8fa8ef1607511d96e82d17a51cf9b9e9963670b6
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-05 Yao Qi <yao.qi@linaro.org>
2
3 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4 * regcache.c (get_thread_regcache): Use VEC_length.
5 (init_register_cache): Likewise.
6 (regcache_cpy): Likewise.
7 (registers_to_string): Iterate reg_defs via VEC_iterate.
8 (find_regno): Likewise.
9 (find_register_by_number): Use VEC_index.
10 (register_size): Call find_register_by_number.
11 (register_data): Call find_register_by_number.
12 (supply_regblock): Use VEC_length.
13 (regcache_raw_read_unsigned): Likewise.
14 * tdesc.c (init_target_desc): Iterate reg_defs via
15 VEC_iterate.
16 (default_description): Update initializer.
17 (copy_target_description): Don't update field num_registers.
18 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
19 <num_registers>: Remove.
20
21 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
22
23 * Makefile.in (.SECONDARY): Define target.
24
25 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
26
27 * linux-low.c (linux_wait_1): Adjust.
28 * server.c (queue_stop_reply_callback): Adjust.
29
30 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
31
32 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
33 QEnvironmentUnset and QEnvironmentReset packets.
34 (handle_query): Inform remote that QEnvironmentHexEncoded,
35 QEnvironmentUnset and QEnvironmentReset are supported.
36
37 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
38
39 * inferiors.h (inferior_target_data): Rename to ...
40 (thread_target_data): ... this.
41 (inferior_regcache_data): Rename to ...
42 (thread_regcache_data): ... this.
43 (set_inferior_regcache_data): Rename to ...
44 (set_thread_regcache_data): ... this.
45 * inferiors.c (inferior_target_data): Rename to ...
46 (thread_target_data): ... this.
47 (inferior_regcache_data): Rename to ...
48 (thread_regcache_data): ... this.
49 (set_inferior_regcache_data): Rename to ...
50 (set_thread_regcache_data): ... this.
51 (free_one_thread): Update.
52 * linux-low.h (get_thread_lwp): Update.
53 * regcache.c (get_thread_regcache): Update.
54 (regcache_invalidate_thread): Update.
55 (free_register_cache_thread): Update.
56 * win32-i386-low.c (update_debug_registers_callback): Update.
57 (win32_get_current_dr): Update.
58 * win32-low.c (thread_rec): Update.
59 (delete_thread_info): Update.
60 (continue_one_thread): Update.
61 (suspend_one_thread): Update.
62
63 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
64
65 * inferiors.c (set_inferior_target_data): Remove.
66 * inferiors.h (set_inferior_target_data): Remove.
67
68 2017-08-18 Yao Qi <yao.qi@linaro.org>
69
70 * Makefile.in (OBS): Add selftest.o.
71 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
72 * configure, config.in: Re-generated.
73 * server.c: Include common/sefltest.h.
74 (captured_main): Handle option --selftest.
75
76 2017-08-09 Yao Qi <yao.qi@linaro.org>
77
78 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
79 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
80 i386-avx-mpx.o and i386-mmx.o.
81 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
82 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
83 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
84 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
85 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
86 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
87 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
88 i386/amd64-avx-mpx.xml.
89
90 2017-08-09 Yao Qi <yao.qi@linaro.org>
91
92 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
93 and x32-avx-avx512.o.
94 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
95 i386/x32-avx-avx512.xml.
96
97 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
98
99 * tracepoint.h (enum class fast_tpoint_collect_result): New
100 enumeration.
101 (fast_tracepoint_collecting): Change return type to
102 fast_tpoint_collect_result.
103 * tracepoint.c (fast_tracepoint_collecting): Likewise.
104 * linux-low.h: Include tracepoint.h.
105 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
106 fast_tpoint_collect_result.
107 * linux-low.c (handle_tracepoints): Adjust.
108 (linux_fast_tracepoint_collecting): Change return type to
109 fast_tpoint_collect_result.
110 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
111 linux_wait_1, stuck_in_jump_pad_callback,
112 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
113 proceed_one_lwp): Adjust to type change.
114
115 2017-07-10 Yao Qi <yao.qi@linaro.org>
116
117 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
118
119 2017-06-29 Yao Qi <yao.qi@linaro.org>
120
121 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
122 Remove.
123 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
124
125 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
126
127 * Makefile.in (IPA_OBJS): Sort and format one item per line.
128
129 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
130
131 * linux-low.c (linux_create_inferior): Adjust code to access the
132 environment information via 'gdb_environ' class.
133 * lynx-low.c (lynx_create_inferior): Likewise.
134 * server.c (our_environ): Make it an instance of 'gdb_environ'.
135 (get_environ): Return a pointer to 'our_environ'.
136 (captured_main): Initialize 'our_environ'.
137 * server.h (get_environ): Adjust prototype.
138 * spu-low.c (spu_create_inferior): Adjust code to access the
139 environment information via 'gdb_environ' class.
140
141 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
142
143 * linux-low.c (linux_read_memory, linux_write_memory): Remove
144 usage of "register" keyword.
145
146 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
147
148 * configure: Re-generate.
149
150 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
151
152 * configure: Re-generate.
153
154 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
155
156 * Makefile.in (COMPILE.pre): Add "-x c++".
157
158 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
159
160 * fork-child.c: Conditionally include <signal.h>.
161
162 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
163
164 * server.c (handle_general_set): Handle new packet
165 "QStartupWithShell".
166 (handle_query): Add "QStartupWithShell" to the list of supported
167 packets.
168 (gdbserver_usage): Add help text explaining the
169 new "--startup-with-shell" and "--no-startup-with-shell" CLI
170 options.
171 (captured_main): Recognize and act upon the presence of the new
172 CLI options.
173
174 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
175 Pedro Alves <palves@redhat.com>
176
177 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
178 * configure: Regenerate.
179 * configure.srv (srv_linux_obj): Add "fork-child.o" and
180 "fork-inferior.o".
181 (i[34567]86-*-lynxos*): Likewise.
182 (spu*-*-*): Likewise.
183 * fork-child.c: New file.
184 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
185 and "environ.h".
186 (linux_ptrace_fun): New function.
187 (linux_create_inferior): Adjust function prototype to reflect
188 change on "target.h". Adjust function code to use
189 "fork_inferior".
190 (linux_request_interrupt): Delete "signal_pid".
191 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
192 (lynx_ptrace_fun): New function.
193 (lynx_create_inferior): Adjust function prototype to reflect
194 change on "target.h". Adjust function code to use
195 "fork_inferior".
196 * nto-low.c (nto_create_inferior): Adjust function prototype and
197 code to reflect change on "target.h". Update comments.
198 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
199 "common-terminal.h" and "environ.h".
200 (terminal_fd): Moved to fork-child.c.
201 (old_foreground_pgrp): Likewise.
202 (restore_old_foreground_pgrp): Likewise.
203 (last_status): Make it global.
204 (last_ptid): Likewise.
205 (our_environ): New variable.
206 (startup_with_shell): Likewise.
207 (program_name): Likewise.
208 (program_argv): Rename to...
209 (program_args): ...this.
210 (wrapper_argv): New variable.
211 (start_inferior): Delete function.
212 (get_exec_wrapper): New function.
213 (get_exec_file): Likewise.
214 (get_environ): Likewise.
215 (prefork_hook): Likewise.
216 (post_fork_inferior): Likewise.
217 (postfork_hook): Likewise.
218 (postfork_child_hook): Likewise.
219 (handle_v_run): Update code to deal with arguments coming from the
220 remote host. Update calls from "start_inferior" to
221 "create_inferior".
222 (captured_main): Likewise. Initialize environment variable. Call
223 "have_job_control".
224 * server.h (post_fork_inferior): New prototype.
225 (get_environ): Likewise.
226 (last_status): Declare.
227 (last_ptid): Likewise.
228 (signal_pid): Likewise.
229 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
230 (spu_ptrace_fun): New function.
231 (spu_create_inferior): Adjust function prototype to reflect change
232 on "target.h". Adjust function code to use "fork_inferior".
233 * target.c (target_terminal_init): New function.
234 (target_terminal_inferior): Likewise.
235 (target_terminal_ours): Likewise.
236 * target.h: Include <vector>.
237 (struct target_ops) <create_inferior>: Update prototype.
238 (create_inferior): Update macro.
239 * utils.c (gdb_flush_out_err): New function.
240 * win32-low.c (win32_create_inferior): Adjust function prototype
241 and code to reflect change on "target.h".
242
243 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
244
245 * inferiors.c (switch_to_thread): New function.
246
247 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
248
249 * Makefile.in (SFILE): Add "common/job-control.c".
250 (OBS): Add "job-control.o".
251
252 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
253
254 * Makefile: Remove "@host_makefile_frag@".
255
256 2017-05-05 Pedro Alves <palves@redhat.com>
257
258 * configure: Regenerate.
259
260 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
261
262 * configure: Regenerate.
263
264 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
265
266 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
267 software_single_step change of return type to
268 std::vector<CORE_ADDR>.
269 * linux-low.c (install_software_single_step_breakpoints):
270 Likewise.
271 * linux-low.h (install_software_single_step_breakpoints):
272 Likewise.
273
274 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
275
276 * remote-utils.c: Include "gdb_termios.h" instead of
277 "terminal.h".
278 * terminal.h: Delete file.
279
280 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
281
282 * server.c: Include <vector>.
283 <program_argv, wrapper_argv>: Convert to std::vector.
284 (start_inferior): Rewrite function to use C++.
285 (handle_v_run): Likewise. Update code that calculates the argv
286 based on the vRun packet; use C++.
287 (captured_main): Likewise.
288
289 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
290
291 * server.c (handle_v_cont): Initialize thread_resume::thread
292 with null_ptid.
293
294 2017-04-05 Pedro Alves <palves@redhat.com>
295
296 * configure: Regenerate.
297
298 2017-04-05 Pedro Alves <palves@redhat.com>
299
300 * gdbreplay.c (sync_error): Constify.
301 * linux-x86-low.c (push_opcode): Constify.
302
303 2017-04-05 Pedro Alves <palves@redhat.com>
304
305 * win32-low.c (get_child_debug_event)
306 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
307 Report TARGET_WAITKIND_SPURIOUS instead.
308
309 2017-04-05 Pedro Alves <palves@redhat.com>
310
311 * remote-utils.c (remote_prepare, remote_open): Constify.
312 * remote-utils.h (remote_prepare, remote_open): Constify.
313 * server.c (captured_main): Constify 'port' handling.
314
315 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
316
317 * Makefile.in (clean): Clear .deps.
318
319 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
320
321 * .gitignore: Remove generated files, replace with wildcard.
322 * (clean): Replace removal of generated files with wildcard.
323 (version.c): Replace with...
324 (version-generated.c): ...this.
325 (xml-builtin.c): Replace with...
326 (xml-builtin-generated.c): ...this.
327 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
328 (%.c: *regformats*): Replace with...
329 (%-generated.c: *regformats*): ...this.
330
331 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
332
333 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
334 (xtensa_fill_gregset): Call collect_register_by_name for
335 threadptr register.
336 (xtensa_store_gregset): Call supply_register_by_name for
337 threadptr register.
338
339 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
340
341 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
342 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
343 (xtensa_store_gregset): Call supply_register for all registers in
344 a0_regnum..a0_regnum + C0_NREGS range.
345
346 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
347
348 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
349 (ax-ipa.o: ax.c): Remove.
350 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
351 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
352 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
353 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
354 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
355
356 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
357
358 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
359 (print-utils-ipa.o: ../common/print-utils.c): Remove.
360 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
361 (errors-ipa.o: ../common/errors.c): Remove.
362 (format-ipa.o: ../common/format.c): Remove.
363 (common-utils-ipa.o: ../common/common-utils.c): Remove.
364
365 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * Makefile.in (%-ipa.o: %.c): New rule.
368 (tracepoint-ipa.o: tracepoint.c): Remove.
369 (utils-ipa.o: utils.c): Remove.
370 (remote-utils-ipa.o: remote-utils.c): Remove.
371 (regcache-ipa.o: regcache.c): Remove.
372 (i386-linux-ipa.o: i386-linux.c): Remove.
373 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
374 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
375 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
376 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
377 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
378 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
379 (amd64-linux-ipa.o: amd64-linux.c): Remove.
380 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
381 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
382 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
383 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
384 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
385 (aarch64-ipa.o: aarch64.c): Remove.
386 (s390-linux32-ipa.o: s390-linux32.c): Remove.
387 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
388 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
389 (s390-linux64-ipa.o: s390-linux64.c): Remove.
390 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
391 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
392 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
393 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
394 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
395 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
396 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
397 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
398 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
399 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
400 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
401 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
402 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
403 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
404 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
405 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
406 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
407 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
408 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
409 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
410 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
411 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
412 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
413 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
414 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
415 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
416 (tdesc-ipa.o: tdesc.c): Remove.
417 (x32-linux-ipa.o: x32-linux.c): Remove.
418 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
419 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
420
421 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
422
423 * Makefile.in (%.o: ../arch/%.c): New rule.
424 (arm.o: ../arch/arm.c): Remove.
425 (arm-linux.o: ../arch/arm-linux.c): Remove.
426 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
427 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
428
429 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
430
431 * Makefile.in (%.o: ../nat/%.c): New rule.
432 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
433 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
434 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
435 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
436 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
437 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
438 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
439 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
440 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
441 (linux-personality.o: ../nat/linux-personality.c): Remove.
442 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
443 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
444 (x86-linux.o: ../nat/x86-linux.c): Remove.
445 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
446 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
447
448 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
449
450 * Makefile.in (%.o: ../common/%.c): New rule.
451 (signals.o: ../common/signals.c): Remove.
452 (print-utils.o: ../common/print-utils.c): Remove.
453 (rsp-low.o: ../common/rsp-low.c): Remove.
454 (common-utils.o: ../common/common-utils.c): Remove.
455 (posix-strerror.o: ../common/posix-strerror.c): Remove.
456 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
457 (vec.o: ../common/vec.c): Remove.
458 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
459 (xml-utils.o: ../common/xml-utils.c): Remove.
460 (ptid.o: ../common/ptid.c): Remove.
461 (buffer.o: ../common/buffer.c): Remove.
462 (format.o: ../common/format.c): Remove.
463 (filestuff.o: ../common/filestuff.c): Remove.
464 (agent.o: ../common/agent.c): Remove.
465 (errors.o: ../common/errors.c): Remove.
466 (environ.o: ../common/environ.c): Remove.
467 (common-debug.o: ../common/common-debug.c): Remove.
468 (cleanups.o: ../common/cleanups.c): Remove.
469 (common-exceptions.o: ../common/common-exceptions.c): Remove.
470 (fileio.o: ../common/fileio.c): Remove.
471 (common-regcache.o: ../common/common-regcache.c): Remove.
472 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
473 (new-op.o: ../common/new-op.c): Remove.
474 (btrace-common.o: ../common/btrace-common.c): Remove.
475
476 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
477
478 * Makefile.in (%.o: ../target/%.c): New rule.
479 (waitstatus.o: ../target/waitstatus.c): Remove.
480
481 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * Makefile.in
484 (%.c: ../regformats/%.dat,
485 (%.c: ../regformats/arm/%.dat,
486 (%.c: ../regformats/i386/%.dat,
487 (%.c: ../regformats/rs6000/%.dat): New rules.
488 (aarch64.c): Remove.
489 (reg-arm.c): Remove.
490 (arm-with-iwmmxt.c): Remove.
491 (arm-with-vfpv2.c): Remove.
492 (arm-with-vfpv3.c): Remove.
493 (arm-with-neon.c): Remove.
494 (reg-bfin.c): Remove.
495 (reg-cris.c): Remove.
496 (reg-crisv32.c): Remove.
497 (i386.c): Remove.
498 (i386-linux.c): Remove.
499 (i386-avx.c): Remove.
500 (i386-avx-linux.c): Remove.
501 (i386-avx-avx512.c): Remove.
502 (i386-avx-avx512-linux.c): Remove.
503 (i386-mpx.c): Remove.
504 (i386-mpx-linux.c): Remove.
505 (i386-avx-mpx-avx512-pku.c): Remove.
506 (i386-avx-mpx-avx512-pku-linux.c): Remove.
507 (i386-avx-mpx.c): Remove.
508 (i386-avx-mpx-linux.c): Remove.
509 (i386-mmx.c): Remove.
510 (i386-mmx-linux.c): Remove.
511 (reg-ia64.c): Remove.
512 (reg-m32r.c): Remove.
513 (reg-m68k.c): Remove.
514 (reg-cf.c): Remove.
515 (mips-linux.c): Remove.
516 (mips-dsp-linux.c): Remove.
517 (mips64-linux.c): Remove.
518 (mips64-dsp-linux.c): Remove.
519 (nios2-linux.c): Remove.
520 (powerpc-32.c): Remove.
521 (powerpc-32l.c): Remove.
522 (powerpc-altivec32l.c): Remove.
523 (powerpc-cell32l.c): Remove.
524 (powerpc-vsx32l.c): Remove.
525 (powerpc-isa205-32l.c): Remove.
526 (powerpc-isa205-altivec32l.c): Remove.
527 (powerpc-isa205-vsx32l.c): Remove.
528 (powerpc-e500l.c): Remove.
529 (powerpc-64l.c): Remove.
530 (powerpc-altivec64l.c): Remove.
531 (powerpc-cell64l.c): Remove.
532 (powerpc-vsx64l.c): Remove.
533 (powerpc-isa205-64l.c): Remove.
534 (powerpc-isa205-altivec64l.c): Remove.
535 (powerpc-isa205-vsx64l.c): Remove.
536 (s390-linux32.c): Remove.
537 (s390-linux32v1.c): Remove.
538 (s390-linux32v2.c): Remove.
539 (s390-linux64.c): Remove.
540 (s390-linux64v1.c): Remove.
541 (s390-linux64v2.c): Remove.
542 (s390-te-linux64.c): Remove.
543 (s390-vx-linux64.c): Remove.
544 (s390-tevx-linux64.c): Remove.
545 (s390x-linux64.c): Remove.
546 (s390x-linux64v1.c): Remove.
547 (s390x-linux64v2.c): Remove.
548 (s390x-te-linux64.c): Remove.
549 (s390x-vx-linux64.c): Remove.
550 (s390x-tevx-linux64.c): Remove.
551 (tic6x-c64xp-linux.c): Remove.
552 (tic6x-c64x-linux.c): Remove.
553 (tic6x-c62x-linux.c): Remove.
554 (reg-sh.c): Remove.
555 (reg-sparc64.c): Remove.
556 (reg-spu.c): Remove.
557 (amd64.c): Remove.
558 (amd64-linux.c): Remove.
559 (amd64-avx.c): Remove.
560 (amd64-avx-linux.c): Remove.
561 (amd64-avx-avx512.c): Remove.
562 (amd64-avx-avx512-linux.c): Remove.
563 (amd64-mpx.c): Remove.
564 (amd64-mpx-linux.c): Remove.
565 (amd64-avx-mpx-avx512-pku.c): Remove.
566 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
567 (amd64-avx-mpx.c): Remove.
568 (amd64-avx-mpx-linux.c): Remove.
569 (x32.c): Remove.
570 (x32-linux.c): Remove.
571 (x32-avx.c): Remove.
572 (x32-avx-linux.c): Remove.
573 (x32-avx-avx512.c): Remove.
574 (x32-avx-avx512-linux.c): Remove.
575 (reg-xtensa.c): Remove.
576 (reg-tilegx.c): Remove.
577 (reg-tilegx32.c): Remove.
578
579 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
580
581 * Makefile.in (SFILES): Add "common/environ.c".
582 (OBJS): Add "common/environ.h".
583
584 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
585
586 * configure.ac: Check if the fs_base and gs_base members of
587 `struct user_regs_struct' exist.
588 * config.in: Regenerated.
589 * configure: Likewise.
590
591 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
592
593 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
594 target_read_memory.
595 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
596 (get_next_pcs_syscall_next_pc): Likewise.
597
598 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
599
600 * win32-i386-low.c: Fix incorrect reference to a couple source files.
601 * nto-x86-low.c: Likewise.
602
603 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
604
605 * Makefile.in: Include disable-implicit-rules.mk.
606
607 2016-11-23 Pedro Alves <palves@redhat.com>
608
609 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
610 (debug_vprintf): Use std::chrono::steady_clock instead of
611 gettimeofday. Use '.' instead of ':'.
612 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
613 (get_timestamp): Use std::chrono::steady_clock instead of
614 gettimeofday.
615
616 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * Makefile.in: Fix whitespace formatting.
619
620 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
621
622 * Makefile.in (SFILES, OBS): Flatten list and order
623 alphabetically.
624
625 2016-11-23 Pedro Alves <palves@redhat.com>
626
627 * event-loop.c (handle_file_event): Use warning.
628 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
629 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
630 Use warning.
631
632 2016-11-23 Pedro Alves <palves@redhat.com>
633
634 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
635 output.
636 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
637 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
638 debug_printf and debug_flush for debug output.
639 * server.c (handle_general_set): Likewise.
640 * thread-db.c (try_thread_db_load): Use debug_printf for debug
641 output.
642
643 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
644
645 * Makefile.in (.c.o): Replace rule with ...
646 (%.o: %.c): ... this one.
647
648 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
649
650 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
651 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
652 make.
653 * configure.ac: Remove checks for the make program.
654 * configure: Re-generate.
655
656 2016-10-28 Pedro Alves <palves@redhat.com>
657
658 * Makefile.in (CXX_DIALECT): Get from configure.
659 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
660 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
661 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
662 * config.in: Regenerate.
663 * configure: Regenerate.
664
665 2016-10-27 Yao Qi <yao.qi@linaro.org>
666
667 * linux-low.c (linux_supports_range_stepping): Return true if
668 can_software_single_step return true.
669
670 2016-10-27 Yao Qi <yao.qi@linaro.org>
671
672 * inferiors.c (find_inferior_in_random): New function.
673 * inferiors.h (find_inferior_in_random): Declare.
674 * linux-low.c (linux_wait_for_event_filtered): Call
675 find_inferior_in_random instead of find_inferior.
676
677 2016-10-27 Yao Qi <yao.qi@linaro.org>
678
679 * linux-low.c (linux_wait_1): If single-step breakpoints are
680 inserted, remove them.
681
682 2016-10-26 Pedro Alves <palves@redhat.com>
683
684 * linux-low.c (handle_extended_wait): Link parent/child fork
685 threads.
686 (linux_wait_1): Unlink them.
687 (linux_set_resume_request): Ignore resume requests for
688 already-resumed and unhandled fork child threads.
689 * linux-low.h (struct lwp_info) <fork_relative>: New field.
690 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
691 New functions.
692 (handle_v_requests) <vCont>: Don't call require_running.
693 * server.h (in_queued_stop_replies): New declaration.
694
695 2016-10-24 Yao Qi <yao.qi@linaro.org>
696
697 PR server/20733
698 * linux-aarch64-low.c (append_insns): Cast the return value to
699 'uint32_t *'.
700
701 2016-10-10 Yao Qi <yao.qi@linaro.org>
702
703 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
704
705 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
706
707 * target.c (target_supports_multi_process): New function, moved
708 from...
709 * target.h (target_supports_multi_process): ... here. Remove
710 macro.
711
712 2016-10-05 Tom Tromey <tom@tromey.com>
713
714 PR remote/20655:
715 * tracepoint.c (handle_tracepoint_bkpts): Check
716 ipa_error_tracepoint, not ipa_stopping_tracepoint.
717
718 2016-10-05 Yao Qi <yao.qi@linaro.org>
719
720 * configure.srv: Update the path of arm-*.xml files.
721
722 2016-10-05 Terry Guo <terry.guo@arm.com>
723 Yao Qi <yao.qi@linaro.org>
724
725 * Makefile.in: Adjust the path of rules.
726 * configure.srv: Update the path of xml files.
727 * regformats/arm-with-iwmmxt.dat: Regenerated.
728 * regformats/arm-with-neon.dat: Likewise.
729 * regformats/arm-with-vfpv2.dat: Likewise.
730 * regformats/arm-with-vfpv3.dat Likewise.
731
732 2016-09-30 Yao Qi <yao.qi@linaro.org>
733
734 PR gdbserver/20627
735 * target.c (target_stop_and_wait): Don't call
736 target_continue_no_signal, use resume_stop instead.
737
738 2016-09-26 Yao Qi <yao.qi@linaro.org>
739
740 * linux-low.c (linux_wait_1): Call debug_exit.
741
742 2016-09-23 Pedro Alves <palves@redhat.com>
743
744 * Makefile.in (SFILES): Add common/new-op.c.
745 (OBS): Add common/new-op.o.
746 (new-op.o): New rule.
747
748 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
749
750 * .gitinore: Ignore more files.
751
752 2016-09-21 Yao Qi <yao.qi@linaro.org>
753
754 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
755 23.
756
757 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
758
759 * server.c (start_inferior): Call target_mourn_inferior instead of
760 mourn_inferior; pass ptid_t argument to it.
761 (resume): Likewise.
762 (handle_target_event): Likewise.
763 * target.c (target_mourn_inferior): New function.
764 * target.h (mourn_inferior): Delete macro.
765
766 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
767
768 * linux-low.c (lwp_is_stepping): New function.
769
770 2016-09-06 Carl Love <cel@us.ibm.com>
771
772 * server.c (start_inferior): Fixed comment, requested comment change
773 didn't get updated correctly. Removed reference to ptrace () call as
774 it is only true on Linux systems.
775
776 2016-09-06 Carl Love <cel@us.ibm.com>
777
778 * server.c (start_inferior): Do not call
779 function target_post_create_inferior () if the
780 inferior process has already exited.
781
782 2016-09-05 Pedro Alves <palves@redhat.com>
783
784 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
785 (COMPILE.pre, CC_LD): Use CXX directly.
786 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
787 * acinclude.m4: Don't include build-with-cxx.m4.
788 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
789 * configure: Regenerate.
790
791 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
792
793 PR gdb/19495
794 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
795 call writing data to own_buf.
796
797 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
798
799 * target.c (mywait): Call target_wait instead of
800 the_target->wait.
801 (target_wait): New function.
802
803 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
804
805 * server.c (start_inferior): New variable 'ptid'. Replace calls
806 to the_target->resume by target_continue{,_no_signal}, depending
807 on the case.
808 * target.c (target_stop_and_wait): Call target_continue_no_signal
809 instead of the_target->resume.
810 (target_continue): New function.
811
812 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
813
814 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
815
816 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
817
818 PR server/20491
819 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
820 ps_prochandle.
821 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
822 * linux-arm-low.c (ps_get_thread_area): Likewise.
823 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
824 * linux-m68k-low.c (ps_get_thread_area): Likewise.
825 * linux-mips-low.c (ps_get_thread_area): Likewise.
826 * linux-nios2-low.c (ps_get_thread_area): Likewise.
827 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
828 * linux-x86-low.c (ps_get_thread_area): Likewise.
829 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
830
831 2016-08-19 Pedro Alves <palves@redhat.com>
832
833 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
834
835 2016-08-19 Pedro Alves <palves@redhat.com>
836
837 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
838 comment. Use memcpy instead of casting through unsigned long.
839
840 2016-08-19 Pedro Alves <palves@redhat.com>
841
842 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
843 allocating around 0x80000000.
844
845 2016-08-19 Pedro Alves <palves@redhat.com>
846
847 PR gdb/20415
848 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
849 (x32-avx512-linux-ipa.o): New rules.
850 * configure.ac (x86_64-*-linux*): New x32 check.
851 * configure.srv (ipa_x32_linux_regobj): New.
852 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
853 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
854 descriptions.
855 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
856 descriptions.
857 * configure: Regenerate.
858
859 2016-08-09 Pedro Alves <palves@redhat.com>
860
861 PR gdb/18653
862 * Makefile.in (OBS): Add signals-state-save-restore.o.
863 (signals-state-save-restore.o): New rule.
864 * config.in: Regenerate.
865 * configure: Regenerate.
866 * linux-low.c: Include "signals-state-save-restore.h".
867 (linux_create_inferior): Call
868 restore_original_signals_state.
869 * server.c: Include "dispositions-save-restore.h".
870 (captured_main): Call save_original_signals_state.
871
872 2016-08-05 Pedro Alves <palves@redhat.com>
873
874 * configure: Regenerate.
875
876 2016-08-04 Yao Qi <yao.qi@linaro.org>
877
878 * linux-low.c (regsets_fetch_inferior_registers): Check
879 errno is ESRCH or not.
880
881 2016-08-02 Yao Qi <yao.qi@linaro.org>
882
883 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
884 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
885 (thread_db_load_search): Update.
886 (try_thread_db_load_1): Don't look for td_ta_event_addr,
887 td_ta_set_event and td_ta_event_getmsg.
888
889 2016-07-26 Pedro Alves <palves@redhat.com>
890
891 PR server/20414
892 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
893 of unsigned long for 64-bit registers and use uint32_t instead of
894 unsigned int for 32-bit registers.
895
896 2016-07-26 Pedro Alves <palves@redhat.com>
897
898 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
899 to 'ptrace'.
900
901 2016-07-21 Tom Tromey <tom@tromey.com>
902
903 * configure: Rebuild.
904
905 2016-07-21 Yao Qi <yao.qi@linaro.org>
906
907 * mem-break.c (find_gdb_breakpoint): Cast bp to
908 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
909
910 2016-07-21 Yao Qi <yao.qi@linaro.org>
911
912 * server.c (handle_v_requests): Support s and S actions
913 if target_supports_software_single_step return true.
914
915 2016-07-21 Yao Qi <yao.qi@linaro.org>
916
917 * linux-low.c (resume_stopped_resumed_lwps): If resume request
918 is resume_step, call maybe_hw_step.
919 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
920 and unstop them.
921 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
922 breakpoints or not.
923 (proceed_one_lwp): If resume request is resume_step, install
924 reinsert breakpoints and call maybe_hw_step.
925
926 2016-07-21 Yao Qi <yao.qi@linaro.org>
927
928 * linux-low.c (proceed_one_lwp): Declare.
929 (linux_resume_one_thread): Remove local variable 'step'.
930 Lift code enqueue signal. Call proceed_one_lwp instead of
931 linux_resume_one_lwp.
932
933 2016-07-21 Yao Qi <yao.qi@linaro.org>
934
935 * linux-low.c (linux_resume_one_thread): Call
936 enqueue_pending_signal.
937
938 2016-07-21 Yao Qi <yao.qi@linaro.org>
939
940 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
941 * inferiors.c (do_restore_current_thread_cleanup): New function.
942 (make_cleanup_restore_current_thread): Likewise.
943 * linux-low.c (install_software_single_step_breakpoints): Call
944 make_cleanup_restore_current_thread. Switch current_thread to
945 thread.
946
947 2016-07-21 Yao Qi <yao.qi@linaro.org>
948
949 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
950 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
951 (clone_one_breakpoint): Likewise.
952 (delete_reinsert_breakpoints): Change parameter to thread.
953 Callers updated.
954 (has_reinsert_breakpoints): Likewise.
955 (uninsert_reinsert_breakpoints): Likewise.
956 (reinsert_reinsert_breakpoints): Likewise.
957 * mem-break.h (set_reinsert_breakpoint): Update declaration.
958 (delete_reinsert_breakpoints): Likewise.
959 (reinsert_reinsert_breakpoints): Likewise.
960 (uninsert_reinsert_breakpoints): Likewise.
961 (has_reinsert_breakpoints): Likewise.
962
963 2016-07-21 Yao Qi <yao.qi@linaro.org>
964
965 * inferiors.c (get_thread_process): Make parameter const.
966 * inferiors.h (get_thread_process): Update declaration.
967 * mem-break.c (clone_all_breakpoints): Remove all parameters.
968 Add new parameters child_thread and parent_thread. Callers
969 updated.
970 * mem-break.h (clone_all_breakpoints): Update declaration.
971
972 2016-07-21 Yao Qi <yao.qi@linaro.org>
973
974 * mem-break.c (struct breakpoint) <cond_list>: Remove.
975 <command_list, handler>: Remove.
976 (struct gdb_breakpoint): New.
977 (struct other_breakpoint): New.
978 (struct reinsert_breakpoint): New.
979 (is_gdb_breakpoint): New function.
980 (any_persistent_commands): Update command_list if
981 is_gdb_breakpoint returns true.
982 (set_breakpoint): Create breakpoints according to their types.
983 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
984 (set_gdb_breakpoint_1): Likewise.
985 (set_gdb_breakpoint): Likewise.
986 (clear_breakpoint_conditions): Change parameter type to
987 'struct gdb_breakpoint *'.
988 (clear_breakpoint_commands): Likewise.
989 (clear_breakpoint_conditions_and_commands): Likewise.
990 (add_condition_to_breakpoint): Likewise.
991 (add_breakpoint_condition): Likewise.
992 (add_commands_to_breakpoint): Likewise.
993 (check_breakpoints): Check other_breakpoint.
994 (clone_one_breakpoint): Clone breakpopint according to its type.
995 * mem-break.h (struct gdb_breakpoint): Declare.
996 (set_gdb_breakpoint): Update declaration.
997 (clear_breakpoint_conditions_and_commands): Likewise.
998 (add_breakpoint_condition): Likewise.
999 (add_breakpoint_commands): Likewise.
1000 * server.c (process_point_options): Change parameter type to
1001 'struct gdb_breakpoint *'.
1002
1003 2016-07-21 Yao Qi <yao.qi@linaro.org>
1004
1005 * mem-break.c (set_breakpoint_at): Rename it to ...
1006 (set_breakpoint_type_at): ... it.
1007 (set_breakpoint_at): Call set_breakpoint_type_at.
1008 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1009 * mem-break.h (set_breakpoint_at): Update comments.
1010
1011 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1012
1013 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1014 to buf parameter.
1015 (nios2_store_gregset): Likewise.
1016
1017 2016-07-01 Pedro Alves <palves@redhat.com>
1018 Antoine Tremblay <antoine.tremblay@ericsson.com>
1019
1020 * linux-low.c: Change interface to take the target lwp_info
1021 pointer directly and return void. Handle detaching from a zombie
1022 thread.
1023 (linux_detach_lwp_callback): New function.
1024 (linux_detach): Detach from the leader thread after detaching from
1025 the clone threads.
1026
1027 2016-06-28 Yao Qi <yao.qi@linaro.org>
1028
1029 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1030 for variable new_offset.
1031 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1032 (aarch64_ftrace_insn_reloc_cb): Likewise.
1033 (aarch64_ftrace_insn_reloc_tb): Likewise.
1034 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1035 PRIx64 instead of PRIx32.
1036
1037 2016-06-28 Yao Qi <yao.qi@linaro.org>
1038
1039 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1040 (the_low_target): Install arm_get_syscall_trapinfo.
1041
1042 2016-06-28 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1045 function.
1046 (the_low_target): Install aarch64_get_syscall_trapinfo.
1047
1048 2016-06-28 Yao Qi <yao.qi@linaro.org>
1049
1050 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1051 Callers updated.
1052 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1053 Remove parameter sysno.
1054 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1055 sysret.
1056
1057 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1058
1059 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1060 (s390_emit_ne_goto): Likewise.
1061 (s390_emit_lt_goto): Likewise.
1062 (s390_emit_le_goto): Likewise.
1063 (s390_emit_gt_goto): Likewise.
1064 (s390_emit_ge_goto): Likewise.
1065 (s390x_emit_eq_goto): Likewise.
1066 (s390x_emit_ne_goto): Likewise.
1067 (s390x_emit_lt_goto): Likewise.
1068 (s390x_emit_le_goto): Likewise.
1069 (s390x_emit_gt_goto): Likewise.
1070 (s390x_emit_ge_goto): Likewise.
1071 (s390_emit_ops_impl): Mark variable static.
1072 (s390x_emit_ops): Likewise.
1073
1074 2016-06-17 Yao Qi <yao.qi@linaro.org>
1075
1076 * linux-low.c (handle_extended_wait): Call
1077 uninsert_reinsert_breakpoints for the parent process. Remove
1078 reinsert breakpoints from the child process. Reinsert them to
1079 the parent process when vfork is done.
1080 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1081 (reinsert_reinsert_breakpoints): New function.
1082 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1083 (reinsert_reinsert_breakpoints): Declare.
1084
1085 2016-06-17 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-low.c (handle_extended_wait): If the parent is doing
1088 step-over, remove the reinsert breakpoints from the forked child.
1089
1090 2016-06-17 Yao Qi <yao.qi@linaro.org>
1091
1092 * linux-low.c (unsuspend_all_lwps): Declare.
1093 (linux_low_filter_event): If thread exited, call finish_step_over.
1094 If step-over is finished, unsuspend other threads.
1095
1096 2016-06-17 Yao Qi <yao.qi@linaro.org>
1097
1098 * linux-low.c (linux_resume_one_lwp_throw): Assert
1099 has_reinsert_breakpoints returns false.
1100 * mem-break.c (delete_disabled_breakpoints): Assert
1101 bp type isn't reinsert_breakpoint.
1102
1103 2016-06-17 Yao Qi <yao.qi@linaro.org>
1104
1105 * linux-low.c (maybe_hw_step): New function.
1106 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1107 (finish_step_over): Switch current_thread to lwp temporarily,
1108 and assert has_reinsert_breakpoints returns true.
1109 (proceed_one_lwp): Call maybe_hw_step.
1110 * mem-break.c (has_reinsert_breakpoints): New function.
1111 * mem-break.h (has_reinsert_breakpoints): Declare.
1112
1113 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1114
1115 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1116
1117 2016-05-17 Yao Qi <yao.qi@linaro.org>
1118
1119 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1120 instead of find_inferior.
1121
1122 2016-05-05 Yao Qi <yao.qi@linaro.org>
1123
1124 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1125 Initialize res to zero.
1126
1127 2016-05-05 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1130 to uint32_t.
1131
1132 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1133
1134 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1135 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1136 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1137
1138 2016-04-28 Par Olsson <par.olsson@windriver.com>
1139 Simon Marchi <simon.marchi@ericsson.com>
1140
1141 * tracepoint.c (write_inferior_int8): New function.
1142 (cmd_qtenable_disable): Write enable flag using
1143 write_inferior_int8.
1144
1145 2016-04-25 Yao Qi <yao.qi@linaro.org>
1146
1147 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1148 (need_step_over_p): Return zero if the LWP has pending signals
1149 can be delivered on software single step target.
1150
1151 2016-04-25 Yao Qi <yao.qi@linaro.org>
1152
1153 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1154 return instead of error.
1155
1156 2016-04-22 Yao Qi <yao.qi@linaro.org>
1157
1158 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1159 to 23.
1160
1161 2016-04-22 Yao Qi <yao.qi@linaro.org>
1162
1163 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1164 signal when stepping over breakpoint with software single
1165 step.
1166
1167 2016-04-21 Pedro Alves <palves@redhat.com>
1168
1169 * linux-s390-low.c (s390_collect_ptrace_register)
1170 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1171 add casts.
1172 (s390_check_regset): Use void * instead of gdb_byte *.
1173
1174 2016-04-20 Pedro Alves <palves@redhat.com>
1175
1176 * configure: Renegerate.
1177
1178 2016-04-20 Yao Qi <yao.qi@linaro.org>
1179
1180 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1181 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1182 number 16.
1183 (arm_store_gregset): Likewise.
1184
1185 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1186
1187 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1188 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1189 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1190 (amd64-avx-mpx-linux.c): New rules.
1191 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1192 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1193 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1194 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1195 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1196 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1197 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1198 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1199 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1200 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1201 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1202 * linux-x86-low.c (x86_linux_read_description): Add case for
1203 X86_XSTATE_AVX_MPX_MASK.
1204 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1205 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1206 init_registers_i386_avx_mpx_linux.
1207 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1208 (initialize_low_tracepoint): Call
1209 init_registers_i386_avx_mpx_linux.
1210 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1211 (initialize_low_tracepoint): Call
1212 init_registers_amd64_avx_mpx_linux.
1213 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1214 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1215 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1216 declarations.
1217
1218 2016-04-18 Pedro Alves <palves@redhat.com>
1219
1220 * configure: Regenerate.
1221
1222 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1223
1224 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1225 (aarch64_emit_sub): Likewise.
1226
1227 2016-04-12 Pedro Alves <palves@redhat.com>
1228
1229 * utils.c (prepare_to_throw_exception): Delete.
1230
1231 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1232
1233 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1234
1235 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1236
1237 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1238
1239 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1240
1241 * linux-aarch64-ipa.c: Add <elf.h> include.
1242 * linux-ppc-ipa.c: Add <elf.h> include.
1243 * linux-s390-ipa.c: Add <elf.h> include.
1244
1245 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1246
1247 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1248 (get_raw_reg_ptr): Likewise.
1249 (get_trace_state_variable_value_ptr): Likewise.
1250 (set_trace_state_variable_value_ptr): Likewise.
1251 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1252 char *.
1253
1254 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1255 Marcin Kościelnicki <koriakin@0x04.net>
1256
1257 PR/17221
1258 * linux-ppc-low.c (emit_insns): New function.
1259 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1260 (ppc_emit_prologue): New function.
1261 (ppc_emit_epilogue): New function.
1262 (ppc_emit_add): New function.
1263 (ppc_emit_sub): New function.
1264 (ppc_emit_mul): New function.
1265 (ppc_emit_lsh): New function.
1266 (ppc_emit_rsh_signed): New function.
1267 (ppc_emit_rsh_unsigned): New function.
1268 (ppc_emit_ext): New function.
1269 (ppc_emit_zero_ext): New function.
1270 (ppc_emit_log_not): New function.
1271 (ppc_emit_bit_and): New function.
1272 (ppc_emit_bit_or): New function.
1273 (ppc_emit_bit_xor): New function.
1274 (ppc_emit_bit_not): New function.
1275 (ppc_emit_equal): New function.
1276 (ppc_emit_less_signed): New function.
1277 (ppc_emit_less_unsigned): New function.
1278 (ppc_emit_ref): New function.
1279 (ppc_emit_const): New function.
1280 (ppc_emit_reg): New function.
1281 (ppc_emit_pop): New function.
1282 (ppc_emit_stack_flush): New function.
1283 (ppc_emit_swap): New function.
1284 (ppc_emit_stack_adjust): New function.
1285 (ppc_emit_call): New function.
1286 (ppc_emit_int_call_1): New function.
1287 (ppc_emit_void_call_2): New function.
1288 (ppc_emit_if_goto): New function.
1289 (ppc_emit_goto): New function.
1290 (ppc_emit_eq_goto): New function.
1291 (ppc_emit_ne_goto): New function.
1292 (ppc_emit_lt_goto): New function.
1293 (ppc_emit_le_goto): New function.
1294 (ppc_emit_gt_goto): New function.
1295 (ppc_emit_ge_goto): New function.
1296 (ppc_write_goto_address): New function.
1297 (ppc_emit_ops_impl): New static variable.
1298 (ppc64v1_emit_prologue): New function.
1299 (ppc64v2_emit_prologue): New function.
1300 (ppc64_emit_epilogue): New function.
1301 (ppc64_emit_add): New function.
1302 (ppc64_emit_sub): New function.
1303 (ppc64_emit_mul): New function.
1304 (ppc64_emit_lsh): New function.
1305 (ppc64_emit_rsh_signed): New function.
1306 (ppc64_emit_rsh_unsigned): New function.
1307 (ppc64_emit_ext): New function.
1308 (ppc64_emit_zero_ext): New function.
1309 (ppc64_emit_log_not): New function.
1310 (ppc64_emit_bit_and): New function.
1311 (ppc64_emit_bit_or): New function.
1312 (ppc64_emit_bit_xor): New function.
1313 (ppc64_emit_bit_not): New function.
1314 (ppc64_emit_equal): New function.
1315 (ppc64_emit_less_signed): New function.
1316 (ppc64_emit_less_unsigned): New function.
1317 (ppc64_emit_ref): New function.
1318 (ppc64_emit_const): New function.
1319 (ppc64v1_emit_reg): New function.
1320 (ppc64v2_emit_reg): New function.
1321 (ppc64_emit_pop): New function.
1322 (ppc64_emit_stack_flush): New function.
1323 (ppc64_emit_swap): New function.
1324 (ppc64v1_emit_call): New function.
1325 (ppc64v2_emit_call): New function.
1326 (ppc64v1_emit_int_call_1): New function.
1327 (ppc64v2_emit_int_call_1): New function.
1328 (ppc64v1_emit_void_call_2): New function.
1329 (ppc64v2_emit_void_call_2): New function.
1330 (ppc64_emit_if_goto): New function.
1331 (ppc64_emit_eq_goto): New function.
1332 (ppc64_emit_ne_goto): New function.
1333 (ppc64_emit_lt_goto): New function.
1334 (ppc64_emit_le_goto): New function.
1335 (ppc64_emit_gt_goto): New function.
1336 (ppc64_emit_ge_goto): New function.
1337 (ppc64v1_emit_ops_impl): New static variable.
1338 (ppc64v2_emit_ops_impl): New static variable.
1339 (ppc_emit_ops): New function.
1340 (linux_low_target): Wire in ppc_emit_ops.
1341
1342 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1343 Marcin Kościelnicki <koriakin@0x04.net>
1344
1345 PR/17221
1346 * Makefile.in: Add powerpc-*-ipa.o
1347 * configure.srv: Add ipa_obj for powerpc*-linux.
1348 * linux-ppc-ipa.c: New file.
1349 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1350 includes.
1351 (PPC_FIELD): New macro.
1352 (PPC_SEXT): New macro.
1353 (PPC_OP6): New macro.
1354 (PPC_BO): New macro.
1355 (PPC_LI): New macro.
1356 (PPC_BD): New macro.
1357 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1358 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1359 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1360 (ppc_get_thread_area): New function.
1361 (is_elfv2_inferior): New function.
1362 (gen_ds_form): New function.
1363 (GEN_STD): New macro.
1364 (GEN_STDU): New macro.
1365 (GEN_LD): New macro.
1366 (GEN_LDU): New macro.
1367 (gen_d_form): New function.
1368 (GEN_ADDI): New macro.
1369 (GEN_ADDIS): New macro.
1370 (GEN_LI): New macro.
1371 (GEN_LIS): New macro.
1372 (GEN_ORI): New macro.
1373 (GEN_ORIS): New macro.
1374 (GEN_LWZ): New macro.
1375 (GEN_STW): New macro.
1376 (GEN_STWU): New macro.
1377 (gen_xfx_form): New function.
1378 (GEN_MFSPR): New macro.
1379 (GEN_MTSPR): New macro.
1380 (GEN_MFCR): New macro.
1381 (GEN_MTCR): New macro.
1382 (GEN_SYNC): New macro.
1383 (GEN_LWSYNC): New macro.
1384 (gen_x_form): New function.
1385 (GEN_OR): New macro.
1386 (GEN_MR): New macro.
1387 (GEN_LWARX): New macro.
1388 (GEN_STWCX): New macro.
1389 (GEN_CMPW): New macro.
1390 (gen_md_form): New function.
1391 (GEN_RLDICL): New macro.
1392 (GEN_RLDICR): New macro.
1393 (gen_i_form): New function.
1394 (GEN_B): New macro.
1395 (GEN_BL): New macro.
1396 (gen_b_form): New function.
1397 (GEN_BNE): New macro.
1398 (GEN_LOAD): New macro.
1399 (GEN_STORE): New macro.
1400 (gen_limm): New function.
1401 (gen_atomic_xchg): New function.
1402 (gen_call): New function.
1403 (ppc_relocate_instruction): New function.
1404 (ppc_install_fast_tracepoint_jump_pad): New function.
1405 (ppc_get_min_fast_tracepoint_insn_len): New function.
1406 (ppc_get_ipa_tdesc_idx): New function.
1407 (the_low_target): Wire in the new functions.
1408 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1409 tdescs.
1410 * linux-ppc-tdesc.h: New file.
1411
1412 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1413
1414 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1415 (alloc_jump_pad_buffer): New function.
1416 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1417 (alloc_jump_pad_buffer): New function.
1418 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1419 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1420 (alloc_jump_pad_buffer): New function.
1421 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1422 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1423 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1424 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1425
1426 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1427
1428 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1429 * linux-amd64-ipa.c: Likewise.
1430 * linux-i386-ipa.c: Likewise.
1431 * linux-s390-ipa.c: Likewise.
1432 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1433 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1434 set_trace_state_variable_value_ptr.
1435 (struct ipa_sym_addresses): Likewise.
1436 (symbol_list): Likewise.
1437 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1438 accessing gdb_collect directly.
1439 (gdb_collect_ptr_type): New typedef.
1440 (get_raw_reg_ptr_type): New typedef.
1441 (get_trace_state_variable_value_ptr_type): New typedef.
1442 (set_trace_state_variable_value_ptr_type): New typedef.
1443 (gdb_collect_ptr): New global.
1444 (get_raw_reg_ptr): New global.
1445 (get_trace_state_variable_value_ptr): New global.
1446 (set_trace_state_variable_value_ptr): New global.
1447 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1448 accessing get_raw_reg directly.
1449 (get_get_tsv_func_addr): Likewise for
1450 get_trace_state_variable_value_ptr.
1451 (get_set_tsv_func_addr): Likewise for
1452 set_trace_state_variable_value_ptr.
1453 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1454
1455 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1458
1459 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1460
1461 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1462 packets.
1463 (relocate_instruction): Remove own_buf.
1464 * server.c (own_buf): Make global.
1465 (handle_v_requests): Make global.
1466 * server.h (own_buf): New declaration.
1467 (handle_v_requests): New prototype.
1468
1469 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1470
1471 PR 18377
1472 * linux-s390-low.c (add_insns): New function.
1473 (s390_emit_prologue): New function.
1474 (s390_emit_epilogue): New function.
1475 (s390_emit_add): New function.
1476 (s390_emit_sub): New function.
1477 (s390_emit_mul): New function.
1478 (s390_emit_lsh): New function.
1479 (s390_emit_rsh_signed): New function.
1480 (s390_emit_rsh_unsigned): New function.
1481 (s390_emit_ext): New function.
1482 (s390_emit_log_not): New function.
1483 (s390_emit_bit_and): New function.
1484 (s390_emit_bit_or): New function.
1485 (s390_emit_bit_xor): New function.
1486 (s390_emit_bit_not): New function.
1487 (s390_emit_equal): New function.
1488 (s390_emit_less_signed): New function.
1489 (s390_emit_less_unsigned): New function.
1490 (s390_emit_ref): New function.
1491 (s390_emit_if_goto): New function.
1492 (s390_emit_goto): New function.
1493 (s390_write_goto_address): New function.
1494 (s390_emit_litpool): New function.
1495 (s390_emit_const): New function.
1496 (s390_emit_call): New function.
1497 (s390_emit_reg): New function.
1498 (s390_emit_pop): New function.
1499 (s390_emit_stack_flush): New function.
1500 (s390_emit_zero_ext): New function.
1501 (s390_emit_swap): New function.
1502 (s390_emit_stack_adjust): New function.
1503 (s390_emit_set_r2): New function.
1504 (s390_emit_int_call_1): New function.
1505 (s390_emit_void_call_2): New function.
1506 (s390_emit_eq_goto): New function.
1507 (s390_emit_ne_goto): New function.
1508 (s390_emit_lt_goto): New function.
1509 (s390_emit_le_goto): New function.
1510 (s390_emit_gt_goto): New function.
1511 (s390_emit_ge_goto): New function.
1512 (s390x_emit_prologue): New function.
1513 (s390x_emit_epilogue): New function.
1514 (s390x_emit_add): New function.
1515 (s390x_emit_sub): New function.
1516 (s390x_emit_mul): New function.
1517 (s390x_emit_lsh): New function.
1518 (s390x_emit_rsh_signed): New function.
1519 (s390x_emit_rsh_unsigned): New function.
1520 (s390x_emit_ext): New function.
1521 (s390x_emit_log_not): New function.
1522 (s390x_emit_bit_and): New function.
1523 (s390x_emit_bit_or): New function.
1524 (s390x_emit_bit_xor): New function.
1525 (s390x_emit_bit_not): New function.
1526 (s390x_emit_equal): New function.
1527 (s390x_emit_less_signed): New function.
1528 (s390x_emit_less_unsigned): New function.
1529 (s390x_emit_ref): New function.
1530 (s390x_emit_if_goto): New function.
1531 (s390x_emit_const): New function.
1532 (s390x_emit_call): New function.
1533 (s390x_emit_reg): New function.
1534 (s390x_emit_pop): New function.
1535 (s390x_emit_stack_flush): New function.
1536 (s390x_emit_zero_ext): New function.
1537 (s390x_emit_swap): New function.
1538 (s390x_emit_stack_adjust): New function.
1539 (s390x_emit_int_call_1): New function.
1540 (s390x_emit_void_call_2): New function.
1541 (s390x_emit_eq_goto): New function.
1542 (s390x_emit_ne_goto): New function.
1543 (s390x_emit_lt_goto): New function.
1544 (s390x_emit_le_goto): New function.
1545 (s390x_emit_gt_goto): New function.
1546 (s390x_emit_ge_goto): New function.
1547 (s390_emit_ops): New function.
1548 (struct linux_target_ops): Fill in emit_ops hook.
1549
1550 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1551
1552 PR 18377
1553 * Makefile.in: Add s390 IPA files.
1554 * configure.srv: Build IPA for s390.
1555 * linux-s390-ipa.c: New file.
1556 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1557 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1558 (tdesc_s390_linux32): Likewise.
1559 (init_registers_s390_linux32v1): Likewise.
1560 (tdesc_s390_linux32v1): Likewise.
1561 (init_registers_s390_linux32v2): Likewise.
1562 (tdesc_s390_linux32v2): Likewise.
1563 (init_registers_s390_linux64): Likewise.
1564 (tdesc_s390_linux64): Likewise.
1565 (init_registers_s390_linux64v1): Likewise.
1566 (tdesc_s390_linux64v1): Likewise.
1567 (init_registers_s390_linux64v2): Likewise.
1568 (tdesc_s390_linux64v2): Likewise.
1569 (init_registers_s390_te_linux64): Likewise.
1570 (tdesc_s390_te_linux64): Likewise.
1571 (init_registers_s390_vx_linux64): Likewise.
1572 (tdesc_s390_vx_linux64): Likewise.
1573 (init_registers_s390_tevx_linux64): Likewise.
1574 (tdesc_s390_tevx_linux64): Likewise.
1575 (init_registers_s390x_linux64): Likewise.
1576 (tdesc_s390x_linux64): Likewise.
1577 (init_registers_s390x_linux64v1): Likewise.
1578 (tdesc_s390x_linux64v1): Likewise.
1579 (init_registers_s390x_linux64v2): Likewise.
1580 (tdesc_s390x_linux64v2): Likewise.
1581 (init_registers_s390x_te_linux64): Likewise.
1582 (tdesc_s390x_te_linux64): Likewise.
1583 (init_registers_s390x_vx_linux64): Likewise.
1584 (tdesc_s390x_vx_linux64): Likewise.
1585 (init_registers_s390x_tevx_linux64): Likewise.
1586 (tdesc_s390x_tevx_linux64): Likewise.
1587 (have_hwcap_s390_vx): New static variable.
1588 (s390_arch_setup): Fill have_hwcap_s390_vx.
1589 (s390_get_thread_area): New function.
1590 (s390_ft_entry_gpr_esa): New const.
1591 (s390_ft_entry_gpr_zarch): New const.
1592 (s390_ft_entry_misc): New const.
1593 (s390_ft_entry_fr): New const.
1594 (s390_ft_entry_vr): New const.
1595 (s390_ft_main_31): New const.
1596 (s390_ft_main_64): New const.
1597 (s390_ft_exit_fr): New const.
1598 (s390_ft_exit_vr): New const.
1599 (s390_ft_exit_misc): New const.
1600 (s390_ft_exit_gpr_esa): New const.
1601 (s390_ft_exit_gpr_zarch): New const.
1602 (append_insns): New function.
1603 (s390_relocate_instruction): New function.
1604 (s390_install_fast_tracepoint_jump_pad): New function.
1605 (s390_get_min_fast_tracepoint_insn_len): New function.
1606 (s390_get_ipa_tdesc_idx): New function.
1607 (struct linux_target_ops): Wire in the above functions.
1608 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1609 * linux-s390-tdesc.h: New file.
1610
1611 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1612
1613 * linux-s390-low.c (s390_supports_tracepoints): New function.
1614 (struct linux_target_ops): Fill supports_tracepoints hook.
1615
1616 2016-03-18 Yao Qi <yao.qi@linaro.org>
1617
1618 * linux-low.c (lwp_signal_can_be_delivered): New function.
1619 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1620
1621 2016-03-18 Yao Qi <yao.qi@linaro.org>
1622
1623 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1624 0 if signal is enqueued. Remove 'signal' from one debugging
1625 message. Move one debugging message to some lines below.
1626 Remove code setting 'signal' to 0.
1627
1628 2016-03-18 Yao Qi <yao.qi@linaro.org>
1629
1630 * linux-low.c (linux_low_filter_event): Remove redundant
1631 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1632
1633 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1634
1635 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1636 (struct linux_target_ops): Wire in the above.
1637
1638 2016-03-03 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-low.c: Update comments to start_step_over.
1641
1642 2016-03-03 Yao Qi <yao.qi@linaro.org>
1643
1644 PR server/19736
1645 * linux-low.c (handle_extended_wait): Set child suspended
1646 if event_lwp->bp_reinsert isn't zero.
1647
1648 2016-03-02 Yao Qi <yao.qi@linaro.org>
1649
1650 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1651 enqueue_pending_signal.
1652
1653 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1654
1655 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1656 is actually loaded.
1657
1658 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1659
1660 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1661 (s390_regmap_3264) [!__s390x__]: New global.
1662 (s390_collect_ptrace_register): Skip map entries containing -1.
1663 (s390_supply_ptrace_register): Ditto.
1664 (s390_fill_gprs_high): New function.
1665 (s390_store_gprs_high): New function.
1666 (s390_regsets): Add NT_S390_HIGH_GPRS.
1667 (s390_get_hwcap): Enable on 31-bit.
1668 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1669 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1670 Detect NT_S390_HIGH_GPRS.
1671 (s390_usrregs_info_3264): Enable on 31-bit.
1672 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1673 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1674
1675 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1676
1677 PR gdb/13808
1678 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1679 * configure.srv: Ditto.
1680 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1681 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1682 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1683 (init_registers_amd64_linux): Remove prototype.
1684 (tdesc_amd64_linux): Remove declaration.
1685 (get_ipa_tdesc): New function.
1686 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1687 initialize remaining tdescs.
1688 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1689 (init_registers_i386_linux): Remove prototype.
1690 (tdesc_i386_linux): Remove declaration.
1691 (get_ipa_tdesc): New function.
1692 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1693 initialize remaining tdescs.
1694 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1695 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1696 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1697 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1698 (x86_get_ipa_tdesc_idx): New function.
1699 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1700 * linux-x86-tdesc.h: New file.
1701 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1702 (target_get_ipa_tdesc_idx): New macro.
1703 * tracepoint.c (ipa_tdesc_idx): New macro.
1704 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1705 (symbol_list): Add ipa_tdesc_idx.
1706 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1707 (ipa_tdesc): Remove.
1708 (ipa_tdesc_idx): New variable.
1709 (get_context_regcache): Use get_ipa_tdesc.
1710 (gdb_collect): Ditto.
1711 (gdb_probe): Ditto.
1712 * tracepoint.h (get_ipa_tdesc): New prototype.
1713 (ipa_tdesc): Remove.
1714
1715 2016-02-24 Pedro Alves <palves@redhat.com>
1716
1717 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1718 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1719 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1720 Factor out common code between the USE_SIGTRAP_SIGINFO and
1721 !USE_SIGTRAP_SIGINFO blocks.
1722 (linux_low_filter_event): Call save_stop_reason instead of
1723 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1724 Update comments.
1725 (linux_wait_1): Update comments.
1726
1727 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1728
1729 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1730 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1731 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1732 ppc_insert_point, ppc_remove_point.
1733
1734 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1735
1736 * linux-s390-low.c (s390_supports_z_point_type): New function.
1737 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1738
1739 2016-02-16 Yao Qi <yao.qi@linaro.org>
1740
1741 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1742 PC. Get pc from regcache_read_pc.
1743
1744 2016-02-12 Yao Qi <yao.qi@linaro.org>
1745
1746 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1747 or linux_get_pc_32bit.
1748 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1749
1750 2016-02-12 Yao Qi <yao.qi@linaro.org>
1751
1752 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1753 arm_linux_get_next_pcs_fixup.
1754
1755 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1756
1757 * tracepoint.c (x_tracepoint_action_download): Change
1758 write_inferior_data_ptr to write_inferior_data_pointer.
1759 (cmd_qtstart): Likewise.
1760 (write_inferior_data_ptr): Remove.
1761 (download_agent_expr): Change write_inferior_data_ptr to
1762 write_inferior_data_pointer.
1763 (download_tracepoint_1): Likewise.
1764 (download_tracepoint): Likewise.
1765 (download_trace_state_variables): Likewise.
1766
1767 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1768 Marcin Kościelnicki <koriakin@0x04.net>
1769
1770 * tracepoint.c (struct tracepoint_action_ops): Remove.
1771 (struct tracepoint_action): Remove ops.
1772 (m_tracepoint_action_download, r_tracepoint_action_download)
1773 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1774 size and offset accordingly.
1775 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1776 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1777 (tracepoint_action_send, tracepoint_action_download): New functions.
1778 Helpers for trace action handlers.
1779 (add_tracepoint_action): Remove setup actions ops.
1780 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1781
1782 2016-02-10 Yao Qi <yao.qi@linaro.org>
1783
1784 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1785
1786 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1787
1788 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1789 to AC_OUTPUT.
1790 * configure: Regenerate.
1791
1792 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1795 void * to gdb_byte *.
1796 * linux-low.c (siginfo_fixup): Likewise.
1797 (linux_xfer_siginfo): Likewise.
1798 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1799 Likewise.
1800 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1801
1802 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1803
1804 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1805 to srv_tgtobj.
1806 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1807 to srv_tgtobj.
1808 * linux-x86-low.c [__x86_64__]: Include
1809 "nat/amd64-linux-siginfo.h".
1810 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1811 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1812 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1813 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1814 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1815 (cpt_si_fd, si_timerid, si_overrun): Move from
1816 nat/amd64-linux-siginfo.c.
1817 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1818
1819 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1820
1821 * server.c (skip_to_semicolon): Remove.
1822 (process_point_options): Use strchrnul instead of
1823 skip_to_semicolon.
1824
1825 2016-01-26 Yao Qi <yao.qi@linaro.org>
1826
1827 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1828 * linux-low.c (install_software_single_step_breakpoints): Don't
1829 call regcache_read_pc.
1830 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1831 argument pc.
1832
1833 2016-01-26 Yao Qi <yao.qi@linaro.org>
1834
1835 * linux-low.c (install_software_single_step_breakpoints): Call
1836 regcache_read_pc instead of get_pc.
1837
1838 2016-01-26 Yao Qi <yao.qi@linaro.org>
1839
1840 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1841 (unblock_async_io): Rename to ...
1842 (block_unblock_async_io): ... it. New function.
1843 (enable_async_io): Don't install SIGIO handler. Unblock it
1844 instead.
1845 (disable_async_io): Don't ignore SIGIO. Block it instead.
1846 (initialize_async_io): Install SIGIO handler. Don't call
1847 unblock_async_io.
1848
1849 2016-01-26 Yao Qi <yao.qi@linaro.org>
1850
1851 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1852 first character is '\003', call *the_target->request_interrupt.
1853
1854 2016-01-25 Yao Qi <yao.qi@linaro.org>
1855
1856 * remote-utils.c (new_thread_notify): Remove.
1857 (dead_thread_notify): Likewise.
1858 * remote-utils.h (new_thread_notify): Remove declaration.
1859 (dead_thread_notify): Likewise.
1860
1861 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1862
1863 * gdb.trace/pending.exp: Fix expected message on continue.
1864
1865 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1866
1867 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1868 it works properly on big-endian machines where sizeof (CORE_ADDR)
1869 != sizeof (void *).
1870
1871 2016-01-21 Pedro Alves <palves@redhat.com>
1872
1873 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1874 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1875 * configure: Regenerate.
1876
1877 2016-01-21 Yao Qi <yao.qi@linaro.org>
1878
1879 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1880 is_thumb and set it according to CPSR saved on the stack.
1881 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1882 arm_sigreturn_next_pc.
1883
1884 2016-01-18 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-low.c (linux_set_pc_64bit): New function.
1887 (linux_get_pc_64bit): New function.
1888 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1889 Declare.
1890 * linux-sparc-low.c (debug_threads): Remove declaration.
1891 (sparc_get_pc): Remove.
1892 (the_low_target): Use linux_get_pc_64bit instead of
1893 sparc_get_pc.
1894 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1895 (the_low_target): Use linux_get_pc_64bit and
1896 linux_set_pc_64bit.
1897
1898 2016-01-18 Yao Qi <yao.qi@linaro.org>
1899
1900 * linux-arm-low.c (debug_threads): Remove declaration.
1901 (arm_get_pc, arm_set_pc): Remove.
1902 (the_low_target): Use linux_get_pc_32bit and
1903 linux_set_pc_32bit.
1904 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1905 (the_low_target): Use linux_get_pc_32bit and
1906 linux_set_pc_32bit.
1907 * linux-cris-low.c (debug_threads): Remove declaration.
1908 (cris_get_pc, cris_set_pc,): Remove.
1909 (the_low_target): Use linux_get_pc_32bit and
1910 linux_set_pc_32bit.
1911 * linux-crisv32-low.c (debug_threads): Remove declaration.
1912 (cris_get_pc, cris_set_pc): Remove.
1913 (the_low_target): Use linux_get_pc_32bit and
1914 linux_set_pc_32bit.
1915 * linux-low.c: Include inttypes.h.
1916 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1917 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1918 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1919 (the_low_target): Use linux_get_pc_32bit and
1920 linux_set_pc_32bit.
1921 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1922 (the_low_target): Use linux_get_pc_32bit and
1923 linux_set_pc_32bit.
1924 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1925 (the_low_target): Use linux_get_pc_32bit and
1926 linux_set_pc_32bit.
1927 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1928 (the_low_target): Use linux_get_pc_32bit and
1929 linux_set_pc_32bit.
1930 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1931 (the_low_target): Use linux_get_pc_32bit and
1932 linux_set_pc_32bit.
1933
1934 2016-01-18 Gary Benson <gbenson@redhat.com>
1935
1936 * configure.ac (AC_FUNC_FORK): New check.
1937 * config.in: Regenerate.
1938 * configure: Likewise.
1939
1940 2016-01-14 Yao Qi <yao.qi@linaro.org>
1941
1942 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1943 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1944 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1945 arm_get_next_pcs_ctor.
1946
1947 2016-01-12 Josh Stone <jistone@redhat.com>
1948 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1949
1950 * inferiors.h: Include "gdb_vecs.h".
1951 (struct process_info): Add syscalls_to_catch.
1952 * inferiors.c (remove_process): Free syscalls_to_catch.
1953 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1954 syscall_return stops.
1955 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1956 * server.c (handle_general_set): Handle QCatchSyscalls.
1957 (handle_query): Report support for QCatchSyscalls.
1958 * target.h (struct target_ops): Add supports_catch_syscall.
1959 (target_supports_catch_syscall): New macro.
1960 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1961 (struct lwp_info): Add syscall_state.
1962 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1963 Maintain syscall_state and syscalls_to_catch across exec.
1964 (get_syscall_trapinfo): New function, proxy to the_low_target.
1965 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1966 (linux_low_filter_event): Toggle syscall_state entry/return for
1967 syscall traps, and set it ignored for all others.
1968 (gdb_catching_syscalls_p): New function.
1969 (gdb_catch_this_syscall_p): New function.
1970 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1971 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1972 (linux_supports_catch_syscall): New function.
1973 (linux_target_ops): Install it.
1974 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1975 (the_low_target): Install it.
1976
1977 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1978
1979 * acinclude.m4: Include new ../warning.m4 file.
1980 * configure: Regenerated.
1981 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1982
1983 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1984
1985 * ax.c (is_goto_target): Mark static.
1986 * linux-low.c (register_addr): Likewise.
1987 (linux_fetch_registers, linux_store_registers): Likewise.
1988 * mem-break.c (any_persistent_commands): Fix old prototype.
1989 (add_commands_to_breakpoint): Mark static.
1990 * regcache.c (find_register_by_name): Delete unused func.
1991 * remote-utils.c (hex_or_minus_one): Mark static.
1992 * server.c (monitor_show_help): Mark static.
1993 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1994 handle_v_requests): Likewise.
1995
1996 2016-01-12 Pedro Alves <palves@redhat.com>
1997
1998 Remove use of the registered trademark symbol throughout.
1999
2000 2016-01-08 Yao Qi <yao.qi@linaro.org>
2001
2002 * remote-utils.c (getpkt): If c is '\003', call target hook
2003 request_interrupt.
2004
2005 2016-01-06 Yao Qi <yao.qi@linaro.org>
2006
2007 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2008 linux-aarch32-low.c.
2009 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2010 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2011 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2012 (thumb2_breakpoint): Declare.
2013 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2014 linux-aarch32-low.h.
2015 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2016 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2017 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2018
2019 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2020
2021 * gdbreplay.c (gdbreplay_version): Change copyright year in
2022 version message.
2023 * server.c (gdbserver_version): Likewise.
2024
2025 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2026
2027 * server.c (crc32_table): Delete.
2028 (crc32): Use libiberty's xcrc32 function.
2029
2030 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2031
2032 * lynx-low.c (lynx_delete_thread_callback): New function.
2033 (lynx_mourn): Properly delete our process and all of its
2034 threads. Remove call to clear_inferiors.
2035
2036 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2037
2038 * target.c (thread_search_callback): Add check that
2039 the thread_stopped target callback is not NULL before
2040 calling it.
2041
2042 2015-12-21 Yao Qi <yao.qi@linaro.org>
2043
2044 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2045 arm breakpoint.
2046
2047 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2048
2049 * server.c (handle_query): Call target_supports_software_single_step.
2050
2051 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2052
2053 * linux-low.c (single_step): New function.
2054 (linux_resume_one_lwp_throw): Call single_step.
2055 (start_step_over): Likewise.
2056
2057 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2058
2059 * Makefile.in (SFILES): Append arch/arm-linux.c,
2060 arch/arm-get-next-pcs.c.
2061 (arm-linux.o): New rule.
2062 (arm-get-next-pcs.o): New rule.
2063 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2064 arm-linux.o.
2065 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2066 to linux-aarch32-low.c.
2067 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2068 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2069 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2070 (thumb2_breakpoint_len): Likewise.
2071 (arm_is_thumb_mode): Make non-static.
2072 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2073 from linux-aarch32-low.c.
2074 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2075 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2076 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2077 (thumb2_breakpoint_len): Likewise.
2078 (arm_is_thumb_mode): New declaration.
2079 * linux-arm-low.c: Include arch/arm-linux.h
2080 aarch/arm-get-next-pcs.h, sys/syscall.h.
2081 (get_next_pcs_ops): New struct.
2082 (get_next_pcs_addr_bits_remove): New function.
2083 (get_next_pcs_is_thumb): New function.
2084 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2085 (arm_sigreturn_next_pc): Likewise.
2086 (get_next_pcs_syscall_next_pc): Likewise.
2087 (arm_gdbserver_get_next_pcs): Likewise.
2088 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2089 Initialize.
2090 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2091 * server.h: Include gdb_vecs.h.
2092
2093 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2094
2095 * Makefile.in (SFILES): Append common/common-regcache.c.
2096 (OBS): Append common-regcache.o.
2097 (common-regcache.o): New rule.
2098 * regcache.c (init_register_cache): Initialize cache to
2099 REG_UNAVAILABLE.
2100 (regcache_raw_read_unsigned): New function.
2101 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2102 register_status enum.
2103
2104 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2105
2106 * linux-aarch64-low.c (the_low_targets): Rename
2107 breakpoint_reinsert_addr to get_next_pcs.
2108 * linux-arm-low.c (the_low_targets): Likewise.
2109 * linux-bfin-low.c (the_low_targets): Likewise.
2110 * linux-cris-low.c (the_low_targets): Likewise.
2111 * linux-crisv32-low.c (the_low_targets): Likewise.
2112 * linux-low.c (can_software_single_step): Likewise.
2113 (install_software_single_step_breakpoints): New function.
2114 (start_step_over): Use install_software_single_step_breakpoints.
2115 * linux-low.h: New CORE_ADDR vector.
2116 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2117 get_next_pcs.
2118 * linux-mips-low.c (the_low_targets): Likewise.
2119 * linux-nios2-low.c (the_low_targets): Likewise.
2120 * linux-sparc-low.c (the_low_targets): Likewise.
2121
2122 2015-12-17 Pedro Alves <palves@redhat.com>
2123
2124 * linux-low.c (linux_kill_one_lwp): Remove references to
2125 LinuxThreads.
2126 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2127 to 'kill'.
2128 (linux_init_signals): Delete.
2129 (initialize_low): Adjust.
2130 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2131
2132 2015-12-16 Pedro Alves <palves@redhat.com>
2133
2134 * configure.ac (compiler warning flags): When testing a
2135 -Wno-foo option, check whether -Wfoo works instead.
2136 * configure: Regenerate.
2137
2138 2015-12-11 Don Breazeal <donb@codesourcery.com>
2139
2140 * server.c (process_serial_event): Don't exit from gdbserver
2141 in remote mode if there are still active inferiors.
2142
2143 2015-12-11 Yao Qi <yao.qi@linaro.org>
2144
2145 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2146 arm_breakpoint_at if the process is 32-bit.
2147
2148 2015-12-11 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2151 arm breakpoint.
2152
2153 2015-12-07 Yao Qi <yao.qi@linaro.org>
2154
2155 * configure.srv: Append arm.o to srv_tgtobj for
2156 aarch64*-*-linux* target.
2157 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2158 from linux-arm-low.c.
2159 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2160 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2161 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2162 (thumb2_breakpoint_len): Likewise.
2163 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2164 (arm_breakpoint_kinds): Likewise.
2165 (arm_breakpoint_kind_from_pc): Likewise.
2166 (arm_sw_breakpoint_from_kind): Likewise.
2167 (arm_breakpoint_kind_from_current_state): Likewise.
2168 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2169 (arm_sw_breakpoint_from_kind): Declare.
2170 (arm_breakpoint_kind_from_current_state): Declare.
2171 (arm_breakpoint_at): Declare.
2172 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2173 arm_sw_breakpoint_from_kind if process is 32-bit.
2174 (aarch64_breakpoint_kind_from_pc): New function.
2175 (aarch64_breakpoint_kind_from_current_state): New function.
2176 (the_low_target): Initialize fields breakpoint_kind_from_pc
2177 and breakpoint_kind_from_current_state.
2178 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2179 linux-aarch32-low.c.
2180 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2181 (arm_breakpoint, arm_breakpoint_len): Likewise.
2182 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2183 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2184 (arm_is_thumb_mode): Likewise.
2185 (arm_breakpoint_at): Likewise.
2186 (arm_breakpoint_kind_from_pc): Likewise.
2187 (arm_sw_breakpoint_from_kind): Likewise.
2188 (arm_breakpoint_kind_from_current_state): Likewise.
2189
2190 Revert:
2191 2015-08-04 Yao Qi <yao.qi@linaro.org>
2192
2193 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2194 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2195 * server.c (extended_protocol): Remove "static".
2196 * server.h (extended_protocol): Declare it.
2197
2198 2015-12-04 Josh Stone <jistone@redhat.com>
2199
2200 * target.h (struct target_ops) <arch_setup>: Rename to ...
2201 (struct target_ops) <post_create_inferior>: ... this.
2202 (target_arch_setup): Rename to ...
2203 (target_post_create_inferior): ... this, calling post_create_inferior.
2204 * server.c (start_inferior): Update target_arch_setup calls to
2205 target_post_create_inferior.
2206 * linux-low.c (linux_low_ptrace_options): Forward declare.
2207 (linux_arch_setup): Update its comment for general use.
2208 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2209 (struct linux_target_ops): Use linux_post_create_inferior.
2210 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2211 to post_create_inferior.
2212 * nto-low.c (struct nto_target_ops): Likewise.
2213 * spu-low.c (struct spu_target_ops): Likewise.
2214 * win32-low.c (struct win32_target_ops): Likewise.
2215
2216 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2217
2218 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2219
2220 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2221
2222 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2223 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2224 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2225 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2226 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2227 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2228 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2229 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2230 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2231 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2232 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2233 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2234
2235 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2236
2237 * linux-low.c (linux_look_up_symbols): Don't call
2238 linux_supports_traceclone.
2239 * linux-low.h (thread_db_init): Remove use_events argument.
2240 * thread-db.c (thread_db_use_event): Remove global variable.
2241 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2242 (struct thread_db) <td_create_bp>: Remove field.
2243 (thread_db_create_event): Remove function.
2244 (thread_db_enable_reporting): Likewise.
2245 (find_one_thread): Don't check for thread_db_use_events.
2246 (attach_thread): Likewise.
2247 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2248 (try_thread_db_load_1): Don't check for thread_db_use_events.
2249 (thread_db_init): Remove use_events argument and thread events
2250 handling.
2251 (remove_thread_event_breakpoints): Remove function.
2252 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2253
2254 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2255
2256 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2257 New function.
2258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2259 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2260 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2261 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2262 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2263 Initialize.
2264 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2265 New function.
2266 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2267 * linux-low.c (can_hardware_single_step): Use
2268 supports_hardware_single_step.
2269 (can_software_single_step): New function.
2270 (start_step_over): Call can_software_single_step.
2271 (linux_supports_hardware_single_step): New function.
2272 (struct target_ops) <supports_software_single_step>: Initialize.
2273 * linux-low.h (struct linux_target_ops)
2274 <supports_hardware_single_step>: Initialize.
2275 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2276 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2277 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2278 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2279 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2280 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2281 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2282 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2283 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2284 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2285 Initialize.
2286 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2287 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2288 Initialize.
2289 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2290 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2291 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2292 New function.
2293 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2294 * target.h (struct target_ops): <supports_software_single_step>:
2295 New field.
2296 (target_supports_software_single_step): New macro.
2297
2298 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2299
2300 * linux-low.c (linux_wait_1): Fix pc advance condition.
2301 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2302 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2303
2304 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2305
2306 * linux-arm-low.c (arm_is_thumb_mode): New function.
2307 (arm_breakpoint_at): Use arm_is_thumb_mode.
2308 (arm_breakpoint_kind_from_current_state): New function.
2309 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2310 Initialize.
2311 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2312 (linux_breakpoint_kind_from_current_state): New function.
2313 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2314 * linux-low.h (struct linux_target_ops)
2315 <breakpoint_kind_from_current_state>: New field.
2316 * target.h (struct target_ops): Likewise.
2317 (target_breakpoint_kind_from_current_state): New macro.
2318
2319 2015-11-30 Pedro Alves <palves@redhat.com>
2320
2321 * linux-low.c (linux_resume): Wake up the event loop before
2322 returning.
2323
2324 2015-11-30 Pedro Alves <palves@redhat.com>
2325
2326 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2327 check.
2328 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2329 to -1.
2330 * target.c (struct thread_search): New structure.
2331 (thread_search_callback): New function.
2332 (prev_general_thread): New global.
2333 (prepare_to_access_memory, done_accessing_memory): New functions.
2334 * target.h (prepare_to_access_memory, done_accessing_memory):
2335 Replace macros with function declarations.
2336
2337 2015-11-30 Pedro Alves <palves@redhat.com>
2338
2339 PR 14618
2340 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2341 report TARGET_WAITKIND_NO_RESUMED.
2342 * remote-utils.c (prepare_resume_reply): Handle
2343 TARGET_WAITKIND_NO_RESUMED.
2344 * server.c (report_no_resumed): New global.
2345 (handle_query) <qSupported>: Handle "no-resumed+". Report
2346 "no-resumed+" support.
2347 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2348 return error if the client doesn't support no-resumed events.
2349 (push_stop_notification): New function.
2350 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2351 events if the client supports them.
2352
2353 2015-11-30 Pedro Alves <palves@redhat.com>
2354
2355 * linux-low.c (thread_still_has_status_pending_p): Don't check
2356 vCont;t here.
2357 (lwp_resumed): New function.
2358 (status_pending_p_callback): Return early if the LWP is not
2359 supposed to be resumed.
2360
2361 2015-11-30 Pedro Alves <palves@redhat.com>
2362
2363 * linux-low.c (handle_extended_wait): Assert that the LWP's
2364 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2365 thread create events, leave the new child's status pending.
2366 (linux_low_filter_event): If GDB wants to hear about thread exit
2367 events, leave the LWP marked dead and don't delete it.
2368 (linux_wait_for_event_filtered): Don't check for thread exit.
2369 (filter_exit_event): New function.
2370 (linux_wait_1): Use it, when returning an exit event.
2371 (linux_resume_one_lwp_throw): Assert that the LWP's
2372 waitstatus is TARGET_WAITKIND_IGNORE.
2373 * remote-utils.c (prepare_resume_reply): Handle
2374 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2375 * server.c (report_thread_events): New global.
2376 (handle_general_set): Handle QThreadEvents.
2377 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2378 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2379 TARGET_WAITKIND_THREAD_EXITED.
2380 * server.h (report_thread_events): Declare.
2381
2382 2015-11-30 Pedro Alves <palves@redhat.com>
2383
2384 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2385 the thread's last_resume_kind was resume_stop.
2386
2387 2015-11-30 Pedro Alves <palves@redhat.com>
2388
2389 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2390 before returning.
2391
2392 2015-11-30 Pedro Alves <palves@redhat.com>
2393
2394 * server.c (handle_v_requests): Handle vCtrlC.
2395
2396 2015-11-30 Pedro Alves <palves@redhat.com>
2397
2398 * gdbthread.h (find_any_thread_of_pid): Declare.
2399 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2400 functions.
2401 * server.c (handle_query): If current_thread is NULL, look for
2402 another thread of the selected process.
2403
2404 2015-11-26 Daniel Colascione <dancol@dancol.org>
2405 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2408 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2409 name in reply.
2410 * target.h (struct target_ops) <thread_name>: New field.
2411 (target_thread_name): New macro.
2412
2413 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2414
2415 * regcache.h (regcache_invalidate_pid): Add declaration.
2416 * regcache.c (regcache_invalidate_pid): New function, extracted
2417 from regcache_invalidate.
2418 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2419 Add trivial documentation comment.
2420 * lynx-low.c: Use regcache_invalidate_pid instead of
2421 regcache_invalidate.
2422
2423 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2424
2425 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2426 and Elf64_auxv_t if the target is Android.
2427
2428 2015-11-22 Doug Evans <xdje42@gmail.com>
2429
2430 * target.h: #include <sys/types.h>.
2431
2432 2015-11-19 Pedro Alves <palves@redhat.com>
2433
2434 * linux-low.c (linux_process_qsupported): Change prototype.
2435 Adjust.
2436 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2437 Change prototype.
2438 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2439 and adjust to loop over all features.
2440 * server.c (handle_query) <qSupported>: Adjust to call
2441 target_process_qsupported once, passing it a vector of unprocessed
2442 features.
2443 * target.h (struct target_ops) <process_qsupported>: Change
2444 prototype.
2445 (target_process_qsupported): Adjust.
2446
2447 2015-11-19 Pedro Alves <palves@redhat.com>
2448
2449 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2450 mode.
2451 * configure: Regenerate.
2452
2453 2015-11-19 Pedro Alves <palves@redhat.com>
2454
2455 * configure: Regenerate.
2456
2457 2015-11-19 Yao Qi <yao.qi@linaro.org>
2458
2459 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2460 type to uint32_t.
2461
2462 2015-11-19 Yao Qi <yao.qi@linaro.org>
2463
2464 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2465 (struct aarch64_operand): Move enum out.
2466
2467 2015-11-19 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2470 struct user_fpsimd_state *.
2471 (aarch64_store_fpregset): Likewise.
2472
2473 2015-11-19 Yao Qi <yao.qi@linaro.org>
2474
2475 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2476 struct user_pt_regs *.
2477 (aarch64_store_gregset): Likewise.
2478
2479 2015-11-18 Pedro Alves <palves@redhat.com>
2480
2481 * Makefile.in (all_object_files): Add $IPA_OBJS.
2482
2483 2015-11-17 Pedro Alves <palves@redhat.com>
2484
2485 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2486 GDB_SIGNAL_0 and gdb_signal_to_string.
2487
2488 2015-11-17 Pedro Alves <palves@redhat.com>
2489
2490 * win32-low.c (handle_output_debug_string): Remove parameter.
2491 (win32_kill): Remove our_status local and adjust call to
2492 handle_output_debug_string.
2493 (get_child_debug_event): Adjust call to
2494 handle_output_debug_string.
2495
2496 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2497
2498 * linux-mips-low.c (mips_fill_gregset): Add cast.
2499 (mips_store_gregset): Likewise.
2500 (mips_fill_fpregset): Likewise.
2501 (mips_store_fpregset): Likewise.
2502
2503 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2504
2505 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2506 priv.
2507
2508 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2509
2510 * linux-mips-low.c (mips_linux_new_thread): Change type of
2511 watch_type to enum target_hw_bp_type.
2512
2513 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2514
2515 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2516 Change return type to arm_hwbp_type.
2517
2518 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2519
2520 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2521 (arm_store_gregset): Likewise.
2522 * linux-arm-low.c (arm_get_hwcap): Likewise.
2523 (arm_read_description): Likewise.
2524
2525 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2526
2527 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2528
2529 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2530
2531 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2532 (ppc_fill_vsxregset): Likewise.
2533 (ppc_store_vsxregset): Likewise.
2534 (ppc_fill_vrregset): Likewise.
2535 (ppc_store_vrregset): Likewise.
2536 (ppc_fill_evrregset): Likewise.
2537 (ppc_store_evrregset): Likewise.
2538
2539 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2540
2541 * linux-ppc-low.c (ppc_usrregs_info): Remove
2542 forward-declaration.
2543 (ppc_arch_setup): Move lower in file.
2544
2545 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2548 (ps_pdwrite): Likewise.
2549
2550 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2551
2552 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2553 to after assert checks.
2554
2555 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2556
2557 * proc-service.c (ps_pdread): Add/adjust casts.
2558 (ps_pdwrite): Add/adjust casts.
2559
2560 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2561
2562 * server.c (handle_search_memory_1): Cast return value of
2563 memmem.
2564
2565 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2566
2567 * server.c (write_qxfer_response): Change type of data to
2568 gdb_byte *.
2569
2570 2015-10-29 Pedro Alves <palves@redhat.com>
2571
2572 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2573
2574 2015-10-29 Pedro Alves <palves@redhat.com>
2575
2576 * tracepoint.c (clear_installed_tracepoints): Add casts.
2577
2578 2015-10-29 Pedro Alves <palves@redhat.com>
2579
2580 * server.c (handle_v_cont, process_serial_event): Add enum
2581 gdb_signal casts to signal parsing code.
2582
2583 2015-10-29 Pedro Alves <palves@redhat.com>
2584
2585 * linux-low.h (NULL_REGSET): Define.
2586 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2587 * linux-arm-low.c (arm_regsets): Likewise.
2588 * linux-crisv32-low.c (cris_regsets): Likewise.
2589 * linux-m68k-low.c (m68k_regsets): Likewise.
2590 * linux-mips-low.c (mips_regsets): Likewise.
2591 * linux-nios2-low.c (nios2_regsets): Likewise.
2592 * linux-ppc-low.c (ppc_regsets): Likewise.
2593 * linux-s390-low.c (s390_regsets): Likewise.
2594 * linux-sh-low.c (sh_regsets): Likewise.
2595 * linux-sparc-low.c (sparc_regsets): Likewise.
2596 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2597 * linux-tile-low.c (tile_regsets): Likewise.
2598 * linux-x86-low.c (x86_regsets): Likewise.
2599 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2600
2601 2015-10-29 Pedro Alves <palves@redhat.com>
2602
2603 * linux-low.h (NULL_REGSET): Define.
2604 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2605 * linux-arm-low.c (arm_regsets): Likewise.
2606 * linux-crisv32-low.c (cris_regsets): Likewise.
2607 * linux-m68k-low.c (m68k_regsets): Likewise.
2608 * linux-mips-low.c (mips_regsets): Likewise.
2609 * linux-nios2-low.c (nios2_regsets): Likewise.
2610 * linux-ppc-low.c (ppc_regsets): Likewise.
2611 * linux-s390-low.c (s390_regsets): Likewise.
2612 * linux-sh-low.c (sh_regsets): Likewise.
2613 * linux-sparc-low.c (sparc_regsets): Likewise.
2614 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2615 * linux-tile-low.c (tile_regsets): Likewise.
2616 * linux-x86-low.c (x86_regsets): Likewise.
2617 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2618
2619 2015-10-26 Doug Evans <dje@google.com>
2620
2621 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2622
2623 2015-10-26 Doug Evans <dje@google.com>
2624
2625 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2626
2627 2015-10-26 Doug Evans <dje@google.com>
2628
2629 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2630 for debug_printf.
2631 (attach_thread, find_new_threads_callback): Ditto.
2632
2633 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2634
2635 * mem-break.h (set_breakpoint_data): Remove.
2636
2637 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2638
2639 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2640 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2641 (initialize_low): Remove set_breakpoint_data call.
2642 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2643 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2644 (initialize_low): Remove set_breakpoint_data call.
2645 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2646 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2647 (initialize_low): Remove set_breakpoint_data call.
2648
2649 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2650
2651 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2652 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2653 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2654 * target.h (target_breakpoint_kind_from_pc): New macro.
2655
2656 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2657
2658 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2659 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2660 the default breakpoint kind.
2661
2662 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2663
2664 * linux-arm-low.c (arm_supports_z_point_type): Add software
2665 breakpoint support.
2666
2667 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2668
2669 * linux-arm-low.c: Refactor breakpoint definitions.
2670 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2671 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2672
2673 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2674
2675 * Makefile.in: Add arm.c/o.
2676 * configure.srv: Likewise.
2677 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2678 (arm_breakpoint_kind_from_pc): New function.
2679 (arm_sw_breakpoint_from_kind): Return proper kind.
2680 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2681
2682 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2683
2684 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2685 removal.
2686 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2687 (struct raw_breakpoint) <size>: Remove.
2688 (struct raw_breakpoint) <kind>: Add.
2689 (bp_size): New function.
2690 (bp_opcode): Likewise.
2691 (find_raw_breakpoint_at): Adjust for kind.
2692 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2693 (remove_memory_breakpoint): Adjust for kind call bp_size.
2694 (set_raw_breakpoint_at): Adjust for kind.
2695 (set_breakpoint): Likewise.
2696 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2697 (delete_raw_breakpoint): Adjust for kind.
2698 (delete_breakpoint): Likewise.
2699 (find_gdb_breakpoint): Likewise.
2700 (set_gdb_breakpoint_1): Likewise.
2701 (set_gdb_breakpoint): Likewise.
2702 (delete_gdb_breakpoint_1): Likewise.
2703 (delete_gdb_breakpoint): Likewise.
2704 (uninsert_raw_breakpoint): Likewise.
2705 (reinsert_raw_breakpoint): Likewise.
2706 (set_breakpoint_data): Remove.
2707 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2708 (check_mem_read): Adjust for kind call bp_size.
2709 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2710 (clone_one_breakpoint): Adjust for kind.
2711 * mem-break.h (set_gdb_breakpoint): Likewise.
2712 (delete_gdb_breakpoint): Likewise.
2713 * server.c (process_serial_event): Likewise.
2714
2715 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2716
2717 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2718 (struct linux_target_ops) <breakpoint>: Remove.
2719 (struct linux_target_ops) <breakpoint_len>: Remove.
2720 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2721 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2722 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2723 (arm_sw_breakpoint_from_kind): New function.
2724 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2725 (struct linux_target_ops) <breakpoint>: Remove.
2726 (struct linux_target_ops) <breakpoint_len>: Remove.
2727 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2728 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2729 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2730 (struct linux_target_ops) <breakpoint>: Remove.
2731 (struct linux_target_ops) <breakpoint_len>: Remove.
2732 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2733 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2734 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2735 (struct linux_target_ops) <breakpoint>: Remove.
2736 (struct linux_target_ops) <breakpoint_len>: Remove.
2737 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2738 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2739 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2740 and sw_breakpoint_from_kind to increment the pc.
2741 (linux_breakpoint_kind_from_pc): New function.
2742 (linux_sw_breakpoint_from_kind): New function.
2743 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2744 (initialize_low): Call breakpoint_kind_from_pc and
2745 sw_breakpoint_from_kind to replace breakpoint_data/len.
2746 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2747 New field.
2748 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2749 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2750 (struct linux_target_ops) <breakpoint>: Remove.
2751 (struct linux_target_ops) <breakpoint_len>: Remove.
2752 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2753 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2754 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2755 (struct linux_target_ops) <breakpoint>: Remove.
2756 (struct linux_target_ops) <breakpoint_len>: Remove.
2757 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2758 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2759 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2760 (struct linux_target_ops) <breakpoint>: Remove.
2761 (struct linux_target_ops) <breakpoint_len>: Remove.
2762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2764 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2765 (struct linux_target_ops) <breakpoint>: Remove.
2766 (struct linux_target_ops) <breakpoint_len>: Remove.
2767 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2768 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2769 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2770 (struct linux_target_ops) <breakpoint>: Remove.
2771 (struct linux_target_ops) <breakpoint_len>: Remove.
2772 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2773 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2774 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2775 (struct linux_target_ops) <breakpoint>: Remove.
2776 (struct linux_target_ops) <breakpoint_len>: Remove.
2777 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2778 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2779 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2780 (struct linux_target_ops) <breakpoint>: Remove.
2781 (struct linux_target_ops) <breakpoint_len>: Remove.
2782 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2783 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2784 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2785 (struct linux_target_ops) <breakpoint>: Remove.
2786 (struct linux_target_ops) <breakpoint_len>: Remove.
2787 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2788 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2789 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2790 (struct linux_target_ops) <breakpoint>: Remove.
2791 (struct linux_target_ops) <breakpoint_len>: Remove.
2792 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2793 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2794 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2795 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2796 (struct linux_target_ops) <breakpoint>: Remove.
2797 (struct linux_target_ops) <breakpoint_len>: Remove.
2798 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2799 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2800 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2801 (struct linux_target_ops) <breakpoint>: Remove.
2802 (struct linux_target_ops) <breakpoint_len>: Remove.
2803 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2804 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2805
2806 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2807
2808 * linux-cris-low.c (cris_get_pc): Remove void arg.
2809
2810 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2811
2812 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2813 variable name.
2814
2815 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2816
2817 * inferiors.c (thread_pid_matches_callback): New function.
2818 (find_thread_process): New function.
2819 (remove_thread): Reset current_thread.
2820 (remove_process): Assert threads have been removed first.
2821
2822 2015-10-15 Yao Qi <yao.qi@linaro.org>
2823
2824 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2825 if it is 3.
2826 (aarch64_remove_point): Likewise.
2827 * regcache.c (regcache_register_size): New function.
2828
2829 2015-10-12 Yao Qi <yao.qi@linaro.org>
2830
2831 * linux-aarch64-low.c: Update all callers as emit_load_store
2832 is renamed to aarch64_emit_load_store.
2833
2834 2015-10-12 Yao Qi <yao.qi@linaro.org>
2835
2836 * linux-aarch64-low.c: Update all callers of function renaming
2837 from emit_insn to aarch64_emit_insn.
2838
2839 2015-10-12 Yao Qi <yao.qi@linaro.org>
2840
2841 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2842 arch/aarch64-insn.h.
2843 (struct aarch64_memory_operand): Likewise.
2844 (ENCODE): Likewise.
2845 (emit_insn): Move to arch/aarch64-insn.c.
2846 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2847 (emit_load_store): Move to arch/aarch64-insn.c.
2848 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2849 (can_encode_int32): Remove.
2850
2851 2015-10-12 Yao Qi <yao.qi@linaro.org>
2852
2853 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2854 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2855 (aarch64_relocate_instruction): Likewise.
2856 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2857 (struct aarch64_insn_visitor): Likewise.
2858
2859 2015-10-12 Yao Qi <yao.qi@linaro.org>
2860
2861 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2862 (struct aarch64_insn_visitor): New.
2863 (struct aarch64_insn_relocation_data): New.
2864 (aarch64_ftrace_insn_reloc_b): New function.
2865 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2866 (aarch64_ftrace_insn_reloc_cb): Likewise.
2867 (aarch64_ftrace_insn_reloc_tb): Likewise.
2868 (aarch64_ftrace_insn_reloc_adr): Likewise.
2869 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2870 (aarch64_ftrace_insn_reloc_others): Likewise.
2871 (visitor): New.
2872 (aarch64_relocate_instruction): Use visitor.
2873
2874 2015-10-12 Yao Qi <yao.qi@linaro.org>
2875
2876 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2877 int. Add argument buf.
2878 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2879 aarch64_relocate_instruction.
2880
2881 2015-10-12 Yao Qi <yao.qi@linaro.org>
2882
2883 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2884 argument insn. Remove local variable insn. Don't call
2885 target_read_uint32.
2886 (aarch64_install_fast_tracepoint_jump_pad): Call
2887 target_read_uint32.
2888
2889 2015-09-30 Yao Qi <yao.qi@linaro.org>
2890
2891 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2892 (emit_load_store_pair): Likewise.
2893
2894 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2895
2896 * dll.c (match_dll): Add cast(s).
2897 (unloaded_dll): Likewise.
2898 * linux-low.c (second_thread_of_pid_p): Likewise.
2899 (delete_lwp_callback): Likewise.
2900 (count_events_callback): Likewise.
2901 (select_event_lwp_callback): Likewise.
2902 (linux_set_resume_request): Likewise.
2903 * server.c (accumulate_file_name_length): Likewise.
2904 (emit_dll_description): Likewise.
2905 (handle_qxfer_threads_worker): Likewise.
2906 (visit_actioned_threads): Likewise.
2907 * thread-db.c (any_thread_of): Likewise.
2908 * tracepoint.c (same_process_p): Likewise.
2909 (match_blocktype): Likewise.
2910 (build_traceframe_info_xml): Likewise.
2911
2912 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2913
2914 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2915 assignment.
2916 (gdb_unparse_agent_expr): Likewise.
2917 * hostio.c (require_data): Likewise.
2918 (handle_pread): Likewise.
2919 * linux-low.c (disable_regset): Likewise.
2920 (fetch_register): Likewise.
2921 (store_register): Likewise.
2922 (get_dynamic): Likewise.
2923 (linux_qxfer_libraries_svr4): Likewise.
2924 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2925 (set_fast_tracepoint_jump): Likewise.
2926 (uninsert_fast_tracepoint_jumps_at): Likewise.
2927 (reinsert_fast_tracepoint_jumps_at): Likewise.
2928 (validate_inserted_breakpoint): Likewise.
2929 (clone_agent_expr): Likewise.
2930 * regcache.c (init_register_cache): Likewise.
2931 * remote-utils.c (putpkt_binary_1): Likewise.
2932 (decode_M_packet): Likewise.
2933 (decode_X_packet): Likewise.
2934 (look_up_one_symbol): Likewise.
2935 (relocate_instruction): Likewise.
2936 (monitor_output): Likewise.
2937 * server.c (handle_search_memory): Likewise.
2938 (handle_qxfer_exec_file): Likewise.
2939 (handle_qxfer_libraries): Likewise.
2940 (handle_qxfer): Likewise.
2941 (handle_query): Likewise.
2942 (handle_v_cont): Likewise.
2943 (handle_v_run): Likewise.
2944 (captured_main): Likewise.
2945 * target.c (write_inferior_memory): Likewise.
2946 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2947 * tracepoint.c (init_trace_buffer): Likewise.
2948 (add_tracepoint_action): Likewise.
2949 (add_traceframe): Likewise.
2950 (add_traceframe_block): Likewise.
2951 (cmd_qtdpsrc): Likewise.
2952 (cmd_qtdv): Likewise.
2953 (cmd_qtstatus): Likewise.
2954 (response_source): Likewise.
2955 (response_tsv): Likewise.
2956 (cmd_qtnotes): Likewise.
2957 (gdb_collect): Likewise.
2958 (initialize_tracepoint): Likewise.
2959
2960 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2961
2962 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2963 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2964 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2965 <NOP>: New.
2966 (enum aarch64_condition_codes): New enum.
2967 (w0): New static global.
2968 (fp): Likewise.
2969 (lr): Likewise.
2970 (struct aarch64_memory_operand) <type>: New
2971 MEMORY_OPERAND_POSTINDEX type.
2972 (postindex_memory_operand): New helper function.
2973 (emit_ret): New function.
2974 (emit_load_store_pair): New function, factored out of emit_stp
2975 with support for MEMORY_OPERAND_POSTINDEX.
2976 (emit_stp): Rewrite using emit_load_store_pair.
2977 (emit_ldp): New function.
2978 (emit_load_store): Likewise.
2979 (emit_ldr): Mention post-index instruction in comment.
2980 (emit_ldrh): New function.
2981 (emit_ldrb): New function.
2982 (emit_ldrsw): Mention post-index instruction in comment.
2983 (emit_str): Likewise.
2984 (emit_subs): New function.
2985 (emit_cmp): Likewise.
2986 (emit_and): Likewise.
2987 (emit_orr): Likewise.
2988 (emit_orn): Likewise.
2989 (emit_eor): Likewise.
2990 (emit_mvn): Likewise.
2991 (emit_lslv): Likewise.
2992 (emit_lsrv): Likewise.
2993 (emit_asrv): Likewise.
2994 (emit_mul): Likewise.
2995 (emit_sbfm): Likewise.
2996 (emit_sbfx): Likewise.
2997 (emit_ubfm): Likewise.
2998 (emit_ubfx): Likewise.
2999 (emit_csinc): Likewise.
3000 (emit_cset): Likewise.
3001 (emit_nop): Likewise.
3002 (emit_ops_insns): New helper function.
3003 (emit_pop): Likewise.
3004 (emit_push): Likewise.
3005 (aarch64_emit_prologue): New function.
3006 (aarch64_emit_epilogue): Likewise.
3007 (aarch64_emit_add): Likewise.
3008 (aarch64_emit_sub): Likewise.
3009 (aarch64_emit_mul): Likewise.
3010 (aarch64_emit_lsh): Likewise.
3011 (aarch64_emit_rsh_signed): Likewise.
3012 (aarch64_emit_rsh_unsigned): Likewise.
3013 (aarch64_emit_ext): Likewise.
3014 (aarch64_emit_log_not): Likewise.
3015 (aarch64_emit_bit_and): Likewise.
3016 (aarch64_emit_bit_or): Likewise.
3017 (aarch64_emit_bit_xor): Likewise.
3018 (aarch64_emit_bit_not): Likewise.
3019 (aarch64_emit_equal): Likewise.
3020 (aarch64_emit_less_signed): Likewise.
3021 (aarch64_emit_less_unsigned): Likewise.
3022 (aarch64_emit_ref): Likewise.
3023 (aarch64_emit_if_goto): Likewise.
3024 (aarch64_emit_goto): Likewise.
3025 (aarch64_write_goto_address): Likewise.
3026 (aarch64_emit_const): Likewise.
3027 (aarch64_emit_call): Likewise.
3028 (aarch64_emit_reg): Likewise.
3029 (aarch64_emit_pop): Likewise.
3030 (aarch64_emit_stack_flush): Likewise.
3031 (aarch64_emit_zero_ext): Likewise.
3032 (aarch64_emit_swap): Likewise.
3033 (aarch64_emit_stack_adjust): Likewise.
3034 (aarch64_emit_int_call_1): Likewise.
3035 (aarch64_emit_void_call_2): Likewise.
3036 (aarch64_emit_eq_goto): Likewise.
3037 (aarch64_emit_ne_goto): Likewise.
3038 (aarch64_emit_lt_goto): Likewise.
3039 (aarch64_emit_le_goto): Likewise.
3040 (aarch64_emit_gt_goto): Likewise.
3041 (aarch64_emit_ge_got): Likewise.
3042 (aarch64_emit_ops_impl): New static global variable.
3043 (aarch64_emit_ops): New target function, return
3044 &aarch64_emit_ops_impl.
3045 (struct linux_target_ops): Install it.
3046
3047 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3048
3049 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3050 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3051 aarch64-ipa.o.
3052 * linux-aarch64-ipa.c: New file.
3053 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3054 and endian.h.
3055 (aarch64_get_thread_area): New target method.
3056 (extract_signed_bitfield): New helper function.
3057 (aarch64_decode_ldr_literal): New function.
3058 (enum aarch64_opcodes): New enum.
3059 (struct aarch64_register): New struct.
3060 (struct aarch64_operand): New struct.
3061 (x0): New static global.
3062 (x1): Likewise.
3063 (x2): Likewise.
3064 (x3): Likewise.
3065 (x4): Likewise.
3066 (w2): Likewise.
3067 (ip0): Likewise.
3068 (sp): Likewise.
3069 (xzr): Likewise.
3070 (aarch64_register): New helper function.
3071 (register_operand): Likewise.
3072 (immediate_operand): Likewise.
3073 (struct aarch64_memory_operand): New struct.
3074 (offset_memory_operand): New helper function.
3075 (preindex_memory_operand): Likewise.
3076 (enum aarch64_system_control_registers): New enum.
3077 (ENCODE): New macro.
3078 (emit_insn): New helper function.
3079 (emit_b): New function.
3080 (emit_bcond): Likewise.
3081 (emit_cb): Likewise.
3082 (emit_tb): Likewise.
3083 (emit_blr): Likewise.
3084 (emit_stp): Likewise.
3085 (emit_ldp_q_offset): Likewise.
3086 (emit_stp_q_offset): Likewise.
3087 (emit_load_store): Likewise.
3088 (emit_ldr): Likewise.
3089 (emit_ldrsw): Likewise.
3090 (emit_str): Likewise.
3091 (emit_ldaxr): Likewise.
3092 (emit_stxr): Likewise.
3093 (emit_stlr): Likewise.
3094 (emit_data_processing_reg): Likewise.
3095 (emit_data_processing): Likewise.
3096 (emit_add): Likewise.
3097 (emit_sub): Likewise.
3098 (emit_mov): Likewise.
3099 (emit_movk): Likewise.
3100 (emit_mov_addr): Likewise.
3101 (emit_mrs): Likewise.
3102 (emit_msr): Likewise.
3103 (emit_sevl): Likewise.
3104 (emit_wfe): Likewise.
3105 (append_insns): Likewise.
3106 (can_encode_int32_in): New helper function.
3107 (aarch64_relocate_instruction): New function.
3108 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3109 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3110 (struct linux_target_ops): Install aarch64_get_thread_area,
3111 aarch64_install_fast_tracepoint_jump_pad and
3112 aarch64_get_min_fast_tracepoint_insn_len.
3113
3114 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3115
3116 * Makefile.in (aarch64-insn.o): New rule.
3117 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3118
3119 2015-09-21 Yao Qi <yao.qi@linaro.org>
3120
3121 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3122
3123 2015-09-21 Yao Qi <yao.qi@linaro.org>
3124
3125 * tracepoint.c (max_jump_pad_size): Remove.
3126
3127 2015-09-18 Yao Qi <yao.qi@linaro.org>
3128
3129 * linux-aarch64-low.c: Don't include sys/uio.h.
3130 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3131
3132 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3133
3134 * tracepoint.c (eval_result_type): Change prototype.
3135 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3136
3137 2015-09-15 Pedro Alves <palves@redhat.com>
3138
3139 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3140 Check whether to report exec events instead of checking whether
3141 multiprocess is enabled.
3142
3143 2015-09-15 Pedro Alves <palves@redhat.com>
3144
3145 PR remote/18965
3146 * remote-utils.c (prepare_resume_reply): Merge
3147 TARGET_WAITKIND_VFORK_DONE switch case with the
3148 TARGET_WAITKIND_FORKED case.
3149
3150 2015-09-15 Yao Qi <yao.qi@linaro.org>
3151
3152 * server.c (handle_query): Check string comparison using
3153 "else if" instead of "if".
3154
3155 2015-09-15 Yao Qi <yao.qi@linaro.org>
3156
3157 * server.c (vCont_supported): New global variable.
3158 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3159 matches. Append ";vContSupported+" to own_buf.
3160 (handle_v_requests): Append ";s;S" to own_buf if target supports
3161 hardware single step or vCont_supported is false.
3162 (capture_main): Set vCont_supported to zero.
3163
3164 2015-09-15 Yao Qi <yao.qi@linaro.org>
3165
3166 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3167 it to ...
3168 (linux_supports_hardware_single_step): ... New function.
3169 (linux_target_ops): Update.
3170 * lynx-low.c (lynx_target_ops): Set field
3171 supports_hardware_single_step to target_can_do_hardware_single_step.
3172 * nto-low.c (nto_target_ops): Likewise.
3173 * spu-low.c (spu_target_ops): Likewise.
3174 * win32-low.c (win32_target_ops): Likewise.
3175 * target.c (target_can_do_hardware_single_step): New function.
3176 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3177 Remove. <supports_hardware_single_step>: New field.
3178 (target_supports_conditional_breakpoints): Remove.
3179 (target_supports_hardware_single_step): New macro.
3180 (target_can_do_hardware_single_step): Declare.
3181 * server.c (handle_query): Use target_supports_hardware_single_step
3182 instead of target_supports_conditional_breakpoints.
3183
3184 2015-09-15 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3187 function.
3188 (struct linux_target_ops the_low_target): Install
3189 aarch64_linux_siginfo_fixup.
3190
3191 2015-09-11 Don Breazeal <donb@codesourcery.com>
3192 Luis Machado <lgustavo@codesourcery.com>
3193
3194 * linux-low.c (linux_mourn): Static declaration.
3195 (linux_arch_setup): Move in front of
3196 handle_extended_wait.
3197 (linux_arch_setup_thread): New function.
3198 (handle_extended_wait): Handle exec events. Call
3199 linux_arch_setup_thread. Make event_lwp argument a
3200 pointer-to-a-pointer.
3201 (check_zombie_leaders): Do not check stopped threads.
3202 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3203 (linux_low_filter_event): Add lwp and thread for exec'ing
3204 non-leader thread if leader thread has been deleted.
3205 Refactor code into linux_arch_setup_thread and call it.
3206 Pass child lwp pointer by reference to handle_extended_wait.
3207 (linux_wait_for_event_filtered): Update comment.
3208 (linux_wait_1): Prevent clobbering exec event status.
3209 (linux_supports_exec_events): New function.
3210 (linux_target_ops) <supports_exec_events>: Initialize new member.
3211 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3212 new member.
3213 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3214 * server.c (report_exec_events): New global variable.
3215 (handle_query): Handle qSupported query for exec-events feature.
3216 (captured_main): Initialize report_exec_events.
3217 * server.h (report_exec_events): Declare new global variable.
3218 * target.h (struct target_ops) <supports_exec_events>: New
3219 member.
3220 (target_supports_exec_events): New macro.
3221 * win32-low.c (win32_target_ops) <supports_exec_events>:
3222 Initialize new member.
3223
3224 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3225
3226 * linux-low.c (linux_low_enable_btrace): Remove.
3227 (linux_target_ops): Replace linux_low_enable_btrace with
3228 linux_enable_btrace.
3229
3230 2015-09-03 Yao Qi <yao.qi@linaro.org>
3231
3232 * linux-aarch64-low.c (aarch64_insert_point): Call
3233 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3234 returns true.
3235
3236 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3237
3238 * linux-low.c (check_stopped_by_breakpoint): Use
3239 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3240
3241 2015-08-27 Pedro Alves <palves@redhat.com>
3242
3243 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3244
3245 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3246
3247 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3248 the XNEW-family equivalent.
3249 (compile_bytecodes): Likewise.
3250 * dll.c (loaded_dll): Likewise.
3251 * event-loop.c (append_callback_event): Likewise.
3252 (create_file_handler): Likewise.
3253 (create_file_event): Likewise.
3254 * hostio.c (handle_open): Likewise.
3255 * inferiors.c (add_thread): Likewise.
3256 (add_process): Likewise.
3257 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3258 * linux-arm-low.c (arm_new_process): Likewise.
3259 (arm_new_thread): Likewise.
3260 * linux-low.c (add_to_pid_list): Likewise.
3261 (linux_add_process): Likewise.
3262 (handle_extended_wait): Likewise.
3263 (add_lwp): Likewise.
3264 (enqueue_one_deferred_signal): Likewise.
3265 (enqueue_pending_signal): Likewise.
3266 (linux_resume_one_lwp_throw): Likewise.
3267 (linux_resume_one_thread): Likewise.
3268 (linux_read_memory): Likewise.
3269 (linux_write_memory): Likewise.
3270 * linux-mips-low.c (mips_linux_new_process): Likewise.
3271 (mips_linux_new_thread): Likewise.
3272 (mips_add_watchpoint): Likewise.
3273 * linux-x86-low.c (initialize_low_arch): Likewise.
3274 * lynx-low.c (lynx_add_process): Likewise.
3275 * mem-break.c (set_raw_breakpoint_at): Likewise.
3276 (set_breakpoint): Likewise.
3277 (add_condition_to_breakpoint): Likewise.
3278 (add_commands_to_breakpoint): Likewise.
3279 (clone_agent_expr): Likewise.
3280 (clone_one_breakpoint): Likewise.
3281 * regcache.c (new_register_cache): Likewise.
3282 * remote-utils.c (look_up_one_symbol): Likewise.
3283 * server.c (queue_stop_reply): Likewise.
3284 (start_inferior): Likewise.
3285 (queue_stop_reply_callback): Likewise.
3286 (handle_target_event): Likewise.
3287 * spu-low.c (fetch_ppc_memory): Likewise.
3288 (store_ppc_memory): Likewise.
3289 * target.c (set_target_ops): Likewise.
3290 * thread-db.c (thread_db_load_search): Likewise.
3291 (try_thread_db_load_1): Likewise.
3292 * tracepoint.c (add_tracepoint): Likewise.
3293 (add_tracepoint_action): Likewise.
3294 (create_trace_state_variable): Likewise.
3295 (cmd_qtdpsrc): Likewise.
3296 (cmd_qtro): Likewise.
3297 (add_while_stepping_state): Likewise.
3298 * win32-low.c (child_add_thread): Likewise.
3299 (get_image_name): Likewise.
3300
3301 2015-08-25 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3304
3305 2015-08-25 Yao Qi <yao.qi@linaro.org>
3306
3307 * Makefile.in (aarch64-linux.o): New rule.
3308 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3309 srv_tgtobj.
3310 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3311 (aarch64_init_debug_reg_state): Make it extern.
3312 (aarch64_linux_prepare_to_resume): Remove.
3313
3314 2015-08-25 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3317 lwp_arch_private_info and ptid_of_lwp.
3318
3319 2015-08-25 Yao Qi <yao.qi@linaro.org>
3320
3321 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3322 Find proc_info by find_process_pid. All callers updated.
3323
3324 2015-08-25 Yao Qi <yao.qi@linaro.org>
3325
3326 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3327 Remove.
3328 (debug_reg_change_callback): Remove.
3329 (aarch64_notify_debug_reg_change): Remove.
3330
3331 2015-08-25 Yao Qi <yao.qi@linaro.org>
3332
3333 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3334 Call current_lwp_ptid.
3335
3336 2015-08-25 Yao Qi <yao.qi@linaro.org>
3337
3338 * linux-aarch64-low.c (debug_reg_change_callback): Use
3339 debug_printf.
3340
3341 2015-08-25 Yao Qi <yao.qi@linaro.org>
3342
3343 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3344
3345 2015-08-25 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3348
3349 2015-08-25 Yao Qi <yao.qi@linaro.org>
3350
3351 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3352 the code.
3353
3354 2015-08-25 Yao Qi <yao.qi@linaro.org>
3355
3356 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3357 Remove.
3358 (debug_reg_change_callback): Remove argument entry and add argument
3359 lwp. Remove local variable thread. Don't print thread id in the
3360 debugging output. Don't check whether pid of thread equals to pid.
3361 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3362 iterate_over_lwps instead find_inferior.
3363
3364 2015-08-24 Pedro Alves <palves@redhat.com>
3365
3366 * inferiors.c (get_first_process): New function.
3367 * inferiors.h (get_first_process): New declaration.
3368 * remote-utils.c (read_ptid): Default to the first process in the
3369 list, instead of to the current thread's process.
3370
3371 2015-08-24 Pedro Alves <palves@redhat.com>
3372
3373 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3374 * event-loop.c: Likewise.
3375 * remote-utils.c: Likewise.
3376 * tracepoint.c: Likewise.
3377
3378 2015-08-24 Pedro Alves <palves@redhat.com>
3379
3380 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3381 ptid_get_lwp.
3382
3383 2015-08-21 Pedro Alves <palves@redhat.com>
3384
3385 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3386 instead of literal 1.
3387
3388 2015-08-21 Pedro Alves <palves@redhat.com>
3389
3390 * tdesc.c (default_description): Explicitly zero-initialize.
3391
3392 2015-08-21 Pedro Alves <palves@redhat.com>
3393
3394 PR gdb/18749
3395 * inferiors.c (remove_thread): Discard any pending stop reply for
3396 this thread.
3397 * server.c (remove_all_on_match_pid): Rename to ...
3398 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3399 instead of a pid.
3400 (discard_queued_stop_replies): Change parameter to a ptid. Now
3401 extern.
3402 (handle_v_kill, kill_inferior_callback, captured_main)
3403 (process_serial_event): Adjust.
3404 * server.h (discard_queued_stop_replies): Declare.
3405
3406 2015-08-21 Pedro Alves <palves@redhat.com>
3407
3408 * linux-low.c (wait_for_sigstop): Always switch to no thread
3409 selected if the previously current thread dies.
3410 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3411 process instead of the current thread's.
3412 * remote-utils.c (input_interrupt): Don't check if there's no
3413 current thread.
3414 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3415 current thread to the general thread fails, error out.
3416 (handle_qxfer_auxv, handle_qxfer_libraries)
3417 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3418 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3419 (handle_query): Check if there's a thread selected instead of
3420 checking whether there's any thread in the thread list.
3421 (handle_qxfer_threads, handle_qxfer_btrace)
3422 (handle_qxfer_btrace_conf): Don't error out early if there's no
3423 thread in the thread list.
3424 (handle_v_cont, myresume): Don't set the current thread to the
3425 continue thread.
3426 (process_serial_event) <Hg handling>: Also set thread_id if the
3427 previous general thread is still alive.
3428 (process_serial_event) <g/G handling>: If setting the current
3429 thread to the general thread fails, error out.
3430 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3431 thread's lwp instead of the current thread's.
3432 * target.c (set_desired_thread): If the desired thread was not
3433 found, leave the current thread pointing to NULL. Return an int
3434 (boolean) indicating success.
3435 * target.h (set_desired_thread): Change return type to int.
3436
3437 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3438
3439 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3440 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3441 #includes.
3442 (ps_get_thread_area): New function.
3443
3444 2015-08-19 Gary Benson <gbenson@redhat.com>
3445
3446 * hostio.c (handle_pread): Do not attempt to read more data
3447 than hostio_reply_with_data can fit in a packet.
3448
3449 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3450
3451 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3452
3453 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3454
3455 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3456
3457 2015-08-06 Pedro Alves <palves@redhat.com>
3458
3459 * tracepoint.c (expr_eval_result): Now an int.
3460
3461 2015-08-06 Pedro Alves <palves@redhat.com>
3462
3463 * gdbthread.h (struct regcache): Forward declare.
3464 (struct thread_info) <regcache_data>: Now a struct regcache
3465 pointer.
3466 * inferiors.c (inferior_regcache_data)
3467 (set_inferior_regcache_data): Now work with struct regcache
3468 pointers.
3469 * inferiors.h (struct regcache): Forward declare.
3470 (inferior_regcache_data, set_inferior_regcache_data): Now work
3471 with struct regcache pointers.
3472 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3473 (free_register_cache_thread): Remove struct regcache pointer
3474 casts.
3475
3476 2015-08-06 Pedro Alves <palves@redhat.com>
3477
3478 * server.c (captured_main): On error, print the exception message
3479 to stderr, and if run_once is set, throw a quit.
3480
3481 2015-08-06 Pedro Alves <palves@redhat.com>
3482
3483 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3484 the current thread.
3485
3486 2015-08-06 Pedro Alves <palves@redhat.com>
3487
3488 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3489 reading beyond the passed in buffer length.
3490
3491 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3492
3493 * tracepoint.c (symbol_list) <required>: Remove.
3494
3495 2015-08-06 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3498 count if stopping and suspending threads.
3499 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3500 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3501 (linux_detach): Complete an ongoing step-over.
3502 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3503 throughout.
3504 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3505 (linux_wait_1): If passing a signal to the inferior after
3506 finishing a step-over, unsuspend and re-resume all lwps. If we
3507 see a single-step event but the thread should be continuing, don't
3508 pass the trap to gdb.
3509 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3510 internal_error instead of gdb_assert.
3511 (enqueue_pending_signal): New function.
3512 (check_ptrace_stopped_lwp_gone): Add debug output.
3513 (start_step_over): Use internal_error instead of gdb_assert.
3514 (complete_ongoing_step_over): New function.
3515 (linux_resume_one_thread): Don't resume a suspended thread.
3516 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3517 it stepping.
3518
3519 2015-08-06 Pedro Alves <palves@redhat.com>
3520
3521 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3522 (linux_thread_alive): Use lwp_is_marked_dead.
3523 (extended_event_reported): Delete.
3524 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3525 instead of extended_event_reported.
3526 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3527 as well.
3528 (lwp_is_marked_dead): New function.
3529 (lwp_running): Use lwp_is_marked_dead.
3530 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3531 comment.
3532
3533 2015-08-06 Pedro Alves <palves@redhat.com>
3534
3535 * linux-low.c (linux_wait_1): Move fork event output out of the
3536 !report_to_gdb check. Pass event_child->waitstatus to
3537 target_waitstatus_to_string instead of ourstatus.
3538
3539 2015-08-04 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3542 if current_thread is 32 bit.
3543
3544 2015-08-04 Yao Qi <yao.qi@linaro.org>
3545
3546 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3547 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3548 * server.c (extended_protocol): Remove "static".
3549 * server.h (extended_protocol): Declare it.
3550
3551 2015-08-04 Yao Qi <yao.qi@linaro.org>
3552
3553 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3554 both aarch64 and aarch32.
3555 (aarch64_set_pc): Likewise.
3556
3557 2015-08-04 Yao Qi <yao.qi@linaro.org>
3558
3559 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3560 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3561 arm-with-neon.xml to srv_xmlfiles.
3562 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3563 (is_64bit_tdesc): New function.
3564 (aarch64_linux_read_description): New function.
3565 (aarch64_arch_setup): Call aarch64_linux_read_description.
3566 (regs_info): Rename to regs_info_aarch64.
3567 (aarch64_regs_info): Return right regs_info.
3568 (initialize_low_arch): Call initialize_low_arch_aarch32.
3569
3570 2015-08-04 Yao Qi <yao.qi@linaro.org>
3571
3572 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3573 * linux-aarch32-low.c: New file.
3574 * linux-aarch32-low.h: New file.
3575 * linux-arm-low.c (arm_fill_gregset): Move it to
3576 linux-aarch32-low.c.
3577 (arm_store_gregset): Likewise.
3578 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3579 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3580 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3581 (regs_info): Rename to regs_info_arm.
3582 (arm_regs_info): Return regs_info_aarch32 if
3583 have_ptrace_getregset is 1 and target description is
3584 arm_with_neon or arm_with_vfpv3.
3585 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3586 Call initialize_low_arch_aarch32 instead.
3587
3588 2015-08-04 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3591 * linux-low.c: ... here.
3592 * linux-low.h (have_ptrace_getregset): Declare it.
3593
3594 2015-08-04 Pedro Alves <palves@redhat.com>
3595
3596 * thread-db.c (struct thread_db): Use new typedefs.
3597 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3598 CHK calls.
3599 (disable_thread_event_reporting): Cast result of dlsym to
3600 destination function pointer type.
3601 (thread_db_mourn): Use td_ta_delete_ftype.
3602
3603 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3604
3605 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3606 arch variant.
3607 (CDX_BREAKPOINT): Define for R2.
3608 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3609 (the_low_target): Add comments.
3610
3611 2015-07-30 Yao Qi <yao.qi@linaro.org>
3612
3613 * linux-arm-low.c (arm_hwcap): Remove it.
3614 (arm_read_description): New local variable arm_hwcap. Don't
3615 set arm_hwcap to zero.
3616
3617 2015-07-30 Yao Qi <yao.qi@linaro.org>
3618
3619 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3620 Use regcache->tdesc instead.
3621 (arm_store_wmmxregset): Likewise.
3622 (arm_fill_vfpregset): Likewise.
3623 (arm_store_vfpregset): Likewise.
3624
3625 2015-07-30 Yao Qi <yao.qi@linaro.org>
3626
3627 * linux-arm-low.c: Include arch/arm.h.
3628 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3629 (arm_store_gregset): Likewise.
3630
3631 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3632
3633 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3634 ptrace's 4th parameter.
3635
3636 2015-07-27 Yao Qi <yao.qi@linaro.org>
3637
3638 * configure.srv (case aarch64*-*-linux*): Don't set
3639 srv_linux_usrregs.
3640
3641 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3642
3643 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3644 sys/ptrace.h.
3645 * linux-arm-low.c: Likewise.
3646 * linux-cris-low.c: Likewise.
3647 * linux-crisv32-low.c: Likewise.
3648 * linux-low.c: Likewise.
3649 * linux-m68k-low.c: Likewise.
3650 * linux-mips-low.c: Likewise.
3651 * linux-nios2-low.c: Likewise.
3652 * linux-s390-low.c: Likewise.
3653 * linux-sparc-low.c: Likewise.
3654 * linux-tic6x-low.c: Likewise.
3655 * linux-tile-low.c: Likewise.
3656 * linux-x86-low.c: Likewise.
3657
3658 2015-07-24 Pedro Alves <palves@redhat.com>
3659
3660 * config.in: Regenerate.
3661 * configure: Regenerate.
3662
3663 2015-07-24 Pedro Alves <palves@redhat.com>
3664
3665 * acinclude.m4: Include ../ptrace.m4.
3666 * configure.ac: Call GDB_AC_PTRACE.
3667 * config.in, configure: Regenerate.
3668
3669 2015-07-24 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-low.c (linux_create_inferior): Remove setting to
3672 proc->priv->new_inferior.
3673 (linux_attach): Likewise.
3674 (linux_low_filter_event): Likewise.
3675 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3676
3677 2015-07-24 Yao Qi <yao.qi@linaro.org>
3678
3679 * linux-low.c (linux_arch_setup): New function.
3680 (linux_low_filter_event): If proc->tdesc is NULL and
3681 proc->attached is true, call the_low_target.arch_setup.
3682 Otherwise, keep status pending, and return.
3683 (linux_resume_one_lwp_throw): Don't call get_pc if
3684 thread->while_stepping isn't NULL. Don't call
3685 get_thread_regcache if proc->tdesc is NULL.
3686 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3687 (linux_target_ops): Install arch_setup.
3688 * server.c (start_inferior): Call the_target->arch_setup.
3689 * target.h (struct target_ops) <arch_setup>: New field.
3690 (target_arch_setup): New marco.
3691 * lynx-low.c (lynx_target_ops): Update.
3692 * nto-low.c (nto_target_ops): Update.
3693 * spu-low.c (spu_target_ops): Update.
3694 * win32-low.c (win32_target_ops): Update.
3695
3696 2015-07-24 Yao Qi <yao.qi@linaro.org>
3697
3698 * linux-low.c (linux_add_process): Don't set
3699 proc->priv->new_inferior.
3700 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3701 (linux_attach): Likewise.
3702
3703 2015-07-24 Yao Qi <yao.qi@linaro.org>
3704
3705 * server.c (start_inferior): Code refactor.
3706
3707 2015-07-24 Yao Qi <yao.qi@linaro.org>
3708
3709 * server.c (process_serial_event): Set general_thread.
3710
3711 2015-07-21 Yao Qi <yao.qi@linaro.org>
3712
3713 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3714 aarch64_linux_get_debug_reg_capacity.
3715
3716 2015-07-17 Yao Qi <yao.qi@linaro.org>
3717
3718 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3719 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3720 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3721 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3722 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3723 (AARCH64_HWP_ALIGNMENT): Likewise.
3724 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3725 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3726 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3727 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3728 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3729 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3730 (struct aarch64_debug_reg_state): Likewise.
3731 (struct arch_lwp_info): Likewise.
3732 (aarch64_align_watchpoint): Likewise.
3733 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3734 (aarch64_watchpoint_length): Likewise.
3735 (aarch64_point_encode_ctrl_reg): Likewise
3736 (aarch64_point_is_aligned): Likewise.
3737 (aarch64_align_watchpoint): Likewise.
3738 (aarch64_linux_set_debug_regs):
3739 (aarch64_dr_state_insert_one_point): Likewise.
3740 (aarch64_dr_state_remove_one_point): Likewise.
3741 (aarch64_handle_breakpoint): Likewise.
3742 (aarch64_handle_aligned_watchpoint): Likewise.
3743 (aarch64_handle_unaligned_watchpoint): Likewise.
3744 (aarch64_handle_watchpoint): Likewise.
3745
3746 2015-07-17 Yao Qi <yao.qi@linaro.org>
3747
3748 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3749 and don't aarch64_get_debug_reg_state. All callers update.
3750 (aarch64_handle_aligned_watchpoint): Likewise.
3751 (aarch64_handle_unaligned_watchpoint): Likewise.
3752 (aarch64_handle_watchpoint): Likewise.
3753 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3754 (aarch64_remove_point): Likewise.
3755
3756 2015-07-17 Yao Qi <yao.qi@linaro.org>
3757
3758 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3759 debug_printf.
3760 (aarch64_handle_unaligned_watchpoint): Likewise.
3761
3762 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3763
3764 Revert the previous 3 commits:
3765 Move gdb_regex* to common/
3766 Move linux_find_memory_regions_full & co.
3767 gdbserver build-id attribute generator
3768
3769 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3770 Jan Kratochvil <jan.kratochvil@redhat.com>
3771
3772 gdbserver build-id attribute generator.
3773 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3774 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3775 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3776 (find_phdr): New.
3777 (get_dynamic): Use find_pdhr to traverse program headers.
3778 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3779 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3780 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3781 (get_hex_build_id): New.
3782 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3783 to reply XML document.
3784
3785 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3786 Jan Kratochvil <jan.kratochvil@redhat.com>
3787
3788 * target.c: Include target/target-utils.h and fcntl.h.
3789 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3790 (target_fileio_read_stralloc): New functions.
3791
3792 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3793
3794 * Makefile.in (OBS): Add gdb_regex.o.
3795 (gdb_regex.o): New.
3796 * config.in: Rebuilt.
3797 * configure: Rebuilt.
3798
3799 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3800 Jan Kratochvil <jan.kratochvil@redhat.com>
3801
3802 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3803 * Makefile.in (OBS): Add target-utils.o.
3804 (linux-maps.o, target-utils.o): New.
3805 * configure.srv (srv_linux_obj): Add linux-maps.o.
3806
3807 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3808
3809 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3810 function, return 1.
3811 (the_low_target): Install it.
3812
3813 2015-07-14 Pedro Alves <palves@redhat.com>
3814
3815 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3816 Instead, ignore ECHILD, and throw an error for other errnos.
3817
3818 2015-07-10 Pedro Alves <palves@redhat.com>
3819
3820 * event-loop.c (struct callback_event) <data>: Change type to
3821 gdb_client_data instance instead of gdb_client_data pointer.
3822 (append_callback_event): Adjust.
3823
3824 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3825
3826 * linux-aarch64-low.c: Add comments for each linux_target_ops
3827 method. Remove comments already covered in target_ops and
3828 linux_target_ops definitions.
3829 (the_low_target): Add comments for each unimplemented method.
3830
3831 2015-07-09 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-aarch64-low.c (aarch64_regmap): Remove.
3834 (aarch64_usrregs_info): Remove.
3835 (regs_info): Set field usrregs to NULL.
3836
3837 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3838
3839 * linux-low.c: Include "rsp-low.h"
3840 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3841 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3842 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3843 (handle_btrace_enable_pt): New.
3844 (handle_btrace_general_set): Support "pt".
3845 (handle_btrace_conf_general_set): Support "pt:size".
3846
3847 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3848
3849 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3850 Z_PACKET_SW_BP.
3851
3852 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3853
3854 * linux-aarch64-low.c: Remove comment about endianness.
3855 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3856 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3857 memcmp.
3858
3859 2015-06-24 Gary Benson <gbenson@redhat.com>
3860
3861 * linux-i386-ipa.c (stdint.h): Do not include.
3862 * lynx-i386-low.c (stdint.h): Likewise.
3863 * lynx-ppc-low.c (stdint.h): Likewise.
3864 * mem-break.c (stdint.h): Likewise.
3865 * thread-db.c (stdint.h): Likewise.
3866 * tracepoint.c (stdint.h): Likewise.
3867 * win32-low.c (stdint.h): Likewise.
3868
3869 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3870
3871 * server.c (write_qxfer_response): Update call to
3872 remote_escape_output.
3873
3874 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3875 Jan Kratochvil <jan.kratochvil@redhat.com>
3876
3877 Merge multiple hex conversions.
3878 * gdbreplay.c (tohex): Rename to 'fromhex'.
3879 (logchar): Use fromhex.
3880
3881 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3882
3883 * server.c (handle_qxfer_libraries): Set `version' attribute for
3884 <library-list>.
3885
3886 2015-06-10 Gary Benson <gbenson@redhat.com>
3887
3888 * target.h (struct target_ops) <multifs_open>: New field.
3889 <multifs_unlink>: Likewise.
3890 <multifs_readlink>: Likewise.
3891 * linux-low.c (nat/linux-namespaces.h): New include.
3892 (linux_target_ops): Initialize the_target->multifs_open,
3893 the_target->multifs_unlink and the_target->multifs_readlink.
3894 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3895 * hostio.c (hostio_fs_pid): New static variable.
3896 (hostio_handle_new_gdb_connection): New function.
3897 (handle_setfs): Likewise.
3898 (handle_open): Use the_target->multifs_open as appropriate.
3899 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3900 (handle_readlink): Use the_target->multifs_readlink as
3901 appropriate.
3902 (handle_vFile): Handle vFile:setfs packets.
3903 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3904 after target_handle_new_gdb_connection.
3905
3906 2015-06-10 Gary Benson <gbenson@redhat.com>
3907
3908 * configure.ac (AC_CHECK_FUNCS): Add setns.
3909 * config.in: Regenerate.
3910 * configure: Likewise.
3911 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3912 (linux-namespaces.o): New rule.
3913 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3914
3915 2015-06-09 Gary Benson <gbenson@redhat.com>
3916
3917 * hostio.c (handle_open): Process mode argument with
3918 fileio_to_host_mode.
3919
3920 2015-06-01 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3923 * linux-x86-low.c: Likewise.
3924
3925 2015-05-28 Don Breazeal <donb@codesourcery.com>
3926
3927 * linux-low.c (handle_extended_wait): Initialize
3928 thread_info.last_resume_kind for new fork children.
3929
3930 2015-05-15 Pedro Alves <palves@redhat.com>
3931
3932 * target.h (target_handle_new_gdb_connection): Rewrite using if
3933 wrapped in do/while.
3934
3935 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3936
3937 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3938 * configure, config.in: Regenerate.
3939 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3940 Declare typedef.
3941
3942 2015-05-12 Don Breazeal <donb@codesourcery.com>
3943
3944 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3945 PTRACE_EVENT_VFORK_DONE.
3946 (linux_low_ptrace_options, extended_event_reported): Add vfork
3947 events.
3948 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3949 and "vforkdone" for RSP 'T' Stop Reply Packet.
3950 * server.h (report_vfork_events): Declare
3951 global variable.
3952
3953 2015-05-12 Don Breazeal <donb@codesourcery.com>
3954
3955 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3956 (the_low_target) <new_fork>: Initialize new member.
3957 * linux-arm-low.c (arm_new_fork): New function.
3958 (the_low_target) <new_fork>: Initialize new member.
3959 * linux-low.c (handle_extended_wait): Call new target function
3960 new_fork.
3961 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3962 * linux-mips-low.c (mips_add_watchpoint): New function
3963 extracted from mips_insert_point.
3964 (the_low_target) <new_fork>: Initialize new member.
3965 (mips_linux_new_fork): New function.
3966 (mips_insert_point): Call mips_add_watchpoint.
3967 * linux-x86-low.c (x86_linux_new_fork): New function.
3968 (the_low_target) <new_fork>: Initialize new member.
3969
3970 2015-05-12 Don Breazeal <donb@codesourcery.com>
3971
3972 * linux-low.c (handle_extended_wait): Implement return value,
3973 rename argument 'event_child' to 'event_lwp', handle
3974 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3975 (linux_low_ptrace_options): New function.
3976 (linux_low_filter_event): Call linux_low_ptrace_options,
3977 use different argument fo linux_enable_event_reporting,
3978 use return value from handle_extended_wait.
3979 (extended_event_reported): New function.
3980 (linux_wait_1): Call extended_event_reported and set
3981 status to report fork events.
3982 (linux_write_memory): Add pid to debug message.
3983 (reset_lwp_ptrace_options_callback): New function.
3984 (linux_handle_new_gdb_connection): New function.
3985 (linux_target_ops): Initialize new structure member.
3986 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3987 * lynx-low.c: Initialize new structure member.
3988 * remote-utils.c (prepare_resume_reply): Implement stop reason
3989 "fork" for "T" stop message.
3990 * server.c (handle_query): Call handle_new_gdb_connection.
3991 * server.h (report_fork_events): Declare global flag.
3992 * target.h (struct target_ops) <handle_new_gdb_connection>:
3993 New member.
3994 (target_handle_new_gdb_connection): New macro.
3995 * win32-low.c: Initialize new structure member.
3996
3997 2015-05-12 Don Breazeal <donb@codesourcery.com>
3998
3999 * mem-break.c (APPEND_TO_LIST): Define macro.
4000 (clone_agent_expr): New function.
4001 (clone_one_breakpoint): New function.
4002 (clone_all_breakpoints): New function.
4003 * mem-break.h: Declare new functions.
4004
4005 2015-05-12 Don Breazeal <donb@codesourcery.com>
4006
4007 * linux-low.c (linux_supports_fork_events): New function.
4008 (linux_supports_vfork_events): New function.
4009 (linux_target_ops): Initialize new structure members.
4010 (initialize_low): Call linux_check_ptrace_features.
4011 * lynx-low.c (lynx_target_ops): Initialize new structure
4012 members.
4013 * server.c (report_fork_events, report_vfork_events):
4014 New global flags.
4015 (handle_query): Add new features to qSupported packet and
4016 response.
4017 (captured_main): Initialize new global variables.
4018 * target.h (struct target_ops) <supports_fork_events>:
4019 New member.
4020 <supports_vfork_events>: New member.
4021 (target_supports_fork_events): New macro.
4022 (target_supports_vfork_events): New macro.
4023 * win32-low.c (win32_target_ops): Initialize new structure
4024 members.
4025
4026 2015-05-12 Gary Benson <gbenson@redhat.com>
4027
4028 * server.c (handle_qxfer_exec_file): Use current process
4029 if annex is empty.
4030
4031 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4032
4033 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4034 Remove HAVE_PTRACE_GETREGS conditionals.
4035 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4036 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4037
4038 2015-05-08 Yao Qi <yao.qi@linaro.org>
4039
4040 * linux-low.c (linux_supports_conditional_breakpoints): New
4041 function.
4042 (linux_target_ops): Install new target method.
4043 * lynx-low.c (lynx_target_ops): Install NULL hook for
4044 supports_conditional_breakpoints.
4045 * nto-low.c (nto_target_ops): Likewise.
4046 * spu-low.c (spu_target_ops): Likewise.
4047 * win32-low.c (win32_target_ops): Likewise.
4048 * server.c (handle_query): Check
4049 target_supports_conditional_breakpoints.
4050 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4051 New field.
4052 (target_supports_conditional_breakpoints): New macro.
4053
4054 2015-05-06 Pedro Alves <palves@redhat.com>
4055
4056 PR server/18081
4057 * server.c (start_inferior): If the process exits, mourn it.
4058
4059 2015-04-21 Gary Benson <gbenson@redhat.com>
4060
4061 * hostio.c (fileio_open_flags_to_host): Factored out to
4062 fileio_to_host_openflags in common/fileio.c. Single use
4063 updated.
4064
4065 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4066
4067 * linux-xtensa-low.c (xtensa_fill_gregset)
4068 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4069 XCHAL_HAVE_LOOP.
4070
4071 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4072
4073 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4074 (regs_info): Replace usrregs pointer with NULL.
4075
4076 2015-04-17 Gary Benson <gbenson@redhat.com>
4077
4078 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4079 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4080 * server.c (handle_qxfer_exec_file): New function.
4081 (qxfer_packets): Add exec-file entry.
4082 (handle_query): Report qXfer:exec-file:read as supported packet.
4083
4084 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4085
4086 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4087
4088 2015-04-09 Gary Benson <gbenson@redhat.com>
4089
4090 * hostio-errno.c (errno_to_fileio_error): Remove function.
4091 Update caller to use remote_fileio_to_fio_error.
4092
4093 2015-04-09 Yao Qi <yao.qi@linaro.org>
4094
4095 * linux-low.c (linux_insert_point): Call
4096 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4097 (linux_remove_point): Call remove_memory_breakpoint if type is
4098 raw_bkpt_type_sw.
4099 * linux-x86-low.c (x86_insert_point): Don't call
4100 insert_memory_breakpoint.
4101 (x86_remove_point): Don't call remove_memory_breakpoint.
4102
4103 2015-04-01 Pedro Alves <palves@redhat.com>
4104 Cleber Rosa <crosa@redhat.com>
4105
4106 * server.c (gdbserver_usage): Reorganize and extend the usage
4107 message.
4108
4109 2015-03-24 Pedro Alves <palves@redhat.com>
4110
4111 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4112 output. Also dump TRAP_TRACE.
4113 (linux_low_filter_event): In debug output, distinguish a
4114 resume_stop SIGSTOP from a delayed SIGSTOP.
4115
4116 2015-03-24 Gary Benson <gbenson@redhat.com>
4117
4118 * linux-x86-low.c (x86_linux_new_thread): Moved to
4119 nat/x86-linux.c.
4120 (x86_linux_prepare_to_resume): Likewise.
4121
4122 2015-03-24 Gary Benson <gbenson@redhat.com>
4123
4124 * Makefile.in (x86-linux-dregs.o): New rule.
4125 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4126 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4127 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4128 (x86_linux_dr_get): Likewise.
4129 (x86_linux_dr_set): Likewise.
4130 (update_debug_registers_callback): Likewise.
4131 (x86_linux_dr_set_addr): Likewise.
4132 (x86_linux_dr_get_addr): Likewise.
4133 (x86_linux_dr_set_control): Likewise.
4134 (x86_linux_dr_get_control): Likewise.
4135 (x86_linux_dr_get_status): Likewise.
4136 (x86_linux_update_debug_registers): Likewise.
4137
4138 2015-03-24 Gary Benson <gbenson@redhat.com>
4139
4140 * linux-x86-low.c (x86_linux_update_debug_registers):
4141 New function, factored out from...
4142 (x86_linux_prepare_to_resume): ...this.
4143
4144 2015-03-24 Gary Benson <gbenson@redhat.com>
4145
4146 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4147 (x86_linux_dr_set): Likewise.
4148 (update_debug_registers_callback): Likewise.
4149 (x86_linux_dr_set_addr): Likewise.
4150 (x86_linux_dr_get_addr): Likewise.
4151 (x86_linux_dr_set_control): Likewise.
4152 (x86_linux_dr_get_control): Likewise.
4153 (x86_linux_dr_get_status): Likewise.
4154 (x86_linux_prepare_to_resume): Likewise.
4155
4156 2015-03-24 Gary Benson <gbenson@redhat.com>
4157
4158 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4159 Use perror_with_name. Pass string through gettext.
4160 (x86_linux_dr_set): Likewise.
4161
4162 2015-03-24 Gary Benson <gbenson@redhat.com>
4163
4164 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4165 (x86_linux_dr_set_addr): ...this.
4166 (x86_dr_low_get_addr): Rename to...
4167 (x86_linux_dr_get_addr): ...this.
4168 (x86_dr_low_set_control): Rename to...
4169 (x86_linux_dr_set_control): ...this.
4170 (x86_dr_low_get_control): Rename to...
4171 (x86_linux_dr_get_control): ...this.
4172 (x86_dr_low_get_status): Rename to...
4173 (x86_linux_dr_get_status): ...this.
4174 (x86_dr_low): Update with new function names.
4175
4176 2015-03-24 Gary Benson <gbenson@redhat.com>
4177
4178 * Makefile.in (x86-linux.o): New rule.
4179 * configure.srv: Add x86-linux.o to relevant targets.
4180 * linux-low.c (lwp_set_arch_private_info): New function.
4181 (lwp_arch_private_info): Likewise.
4182 * linux-x86-low.c: Include nat/x86-linux.h.
4183 (arch_lwp_info): Removed structure.
4184 (update_debug_registers_callback):
4185 Use lwp_set_debug_registers_changed.
4186 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4187 and lwp_set_debug_registers_changed.
4188 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4189
4190 2015-03-24 Gary Benson <gbenson@redhat.com>
4191
4192 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4193 * linux-arm-low.c (arm_new_thread): Likewise.
4194 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4195 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4196 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4197 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4198
4199 2015-03-24 Gary Benson <gbenson@redhat.com>
4200
4201 * linux-low.c (ptid_of_lwp): New function.
4202 (lwp_is_stopped): Likewise.
4203 (lwp_stop_reason): Likewise.
4204 * linux-x86-low.c (update_debug_registers_callback):
4205 Use lwp_is_stopped.
4206 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4207 lwp_stop_reason.
4208
4209 2015-03-24 Gary Benson <gbenson@redhat.com>
4210
4211 * linux-low.h (linux_stop_lwp): Remove declaration.
4212
4213 2015-03-24 Gary Benson <gbenson@redhat.com>
4214
4215 * linux-low.h: Include nat/linux-nat.h.
4216 * linux-low.c (iterate_over_lwps_args): New structure.
4217 (iterate_over_lwps_filter): New function.
4218 (iterate_over_lwps): Likewise.
4219 * linux-x86-low.c (update_debug_registers_callback):
4220 Update signature to what iterate_over_lwps expects.
4221 Remove PID check that iterate_over_lwps now performs.
4222 (x86_dr_low_set_addr): Use iterate_over_lwps.
4223 (x86_dr_low_set_control): Likewise.
4224
4225 2015-03-24 Gary Benson <gbenson@redhat.com>
4226
4227 * linux-x86-low.c (x86_debug_reg_state): New function.
4228 (x86_linux_prepare_to_resume): Use the above.
4229
4230 2015-03-24 Gary Benson <gbenson@redhat.com>
4231
4232 * linux-low.c (current_lwp_ptid): New function.
4233 * linux-x86-low.c: Include nat/linux-nat.h.
4234 (x86_dr_low_get_addr): Use current_lwp_ptid.
4235 (x86_dr_low_get_control): Likewise.
4236 (x86_dr_low_get_status): Likewise.
4237
4238 2015-03-20 Pedro Alves <palves@redhat.com>
4239
4240 * tracepoint.c (cmd_qtstatus): Make "str" const.
4241
4242 2015-03-20 Pedro Alves <palves@redhat.com>
4243
4244 * server.c (handle_general_set): Make "req_str" const.
4245
4246 2015-03-19 Pedro Alves <palves@redhat.com>
4247
4248 * linux-low.c (linux_resume_one_lwp): Rename to ...
4249 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4250 instead call perror_with_name.
4251 (check_ptrace_stopped_lwp_gone): New function.
4252 (linux_resume_one_lwp): Reimplement as wrapper around
4253 linux_resume_one_lwp_throw that swallows errors if the LWP is
4254 gone.
4255
4256 2015-03-19 Pedro Alves <palves@redhat.com>
4257
4258 * linux-low.c (count_events_callback, select_event_lwp_callback):
4259 No longer check whether the thread has resume_stop as last resume
4260 kind.
4261
4262 2015-03-19 Pedro Alves <palves@redhat.com>
4263
4264 * linux-low.c (count_events_callback, select_event_lwp_callback):
4265 Use the lwp's status_pending_p field, not the thread's.
4266
4267 2015-03-19 Pedro Alves <palves@redhat.com>
4268
4269 * linux-low.c (select_event_lwp_callback): Update comments to
4270 no longer mention SIGTRAP.
4271
4272 2015-03-18 Gary Benson <gbenson@redhat.com>
4273
4274 * server.c (handle_query): Do not report vFile:fstat as supported.
4275
4276 2015-03-11 Gary Benson <gbenson@redhat.com>
4277
4278 * hostio.c (sys/types.h): New include.
4279 (sys/stat.h): Likewise.
4280 (common-remote-fileio.h): Likewise.
4281 (handle_fstat): New function.
4282 (handle_vFile): Handle vFile:fstat packets.
4283
4284 2015-03-11 Gary Benson <gbenson@redhat.com>
4285
4286 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4287 struct stat.st_blocks and struct stat.st_blksize.
4288 * configure: Regenerate.
4289 * config.in: Likewise.
4290 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4291 (OBS): Add common-remote-fileio.o.
4292 (common-remote-fileio.o): New rule.
4293
4294 2015-03-09 Pedro Alves <palves@redhat.com>
4295
4296 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4297 'struct sockaddr' pointer in 'accept' call.
4298
4299 2015-03-09 Pedro Alves <palves@redhat.com>
4300
4301 Revert:
4302 2015-03-07 Pedro Alves <palves@redhat.com>
4303 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4304 or <winsock2.h> here. Instead include "gdb_socket.h".
4305 (remote_open): Use union gdb_sockaddr_u.
4306 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4307 or <winsock2.h> here. Instead include "gdb_socket.h".
4308 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4309 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4310 or <sys/un.h>.
4311 (init_named_socket, gdb_agent_helper_thread): Use union
4312 gdb_sockaddr_u.
4313
4314 2015-03-07 Pedro Alves <palves@redhat.com>
4315
4316 * configure.ac (build_warnings): Move
4317 -Wdeclaration-after-statement to the C-specific set.
4318 * configure: Regenerate.
4319
4320 2015-03-07 Pedro Alves <palves@redhat.com>
4321
4322 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4323 or <winsock2.h> here. Instead include "gdb_socket.h".
4324 (remote_open): Use union gdb_sockaddr_u.
4325 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4326 or <winsock2.h> here. Instead include "gdb_socket.h".
4327 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4328 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4329 or <sys/un.h>.
4330 (init_named_socket, gdb_agent_helper_thread): Use union
4331 gdb_sockaddr_u.
4332
4333 2015-03-07 Pedro Alves <palves@redhat.com>
4334
4335 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4336 instead.
4337
4338 2015-03-06 Yao Qi <yao.qi@linaro.org>
4339
4340 * linux-aarch64-low.c (aarch64_insert_point): Use
4341 show_debug_regs as a boolean.
4342 (aarch64_remove_point): Likewise.
4343
4344 2015-03-05 Pedro Alves <palves@redhat.com>
4345
4346 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4347 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4348 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4349 * nto-low.c (nto_target_ops): Likewise.
4350 * spu-low.c (spu_target_ops): Likewise.
4351 * win32-low.c (win32_target_ops): Likewise.
4352
4353 2015-03-04 Pedro Alves <palves@redhat.com>
4354
4355 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4356 Decide whether a breakpoint triggered based on the SIGTRAP's
4357 siginfo.si_code.
4358 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4359 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4360 (linux_low_filter_event): Check for breakpoints before checking
4361 watchpoints.
4362 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4363 siginfo.si_code.
4364 (linux_stopped_by_sw_breakpoint)
4365 (linux_supports_stopped_by_sw_breakpoint)
4366 (linux_stopped_by_hw_breakpoint)
4367 (linux_supports_stopped_by_hw_breakpoint): New functions.
4368 (linux_target_ops): Install new target methods.
4369
4370 2015-03-04 Pedro Alves <palves@redhat.com>
4371
4372 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4373 * server.c (swbreak_feature, hwbreak_feature): New globals.
4374 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4375 (captured_main): Clear swbreak_feature and hwbreak_feature.
4376 * server.h (swbreak_feature, hwbreak_feature): Declare.
4377 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4378 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4379 supports_stopped_by_hw_breakpoint>: New fields.
4380 (target_supports_stopped_by_sw_breakpoint)
4381 (target_stopped_by_sw_breakpoint)
4382 (target_supports_stopped_by_hw_breakpoint)
4383 (target_stopped_by_hw_breakpoint): Declare.
4384
4385 2015-03-04 Pedro Alves <palves@redhat.com>
4386
4387 enum lwp_stop_reason -> enum target_stop_reason
4388 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4389 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4390 (linux_wait_1, stuck_in_jump_pad_callback)
4391 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4392 (linux_stopped_by_watchpoint):
4393 * linux-low.h (enum lwp_stop_reason): Delete.
4394 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4395 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4396
4397 2015-03-04 Yao Qi <yao.qi@linaro.org>
4398
4399 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4400
4401 2015-03-03 Gary Benson <gbenson@redhat.com>
4402
4403 * hostio.c (handle_vFile): Fix prefix lengths.
4404
4405 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4406
4407 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4408 ptr_bits.
4409
4410 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4411
4412 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4413 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4414 (clean): Add "rm -f" for above C files.
4415 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4416 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4417 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4418 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4419 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4420 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4421 (init_registers_s390x_vx_linux64)
4422 (init_registers_s390x_tevx_linux64)
4423 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4424 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4425 declarations.
4426 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4427 (s390_store_vxrs_high): New functions.
4428 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4429 NT_S390_VXRS_HIGH.
4430 (s390_arch_setup): Add logic for selecting one of the new target
4431 descriptions. Activate the new vector regsets if applicable.
4432 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4433 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4434 and init_registers_s390x_tevx_linux64.
4435
4436 2015-03-01 Pedro Alves <palves@redhat.com>
4437
4438 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4439 parameter.
4440
4441 2015-02-27 Pedro Alves <palves@redhat.com>
4442
4443 * linux-x86-low.c (u_debugreg_offset): New function.
4444 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4445
4446 2015-02-27 Pedro Alves <palves@redhat.com>
4447
4448 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4449 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4450 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4451 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4452 (ps_lsetfpregs, ps_getpid)
4453 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4454 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4455 (ps_lsetxregs, ps_plog): Declare.
4456
4457 2015-02-27 Pedro Alves <palves@redhat.com>
4458
4459 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4460 IP_AGENT_EXPORT_FUNC.
4461 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4462 IP_AGENT_EXPORT_FUNC.
4463 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4464 (IP_AGENT_EXPORT): Delete.
4465 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4466 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4467 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4468 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4469 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4470 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4471 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4472 (traceframe_read_count, traceframe_write_count)
4473 (traceframes_created, trace_state_variables, get_raw_reg)
4474 (get_trace_state_variable_value, set_trace_state_variable_value)
4475 (ust_loaded, helper_thread_id, cmd_buf): Use
4476 IPA_SYM_EXPORTED_NAME.
4477 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4478 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4479 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4480 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4481 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4482 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4483 EXTERN_C_PUSH/EXTERN_C_POP.
4484 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4485 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4486 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4487 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4488 (traceframe_write_count, traceframe_read_count)
4489 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4490 (about_to_request_buffer_space, get_trace_state_variable_value)
4491 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4492 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4493 EXTERN_C_PUSH/EXTERN_C_POP.
4494 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4495 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4496 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4497 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4498 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4499 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4500 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4501 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4502 Define.
4503 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4504 (IP_AGENT_EXPORT_VAR_DECL): Define.
4505 (tracing): Declare.
4506 (gdb_agent_get_raw_reg): Declare.
4507
4508 2015-02-27 Tom Tromey <tromey@redhat.com>
4509 Pedro Alves <palves@redhat.com>
4510
4511 Rename symbols whose names are reserved C++ keywords throughout.
4512
4513 2015-02-27 Pedro Alves <palves@redhat.com>
4514
4515 * Makefile.in (COMPILER): New, get it from autoconf.
4516 (CXX): Get from autoconf instead.
4517 (COMPILE.pre): Use COMPILER.
4518 (CC-LD): Rename to ...
4519 (CC_LD): ... this. Use COMPILER.
4520 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4521 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4522 * acinclude.m4: Include build-with-cxx.m4.
4523 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4524 Disable -Werror by default if building in C++ mode.
4525 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4526 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4527 the C++ compiler. Save/restore CXXFLAGS too.
4528 * configure: Regenerate.
4529
4530 2015-02-27 Pedro Alves <palves@redhat.com>
4531
4532 * acinclude.m4: Include libiberty.m4.
4533 * configure.ac: Call libiberty_INIT.
4534 * config.in, configure: Regenerate.
4535
4536 2015-02-26 Pedro Alves <palves@redhat.com>
4537
4538 * linux-low.c (linux_wait_1): When incrementing the PC past a
4539 program breakpoint always use the_low_target.breakpoint_len as
4540 increment, rather than the maximum between that and
4541 the_low_target.decr_pc_after_break.
4542
4543 2015-02-23 Pedro Alves <palves@redhat.com>
4544
4545 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4546 thread was doing a step-over; always adjust the PC if
4547 we stepped over a permanent breakpoint.
4548 (linux_wait_1): If we stepped over breakpoint that was on top of a
4549 permanent breakpoint, manually advance the PC past it.
4550
4551 2015-02-23 Pedro Alves <palves@redhat.com>
4552
4553 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4554 modes.
4555 (x86_fill_gregset, x86_store_gregset): Use it when handling
4556 $orig_eax.
4557
4558 2015-02-20 Pedro Alves <palves@redhat.com>
4559
4560 * thread-db.c: Include "nat/linux-procfs.h".
4561 (thread_db_init): Skip listing new threads if the kernel supports
4562 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4563
4564 2015-02-20 Pedro Alves <palves@redhat.com>
4565
4566 * linux-low.c (status_pending_p_callback): Use ptid_match.
4567
4568 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4569
4570 PR breakpoints/16812
4571 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4572 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4573 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4574
4575 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4576
4577 PR breakpoints/15956
4578 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4579
4580 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4581
4582 * linux-low.c (linux_low_btrace_conf): Print size.
4583 * server.c (handle_btrace_conf_general_set): New.
4584 (hanle_general_set): Call handle_btrace_conf_general_set.
4585 (handle_query): Report Qbtrace-conf:bts:size as supported.
4586
4587 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4588
4589 * linux-low.c (linux_low_enable_btrace): Update parameters.
4590 (linux_low_btrace_conf): New.
4591 (linux_target_ops)<to_btrace_conf>: Initialize.
4592 * server.c (current_btrace_conf): New.
4593 (handle_btrace_enable): Rename to ...
4594 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4595 to target_enable_btrace. Update comment. Update users.
4596 (handle_qxfer_btrace_conf): New.
4597 (qxfer_packets): Add btrace-conf entry.
4598 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4599 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4600 (target_ops)<read_btrace_conf>: New.
4601 (target_enable_btrace): Update parameters.
4602 (target_read_btrace_conf): New.
4603
4604 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4605
4606 * server.c (handle_btrace_general_set): Remove call to
4607 target_supports_btrace.
4608 (supported_btrace_packets): New.
4609 (handle_query): Call supported_btrace_packets.
4610 * target.h: include btrace-common.h.
4611 (btrace_target_info): Removed.
4612 (supports_btrace, target_supports_btrace): Update parameters.
4613
4614 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4615
4616 * Makefile.in (SFILES): Add common/btrace-common.c.
4617 (OBS): Add common/btrace-common.o.
4618 (btrace-common.o): Add build rules.
4619 * linux-low: Include btrace-common.h.
4620 (linux_low_read_btrace): Use struct btrace_data. Call
4621 btrace_data_init and btrace_data_fini.
4622
4623 2015-02-06 Pedro Alves <palves@redhat.com>
4624
4625 * thread-db.c (find_new_threads_callback): Add debug output.
4626
4627 2015-02-04 Pedro Alves <palves@redhat.com>
4628
4629 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4630 (resume_stopped_resumed_lwps): New function.
4631 (linux_wait_for_event_filtered): Use it.
4632
4633 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4634
4635 * Makefile.in (SFILES): Add linux-personality.c.
4636 (linux-personality.o): New rule.
4637 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4638 list of objects to be built.
4639 * linux-low.c: Include nat/linux-personality.h.
4640 (linux_create_inferior): Remove code to disable address space
4641 randomization (moved to ../nat/linux-personality.c). Create
4642 cleanup to disable address space randomization.
4643
4644 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4645
4646 * Makefile.in (posix-strerror.o): New rule.
4647 (mingw-strerror.o): Likewise.
4648 * configure: Regenerated.
4649 * configure.ac: Source file ../common/common.host. Initialize new
4650 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4651
4652 2015-01-14 Yao Qi <yao@codesourcery.com>
4653
4654 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4655 (ppc-linux.o): New rule.
4656 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4657 * configure.ac: AC_CHECK_FUNCS(getauxval).
4658 * config.in: Re-generated.
4659 * configure: Re-generated.
4660 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4661 ppc64_64bit_inferior_p
4662
4663 2015-01-14 Yao Qi <yao@codesourcery.com>
4664
4665 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4666 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4667 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4668 (PT_ORIG_R3, PT_TRAP): Likewise.
4669 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4670 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4671 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4672
4673 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4674
4675 * i387-fp.c (i387_cache_to_xsave): In look over
4676 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4677 zmmh_low_space field by use of zmmh_high_space.
4678
4679 2015-01-09 Pedro Alves <palves@redhat.com>
4680
4681 * linux-low.c (step_over_bkpt): Move higher up in the file.
4682 (handle_extended_wait): Don't store the stop_pc here.
4683 (get_stop_pc): Adjust comments and rename to ...
4684 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4685 stopped for a software breakpoint or hardware breakpoint.
4686 (thread_still_has_status_pending_p): New function.
4687 (status_pending_p_callback): Use
4688 thread_still_has_status_pending_p. If the event is no longer
4689 interesting, resume the LWP.
4690 (handle_tracepoints): Add assert.
4691 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4692 (wstatus_maybe_breakpoint): New function.
4693 (cancel_breakpoint): Delete function.
4694 (check_stopped_by_watchpoint): New function, factored out from
4695 linux_low_filter_event.
4696 (lp_status_maybe_breakpoint): Delete function.
4697 (linux_low_filter_event): Remove filter_ptid argument.
4698 Leave thread group exits pending here. Store the LWP's stop PC.
4699 Always leave events pending.
4700 (linux_wait_for_event_filtered): Pull all events out of the
4701 kernel, and leave them all pending.
4702 (count_events_callback, select_event_lwp_callback): Consider all
4703 events.
4704 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4705 (select_event_lwp): Only give preference to the stepping LWP in
4706 all-stop mode. Adjust comments.
4707 (ignore_event): New function.
4708 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4709 references to cancel_breakpoints. Adjust to renames. Also give
4710 equal priority to all LWPs that have had events in non-stop mode.
4711 If reporting a software breakpoint event, unadjust the LWP's PC.
4712 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4713 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4714 Adjust.
4715 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4716 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4717 (linux_stopped_by_watchpoint): Adjust.
4718 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4719 * linux-low.h (enum lwp_stop_reason): New.
4720 (struct lwp_info) <stop_pc>: Adjust comment.
4721 <stopped_by_watchpoint>: Delete field.
4722 <stop_reason>: New field.
4723 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4724 * mem-break.c (software_breakpoint_inserted_here)
4725 (hardware_breakpoint_inserted_here): New function.
4726 * mem-break.h (software_breakpoint_inserted_here)
4727 (hardware_breakpoint_inserted_here): Declare.
4728 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4729 (cancel_breakpoints): Delete.
4730 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4731 (upload_fast_traceframes): Remove references to
4732 cancel_breakpoints.
4733
4734 2015-01-09 Pedro Alves <palves@redhat.com>
4735
4736 * thread-db.c (find_new_threads_callback): Ignore thread if the
4737 kernel thread ID is -1.
4738
4739 2015-01-09 Pedro Alves <palves@redhat.com>
4740
4741 * linux-low.c (linux_attach_fail_reason_string): Move to
4742 nat/linux-ptrace.c, and rename.
4743 (linux_attach_lwp): Update comment.
4744 (attach_proc_task_lwp_callback): New function.
4745 (linux_attach): Adjust to rename and use
4746 linux_proc_attach_tgid_threads.
4747 (linux_attach_fail_reason_string): Delete declaration.
4748
4749 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4750
4751 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4752 * server.c (gdbserver_version): Likewise.
4753
4754 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4755
4756 * remote-utils.c: Include ctype.h.
4757 (input_interrupt): Explicitly handle the case when the char
4758 received is the NUL byte. Improve the printing of non-ASCII
4759 characters.
4760
4761 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4762
4763 * linux-low.c (linux_low_filter_event): Update call to
4764 linux_enable_event_reporting following the addition of
4765 a new parameter to that function.
4766
4767 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4768
4769 PR server/17457
4770 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4771 (AARCH64_FPCR_REGNO): Likewise.
4772 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4773 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4774 (aarch64_store_fpregset): Likewise.
4775
4776 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4777
4778 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4779 Remove FIXME comment about assumption about N.
4780
4781 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4782
4783 * configure.ac: If large-file support is disabled in GDBserver,
4784 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4785 * configure: Regenerate.
4786
4787 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4788
4789 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4790 warning upon ENODATA from ptrace.
4791 * linux-s390-low.c (s390_store_tdb): New.
4792 (s390_regsets): Add regset for NT_S390_TDB.
4793
4794 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4795
4796 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4797 without a fill_function.
4798 * linux-s390-low.c (s390_fill_last_break): Remove.
4799 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4800 (s390_arch_setup): Use regset's size instead of fill_function for
4801 loop end condition.
4802
4803 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4804
4805 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4806 the regset's store function when ptrace returned an error.
4807 * regcache.c (get_thread_regcache): Invalidate register cache
4808 before fetching inferior's registers.
4809
4810 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4811
4812 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4813 while-loop as for-loop.
4814 (regsets_store_inferior_registers): Likewise.
4815
4816 2014-11-28 Yao Qi <yao@codesourcery.com>
4817
4818 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4819 * config.in, configure: Re-generate.
4820 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4821 is defined.
4822
4823 2014-11-21 Yao Qi <yao@codesourcery.com>
4824
4825 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4826 (AC_CHECK_HEADERS): Remove malloc.h.
4827 * configure: Re-generated.
4828 * config.in: Re-generated.
4829 * server.h: Don't include alloca.h and malloc.h.
4830 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4831 Don't include malloc.h.
4832
4833 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4834
4835 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4836 corresponding ERRNO check in same block.
4837
4838 2014-11-12 Pedro Alves <palves@redhat.com>
4839
4840 * server.c (cont_thread): Update comment.
4841 (start_inferior, attach_inferior): No longer clear cont_thread.
4842 (handle_v_cont): No longer set cont_thread.
4843 (captured_main): Clear cont_thread each time a GDB connects.
4844
4845 2014-11-12 Pedro Alves <palves@redhat.com>
4846
4847 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4848 thread, and don't resume all threads if the Hc thread has exited.
4849
4850 2014-11-12 Pedro Alves <palves@redhat.com>
4851
4852 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4853 the process group instead of to a specific LWP.
4854
4855 2014-10-15 Pedro Alves <palves@redhat.com>
4856
4857 PR server/17487
4858 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4859 parameter.
4860 (arm_set_thread_context): Delete.
4861 (the_low_target): Adjust.
4862 * win32-i386-low.c (debug_registers_changed)
4863 (debug_registers_used): Delete.
4864 (update_debug_registers_callback): New function.
4865 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4866 needing to update their debug registers.
4867 (win32_get_current_dr): New function.
4868 (x86_dr_low_get_addr, x86_dr_low_get_control)
4869 (x86_dr_low_get_status): Fetch the debug register from the thread
4870 record's context.
4871 (i386_initial_stuff): Adjust.
4872 (i386_get_thread_context): Remove current_event parameter. Don't
4873 clear debug_registers_changed nor copy DR values to
4874 debug_reg_state.
4875 (i386_set_thread_context): Delete.
4876 (i386_prepare_to_resume): New function.
4877 (i386_thread_added): Mark the thread as needing to update irs
4878 debug registers.
4879 (the_low_target): Remove i386_set_thread_context and install
4880 i386_prepare_to_resume.
4881 * win32-low.c (win32_get_thread_context): Adjust.
4882 (win32_set_thread_context): Use SetThreadContext
4883 directly.
4884 (win32_prepare_to_resume): New function.
4885 (win32_require_context): New function, factored out from ...
4886 (thread_rec): ... this.
4887 (continue_one_thread): Call win32_prepare_to_resume on each thread
4888 we're about to continue.
4889 (win32_resume): Call win32_prepare_to_resume on the event thread.
4890 * win32-low.h (struct win32_thread_info)
4891 <debug_registers_changed>: New field.
4892 (struct win32_target_ops): Change prototype of set_thread_context,
4893 delete set_thread_context and add prepare_to_resume.
4894 (win32_require_context): New declaration.
4895
4896 2014-10-08 Gary Benson <gbenson@redhat.com>
4897
4898 * server.h: Do not include common-exceptions.h.
4899
4900 2014-10-08 Gary Benson <gbenson@redhat.com>
4901
4902 * server.h: Do not include cleanups.h.
4903
4904 2014-09-30 James Hogan <james.hogan@imgtec.com>
4905
4906 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4907 mips64-dsp-linux.c.
4908
4909 2014-09-23 Yao Qi <yao@codesourcery.com>
4910
4911 * linux-low.c (lp_status_maybe_breakpoint): New function.
4912 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4913 (count_events_callback): Likewise.
4914 (select_event_lwp_callback): Likewise.
4915 (cancel_breakpoints_callback): Likewise.
4916
4917 2014-09-19 Don Breazeal <donb@codesourcery.com>
4918
4919 * linux-low.c (handle_extended_wait): Call
4920 linux_ptrace_get_extended_event.
4921 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4922 linux_is_extended_waitstatus.
4923
4924 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4925
4926 * Makefile.in (CPPFLAGS): Define.
4927 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4928 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4929
4930 2014-09-16 Gary Benson <gbenson@redhat.com>
4931
4932 * inferiors.h (current_inferior): Renamed as...
4933 (current_thread): New variable. All uses updated.
4934 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4935 (maybe_move_out_of_jump_pad): Likewise.
4936 (cancel_breakpoint): Likewise.
4937 (linux_low_filter_event): Likewise.
4938 (wait_for_sigstop): Likewise.
4939 (linux_resume_one_lwp): Likewise.
4940 (need_step_over_p): Likewise.
4941 (start_step_over): Likewise.
4942 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4943 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4944 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4945 and save_inferior as saved_thread.
4946 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4947 saved_thread.
4948 (regcache_invalidate_thread): Likewise.
4949 * remote-utils.c (prepare_resume_reply): Likewise.
4950 * thread-db.c (thread_db_get_tls_address): Likewise.
4951 (disable_thread_event_reporting): Likewise.
4952 (remove_thread_event_breakpoints): Likewise.
4953 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4954 as saved_thread.
4955 * target.h (set_desired_inferior): Renamed as...
4956 (set_desired_thread): New declaration. All uses updated.
4957 * server.c (myresume): Updated comment to reference thread instead
4958 of inferior.
4959 (handle_serial_event): Likewise.
4960 (handle_target_event): Likewise.
4961
4962 2014-09-12 Tom Tromey <tromey@redhat.com>
4963 Gary Benson <gbenson@redhat.com>
4964
4965 * regcache.h: Include common-regcache.h.
4966 (regcache_read_pc): Don't declare.
4967 * regcache.c (get_thread_regcache_for_ptid): New function.
4968
4969 2014-09-11 Tom Tromey <tromey@redhat.com>
4970 Gary Benson <gbenson@redhat.com>
4971
4972 * symbol.c: New file.
4973 * Makefile.in (SFILES): Add symbol.c.
4974 (OBS): Add symbol.o.
4975
4976 2014-09-11 Gary Benson <gbenson@redhat.com>
4977
4978 * target.c (target_stop_ptid, target_continue_ptid): New
4979 functions.
4980
4981 2014-09-11 Tom Tromey <tromey@redhat.com>
4982 Gary Benson <gbenson@redhat.com>
4983
4984 * target.h: Include target/target.h.
4985 * target.c (target_read_memory, target_read_uint32)
4986 (target_write_memory): New functions.
4987
4988 2014-09-11 Gary Benson <gbenson@redhat.com>
4989
4990 * server.h (debug_hw_points): Don't declare.
4991 * server.c (debug_hw_points): Don't define. Replace all uses
4992 with show_debug_regs.
4993 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4994 all uses with show_debug_regs.
4995
4996 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4997
4998 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4999 endianness into account.
5000 (ppc_supply_ptrace_register): Likewise.
5001
5002 2014-09-03 James Hogan <james.hogan@imgtec.com>
5003
5004 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5005 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5006
5007 2014-09-03 Gary Benson <gbenson@redhat.com>
5008
5009 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5010 ALL_DEBUG_ADDRESS_REGISTERS.
5011
5012 2014-09-02 Gary Benson <gbenson@redhat.com>
5013
5014 * i386-low.h: Renamed as...
5015 * x86-low.h: New file. All type, function and variable name
5016 prefixes changed from "i386_" to "x86_". All references updated.
5017 * i386-low.c: Renamed as...
5018 * x86-low.c: New file. All type, function and variable name
5019 prefixes changed from "i386_" to "x86_". All references updated.
5020
5021 2014-09-02 Gary Benson <gbenson@redhat.com>
5022
5023 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5024 (x86_linux_new_thread): Likewise.
5025
5026 2014-08-29 Gary Benson <gbenson@redhat.com>
5027
5028 * server.h (setjmp.h): Do not include.
5029 (toplevel): Do not declare.
5030 (common-exceptions.h): Include.
5031 (cleanups.h): Likewise.
5032 * server.c (toplevel): Do not define.
5033 (exit_code): New static global.
5034 (detach_or_kill_for_exit_cleanup): New function.
5035 (main): New function. Original main renamed to...
5036 (captured_main): New function.
5037 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5038
5039 2014-08-29 Gary Benson <gbenson@redhat.com>
5040
5041 * Makefile.in (SFILES): Add common/common-exceptions.c.
5042 (OBS): Add common-exceptions.o.
5043 (common-exceptions.o): New rule.
5044 * utils.c (prepare_to_throw_exception): New function.
5045
5046 2014-08-29 Gary Benson <gbenson@redhat.com>
5047
5048 * config.in: Regenerate.
5049 * configure: Likewise.
5050
5051 2014-08-29 Gary Benson <gbenson@redhat.com>
5052
5053 * Makefile.in (SFILES): Add common/cleanups.c.
5054 (OBS): cleanups.o.
5055 (cleanups.o): New rule.
5056
5057 2014-08-29 Gary Benson <gbenson@redhat.com>
5058
5059 * utils.c (internal_vwarning): New function.
5060
5061 2014-08-28 Gary Benson <gbenson@redhat.com>
5062
5063 * utils.h (fatal): Remove declaration.
5064 * utils.c (fatal): Remove function.
5065
5066 2014-08-28 Gary Benson <gbenson@redhat.com>
5067
5068 * tracepoint.c (gdb_agent_init): Replace fatal with
5069 perror_with_name.
5070 (initialize_tracepoint): Likewise.
5071
5072 2014-08-28 Gary Benson <gbenson@redhat.com>
5073
5074 * remote-utils.c (remote_prepare): Replace fatal with error.
5075
5076 2014-08-28 Gary Benson <gbenson@redhat.com>
5077
5078 * linux-low.c (linux_async): Replace fatal with warning.
5079 Tidy up and return.
5080 (linux_start_non_stop): Return -1 if linux_async failed.
5081
5082 2014-08-28 Gary Benson <gbenson@redhat.com>
5083
5084 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5085 gdb_assert.
5086 (i386_dr_low_get_addr): Remove vague comment.
5087 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5088 gdb_assert.
5089
5090 2014-08-28 Gary Benson <gbenson@redhat.com>
5091
5092 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5093 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5094 internal_error.
5095 (linux_resume_one_lwp): Likewise.
5096 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5097 gdb_assert.
5098 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5099 with internal_error.
5100 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5101 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5102 (find_register_by_name): Replace fatal with internal_error.
5103 (find_regno): Likewise.
5104 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5105 * thread-db.c (thread_db_create_event): Likewise.
5106 (thread_db_load_search): Likewise.
5107 (try_thread_db_load_1): Likewise.
5108 * tracepoint.c (get_jump_space_head): Replace fatal with
5109 internal_error.
5110 (claim_trampoline_space): Likewise.
5111 (have_fast_tracepoint_trampoline_buffer): Likewise.
5112 (cmd_qtstart): Likewise.
5113 (stop_tracing): Likewise.
5114 (fast_tracepoint_collecting): Likewise.
5115 (target_malloc): Likewise.
5116 (download_tracepoint): Likewise.
5117 (download_trace_state_variables): Replace check with gdb_assert.
5118 (upload_fast_traceframes): Replace fatal with internal_error.
5119
5120 2014-08-19 Tom Tromey <tromey@redhat.com>
5121 Gary Benson <gbenson@redhat.com>
5122
5123 * Makefile.in (SFILES): Add common/common-debug.c.
5124 (OBS): Add common-debug.o.
5125 (common-debug.o): New rule.
5126 * debug.h (debug_printf): Don't declare.
5127 * debug.c (debug_printf): Renamed and rewritten as...
5128 (debug_vprintf): New function.
5129
5130 2014-08-19 Gary Benson <gbenson@redhat.com>
5131
5132 * utils.h: Do not include print-utils.h.
5133
5134 2014-08-19 Tom Tromey <tromey@redhat.com>
5135 Gary Benson <gbenson@redhat.com>
5136
5137 * server.h: Add static assertion.
5138 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5139
5140 2014-08-19 Tom Tromey <tromey@redhat.com>
5141 Gary Benson <gbenson@redhat.com>
5142
5143 * Makefile.in (SFILES): Add common/errors.c.
5144 (OBS): Add errors.o.
5145 (IPA_OBS): Add errors-ipa.o.
5146 (errors.o): New rule.
5147 (errors-ipa.o): Likewise.
5148 * utils.h (perror_with_name, error, warning): Don't declare.
5149 * utils.c (warning): Renamed and rewritten as...
5150 (vwarning): New function.
5151 (error): Renamed and rewritten as...
5152 (verror): New function.
5153 (internal_error): Renamed and rewritten as...
5154 (internal_verror): New function.
5155
5156 2014-08-07 Gary Benson <gbenson@redhat.com>
5157
5158 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5159 * configure: Regenerate.
5160 * config.in: Likewise.
5161 * server.h: Do not include errno.h.
5162 * event-loop.c: Likewise.
5163 * hostio-errno.c: Likewise.
5164 * linux-low.c: Likewise.
5165 * remote-utils.c: Likewise.
5166 * spu-low.c: Likewise.
5167 * utils.c: Likewise.
5168 * gdbreplay.c: Unconditionally include errno.h.
5169
5170 2014-08-07 Gary Benson <gbenson@redhat.com>
5171
5172 * server.h: Do not include string.h.
5173 * event-loop.c: Likewise.
5174 * linux-low.c: Likewise.
5175 * regcache.c: Likewise.
5176 * remote-utils.c: Likewise.
5177 * spu-low.c: Likewise.
5178 * utils.c: Likewise.
5179
5180 2014-08-07 Gary Benson <gbenson@redhat.com>
5181
5182 * server.h: Do not include gdb_assert.h.
5183
5184 2014-08-07 Gary Benson <gbenson@redhat.com>
5185
5186 * server.h: Do not include common-utils.h.
5187
5188 2014-08-07 Gary Benson <gbenson@redhat.com>
5189
5190 * server.h: Do not include ptid.h.
5191 * notif.h: Likewise.
5192
5193 2014-08-07 Gary Benson <gbenson@redhat.com>
5194
5195 * server.h: Do not include gdb_locale.h.
5196
5197 2014-08-07 Gary Benson <gbenson@redhat.com>
5198
5199 * server.h: Do not include gdb/signals.h.
5200 * win32-low.c: Likewise.
5201
5202 2014-08-07 Gary Benson <gbenson@redhat.com>
5203
5204 * server.h: Do not include pathmax.h.
5205
5206 2014-08-07 Gary Benson <gbenson@redhat.com>
5207
5208 * server.h: Do not include libiberty.h.
5209 * linux-bfin-low.c: Likewise.
5210
5211 2014-08-07 Gary Benson <gbenson@redhat.com>
5212
5213 * server.h: Do not include ansidecl.h.
5214
5215 2014-08-07 Gary Benson <gbenson@redhat.com>
5216
5217 * linux-x86-low.c: Do not include stddef.h.
5218 * lynx-ppc-low.c: Likewise.
5219 * tracepoint.c: Likewise.
5220
5221 2014-08-07 Gary Benson <gbenson@redhat.com>
5222
5223 * server.h: Do not include stdarg.h.
5224 * nto-low.c: Likewise.
5225
5226 2014-08-07 Gary Benson <gbenson@redhat.com>
5227
5228 * server.h: Do not include stdlib.h.
5229 * inferiors.c: Likewise.
5230 * linux-low.c: Likewise.
5231 * regcache.c: Likewise.
5232 * spu-low.c: Likewise.
5233 * tracepoint.c: Likewise.
5234 * utils.c: Likewise.
5235
5236 2014-08-07 Gary Benson <gbenson@redhat.com>
5237
5238 * server.h: Do not include stdio.h.
5239 * linux-low.c: Likewise.
5240 * remote-utils.c: Likewise.
5241 * spu-low.c: Likewise.
5242 * utils.c: Likewise.
5243 * wincecompat.c: Likewise.
5244
5245 2014-08-06 Gary Benson <gbenson@redhat.com>
5246
5247 * regcache.c (init_register_cache): Move conditionals inside if.
5248
5249 2014-08-06 Gary Benson <gbenson@redhat.com>
5250
5251 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5252
5253 2014-07-31 Gary Benson <gbenson@redhat.com>
5254
5255 * ax.h: Do not include server.h.
5256 * gdbthread.h: Likewise.
5257 * lynx-low.h: Likewise.
5258 * notif.h: Likewise.
5259
5260 2014-07-30 Gary Benson <gbenson@redhat.com>
5261
5262 * server.h: Include common-defs.h.
5263 Do not include config.h or build-gnulib-gdbserver/config.h.
5264
5265 2014-07-30 Gary Benson <gbenson@redhat.com>
5266
5267 * hostio-errno.c: Move server.h to top of includes list.
5268 * inferiors.c: Likewise.
5269 * linux-x86-low.c: Likewise.
5270 * notif.c: Include server.h.
5271
5272 2014-07-24 Tom Tromey <tromey@redhat.com>
5273 Gary Benson <gbenson@redhat.com>
5274
5275 * server.h (CORE_ADDR): Now unsigned.
5276
5277 2014-07-16 Pedro Alves <palves@redhat.com>
5278
5279 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5280
5281 2014-07-15 Pedro Alves <palves@redhat.com>
5282
5283 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5284 copy.
5285
5286 2014-07-11 Pedro Alves <palves@redhat.com>
5287
5288 * linux-low.c (kill_wait_lwp): New function, based on
5289 kill_one_lwp_callback, but use my_waitpid directly.
5290 (kill_one_lwp_callback, linux_kill): Use it.
5291
5292 2014-06-23 Pedro Alves <palves@redhat.com>
5293
5294 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5295 before setting DR0..DR3.
5296
5297 2014-06-20 Gary Benson <gbenson@redhat.com>
5298
5299 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5300 * configure: Regenerated.
5301 * config.in: Likewise.
5302
5303 2014-06-20 Gary Benson <gbenson@redhat.com>
5304
5305 * Makefile.in (SFILES): Update locations for files moved
5306 from common to nat.
5307 (object file files): Reordered.
5308
5309 2014-06-20 Gary Benson <gbenson@redhat.com>
5310
5311 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5312 (i386_dr_low_set_addr): Likewise.
5313 (i386_dr_low_get_addr): Likewise.
5314 (i386_dr_low_can_set_control): Likewise.
5315 (i386_dr_low_set_control): Likewise.
5316 (i386_dr_low_get_control): Likewise.
5317 (i386_dr_low_get_status): Likewise.
5318 (i386_get_debug_register_length): Likewise.
5319 * linux-x86-low.c (i386_dr_low_set_addr):
5320 Changed signature. Made static.
5321 (i386_dr_low_get_addr): Likewise.
5322 (i386_dr_low_set_control): Likewise.
5323 (i386_dr_low_get_control): Likewise.
5324 (i386_dr_low_get_status): Likewise.
5325 (i386_dr_low): New global variable.
5326 * win32-i386-low.c (i386_dr_low_set_addr):
5327 Changed signature. Made static.
5328 (i386_dr_low_get_addr): Likewise.
5329 (i386_dr_low_set_control): Likewise.
5330 (i386_dr_low_get_control): Likewise.
5331 (i386_dr_low_get_status): Likewise.
5332 (i386_dr_low): New global variable.
5333
5334 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5335
5336 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5337 * Makefile.in (AR, AR_FLAGS): Define.
5338 * configure: Regenerate.
5339
5340 2014-06-19 Gary Benson <gbenson@redhat.com>
5341
5342 * Makefile.in (i386-dregs.o): New rule.
5343 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5344 * i386-low.c (target.h): Remove include.
5345 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5346 (DR_CONTROL_SHIFT): Likewise.
5347 (DR_CONTROL_SIZE): Likewise.
5348 (DR_RW_EXECUTE): Likewise.
5349 (DR_RW_WRITE): Likewise.
5350 (DR_RW_READ): Likewise.
5351 (DR_RW_IORW): Likewise.
5352 (DR_LEN_1): Likewise.
5353 (DR_LEN_2): Likewise.
5354 (DR_LEN_4): Likewise.
5355 (DR_LEN_8): Likewise.
5356 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5357 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5358 (DR_ENABLE_SIZE): Likewise.
5359 (DR_LOCAL_SLOWDOWN): Likewise.
5360 (DR_GLOBAL_SLOWDOWN): Likewise.
5361 (DR_CONTROL_RESERVED): Likewise.
5362 (I386_DR_CONTROL_MASK): Likewise.
5363 (I386_DR_VACANT): Likewise.
5364 (I386_DR_LOCAL_ENABLE): Likewise.
5365 (I386_DR_GLOBAL_ENABLE): Likewise.
5366 (I386_DR_DISABLE): Likewise.
5367 (I386_DR_SET_RW_LEN): Likewise.
5368 (I386_DR_GET_RW_LEN): Likewise.
5369 (I386_DR_WATCH_HIT): Likewise.
5370 (i386_wp_op_t): Likewise.
5371 (i386_show_dr): Likewise.
5372 (i386_length_and_rw_bits): Likewise.
5373 (i386_insert_aligned_watchpoint): Likewise.
5374 (i386_remove_aligned_watchpoint): Likewise.
5375 (i386_handle_nonaligned_watchpoint): Likewise.
5376 i386_update_inferior_debug_regs(): Likewise.
5377 (i386_dr_insert_watchpoint): Likewise.
5378 (i386_dr_remove_watchpoint): Likewise.
5379 (i386_dr_region_ok_for_watchpoint): Likewise.
5380 (i386_dr_stopped_data_address): Likewise.
5381 (i386_dr_stopped_by_watchpoint): Likewise.
5382
5383 2014-06-19 Gary Benson <gbenson@redhat.com>
5384
5385 * i386-low.c (i386_dr_show): Renamed to
5386 i386_show_dr and made static. All uses updated.
5387 (i386_dr_length_and_rw_bits): Renamed to
5388 i386_length_and_rw_bits and made static.
5389 All uses updated.
5390 (i386_dr_insert_aligned_watchpoint): Renamed to
5391 i386_insert_aligned_watchpoint and made static.
5392 All uses updated.
5393 (i386_dr_remove_aligned_watchpoint): Renamed to
5394 i386_remove_aligned_watchpoint and made static.
5395 All uses updated.
5396 (i386_dr_update_inferior_debug_regs): Renamed to
5397 i386_update_inferior_debug_regs and made static.
5398 All uses updated.
5399
5400 2014-06-18 Gary Benson <gbenson@redhat.com>
5401
5402 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5403 (i386_dr_low_can_set_control): Likewise.
5404 (i386_get_debug_register_length): Likewise.
5405 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5406 (i386_dr_low_can_set_control): Likewise.
5407 (i386_get_debug_register_length): Likewise.
5408
5409 2014-06-17 Gary Benson <gbenson@redhat.com>
5410
5411 * i386-low.h (i386-dregs.h): New include.
5412 (DR_FIRSTADDR): Now in i386-dregs.h.
5413 (DR_LASTADDR): Likewise.
5414 (DR_NADDR): Likewise.
5415 (DR_STATUS): Likewise.
5416 (DR_CONTROL): Likewise.
5417 (i386_debug_reg_state): Likewise.
5418 (i386_dr_insert_watchpoint): Likewise.
5419 (i386_dr_remove_watchpoint): Likewise.
5420 (i386_dr_region_ok_for_watchpoint): Likewise.
5421 (i386_dr_stopped_data_address): Likewise.
5422 (i386_dr_stopped_by_watchpoint): Likewise.
5423 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5424
5425 2014-06-18 Gary Benson <gbenson@redhat.com>
5426
5427 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5428 i386_dr_insert_watchpoint.
5429 (i386_low_remove_watchpoint): Renamed to
5430 i386_dr_remove_watchpoint.
5431 (i386_low_region_ok_for_watchpoint): Renamed to
5432 i386_dr_region_ok_for_watchpoint.
5433 (i386_low_stopped_data_address): Renamed to
5434 i386_dr_stopped_data_address.
5435 (i386_low_stopped_by_watchpoint): Renamed to
5436 i386_dr_stopped_by_watchpoint.
5437 * i386-low.c (i386_show_dr): Renamed to
5438 i386_dr_show and made nonstatic. All uses updated.
5439 (i386_length_and_rw_bits): Renamed to
5440 i386_dr_length_and_rw_bits and made nonstatic.
5441 All uses updated.
5442 (i386_insert_aligned_watchpoint): Renamed to
5443 i386_dr_insert_aligned_watchpoint and made nonstatic.
5444 All uses updated.
5445 (i386_remove_aligned_watchpoint): Renamed to
5446 i386_dr_remove_aligned_watchpoint and made nonstatic.
5447 All uses updated.
5448 (i386_update_inferior_debug_regs): Renamed to
5449 i386_dr_update_inferior_debug_regs and made nonstatic.
5450 All uses updated.
5451 (i386_low_insert_watchpoint): Renamed to
5452 i386_dr_insert_watchpoint. All uses updated.
5453 (i386_low_remove_watchpoint): Renamed to
5454 i386_dr_remove_watchpoint. All uses updated.
5455 (i386_low_region_ok_for_watchpoint): Renamed to
5456 i386_dr_region_ok_for_watchpoint. All uses updated.
5457 (i386_low_stopped_data_address): Renamed to
5458 i386_dr_stopped_data_address. All uses updated.
5459 (i386_low_stopped_by_watchpoint): Renamed to
5460 i386_dr_stopped_by_watchpoint. All uses updated.
5461
5462 2014-06-18 Gary Benson <gbenson@redhat.com>
5463
5464 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5465 (i386_dr_low_can_set_control): Likewise.
5466 (i386_insert_aligned_watchpoint): New check.
5467
5468 2014-06-18 Gary Benson <gbenson@redhat.com>
5469
5470 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5471 Renamed to state.
5472
5473 2014-06-18 Gary Benson <gbenson@redhat.com>
5474
5475 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5476 instead of fatal and error.
5477 (i386_handle_nonaligned_watchpoint): Likewise.
5478
5479 2014-06-18 Gary Benson <gbenson@redhat.com>
5480
5481 * i386-low.c (i386_get_debug_register_length): New macro.
5482 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5483 (i386_show_dr): Use debug_printf instead of fprintf. Use
5484 phex to format values.
5485
5486 2014-06-18 Gary Benson <gbenson@redhat.com>
5487
5488 * i386-low.h: Comment changes.
5489 * i386-low.c: Likewise.
5490
5491 2014-06-18 Gary Benson <gbenson@redhat.com>
5492
5493 * i386-low.c: Whitespace changes.
5494
5495 2014-06-12 Tom Tromey <tromey@redhat.com>
5496
5497 * utils.c (freeargv): Remove.
5498
5499 2014-06-12 Tom Tromey <tromey@redhat.com>
5500
5501 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5502 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5503 (parse_debug_format_options): Likewise.
5504 (gdbserver_usage): Likewise.
5505 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5506 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5507 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5508 against libiberty.
5509 ($(LIBGNU)): Depend on libiberty.
5510 (all-lib): Recurse into all subdirs.
5511 (install-only): Invoke "install" target in subdirs.
5512 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5513 targets.
5514 * configure: Rebuild.
5515 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5516 for vasprintf, vsnprintf, or gettimeofday.
5517 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5518 srv_tgtobj.
5519
5520 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5521
5522 * development.sh: Delete.
5523 * Makefile.in (config.status): Adjust dependency on development.sh.
5524 * configure.ac: Adjust development.sh source call.
5525 * configure: Regenerate.
5526
5527 2014-06-02 Pedro Alves <palves@redhat.com>
5528
5529 * ax.c (gdb_free_agent_expr): New function.
5530 * ax.h (gdb_free_agent_expr): New declaration.
5531 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5532 list.
5533 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5534 static.
5535 (clear_breakpoint_conditions_and_commands): New function.
5536 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5537 (clear_breakpoint_conditions_and_commands): New declaration.
5538
5539 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5540
5541 * linux-aarch64-low.c (asm/ptrace.h): Include.
5542
5543 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5544
5545 Fix TLS access for -static -pthread.
5546 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5547 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5548 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5549
5550 2014-05-20 Pedro Alves <palves@redhat.com>
5551
5552 * linux-aarch64-low.c (aarch64_insert_point)
5553 (aarch64_remove_point): No longer check whether the type is
5554 supported here. Adjust to new interface.
5555 (the_low_target): Install aarch64_supports_z_point_type as
5556 supports_z_point_type method.
5557 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5558 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5559 instead of a Z packet char. Adjust.
5560 (arm_supports_z_point_type): New function.
5561 (arm_insert_point, arm_remove_point): Adjust to new interface.
5562 (the_low_target): Install arm_supports_z_point_type.
5563 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5564 (cris_insert_point, cris_remove_point): Adjust to new interface.
5565 Don't check whether the type is supported here.
5566 (the_low_target): Install cris_supports_z_point_type.
5567 * linux-low.c (linux_supports_z_point_type): New function.
5568 (linux_insert_point, linux_remove_point): Adjust to new interface.
5569 * linux-low.h (struct linux_target_ops) <insert_point,
5570 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5571 raw_breakpoint pointer parameter.
5572 <supports_z_point_type>: New method.
5573 * linux-mips-low.c (mips_supports_z_point_type): New function.
5574 (mips_insert_point, mips_remove_point): Adjust to new interface.
5575 Use mips_supports_z_point_type.
5576 (the_low_target): Install mips_supports_z_point_type.
5577 * linux-ppc-low.c (the_low_target): Install NULL as
5578 supports_z_point_type method.
5579 * linux-s390-low.c (the_low_target): Install NULL as
5580 supports_z_point_type method.
5581 * linux-sparc-low.c (the_low_target): Install NULL as
5582 supports_z_point_type method.
5583 * linux-x86-low.c (x86_supports_z_point_type): New function.
5584 (x86_insert_point): Adjust to new insert_point interface. Use
5585 insert_memory_breakpoint. Adjust to new
5586 i386_low_insert_watchpoint interface.
5587 (x86_remove_point): Adjust to remove_point interface. Use
5588 remove_memory_breakpoint. Adjust to new
5589 i386_low_remove_watchpoint interface.
5590 (the_low_target): Install x86_supports_z_point_type.
5591 * lynx-low.c (lynx_target_ops): Install NULL as
5592 supports_z_point_type callback.
5593 * nto-low.c (nto_supports_z_point_type): New.
5594 (nto_insert_point, nto_remove_point): Adjust to new interface.
5595 (nto_target_ops): Install nto_supports_z_point_type.
5596 * mem-break.c: Adjust intro comment.
5597 (struct raw_breakpoint) <raw_type, size>: New fields.
5598 <inserted>: Update comment.
5599 <shlib_disabled>: Delete field.
5600 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5601 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5602 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5603 (raw_bkpt_type_to_target_hw_bp_type): New function.
5604 (find_enabled_raw_code_breakpoint_at): New function.
5605 (find_raw_breakpoint_at): New type and size parameters. Use them.
5606 (insert_memory_breakpoint): New function, based off
5607 set_raw_breakpoint_at.
5608 (remove_memory_breakpoint): New function.
5609 (set_raw_breakpoint_at): Reimplement.
5610 (set_breakpoint): New, based on set_breakpoint_at.
5611 (set_breakpoint_at): Reimplement.
5612 (delete_raw_breakpoint): Go through the_target->remove_point
5613 instead of assuming memory breakpoints.
5614 (find_gdb_breakpoint_at): Delete.
5615 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5616 (find_gdb_breakpoint): New function.
5617 (set_gdb_breakpoint_at): Delete.
5618 (z_type_supported): New function.
5619 (set_gdb_breakpoint_1): New function, loosely based off
5620 set_gdb_breakpoint_at.
5621 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5622 (delete_gdb_breakpoint_at): Delete.
5623 (delete_gdb_breakpoint_1): New function, loosely based off
5624 delete_gdb_breakpoint_at.
5625 (delete_gdb_breakpoint): New function.
5626 (clear_gdb_breakpoint_conditions): Rename to ...
5627 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5628 breakpoint.
5629 (add_condition_to_breakpoint): Make static.
5630 (add_breakpoint_condition): Take a struct breakpoint pointer
5631 instead of an address. Adjust.
5632 (gdb_condition_true_at_breakpoint): Rename to ...
5633 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5634 z_type parameter.
5635 (gdb_condition_true_at_breakpoint): Reimplement.
5636 (add_breakpoint_commands): Take a struct breakpoint pointer
5637 instead of an address. Adjust.
5638 (gdb_no_commands_at_breakpoint): Rename to ...
5639 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5640 parameter. Return true if no breakpoint was found. Change debug
5641 output.
5642 (gdb_no_commands_at_breakpoint): Reimplement.
5643 (run_breakpoint_commands): Rename to ...
5644 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5645 and change return type to boolean.
5646 (run_breakpoint_commands): New function.
5647 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5648 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5649 breakpoint. Go through the_target->remove_point instead of
5650 assuming memory breakpoint.
5651 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5652 software and hardware breakpoints.
5653 (reinsert_raw_breakpoint): Go through the_target->insert_point
5654 instead of assuming memory breakpoint.
5655 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5656 software and hardware breakpoints.
5657 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5658 Check both software and hardware breakpoints.
5659 (validate_inserted_breakpoint): Assert the breakpoint is a
5660 software breakpoint. Set the inserted flag to -1 instead of
5661 setting shlib_disabled.
5662 (delete_disabled_breakpoints): Adjust.
5663 (validate_breakpoints): Only validate software breakpoints.
5664 Adjust to inserted flag change.
5665 (check_mem_read, check_mem_write): Skip breakpoint types other
5666 than software breakpoints. Adjust to inserted flag change.
5667 * mem-break.h (enum raw_bkpt_type): New enum.
5668 (raw_breakpoint, struct process_info): Forward declare.
5669 (Z_packet_to_target_hw_bp_type): Delete declaration.
5670 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5671 (set_gdb_breakpoint, delete_gdb_breakpoint)
5672 (clear_breakpoint_conditions): New declarations.
5673 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5674 (breakpoint_inserted_here): Update comment.
5675 (add_breakpoint_condition, add_breakpoint_commands): Replace
5676 address parameter with a breakpoint pointer parameter.
5677 (gdb_breakpoint_here): Update comment.
5678 (delete_gdb_breakpoint_at): Delete.
5679 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5680 * server.c (process_point_options): Take a struct breakpoint
5681 pointer instead of an address. Adjust.
5682 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5683 delete_gdb_breakpoint.
5684 * spu-low.c (spu_target_ops): Install NULL as
5685 supports_z_point_type method.
5686 * target.h: Include mem-break.h.
5687 (struct target_ops) <prepare_to_access_memory>: Update comment.
5688 <supports_z_point_type>: New field.
5689 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5690 instead of a char. Also take a raw breakpoint pointer.
5691 * win32-arm-low.c (the_low_target): Install NULL as
5692 supports_z_point_type.
5693 * win32-i386-low.c (i386_supports_z_point_type): New function.
5694 (i386_insert_point, i386_remove_point): Adjust to new interface.
5695 (the_low_target): Install i386_supports_z_point_type.
5696 * win32-low.c (win32_supports_z_point_type): New function.
5697 (win32_insert_point, win32_remove_point): Adjust to new interface.
5698 (win32_target_ops): Install win32_supports_z_point_type.
5699 * win32-low.h (struct win32_target_ops):
5700 <supports_z_point_type>: New method.
5701 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5702 instead of a char. Also take a raw breakpoint pointer.
5703
5704 2014-05-20 Pedro Alves <palves@redhat.com>
5705
5706 * mem-break.h: Include break-common.h.
5707 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5708 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5709 (Z_packet_to_target_hw_bp_type): New declaration.
5710 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5711 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5712 (Z_PACKET_ACCESS_WP): Delete macros.
5713 (Z_packet_to_hw_type): Delete function.
5714 * i386-low.h: Don't include break-common.h here.
5715 (Z_packet_to_hw_type): Delete declaration.
5716 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5717 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5718 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5719 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5720 * linux-aarch64-low.c: Don't include break-common.h here.
5721 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5722 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5723 (Z_packet_to_target_hw_bp_type): Delete function.
5724 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5725 function.
5726 (mips_insert_point, mips_remove_point): Use
5727 Z_packet_to_target_hw_bp_type.
5728
5729 2014-05-20 Pedro Alves <palves@redhat.com>
5730
5731 * linux-aarch64-low.c: Include break-common.h.
5732 (enum target_point_type): Delete.
5733 (Z_packet_to_point_type): Rename to ...
5734 (Z_packet_to_target_hw_bp_type): ... this, and return a
5735 target_hw_bp_type instead.
5736 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5737 instead of an enum target_point_type.
5738 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5739 breakpoint type.
5740 (aarch64_dr_state_insert_one_point)
5741 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5742 (aarch64_handle_aligned_watchpoint)
5743 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5744 Take an enum target_hw_bp_type instead of an enum
5745 target_point_type.
5746 (aarch64_supports_z_point_type): New function.
5747 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5748 use Z_packet_to_target_hw_bp_type.
5749
5750 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5751
5752 * configure.ac: Only use -Werror by default when DEVELOPMENT
5753 is true.
5754 * configure: Regenerate.
5755
5756 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5757
5758 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5759 * linux-x86-low.c (X86_64_USER_REGS): New.
5760 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5761
5762 2014-04-28 Yao Qi <yao@codesourcery.com>
5763
5764 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5765 name.
5766
5767 2014-04-25 Pedro Alves <palves@redhat.com>
5768
5769 PR server/16255
5770 * linux-low.c (linux_attach_fail_reason_string): New function.
5771 (linux_attach_lwp): Delete.
5772 (linux_attach_lwp_1): Rename to ...
5773 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5774 argument. Remove "initial" parameter. Return int instead of
5775 void. Don't error or warn here.
5776 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5777 failure to attach to the tgid. Call warning when failing to
5778 attach to an lwp.
5779 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5780 argument. Remove "initial" parameter. Return int instead of
5781 void. Don't error or warn here.
5782 (linux_attach_fail_reason_string): New declaration.
5783 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5784 interface change. Use linux_attach_fail_reason_string.
5785
5786 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5787 Walfred Tedeschi <walfred.tedeschi@intel.com>
5788
5789 * Makefile.in: Added rules to handle new files
5790 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5791 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5792 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5793 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5794 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5795 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5796 x32-avx512-linux.o.
5797 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5798 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5799 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5800 i386/x32-avx512.xml.
5801 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5802 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5803 i386/x32-avx512-linux.xml.
5804 * i387-fp.c (num_avx512_k_registers): New constant for number
5805 of K registers.
5806 (num_avx512_zmmh_low_registers): New constant for number of
5807 lower ZMM registers (0-15).
5808 (num_avx512_zmmh_high_registers): New constant for number of
5809 higher ZMM registers (16-31).
5810 (num_avx512_ymmh_registers): New contant for number of higher
5811 YMM registers (ymm16-31 added by avx521 on x86_64).
5812 (num_avx512_xmm_registers): New constant for number of higher
5813 XMM registers (xmm16-31 added by AVX512 on x86_64).
5814 (struct i387_xsave): Add space for AVX512 registers.
5815 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5816 Add code to handle AVX512 registers.
5817 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5818 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5819 prototypei from generated file.
5820 (tdesc_amd64_avx512_linux): Likewise.
5821 (init_registers_x32_avx512_linux): Likewise.
5822 (tdesc_x32_avx512_linux): Likewise.
5823 (init_registers_i386_avx512_linux): Likewise.
5824 (tdesc_i386_avx512_linux): Likewise.
5825 (x86_64_regmap): Add AVX512 registers.
5826 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5827 mask.
5828 (initialize_low_arch): Add code to initialize AVX512 registers.
5829
5830 2014-04-23 Pedro Alves <palves@redhat.com>
5831
5832 * mem-break.c (find_gdb_breakpoint_at): Make static.
5833 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5834
5835 2014-04-23 Pedro Alves <palves@redhat.com>
5836
5837 * i386-low.c: Don't include break-common.h here.
5838 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5839 prototype to take target_hw_bp_type as argument instead of a Z
5840 packet char.
5841 * i386-low.h: Include break-common.h here.
5842 (Z_packet_to_hw_type): Declare.
5843 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5844 prototypes.
5845 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5846 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5847 (x86_remove_point): Convert the packet number to a
5848 target_hw_bp_type before calling i386_low_remove_watchpoint.
5849 * win32-i386-low.c (i386_insert_point): Convert the packet number
5850 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5851 (i386_remove_point): Convert the packet number to a
5852 target_hw_bp_type before calling i386_low_remove_watchpoint.
5853
5854 2014-04-23 Pedro Alves <palves@redhat.com>
5855
5856 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5857
5858 2014-04-10 Pedro Alves <palves@redhat.com>
5859
5860 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5861 Check if the condition or command is NULL before checking if the
5862 breakpoint is known. On success, return true.
5863 * mem-break.h (add_breakpoint_condition): Document return.
5864 (add_breakpoint_commands): Add describing comment.
5865 * server.c (skip_to_semicolon): New function.
5866 (process_point_options): Use it.
5867
5868 2014-04-09 Pedro Alves <palves@redhat.com>
5869
5870 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5871 to lwpid_of.
5872
5873 2014-02-27 Pedro Alves <palves@redhat.com>
5874
5875 PR 12702
5876 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5877 macros.
5878 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5879 output.
5880 (last_thread_of_process_p): Take a PID argument instead of a
5881 thread pointer.
5882 (linux_wait_for_lwp): Delete.
5883 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5884 functions.
5885 (linux_low_filter_event): New function, party factored out from
5886 linux_wait_for_event.
5887 (linux_wait_for_event): Rename to ...
5888 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5889 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5890 sigsuspend. Check for zombie leaders.
5891 (linux_wait_for_event): Reimplement as wrapper around
5892 linux_wait_for_event_filtered.
5893 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5894 a normal or signal exit is seen, it's the whole process exiting.
5895 (wait_for_sigstop): No longer a for_each_inferior callback.
5896 Rewrite on top of linux_wait_for_event_filtered.
5897 (stop_all_lwps): Call wait_for_sigstop directly.
5898 * server.c (resume, handle_target_event): Handle
5899 TARGET_WAITKIND_NO_RESUMED.
5900
5901 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5902
5903 * win32-low.c (psapi_get_dll_name,
5904 * win32_CreateToolhelp32Snapshot): Delete.
5905 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5906 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5907 Delete.
5908 (handle_load_dll): Add function description.
5909 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5910
5911 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5912
5913 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5914 Add comment.
5915 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5916 base address when calling win32_add_one_solib.
5917 (handle_load_dll): Delete local variable load_addr.
5918 Remove 0x1000 offset applied to DLL base address when calling
5919 win32_add_one_solib.
5920 (handle_unload_dll): Add comment.
5921
5922 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5923
5924 * win32-low.c (win32_add_all_dlls): Renames
5925 win32_ensure_ntdll_loaded. Rewrite function documentation.
5926 Adjust implementation to always load all DLLs.
5927 Add 0x1000 offset to DLL base address when calling
5928 win32_add_one_solib.
5929 (child_initialization_done): New static global.
5930 (do_initial_child_stuff): Set child_initialization_done to
5931 zero during child initialization, and 1 after. Replace call
5932 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5933 Add comment.
5934 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5935 (handle_unload_dll): Add function documentation.
5936 (get_child_debug_event): Ignore load and unload DLL events
5937 during child initialization.
5938
5939 2014-02-20 Doug Evans <dje@google.com>
5940
5941 Remove global all_lwps.
5942 * inferiors.h (ptid_of): Move here from linux-low.h.
5943 (pid_of, lwpid_of): Ditto.
5944 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5945 parameter is a struct thread_info * now.
5946 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5947 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5948 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5949 directly.
5950 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5951 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5952 * linux-arm-low.c (update_registers_callback): Update, "entry"
5953 parameter is a struct thread_info * now.
5954 Fetch lwpid from current_inferior directly.
5955 (arm_insert_point): Pass &all_threads to find_inferior instead of
5956 &all_lwps.
5957 (arm_remove_point): Ditto.
5958 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5959 (arm_prepare_to_resume): Fetch pid from thread.
5960 (arm_read_description): Fetch lwpid from current_inferior directly.
5961 * linux-low.c (all_lwps): Delete.
5962 (delete_lwp): Delete call to remove_inferior.
5963 (handle_extended_wait): Fetch lwpid from thread.
5964 (add_lwp): Don't set lwp->entry.id. Remove call to
5965 add_inferior_to_list.
5966 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5967 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5968 (kill_one_lwp_callback): Ditto.
5969 (linux_kill): Don't dereference NULL pointer.
5970 Fetch ptid,lwpid from thread.
5971 (get_detach_signal): Fetch ptid from thread.
5972 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5973 Simplify call to regcache_invalidate_thread.
5974 (delete_lwp_callback): Update, "entry" parameter is a
5975 struct thread_info * now. Fetch pid from thread.
5976 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5977 (status_pending_p_callback): Update, "entry" parameter is a
5978 struct thread_info * now. Fetch ptid from thread.
5979 (find_lwp_pid): Update, "entry" parameter is a
5980 struct thread_info * now.
5981 (linux_wait_for_lwp): Fetch pid from thread.
5982 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5983 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5984 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5985 (dequeue_one_deferred_signal): Ditto.
5986 (cancel_breakpoint): Fetch ptid from current_inferior.
5987 (linux_wait_for_event): Pass &all_threads to find_inferior,
5988 not &all_lwps. Fetch ptid, lwpid from thread.
5989 (count_events_callback): Update, "entry" parameter is a
5990 struct thread_info * now.
5991 (select_singlestep_lwp_callback): Ditto.
5992 (select_event_lwp_callback): Ditto.
5993 (cancel_breakpoints_callback): Ditto.
5994 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5995 not &all_lwps.
5996 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5997 (unsuspend_one_lwp): Update, "entry" parameter is a
5998 struct thread_info * now.
5999 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6000 not &all_lwps.
6001 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6002 Fetch lwpid from thread, not lwp.
6003 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6004 Pass &all_threads to find_inferior, not &all_lwps.
6005 (send_sigstop): Fetch lwpid from thread, not lwp.
6006 (send_sigstop_callback): Update, "entry" parameter is a
6007 struct thread_info * now.
6008 (suspend_and_send_sigstop_callback): Ditto.
6009 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6010 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6011 struct thread_info * now.
6012 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6013 from thread, lwp.
6014 (lwp_running): Update, "entry" parameter is a
6015 struct thread_info * now.
6016 (stop_all_lwps): Fetch ptid from thread.
6017 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6018 (linux_resume_one_lwp): Fetch lwpid from thread.
6019 (linux_set_resume_request): Update, "entry" parameter is a
6020 struct thread_info * now. Fetch pid, lwpid from thread.
6021 (resume_status_pending_p): Update, "entry" parameter is a
6022 struct thread_info * now.
6023 (need_step_over_p): Ditto. Fetch lwpid from thread.
6024 (start_step_over): Fetch lwpid from thread.
6025 (linux_resume_one_thread): Update, "entry" parameter is a
6026 struct thread_info * now. Fetch lwpid from thread.
6027 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6028 (proceed_one_lwp): Update, "entry" parameter is a
6029 struct thread_info * now. Fetch lwpid from thread.
6030 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6031 struct thread_info * now.
6032 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6033 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6034 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6035 directly.
6036 (regsets_store_inferior_registers): Ditto.
6037 (fetch_register, store_register): Ditto.
6038 (linux_read_memory, linux_write_memory): Ditto.
6039 (linux_request_interrupt): Ditto.
6040 (linux_read_auxv): Ditto.
6041 (linux_xfer_siginfo): Ditto.
6042 (linux_qxfer_spu): Ditto.
6043 (linux_qxfer_libraries_svr4): Ditto.
6044 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6045 moved to inferiors.h.
6046 (get_lwp): Delete.
6047 (get_thread_lwp): Update.
6048 (struct lwp_info): Delete member "entry". Simplify comment for
6049 member "thread".
6050 (all_lwps): Delete.
6051 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6052 current_inferior directly.
6053 (update_watch_registers_callback): Update, "entry" parameter is a
6054 struct thread_info * now. Fetch pid from thread.
6055 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6056 (mips_insert_point): Fetch lwpid from current_inferior.
6057 Pass &all_threads to find_inferior, not &all_lwps.
6058 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6059 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6060 directly.
6061 (mips_stopped_data_address): Ditto.
6062 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6063 directly.
6064 * linux-tile-low.c (tile_arch_setup): Ditto.
6065 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6066 (update_debug_registers_callback): Update, "entry" parameter is a
6067 struct thread_info * now. Fetch pid from thread.
6068 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6069 Pass &all_threads to find_inferior, not &all_lwps.
6070 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6071 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6072 Pass &all_threads to find_inferior, not &all_lwps.
6073 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6074 (i386_dr_low_get_status): Ditto.
6075 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6076 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6077 (x86_linux_read_description): Ditto.
6078 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6079
6080 2014-02-20 Doug Evans <dje@google.com>
6081
6082 * inferiors.c (get_first_inferior): Fix buglet.
6083
6084 2014-02-19 Doug Evans <dje@google.com>
6085
6086 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6087 * inferiors.c (add_thread): Change result type to struct thread_info *.
6088 All callers updated.
6089 (add_lwp): Call add_thread here instead of in callers.
6090 All callers updated.
6091 * linux-low.h (get_lwp_thread): Rewrite.
6092 (struct lwp_info): New member "thread".
6093
6094 2014-02-19 Doug Evans <dje@google.com>
6095
6096 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6097 All callers updated.
6098
6099 2014-02-19 Doug Evans <dje@google.com>
6100
6101 * inferiors.c (add_thread): Fix whitespace.
6102
6103 2014-02-19 Doug Evans <dje@google.com>
6104
6105 * dll.c (clear_dlls): Replace accessing list implemention details
6106 with API function.
6107 * gdbthread.h (get_first_thread): Declare.
6108 * inferiors.c (for_each_inferior_with_data): New function.
6109 (get_first_thread): New function.
6110 (find_thread_ptid): Simplify.
6111 (get_first_inferior): New function.
6112 (clear_list): Delete.
6113 (one_inferior_p): New function.
6114 (clear_inferior_list): New function.
6115 (clear_inferiors): Update.
6116 * inferiors.h (for_each_inferior_with_data): Declare.
6117 (clear_inferior_list): Declare.
6118 (one_inferior_p): Declare.
6119 (get_first_inferior): Declare.
6120 * linux-low.c (linux_wait_for_event): Replace accessing list
6121 implemention details with API function.
6122 * server.c (target_running): Ditto.
6123 (accumulate_file_name_length): New function.
6124 (emit_dll_description): New function.
6125 (handle_qxfer_libraries): Replace accessing list implemention
6126 details with API function.
6127 (handle_qxfer_threads_worker): New function.
6128 (handle_qxfer_threads_proper): Replace accessing list implemention
6129 details with API function.
6130 (handle_query): Ditto.
6131 (visit_actioned_threads_callback_ftype): New typedef.
6132 (visit_actioned_threads_data): New struct.
6133 (visit_actioned_threads): Rewrite to be find_inferior callback.
6134 (resume): Call find_inferior.
6135 (handle_status): Replace accessing list implemention
6136 details with API function.
6137 (process_serial_event): Replace accessing list implemention details
6138 with API function.
6139 * target.c (set_desired_inferior): Replace accessing list implemention
6140 details with API function.
6141 * tracepoint.c (same_process_p): New function.
6142 (gdb_agent_about_to_close): Replace accessing list implemention
6143 details with API function.
6144 * win32-low.c (child_delete_thread): Replace accessing list
6145 implemention details with API function.
6146 (match_dll_by_basename): New function.
6147 (dll_is_loaded_by_basename): New function.
6148 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6149 details call to dll_is_loaded_by_basename.
6150
6151 2014-02-19 Doug Evans <dje@google.com>
6152
6153 * dll.h (struct dll_info): Add comment.
6154 * gdbthread.h (struct thread_info): Add comment.
6155 (current_ptid): Simplify.
6156 * inferiors.c (add_process): Update.
6157 (remove_process): Update.
6158 * inferiors.h (struct process_info): Rename member "head" to "entry".
6159 * linux-low.c (delete_lwp): Update.
6160 (add_lwp): Update.
6161 (last_thread_of_process_p): Update.
6162 (kill_one_lwp_callback, linux_kill): Update.
6163 (status_pending_p_callback): Update.
6164 (wait_for_sigstop): Update. Simplify read of ptid.
6165 (start_step_over): Update.
6166 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6167 (get_lwp_thread): Update.
6168 (struct lwp_info): Rename member "head" to "entry".
6169 * regcache.h (inferior_list_entry): Delete.
6170 * server.c (kill_inferior_callback): Update.
6171 (detach_or_kill_inferior_callback): Update.
6172 (print_started_pid): Update.
6173 (print_attached_pid): Update.
6174 (process_serial_event): Simplify read of ptid.
6175 * thread-db.c (thread_db_create_event): Update.
6176 (thread_db_get_tls_address): Update.
6177 * win32-low.c (current_inferior_ptid): Simplify.
6178
6179 2014-02-19 Tom Tromey <tromey@redhat.com>
6180
6181 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6182 argument.
6183 (target_supports_btrace): Update.
6184
6185 2014-02-14 Yao Qi <yao@codesourcery.com>
6186
6187 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6188 (rsp-low-ipa.o): New target.
6189
6190 2014-02-12 Tom Tromey <tromey@redhat.com>
6191
6192 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6193 convert_ascii_to_int.
6194 * regcache.c (registers_to_string): Likewise.
6195 * remote-utils.c (decode_M_packet): Likewise.
6196 * server.c (process_serial_event): Likewise.
6197
6198 2014-02-12 Tom Tromey <tromey@redhat.com>
6199
6200 * server.c (handle_query, handle_v_run): Use hex2bin, not
6201 unhexify.
6202 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6203
6204 2014-02-12 Tom Tromey <tromey@redhat.com>
6205
6206 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6207 convert_int_to_ascii.
6208 * regcache.c (registers_to_string, collect_register_as_string):
6209 Likewise.
6210 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6211 Likewise.
6212 * server.c (process_serial_event): Likewise.
6213 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6214 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6215
6216 2014-02-12 Tom Tromey <tromey@redhat.com>
6217
6218 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6219 bin2hex, not hexify.
6220 * tracepoint.c (cmd_qtstatus): Likewise.
6221
6222 2014-02-12 Tom Tromey <tromey@redhat.com>
6223
6224 * remote-utils.c (monitor_output): Pass explicit length to
6225 hexify.
6226
6227 2014-02-12 Tom Tromey <tromey@redhat.com>
6228
6229 * tracepoint.c: Include rsp-low.h.
6230 * server.c: Include rsp-low.h.
6231 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6232 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6233 declare.
6234 * remote-utils.c: Include rsp-low.h.
6235 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6236 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6237 (convert_int_to_ascii, convert_ascii_to_int): Move to
6238 common/rsp-low.c.
6239 * regcache.c: Include rsp-low.h.
6240 * ax.c: Include rsp-low.h.
6241 * Makefile.in (SFILES): Add common/rsp-low.c.
6242 (OBS): Add rsp-low.o.
6243 (rsp-low.o): New target.
6244
6245 2014-02-12 Tom Tromey <tromey@redhat.com>
6246
6247 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6248 Include print-utils.h.
6249 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6250 (plongest, thirty_two, phex_nz): Remove.
6251 * Makefile.in (SFILES): Add common/print-utils.c.
6252 (OBS): Add print-utils.o.
6253 (print-utils-ipa.o): New target.
6254 (print-utils.o): New target.
6255 (IPA_OBJS): Add print-utils-ipa.o.
6256
6257 2014-02-06 Tom Tromey <tromey@redhat.com>
6258
6259 * Makefile.in (SFILES): Fix indentation.
6260
6261 2014-02-05 Doug Evans <dje@google.com>
6262
6263 * linux-low.c (linux_wait_for_event): Improve comment.
6264 (linux_wait_1): Keep current_inferior in sync with event_child.
6265
6266 2014-01-22 Doug Evans <dje@google.com>
6267
6268 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6269
6270 2014-01-22 Doug Evans <dje@google.com>
6271
6272 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6273 * configure: Regenerate.
6274 * config.in: Regenerate.
6275 * Makefile.in (SFILES): Add debug.c.
6276 (OBS): Add debug.o.
6277 * debug.c: New file.
6278 * debug.h: New file.
6279 * linux-aarch64-low.c (*): Update all debugging printfs to use
6280 debug_printf instead of fprintf.
6281 * linux-arm-low.c (*): Ditto.
6282 * linux-cris-low.c (*): Ditto.
6283 * linux-crisv32-low.c (*): Ditto.
6284 * linux-m32r-low.c (*): Ditto.
6285 * linux-sparc-low.c (*): Ditto.
6286 * linux-x86.c (*): Ditto.
6287 * linux-low.c (*): Ditto.
6288 (linux_wait_1): Add calls to debug_enter, debug_exit.
6289 (linux_wait): Remove redundant debugging printf.
6290 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6291 (linux_resume, unstop_all_lwps): Ditto.
6292 * mem-break.c (*): Update all debugging printfs to use
6293 debug_printf instead of fprintf.
6294 * remote-utils.c (*): Ditto.
6295 * thread-db.c (*): Ditto.
6296 * server.c #include <ctype.h>, "gdb_vecs.h".
6297 (debug_threads): Moved to debug.c.
6298 (*): Update all debugging printfs to use debug_printf instead of
6299 fprintf.
6300 (start_inferior): Replace call to fflush with call to debug_flush.
6301 (monitor_show_help): Mention set debug-format.
6302 (parse_debug_format_options): New function.
6303 (handle_monitor_command): Handle "monitor set debug-format".
6304 (gdbserver_usage): Mention --debug-format.
6305 (main): Parse --debug-format.
6306 * server.h (debug_threads): Declaration moved to debug.h.
6307 #include "debug.h".
6308 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6309 trace_debug_1 that uses debug_printf.
6310 (tracepoint_look_up_symbols): Update all debugging printfs to use
6311 debug_printf instead of fprintf.
6312
6313 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6314
6315 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6316 sys/ptrace.h.
6317
6318 2014-01-17 Pedro Alves <palves@redhat.com>
6319
6320 PR build/16445
6321 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6322 defined after including gdb_proc_service.h.
6323
6324 2014-01-16 Doug Evans <dje@google.com>
6325
6326 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6327 (match_dll): Use it.
6328
6329 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6330
6331 * target.h (target_ops) <read_btrace>: Change parameters and
6332 return type to allow error reporting.
6333 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6334 trace reading errors on.
6335 * linux-low.c (linux_low_read_btrace): Pass trace reading
6336 errors on.
6337 (linux_low_disable_btrace): New.
6338
6339 2014-01-15 Doug Evans <dje@google.com>
6340
6341 * inferiors.c (thread_id_to_gdb_id): Delete.
6342 * inferiors.h (thread_id_to_gdb_id): Delete.
6343
6344 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6345
6346 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6347 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6348 versions.
6349
6350 2014-01-08 Pedro Alves <palves@redhat.com>
6351
6352 * server.c (handle_status): Don't discard previous queued stop
6353 replies or thread's pending status here.
6354 (main) <disconnection>: Do it here instead.
6355
6356 2014-01-08 Pedro Alves <palves@redhat.com>
6357
6358 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6359 * server.c (visit_actioned_threads, handle_pending_status): New
6360 function.
6361 (handle_v_cont): Factor out parts to ...
6362 (resume): ... this new function. If in all-stop, and a thread
6363 being resumed has a pending status, report it without actually
6364 resuming.
6365 (myresume): Adjust to use the new 'resume' function.
6366 (clear_pending_status_callback, set_pending_status_callback)
6367 (find_status_pending_thread_callback): New functions.
6368 (handle_status): Handle the case of multiple threads having
6369 interesting statuses to report. Report threads' real last signal
6370 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6371 with an interesting thread to report the status for, instead of
6372 always reporting the status of the first thread.
6373
6374 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6375
6376 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6377 * gdbreplay.c (gdbreplay_version): Likewise.
6378
6379 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6380
6381 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6382 iov.iov_len with the real length in use.
6383
6384 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6385
6386 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6387 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6388 for all targets that use win32-low.c.
6389 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6390 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6391
6392 2013-12-13 Pedro Alves <palves@redhat.com>
6393
6394 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6395 if equal to TARGET_WAITKIND_LOADED.
6396 * win32-low.c (cached_status): New static global.
6397 (win32_wait): Add declaration.
6398 (do_initial_child_stuff): Flush all initial pending debug events
6399 up to the initial breakpoint.
6400 (win32_wait): If CACHED_STATUS was set, return that instead
6401 of doing a real wait. Remove the code resuming the execution
6402 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6403 during the initial phase. Also remove the code changing
6404 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6405 TARGET_WAITKIND_STOPPED.
6406
6407 2013-12-11 Yao Qi <yao@codesourcery.com>
6408
6409 * notif.c (handle_notif_ack): Return 0 if no notification
6410 matches.
6411
6412 2013-11-20 Doug Evans <dje@google.com>
6413
6414 * linux-low.c (linux_set_resume_request): Fix comment.
6415
6416 2013-11-20 Doug Evans <dje@google.com>
6417
6418 * linux-low.c (resume_status_pending_p): Tweak comment.
6419
6420 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6421
6422 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6423 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6424 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6425 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6426 (srv_amd64_regobj): Add amd64-mpx.o.
6427 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6428 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6429 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6430 * i387-fp.c (num_pl_bnd_register) Added constant.
6431 (num_pl_bnd_cfg_registers) Added constant.
6432 (struct i387_xsave) Added reserved area and MPX fields.
6433 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6434 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6435 function.
6436 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6437 (init_registers_amd64_mpx_linux): Declare new function.
6438 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6439 (x86_64_regmap): Add MPX registers.
6440 (x86_linux_read_description): Add MPX case.
6441 (initialize_low_arch): Initialize MPX targets.
6442
6443 2013-11-18 Tom Tromey <tromey@redhat.com>
6444
6445 * configure: Rebuild.
6446 * configure.ac: Don't check for stdlib.h.
6447 * gdbreplay.c: Unconditionally include stdlib.h.
6448
6449 2013-11-18 Tom Tromey <tromey@redhat.com>
6450
6451 * config.in: Rebuild.
6452 * configure: Rebuild.
6453 * configure.ac: Don't use AC_HEADER_DIRENT.
6454
6455 2013-11-18 Tom Tromey <tromey@redhat.com>
6456
6457 * server.h: Don't check HAVE_STRING_H.
6458 * gdbreplay.c: Don't check HAVE_STRING_H.
6459 * configure: Rebuild.
6460
6461 2013-11-18 Tom Tromey <tromey@redhat.com>
6462
6463 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6464 LIBGNU.
6465
6466 2013-11-08 Tom Tromey <tromey@redhat.com>
6467
6468 * configure, config.in: Rebuild.
6469 * configure.ac: Remove unused configury.
6470
6471 2013-11-08 Tom Tromey <tromey@redhat.com>
6472
6473 * acinclude.m4: Include common.m4, codeset.m4.
6474 * configure, config.in: Rebuild.
6475 * configure.ac: Use GDB_AC_COMMON.
6476
6477 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6478
6479 * linux-s390-low.c (HWCAP_S390_TE): New define.
6480 (s390_arch_setup): Consider the TE field in the HWCAP for
6481 determining 'have_regset_tdb'.
6482
6483 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6484
6485 PR gdb/16014
6486 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6487 call to sizeof.
6488
6489 2013-10-02 Pedro Alves <palves@redhat.com>
6490
6491 * server.c (process_serial_event): Don't output "GDBserver
6492 exiting" if GDB is connected through stdio.
6493 * target.c (mywait): Likewise, be silent if GDB is connected
6494 through stdio.
6495
6496 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6497
6498 * lynx-low.c (lynx_add_threads_after_attach): New function.
6499 (lynx_attach): Remove call to add_thread. Add call to
6500 lynx_add_threads_after_attach instead.
6501
6502 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6503
6504 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6505 * config.in, configure: Regenerated.
6506
6507 2013-09-18 Yao Qi <yao@codesourcery.com>
6508
6509 PR server/15959
6510 * server.c (start_inferior): Clear 'resume_info'.
6511
6512 2013-09-16 Jiong Wang <jiwang@tilera.com>
6513
6514 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6515 for each register.
6516
6517 2013-09-16 Jiong Wang <jiwang@tilera.com>
6518
6519 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6520 linux-tile-low.o to srv_tgtobj.
6521
6522 2013-09-16 Will Newton <will.newton@linaro.org>
6523
6524 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6525 out regs.
6526
6527 2013-09-06 Pedro Alves <palves@redhat.com>
6528
6529 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6530 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6531 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6532 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6533 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6534 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6535
6536 2013-09-06 Pedro Alves <palves@redhat.com>
6537
6538 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6539 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6540
6541 2013-09-06 Pedro Alves <palves@redhat.com>
6542
6543 * linux-amd64-ipa.c: Include tracepoint.h.
6544 * linux-i386-ipa.c: Include tracepoint.h.
6545
6546 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6547
6548 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6549 (ps_get_thread_area): New function.
6550
6551 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6552
6553 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6554 (initialize_low_arch): Call init_registers_crisv32 rather than
6555 init_register_crisv32.
6556
6557 2013-09-05 Pedro Alves <palves@redhat.com>
6558
6559 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6560 to ...
6561 * hostio.h: ... this new file.
6562 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6563 win32-low.c: Include hostio.h.
6564
6565 2013-09-05 Pedro Alves <palves@redhat.com>
6566
6567 * server.h (gdb_client_data, handler_func, callback_handler_func)
6568 (delete_file_handler, add_file_handler, append_callback_event)
6569 (delete_callback_event, start_event_loop, initialize_event_loop):
6570 Move to event-loop.h and include it.
6571 * event-loop.h: New file.
6572
6573 2013-09-05 Pedro Alves <palves@redhat.com>
6574
6575 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6576 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6577 (loaded_dll, unloaded_dll): Move to ...
6578 * dll.h: ... this new file.
6579 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6580
6581 2013-09-05 Pedro Alves <palves@redhat.com>
6582
6583 * server.h (current_process, get_thread_process, all_processes)
6584 (add_inferior_to_list, for_each_inferior, current_inferior)
6585 (remove_inferior, add_process, remove_process, find_process_pid)
6586 (have_started_inferiors_p, have_attached_inferiors_p)
6587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6588 (clear_inferiors, find_inferior, find_inferior_id)
6589 (inferior_target_data, set_inferior_target_data)
6590 (inferior_regcache_data, set_inferior_regcache_data): Move to
6591 inferiors.h, and include it.
6592 * inferiors.h: New file.
6593
6594 2013-09-05 Pedro Alves <palves@redhat.com>
6595
6596 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6597 Move ...
6598 * ax.h: ... here.
6599
6600 2013-09-05 Pedro Alves <palves@redhat.com>
6601
6602 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6603 tracepoint.h.
6604 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6605 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6606 (handle_tracepoint_general_set, handle_tracepoint_query)
6607 (tracepoint_finished_step, tracepoint_was_hit)
6608 (release_while_stepping_state_list, current_traceframe)
6609 (in_readonly_region, traceframe_read_mem)
6610 (fetch_traceframe_registers, traceframe_read_sdata)
6611 (traceframe_read_info, struct fast_tpoint_collect_status)
6612 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6613 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6614 (supply_fast_tracepoint_registers)
6615 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6616 (ipa_tdesc, claim_trampoline_space)
6617 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6618 (agent_mem_read, agent_get_trace_state_variable_value)
6619 (agent_set_trace_state_variable_value, agent_tsv_read)
6620 (agent_mem_read_string, get_raw_reg_func_addr)
6621 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6622 * tracepoint.h: ... this new file.
6623
6624 2013-09-05 Pedro Alves <palves@redhat.com>
6625
6626 * server.h (perror_with_name, error, fatal, warning, paddress)
6627 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6628 include it.
6629 * utils.h: New file.
6630
6631 2013-09-05 Pedro Alves <palves@redhat.com>
6632
6633 * server.h (remote_debug, noack_mode, transport_is_reliable)
6634 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6635 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6636 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6637 (write_enn, initialize_async_io, enable_async_io)
6638 (disable_async_io, check_remote_input_interrupt_request)
6639 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6640 (dead_thread_notify, prepare_resume_reply)
6641 (decode_address_to_semicolon, decode_address, decode_m_packet)
6642 (decode_M_packet, decode_X_packet, decode_xfer_write)
6643 (decode_search_memory_packet, unhexify, hexify)
6644 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6645 (look_up_one_symbol, relocate_instruction)
6646 (monitor_output): Move to remote-utils.h, and include it.
6647 * remote-utils.h: New file.
6648
6649 2013-09-05 Pedro Alves <palves@redhat.com>
6650
6651 * server.h (_): Delete.
6652
6653 2013-09-02 Pedro Alves <palves@redhat.com>
6654
6655 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6656 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6657 allocated.
6658 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6659
6660 2013-09-02 Pierre Muller <muller@sourceware.org>
6661
6662 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6663 or WriteProcessMemory complete successfully and handle
6664 ERROR_PARTIAL_COPY error.
6665
6666 2013-09-02 Pedro Alves <palves@redhat.com>
6667
6668 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6669 error instead of EIO.
6670
6671 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6672
6673 PR server/15604
6674 * linux-low.c: Include filestuff.h.
6675 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6676 * lynx-low.c: Include filestuff.h.
6677 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6678 * server.c: Include filestuff.h.
6679 (main): Call notice_open_fds.
6680 * spu-low.c: Include filestuff.h.
6681 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6682
6683 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6684
6685 * Makefile.in: Explain why ../target and ../nat are not
6686 listed as include file search paths.
6687 (linux-waitpid.o): New object file rule.
6688 * configure.srv (srv_native_linux_obj): New variable.
6689 Replace all occurrences of linux native object files with
6690 $srv_native_linux_obj.
6691 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6692 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6693 (linux_enable_event_reporting): Remove declaration.
6694 (my_waitpid): Moved to common/linux-waitpid.c.
6695 (linux_wait_for_event): Pass ptid when calling
6696 linux_enable_event_reporting.
6697 (linux_supports_tracefork_flag): Remove.
6698 (linux_enable_event_reporting): Likewise.
6699 (linux_tracefork_grandchild): Remove.
6700 (STACK_SIZE): Moved to common/linux-ptrace.c.
6701 (linux_tracefork_child): Remove.
6702 (linux_test_for_tracefork): Remove.
6703 (linux_look_up_symbols): Call linux_supports_traceclone.
6704 (initialize_low): Remove call to linux_test_for_tracefork.
6705 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6706 common/linux-ptrace.h.
6707 (PTRACE_TYPE_ARG4): Likewise.
6708 Include linux-ptrace.h.
6709
6710 2013-08-21 Pedro Alves <palves@redhat.com>
6711
6712 * config.in: Renegerate.
6713
6714 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6715
6716 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6717 (SFILES): Remove $(srcdir)/common/target-common.c and
6718 add $(srcdir)/target/waitstatus.c.
6719 (OBS): Remove target-common.o and add waitstatus.o.
6720 (server_h): Remove $(srcdir)/../common/target-common.h and
6721 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6722 and $(srcdir)/../target/waitstatus.h.
6723 (target-common.o): Remove.
6724 (waitstatus.o): New target object file.
6725 * target.h: Do not include target-common.h and
6726 include target/resume.h, target/wait.h and
6727 target/waitstatus.h.
6728
6729 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6730
6731 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6732 to PTRACE_TYPE_ARG3.
6733 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6734 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6735 PTRACE_TYPE_ARG4.
6736 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6737 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6738
6739 2013-07-27 Jie Zhang <jie@codesourcery.com>
6740 Daniel Jacobowitz <dan@codesourcery.com>
6741 Yao Qi <yao@codesourcery.com>
6742
6743 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6744 (mips-linux-watch.o): New rule.
6745 (mips_linux_watch_h): New variable.
6746 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6747 srv_tgtobj.
6748 * linux-mips-low.c: Include mips-linux-watch.h.
6749 (struct arch_process_info, struct arch_lwp_info): New.
6750 (update_watch_registers_callback): New function.
6751 (mips_linux_new_process, mips_linux_new_thread) New functions.
6752 (mips_linux_prepare_to_resume, mips_insert_point): New
6753 functions.
6754 (mips_remove_point, mips_stopped_by_watchpoint): New
6755 functions.
6756 (rsp_bp_type_to_target_hw_bp_type): New function.
6757 (mips_stopped_data_address): New function.
6758 (the_low_target): Add watchpoint support functions.
6759
6760 2013-07-27 Yao Qi <yao@codesourcery.com>
6761
6762 * i386-low.c: Include break-common.h.
6763 (enum target_hw_bp_type): Remove.
6764
6765 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6766
6767 * Makefile.in (SFILES): /common/target-common.c.
6768 (OBS): Add target-common.o.
6769 (server_h): Add $(srcdir)/../common/target-common.h.
6770 (target-common.o): New target.
6771 * server.c (queue_stop_reply_callback): Free
6772 status string after use.
6773 * target.c (target_waitstatus_to_string): Remove.
6774 * target.h: Include target-common.h.
6775 (resume_kind): Likewise.
6776 (target_waitkind): Likewise.
6777 (target_waitstatus): Likewise.
6778 (TARGET_WNOHANG): Likewise.
6779
6780 2013-07-04 Yao Qi <yao@codesourcery.com>
6781
6782 * Makefile.in (host_alias): Use @host_noncanonical@.
6783 (target_alias): Use @target_noncanonical@.
6784 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6785 ACX_NONCANONICAL_HOST.
6786 * configure: Regenerated.
6787
6788 Revert:
6789 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6790
6791 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6792 * configure: Rebuild.
6793 * Makefile.in (version_host, version_target): Get from configure.
6794 (version.c): Use $(version_host) and $(version_target).
6795
6796 2013-07-03 Pedro Alves <palves@redhat.com>
6797
6798 * Makefile.in (config.status): Depend on development.sh.
6799 * acinclude.m4: Include libmcheck.m4.
6800 * configure: Regenerate.
6801
6802 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6803
6804 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6805 attribute inside the parentheses.
6806 (winapi_DebugSetProcessKillOnExit): Ditto.
6807 (winapi_DebugBreakProcess): Ditto.
6808 (winapi_GenerateConsoleCtrlEvent): Ditto.
6809
6810 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6811
6812 * notif.h (notif_event): Add a dummy member to avoid compiler
6813 errors.
6814
6815 2013-07-01 Pedro Alves <palves@redhat.com>
6816
6817 * hostio.c (HOSTIO_PATH_MAX): Define.
6818 (require_filename, handle_open, handle_unlink, handle_readlink):
6819 Use it.
6820
6821 2013-07-01 Pedro Alves <palves@redhat.com>
6822
6823 * server.h: Include "pathmax.h".
6824 * linux-low.c: Don't include sys/param.h.
6825 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6826 MAXPATHLEN.
6827 * win32-low.c: Don't include sys/param.h.
6828 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6829
6830 2013-07-01 Pedro Alves <palves@redhat.com>
6831
6832 * event-loop.c: Don't check HAVE_UNISTD_H before including
6833 <unistd.h>.
6834 * gdbreplay.c: Likewise.
6835 * remote-utils.c: Likewise.
6836 * server.c: Likewise.
6837 * configure.ac: Don't check for unistd.h.
6838 * configure: Regenerate.
6839
6840 2013-06-28 Tom Tromey <tromey@redhat.com>
6841
6842 * Makefile.in (version.c): Use version.in, not
6843 common/version.in.
6844
6845 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6846
6847 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6848 * configure: Rebuild.
6849 * Makefile.in (version_host, version_target): Get from configure.
6850 (version.c): Use $(version_host) and $(version_target).
6851
6852 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6853
6854 Fix trace-status to output user name without trailing colon.
6855 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6856
6857 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6858
6859 Fix trace-status to output proper start-time and stop-time.
6860 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6861 output start time and stop time in hex as gdb expects.
6862
6863 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6864
6865 * tracepoint.c (build_traceframe_info_xml): Output trace state
6866 variables present in the trace buffer.
6867
6868 2013-06-24 Tom Tromey <tromey@redhat.com>
6869
6870 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6871 create-version.sh.
6872 (version.o): Remove.
6873 * gdbreplay.c: Include version.h.
6874 (version, host_name): Don't declare.
6875 * server.h: Include version.h.
6876 (version, host_name): Don't declare.
6877
6878 2013-06-12 Pedro Alves <palves@redhat.com>
6879
6880 * linux-x86-low.c (linux_is_elf64): Delete global.
6881 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6882 with local linux_pid_exe_is_elf_64_file use.
6883
6884 2013-06-11 Pedro Alves <palves@redhat.com>
6885
6886 * linux-low.c (regset_disabled, disable_regset): New functions.
6887 (regsets_fetch_inferior_registers)
6888 (regsets_store_inferior_registers): Use them.
6889 (initialize_regsets_info); Don't allocate the disabled_regsets
6890 array here.
6891 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6892 comment.
6893
6894 2013-06-11 Pedro Alves <palves@redhat.com>
6895
6896 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6897 xmalloc.
6898
6899 2013-06-11 Pedro Alves <palves@redhat.com>
6900
6901 * linux-x86-low.c (initialize_low_arch): Call
6902 init_registers_x32_avx_linux.
6903
6904 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6905
6906 Fix compatibility with Android Bionic.
6907 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6908 it is not empty.
6909
6910 2013-06-07 Pedro Alves <palves@redhat.com>
6911
6912 PR server/14823
6913 * Makefile.in (OBS): Add tdesc.o.
6914 (IPA_OBJS): Add tdesc-ipa.o.
6915 (tdesc-ipa.o): New rule.
6916 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6917 interface.
6918 * linux-low.c (new_inferior): Delete.
6919 (disabled_regsets, num_regsets): Delete.
6920 (linux_add_process): Adjust to set the new per-process
6921 new_inferior flag.
6922 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6923 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6924 was a stop. When calling arch_setup, switch the current inferior
6925 to the thread that got an event.
6926 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6927 (regsets_fetch_inferior_registers)
6928 (regsets_store_inferior_registers): New regsets_info parameter.
6929 Adjust to use it.
6930 (linux_register_in_regsets): New regs_info parameter. Adjust to
6931 use it.
6932 (register_addr, fetch_register, store_register): New usrregs_info
6933 parameter. Adjust to use it.
6934 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6935 parameter regs_info. Adjust to use it.
6936 (linux_fetch_registers): Get the current inferior's regs_info, and
6937 adjust to use it.
6938 (linux_store_registers): Ditto.
6939 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6940 (initialize_low): Don't initialize the target_regsets here. Call
6941 initialize_low_arch.
6942 * linux-low.h (target_regsets): Delete declaration.
6943 (struct regsets_info): New.
6944 (struct usrregs_info): New.
6945 (struct regs_info): New.
6946 (struct process_info_private) <new_inferior>: New field.
6947 (struct linux_target_ops): Delete the num_regs, regmap, and
6948 regset_bitmap fields. New field regs_info.
6949 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6950 * i387-fp.c (num_xmm_registers): Delete.
6951 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6952 calls to new interface.
6953 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6954 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6955 Infer the number of xmm registers from the regcache's target
6956 description.
6957 * i387-fp.h (num_xmm_registers): Delete.
6958 * inferiors.c (add_thread): Don't install the thread's regcache
6959 here.
6960 * proc-service.c (gregset_info): Fetch the current inferior's
6961 regs_info. Adjust to use it.
6962 * regcache.c: Include tdesc.h.
6963 (register_bytes, reg_defs, num_registers)
6964 (gdbserver_expedite_regs): Delete.
6965 (get_thread_regcache): If the thread doesn't have a regcache yet,
6966 create one, instead of aborting gdbserver.
6967 (regcache_invalidate_one): Rename to ...
6968 (regcache_invalidate_thread): ... this.
6969 (regcache_invalidate_one): New.
6970 (regcache_invalidate): Only invalidate registers of the current
6971 process.
6972 (init_register_cache): Add target_desc parameter, and use it.
6973 (new_register_cache): Ditto. Assert the target description has a
6974 non zero registers_size.
6975 (regcache_cpy): Add assertions. Adjust.
6976 (realloc_register_cache, set_register_cache): Delete.
6977 (registers_to_string, registers_from_string): Adjust.
6978 (find_register_by_name, find_regno, find_register_by_number)
6979 (register_cache_size): Add target_desc parameter, and use it.
6980 (free_register_cache_thread, free_register_cache_thread_one)
6981 (regcache_release, register_cache_size): New.
6982 (register_size): Add target_desc parameter, and use it.
6983 (register_data, supply_register, supply_register_zeroed)
6984 (supply_regblock, supply_register_by_name, collect_register)
6985 (collect_register_as_string, collect_register_by_name): Adjust.
6986 * regcache.h (struct target_desc): Forward declare.
6987 (struct regcache) <tdesc>: New field.
6988 (init_register_cache, new_register_cache): Add target_desc
6989 parameter.
6990 (regcache_invalidate_thread): Declare.
6991 (regcache_invalidate_one): Delete declaration.
6992 (regcache_release): Declare.
6993 (find_register_by_number, register_cache_size, register_size)
6994 (find_regno): Add target_desc parameter.
6995 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6996 declarations.
6997 * remote-utils.c: Include tdesc.h.
6998 (outreg, prepare_resume_reply): Adjust.
6999 * server.c: Include tdesc.h.
7000 (gdbserver_xmltarget): Delete declaration.
7001 (get_features_xml, process_serial_event): Adjust.
7002 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7003 declare.
7004 (struct process_info) <tdesc>: New field.
7005 (ipa_tdesc): Declare.
7006 * tdesc.c: New file.
7007 * tdesc.h: New file.
7008 * tracepoint.c: Include tdesc.h.
7009 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7010 (get_context_regcache): Adjust to pass ipa_tdesc down.
7011 (do_action_at_tracepoint): Adjust to get the register cache size
7012 from the context regcache's description.
7013 (traceframe_walk_blocks): Adjust to get the register cache size
7014 from the current trace frame's description.
7015 (traceframe_get_pc): Adjust to get current trace frame's
7016 description and pass it down.
7017 (gdb_collect): Adjust to get the register cache size from the
7018 IPA's description.
7019 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7020 (gdbserver_xmltarget): Delete.
7021 (initialize_low_tracepoint): Set the ipa's target description.
7022 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7023 (initialize_low_tracepoint): Set the ipa's target description.
7024 * linux-x86-low.c: Include tdesc.h.
7025 [__x86_64__] (is_64bit_tdesc): New.
7026 (ps_get_thread_area, x86_get_thread_area): Use it.
7027 (i386_cannot_store_register): Rename to ...
7028 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7029 (i386_cannot_fetch_register): Rename to ...
7030 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7031 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7032 to new interface.
7033 (target_regsets): Rename to ...
7034 (x86_regsets): ... this.
7035 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7036 interface.
7037 (x86_siginfo_fixup): Use is_64bit_tdesc.
7038 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7039 (tdesc_x32_avx_linux, tdesc_x32_linux)
7040 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7041 Declare.
7042 (x86_linux_update_xmltarget): Delete.
7043 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7044 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7045 (AMD64_LINUX_USER64_CS): New.
7046 (x86_linux_read_description): New, based on
7047 x86_linux_update_xmltarget.
7048 (same_process_callback): New.
7049 (x86_arch_setup_process_callback): New.
7050 (x86_linux_update_xmltarget): New.
7051 (x86_regsets_info): New.
7052 (amd64_linux_regs_info): New.
7053 (i386_linux_usrregs_info): New.
7054 (i386_linux_regs_info): New.
7055 (x86_linux_regs_info): New.
7056 (x86_arch_setup): Reimplement.
7057 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7058 (x86_emit_ops): Ditto.
7059 (the_low_target): Adjust. Install x86_linux_regs_info,
7060 x86_cannot_fetch_register, and x86_cannot_store_register.
7061 (initialize_low_arch): New.
7062 * linux-ia64-low.c (tdesc_ia64): Declare.
7063 (ia64_fetch_register): Adjust.
7064 (ia64_usrregs_info, regs_info): New globals.
7065 (ia64_regs_info): New function.
7066 (the_low_target): Adjust.
7067 (initialize_low_arch): New function.
7068 * linux-sparc-low.c (tdesc_sparc64): Declare.
7069 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7070 Adjust.
7071 (sparc_arch_setup): New function.
7072 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7073 (the_low_target): Adjust.
7074 (initialize_low_arch): New function.
7075 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7076 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7077 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7078 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7079 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7080 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7081 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7082 (tdesc_powerpc_isa205_vsx64l): Declare.
7083 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7084 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7085 (ppc_set_pc, ppc_get_hwcap): Adjust.
7086 (ppc_usrregs_info): Forward declare.
7087 (!__powerpc64__) ppc_regmap_adjusted: New global.
7088 (ppc_arch_setup): Adjust to the current process'es target
7089 description.
7090 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7091 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7092 (ppc_store_evrregset): Adjust.
7093 (target_regsets): Rename to ...
7094 (ppc_regsets): ... this, and make static.
7095 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7096 (ppc_regs_info): New function.
7097 (the_low_target): Adjust.
7098 (initialize_low_arch): New function.
7099 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7100 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7101 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7102 (tdesc_s390x_linux64v2): Declare.
7103 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7104 (s390_fill_gregset, s390_store_last_break): Adjust.
7105 (target_regsets): Rename to ...
7106 (s390_regsets): ... this, and make static.
7107 (s390_get_pc, s390_set_pc): Adjust.
7108 (s390_get_hwcap): New target_desc parameter, and use it.
7109 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7110 (s390_arch_setup): Adjust to set the current process'es target
7111 description. Don't adjust the regmap.
7112 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7113 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7114 (regs_info_3264): New globals.
7115 (s390_regs_info): New function.
7116 (the_low_target): Adjust.
7117 (initialize_low_arch): New function.
7118 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7119 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7120 [__mips64] (init_registers_mips_linux)
7121 (init_registers_mips_dsp_linux): Delete defines.
7122 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7123 (have_dsp): New global.
7124 (mips_read_description): New, based on mips_arch_setup.
7125 (mips_arch_setup): Reimplement.
7126 (get_usrregs_info): New function.
7127 (mips_cannot_fetch_register, mips_cannot_store_register)
7128 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7129 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7130 (target_regsets): Rename to ...
7131 (mips_regsets): ... this, and make static.
7132 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7133 (dsp_regs_info, regs_info): New globals.
7134 (mips_regs_info): New function.
7135 (the_low_target): Adjust.
7136 (initialize_low_arch): New function.
7137 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7138 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7139 Declare.
7140 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7141 (arm_read_description): New, with bits factored from
7142 arm_arch_setup.
7143 (arm_arch_setup): Reimplement.
7144 (target_regsets): Rename to ...
7145 (arm_regsets): ... this, and make static.
7146 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7147 (arm_regs_info): New function.
7148 (the_low_target): Adjust.
7149 (initialize_low_arch): New function.
7150 * linux-m68k-low.c (tdesc_m68k): Declare.
7151 (target_regsets): Rename to ...
7152 (m68k_regsets): ... this, and make static.
7153 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7154 (m68k_regs_info): New function.
7155 (m68k_arch_setup): New function.
7156 (the_low_target): Adjust.
7157 (initialize_low_arch): New function.
7158 * linux-sh-low.c (tdesc_sharch): Declare.
7159 (target_regsets): Rename to ...
7160 (sh_regsets): ... this, and make static.
7161 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7162 (sh_regs_info, sh_arch_setup): New functions.
7163 (the_low_target): Adjust.
7164 (initialize_low_arch): New function.
7165 * linux-bfin-low.c (tdesc_bfin): Declare.
7166 (bfin_arch_setup): New function.
7167 (bfin_usrregs_info, regs_info): New globals.
7168 (bfin_regs_info): New function.
7169 (the_low_target): Adjust.
7170 (initialize_low_arch): New function.
7171 * linux-cris-low.c (tdesc_cris): Declare.
7172 (cris_arch_setup): New function.
7173 (cris_usrregs_info, regs_info): New globals.
7174 (cris_regs_info): New function.
7175 (the_low_target): Adjust.
7176 (initialize_low_arch): New function.
7177 * linux-cris-low.c (tdesc_crisv32): Declare.
7178 (cris_arch_setup): New function.
7179 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7180 (cris_regs_info): New function.
7181 (the_low_target): Adjust.
7182 (initialize_low_arch): New function.
7183 * linux-m32r-low.c (tdesc_m32r): Declare.
7184 (m32r_arch_setup): New function.
7185 (m32r_usrregs_info, regs_info): New globals.
7186 (m32r_regs_info): Adjust.
7187 (initialize_low_arch): New function.
7188 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7189 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7190 (tic6x_usrregs_info): Forward declare.
7191 (tic6x_read_description): New function, based on ...
7192 (tic6x_arch_setup): ... this. Reimplement.
7193 (target_regsets): Rename to ...
7194 (tic6x_regsets): ... this, and make static.
7195 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7196 (tic6x_regs_info): New function.
7197 (the_low_target): Adjust.
7198 (initialize_low_arch): New function.
7199 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7200 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7201 (target_regsets): Rename to ...
7202 (xtensa_regsets): ... this, and make static.
7203 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7204 globals.
7205 (xtensa_arch_setup, xtensa_regs_info): New functions.
7206 (the_low_target): Adjust.
7207 (initialize_low_arch): New function.
7208 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7209 (nios2_arch_setup): Set the current process'es tdesc.
7210 (target_regsets): Rename to ...
7211 (nios2_regsets): ... this.
7212 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7213 (nios2_regs_info): New function.
7214 (the_low_target): Adjust.
7215 (initialize_low_arch): New function.
7216 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7217 (aarch64_arch_setup): Set the current process'es tdesc.
7218 (target_regsets): Rename to ...
7219 (aarch64_regsets): ... this.
7220 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7221 (aarch64_regs_info): New function.
7222 (the_low_target): Adjust.
7223 (initialize_low_arch): New function.
7224 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7225 globals.
7226 (target_regsets): Rename to ...
7227 (tile_regsets): ... this.
7228 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7229 (tile_regs_info): New function.
7230 (tile_arch_setup): Set the current process'es tdesc.
7231 (the_low_target): Adjust.
7232 (initialize_low_arch): New function.
7233 * spu-low.c (tdesc_spu): Declare.
7234 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7235 * win32-arm-low.c (tdesc_arm): Declare.
7236 (arm_arch_setup): New function.
7237 (the_low_target): Install arm_arch_setup instead of
7238 init_registers_arm.
7239 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7240 (init_windows_x86): Rename to ...
7241 (i386_arch_setup): ... this. Set `win32_tdesc'.
7242 (the_low_target): Adjust.
7243 * win32-low.c (win32_tdesc): New global.
7244 (child_add_thread): Don't create the thread cache here.
7245 (do_initial_child_stuff): Set the new process'es tdesc.
7246 * win32-low.h (struct target_desc): Forward declare.
7247 (win32_tdesc): Declare.
7248 * lynx-i386-low.c (tdesc_i386): Declare global.
7249 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7250 * lynx-low.c (lynx_tdesc): New global.
7251 (lynx_add_process): Set the new process'es tdesc.
7252 * lynx-low.h (struct target_desc): Forward declare.
7253 (lynx_tdesc): Declare global.
7254 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7255 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7256 * nto-low.c (nto_tdesc): New global.
7257 (do_attach): Set the new process'es tdesc.
7258 * nto-low.h (struct target_desc): Forward declare.
7259 (nto_tdesc): Declare.
7260 * nto-x86-low.c (tdesc_i386): Declare.
7261 (nto_x86_arch_setup): Set `nto_tdesc'.
7262
7263 2013-06-04 Gary Benson <gbenson@redhat.com>
7264
7265 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7266 to qSupported response when appropriate.
7267 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7268 with nonzero-length annex.
7269 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7270 arguments supplied in annex.
7271
7272 2013-05-31 Doug Evans <dje@google.com>
7273
7274 PR server/15594
7275 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7276 64 bits in 64-cross-32 environment.
7277
7278 2013-05-28 Pedro Alves <palves@redhat.com>
7279
7280 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7281 (aarch64-without-fpu.c): Delete rule.
7282 * configure.srv (aarch64*-*-linux*): Remove references to
7283 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7284 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7285 declaration.
7286
7287 2013-05-24 Pedro Alves <palves@redhat.com>
7288
7289 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7290 instead of strchr/decode_address. Error if the range isn't split
7291 with a ','. Don't assume there's be a ':' in the action.
7292
7293 2013-05-23 Yao Qi <yao@codesourcery.com>
7294 Pedro Alves <palves@redhat.com>
7295
7296 * linux-low.c (lwp_in_step_range): New function.
7297 (linux_wait_1): If the thread was range stepping and stopped
7298 outside the stepping range, report the stop to GDB. Otherwise,
7299 continue stepping. Add range stepping debug output.
7300 (linux_set_resume_request): Copy the step range from the resume
7301 request to the lwp.
7302 (linux_supports_range_stepping): New.
7303 (linux_target_ops) <supports_range_stepping>: Set to
7304 linux_supports_range_stepping.
7305 * linux-low.h (struct linux_target_ops)
7306 <supports_range_stepping>: New field.
7307 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7308 * linux-x86-low.c (x86_supports_range_stepping): New.
7309 (the_low_target) <supports_range_stepping>: Set to
7310 x86_supports_range_stepping.
7311 * server.c (handle_v_cont): Handle 'r' action.
7312 (handle_v_requests): Append ";r" if the target supports range
7313 stepping.
7314 * target.h (struct thread_resume) <step_range_start,
7315 step_range_end>: New fields.
7316 (struct target_ops) <supports_range_stepping>:
7317 New field.
7318 (target_supports_range_stepping): New macro.
7319
7320 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7321
7322 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7323 confusion in comment.
7324
7325 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7326
7327 * lynx-low.c (struct process_info_private): New type.
7328 (lynx_add_process): New function.
7329 (lynx_create_inferior, lynx_attach): Replace calls to
7330 add_process by calls to lynx_add_process.
7331 (lynx_resume): If PTID is null, then try using
7332 current_process()->private->last_wait_event_ptid.
7333 Add comments.
7334 (lynx_clear_inferiors): Delete. The contents of that function
7335 has been inlined in lynx_mourn;
7336 (lynx_wait_1): Save the ptid in the process's private data.
7337 (lynx_mourn): Free the process' private data. Replace call
7338 to lynx_clear_inferiors by call to clear_inferiors.
7339
7340 2013-05-17 Yao Qi <yao@codesourcery.com>
7341
7342 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7343 the right place.
7344
7345 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7346
7347 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7348 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7349 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7350 PT_TEXT_END_ADDR guards. Update comments.
7351 (linux_target_op) <read_offsets>: Conditionally define to
7352 linux_read_offsets if the target is UCLIBC and if it defines
7353 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7354
7355 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7356 Andrew Jenner <andrew@codesourcery.com>
7357
7358 * Makefile.in (SFILES): Add linux-nios2-low.c.
7359 (clean): Add action to delete nios2-linux.c.
7360 (nios2-linux.c): New rule.
7361 * configure.srv: Add nios2*-*-linux*.
7362 * linux-nios2-low.c: New.
7363
7364 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7365
7366 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7367
7368 2013-04-25 Hui Zhu <hui@codesourcery.com>
7369
7370 PR gdb/15186
7371 * ax.c (ax_printf): Add fflush.
7372
7373 2013-04-22 Tom Tromey <tromey@redhat.com>
7374
7375 * Makefile.in (SFILES): Add filestuff.c.
7376 (OBS): Add filestuff.o.
7377 (filestuff.o): New target.
7378 * config.in, configure: Rebuild.
7379 * configure.ac: Check for fdwalk, pipe2.
7380
7381 2013-04-17 Pedro Alves <palves@redhat.com>
7382
7383 * configure.ac (USE_THREAD_DB): Delete variable.
7384 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7385 Don't AC_SUBST USE_THREAD_DB.
7386 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7387 * config.in, configure: Regenerate.
7388
7389 2013-04-16 Pedro Alves <palves@redhat.com>
7390
7391 * linux-low.h (struct lwp_info) <thread_known>: Move under
7392 the USE_THREAD_DB #ifdef.
7393
7394 2013-04-16 Pedro Alves <palves@redhat.com>
7395
7396 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7397 (linux-low.o): Delete rule.
7398 * linux-low.h: Always include "gdb_thread_db.h" instead of
7399 conditionally including thread_db.h.
7400 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7401 HAVE_THREAD_DB_H.
7402
7403 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7404
7405 * Makefile.in (install-only): Fix make install regression.
7406
7407 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7408
7409 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7410 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7411 installation.
7412 * gdbserver.1: Remove.
7413
7414 2013-03-22 Pedro Alves <palves@redhat.com>
7415
7416 * linux-low.c (handle_extended_wait): Don't call
7417 linux_enable_event_reporting.
7418
7419 2013-03-15 Tony Theodore <tonyt@logyst.com>
7420
7421 PR build/9098:
7422 * Makefile.in (SHELL): Use @SHELL@.
7423
7424 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7425
7426 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7427 compiler warning.
7428
7429 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7430
7431 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7432 Remove extraneous NULL element.
7433
7434 2013-03-13 Yao Qi <yao@codesourcery.com>
7435
7436 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7437 'V' block in trace frame.
7438
7439 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7440
7441 * target.h (struct target_ops): Add btrace ops.
7442 (target_supports_btrace): New macro.
7443 (target_enable_btrace): New macro.
7444 (target_disable_btrace): New macro.
7445 (target_read_btrace): New macro.
7446 * gdbthread.h (struct thread_info): Add btrace field.
7447 * server.c: Include btrace-common.h.
7448 (handle_btrace_general_set): New function.
7449 (handle_btrace_enable): New function.
7450 (handle_btrace_disable): New function.
7451 (handle_general_set): Call handle_btrace_general_set.
7452 (handle_qxfer_btrace): New function.
7453 (struct qxfer qxfer_packets[]): Add btrace entry.
7454 * inferiors.c (remove_thread): Disable btrace.
7455 * linux-low: Include linux-btrace.h.
7456 (linux_low_enable_btrace): New function.
7457 (linux_low_read_btrace): New function.
7458 (linux_target_ops): Add btrace ops.
7459 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7460 Add srv_linux_btrace=yes.
7461 (x86_64-*-linux*): Add linux-btrace.o.
7462 Add srv_linux_btrace=yes.
7463 * configure.ac: Define HAVE_LINUX_BTRACE.
7464 * config.in: Regenerated.
7465 * configure: Regenerated.
7466
7467 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7468
7469 * server.c (handle_qxfer): Preserve error message if -3 is
7470 returned.
7471 (qxfer): Document the -3 return value.
7472
7473 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7474
7475 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7476 (linux_btrace_h): New variable.
7477 (linux-btrace.o): New rule.
7478
7479 2013-03-08 Stan Shebs <stan@codesourcery.com>
7480 Hafiz Abid Qadeer <abidh@codesourcery.com>
7481
7482 * tracepoint.c (trace_buffer_size): New global.
7483 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7484 (init_trace_buffer): Change to one-argument function. Allocate
7485 trace buffer memory.
7486 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7487 handle QTBuffer:size packet.
7488 (cmd_bigqtbuffer_size): New function.
7489 (initialize_tracepoint): Call init_trace_buffer with
7490 DEFAULT_TRACE_BUFFER_SIZE.
7491 * server.c (handle_query): Add QTBuffer:size in the
7492 supported packets.
7493
7494 2013-03-07 Yao Qi <yao@codesourcery.com>
7495
7496 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7497 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7498 of -1.
7499 (cmd_qtsp): Adjust condition. Do post increment.
7500 Set cur_action and cur_step_action back to 0.
7501
7502 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7503
7504 PR server/15236
7505 * linux-low.c (linux_write_memory): Return early success if LEN is
7506 zero.
7507
7508 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7509
7510 * configure.srv: Add x86_64-*-cygwin* as target.
7511
7512 2013-02-28 Tom Tromey <tromey@redhat.com>
7513
7514 * configure.ac: Invoke AC_SYS_LARGEFILE.
7515 * configure, config.in: Rebuild.
7516
7517 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7518
7519 * win32-low.c: Throughout, fix format strings and casts of
7520 printf-like functions to avoid type related warnings on all
7521 platforms.
7522 (get_child_debug_event): Print dwDebugEventCode as hex since
7523 that's how it's usually documented.
7524
7525 2013-02-28 Yao Qi <yao@codesourcery.com>
7526
7527 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7528 pulongest.
7529
7530 2013-02-27 Jiong Wang <jiwang@tilera.com>
7531
7532 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7533 (reg-tilegx32.c): New rule.
7534 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7535 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7536 different register info initializer according to elf class.
7537 (init_registers_tilgx32): New function. The tilegx32 register info
7538 initializer.
7539 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7540 (tile_store_gregset): Likewise.
7541
7542 2013-02-27 Yao Qi <yao@codesourcery.com>
7543
7544 * server.c (process_point_options): Print debug message when
7545 debug_threads is true.
7546
7547 2013-02-26 Yao Qi <yao@codesourcery.com>
7548
7549 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7550
7551 2013-02-19 Pedro Alves <palves@redhat.com>
7552 Kai Tietz <ktietz@redhat.com>
7553
7554 PR gdb/15161
7555
7556 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7557 instead of strtoul to extract address from packet.
7558 (process_serial_event) <'z'>: Likewise.
7559
7560 2013-02-18 Yao Qi <yao@codesourcery.com>
7561
7562 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7563
7564 2013-02-14 Pedro Alves <palves@redhat.com>
7565
7566 Plug memory leak.
7567
7568 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7569 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7570
7571 2013-02-14 Pedro Alves <palves@redhat.com>
7572
7573 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7574
7575 2013-02-14 Pedro Alves <palves@redhat.com>
7576
7577 * tracepoint.c (save_string): Delete.
7578 (add_tracepoint_action): Use savestring instead of save_string.
7579
7580 2013-02-12 Pedro Alves <palves@redhat.com>
7581
7582 * linux-xtensa-low.c: Ditto.
7583 * xtensa-xtregs.c: Ditto.
7584
7585 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7586
7587 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7588 thread_db.
7589
7590 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7591
7592 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7593 aarch64_num_wp_regs and aarch64_num_bp_regs to
7594 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7595
7596 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7597
7598 * linux-aarch64-low.c (ps_get_thread_area): Replace
7599 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7600
7601 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7602 Marcus Shawcroft <marcus.shawcroft@arm.com>
7603 Nigel Stephens <nigel.stephens@arm.com>
7604 Yufeng Zhang <yufeng.zhang@arm.com>
7605
7606 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7607 (aarch64.c, aarch64-without-fpu.c): New targets.
7608 * configure.srv (aarch64*-*-linux*): New.
7609 * linux-aarch64-low.c: New file.
7610
7611 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7612
7613 * linux-low.c (handle_extended_wait, linux_create_inferior)
7614 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7615 (dequeue_one_deferred_signal, linux_resume_one_thread)
7616 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7617 (linux_tracefork_grandchild, linux_test_for_tracefork)
7618 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7619 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7620 where the argument is 0.
7621
7622 2013-01-25 Yao Qi <yao@codesourcery.com>
7623
7624 * event-loop.c: Include "queue.h".
7625 (gdb_event_p): New typedef.
7626 (struct gdb_event) <next_event>: Remove.
7627 (event_queue): Change to QUEUE(gdb_event_p).
7628 (async_queue_event): Remove.
7629 (gdb_event_xfree): New.
7630 (initialize_event_loop): New.
7631 (process_event): Use API from QUEUE.
7632 (wait_for_event): Likewise.
7633 * server.c (main): Call initialize_event_loop.
7634 * server.h (initialize_event_loop): Declare.
7635
7636 2013-01-18 Yao Qi <yao@codesourcery.com>
7637
7638 * ax.h (struct eval_agent_expr_context): New.
7639 (gdb_eval_agent_expr): Update declaration.
7640 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7641 TFRAME. Add new argument CTX.
7642 * server.h (struct eval_agent_expr_context): Declare.
7643 (agent_mem_read, agent_tsv_read): Update declaration.
7644 (agent_mem_read_string): Likewise.
7645 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7646 (add_traceframe_block): Add new argument TPOINT.
7647 Increase TPOINT->traceframe_usage.
7648 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7649 eval_tracepoint_agent_expr.
7650 (condition_true_at_tracepoint): Likewise.
7651 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7652 (agent_mem_read_string, agent_tsv_read): Likewise.
7653
7654 2013-01-16 Yao Qi <yao@codesourcery.com>
7655
7656 * linux-low.c (linux_resume_one_lwp): Don't check
7657 'lwp->bp_reinsert != 0'.
7658
7659 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7660 Pedro Alves <palves@redhat.com>
7661
7662 * lynx-low.c (ptrace_request_to_str): Define a temporary
7663 macro and use it to simplify this function's implementation.
7664
7665 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7666
7667 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7668 sets errno.
7669
7670 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7671
7672 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7673
7674 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7675
7676 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7677
7678 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7679
7680 * lynx-low.c (lynx_resume): Use the resume_info parameter
7681 to determine the ptid for the lynx_ptrace call, unless
7682 it is equal to minus_one_ptid, in which case we use the
7683 ptid of the current_inferior.
7684 (lynx_wait_1): After having received a thread create/exit
7685 event, resume the inferior's execution using the signaling
7686 thread's ptid, rather than the old ptid.
7687
7688 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7689
7690 * lynx-low.c (lynx_resume): Delete variable ret.
7691
7692 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7693
7694 * gdbreplay.c (gdbreplay_version): Update copyright year.
7695 * server.c (gdbserver_version): Likewise.
7696
7697 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7698
7699 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7700 new thread.
7701
7702 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7703
7704 * lynx-low.c (ptrace_request_to_str): Add handling for
7705 PTRACE_GETTRACESIG.
7706
7707 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7708
7709 * lynx-low.c (lynx_attach): Delete variable new_process.
7710
7711 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7712
7713 * lynx-low.c (lynx_create_inferior): Delete variable
7714 new_process.
7715
7716 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7717
7718 * lynx-low.c (ptrace_request_to_str): Do not handle
7719 PTRACE_GETTHREADLIST if this macro does not exist.
7720
7721 2012-12-15 Yao Qi <yao@codesourcery.com>
7722
7723 * Makefile.in (OBS): Add notif.o.
7724 * notif.c, notif.h: New.
7725 * server.c: Include "notif.h".
7726 (struct vstop_notif) <next>: Remove.
7727 <base>: New field.
7728 (queue_stop_reply): Update.
7729 (push_event, send_next_stop_reply): Remove.
7730 (discard_queued_stop_replies): Update.
7731 (notif_stop): New variable.
7732 (handle_v_stopped): Remove.
7733 (handle_v_requests): Don't call handle_v_stopped. Call
7734 handle_ack_notif instead.
7735 (queue_stop_reply_callback): Call notif_event_enque instead
7736 of queue_stop_reply.
7737 (handle_status): Don't call send_next_stop_reply, call
7738 notif_write_event instead.
7739 (kill_inferior_callback): Likewise.
7740 (detach_or_kill_inferior_callback): Likewise.
7741 (main): Call initialize_notif.
7742 (process_serial_event): Call QUEUE_is_empty.
7743 (handle_target_event): Call notif_push instead of push event.
7744 * server.h (push_event): Remove declaration.
7745
7746 2012-12-10 Tom Tromey <tromey@redhat.com>
7747
7748 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7749 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7750 macros.
7751 (.c.o): Rewrite.
7752 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7753 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7754 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7755 (amd64-linux-ipa.o, ax.o): Rewrite.
7756 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7757 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7758 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7759 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7760 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7761 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7762 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7763 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7764 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7765 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7766 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7767 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7768 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7769 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7770 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7771 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7772 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7773 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7774 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7775 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7776 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7777 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7778 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7779 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7780 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7781 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7782 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7783 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7784 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7785 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7786 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7787 (reg-tilegx.o): Remove.
7788 (all_object_files): New macro.
7789 Include .deps files.
7790 * aclocal.m4, configure: Rebuild.
7791 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7792 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7793 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7794
7795 2012-12-05 Tom Tromey <tromey@redhat.com>
7796
7797 PR gdb/14917:
7798 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7799
7800 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7801
7802 * configure.ac: Check for linux/perf_event.h.
7803 * config.in: Regenerated.
7804 * configure: Regenerated.
7805
7806 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7807
7808 * hostio.c (handle_readlink): Decrease buffer size
7809 parameter passed to readlink by one byte.
7810
7811 2012-11-26 Yao Qi <yao@codesourcery.com>
7812
7813 * configure.ac (build_warnings): Append '-Wempty-body'.
7814 * configure: Regenerated.
7815 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7816 body.
7817
7818 2012-11-15 Pierre Muller <muller@sourceware.org>
7819
7820 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7821 * config.in: Regenerate.
7822 * configure: Regenerate.
7823 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7824 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7825 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7826 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7827 header.
7828 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7829 instead of <sys/wait.h> header.
7830 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7831
7832 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7833
7834 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7835 (various make rules): Remove -DGDBSERVER
7836
7837 2012-11-09 Yao Qi <yao@codesourcery.com>
7838
7839 * spu-low.c (current_ptid): Move it to ..
7840 * gdbthread.h: ... here. New.
7841 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7842 * server.c (myresume, process_serial_event): Likewise.
7843 * thread-db.c (thread_db_find_new_threads): Likewise.
7844 * tracepoint.c (run_inferior_command): Likewise.
7845
7846 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7847
7848 * server.c (handle_search_memory_1): Include access length in
7849 warning message.
7850
7851 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7852
7853 * linux-crisv32-low.c: Fix compile errors.
7854
7855 2012-09-04 Yao Qi <yao@codesourcery.com>
7856
7857 * tracepoint.c (cmd_qtsv): Adjust debug message.
7858 Don't check CUR_TPOINT.
7859
7860 2012-08-28 Yao Qi <yao@codesourcery.com>
7861
7862 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7863 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7864 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7865 Remove declarations of xmalloc, xreallloc, xstrdup and
7866 freeargv.
7867 * Makefile.in (libiberty_h): New.
7868 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7869 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7870
7871 2012-08-23 Yao Qi <yao@codesourcery.com>
7872
7873 * server.h: Remove declaration of 'xsnprintf'.
7874
7875 2012-08-22 Keith Seitz <keiths@redhat.com>
7876
7877 * server.h: Include build-gnulib-gbserver/config.h.
7878 * gdbreplay.c: Likewise.
7879
7880 2012-08-08 Doug Evans <dje@google.com>
7881
7882 * Makefile.in (SFILES): Add gdb_vecs.c.
7883 (OBS): Add gdb_vecs.o.
7884 (gdb_vecs_h, host_defs_h): New variables.
7885 (thread-db.o): Add $(gdb_vecs_h) dependency.
7886 (gdb_vecs.o): New rule.
7887 * thread-db.c: #include "gdb_vecs.h".
7888 (thread_db_load_search): Use a vector to iterate over path elements.
7889 Handle text appearing after "$pdir".
7890
7891 * configure.ac: Add check for strstr.
7892 * config.in: Regenerate.
7893 * configure: Regenerate.
7894
7895 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7896
7897 * hostio.c (handle_pread): If pread fails, fall back to attempting
7898 lseek/read.
7899 (handle_pwrite): Likewise for pwrite.
7900
7901 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7902
7903 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7904 between unsupported TYPE and unimplementable ADDR/LEN combination.
7905 (arm_insert_point): Act on new return value.
7906
7907 2012-07-31 Pedro Alves <palves@redhat.com>
7908
7909 * server.c (process_point_options): Only skip tokens if we find
7910 one that is unrecognized. Don't treat 'X' specially while
7911 skipping unrecognized tokens.
7912
7913 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7914
7915 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7916 to 4-byte-align HW breakpoint addresses for Thumb.
7917
7918 2012-07-27 Yao Qi <yao@codesourcery.com>
7919
7920 PR remote/14161.
7921
7922 * server.h: Declare gdb_agent_about_to_close.
7923 * target.c (kill_inferior): Include "agent.h".
7924 New. Send command 'kill'.
7925 * target.h (kill_inferior): Removed macro.
7926 * tracepoint.c (gdb_agent_about_to_close): New.
7927 (gdb_agent_helper_thread): Handle command 'close'.
7928 Wait endlessly until the inferior stops.
7929 Install gdb_agent_remove_socket to atexit hook.
7930 (agent_socket_name): New static variable.
7931 (gdb_agent_socket_init): Replace local variable 'name' with
7932 'agent_socket_name'.
7933 (gdb_agent_remove_socket): New.
7934
7935 2012-07-27 Yao Qi <yao@codesourcery.com>
7936
7937 * server.c (process_point_options): Stop at 'X' when parsing.
7938
7939 2012-07-19 Michael Eager <eager@eagercon.com>
7940
7941 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7942 to hw_execute.
7943 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7944 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7945 hardware breakpoint.
7946
7947 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7948
7949 * gdbserver/linux-low.c (initialize_low): Call
7950 linux_ptrace_init_warnings.
7951
7952 2012-07-02 Doug Evans <dje@google.com>
7953
7954 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7955 pointer to int.
7956
7957 2012-07-02 Stan Shebs <stan@codesourcery.com>
7958
7959 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7960 (ax.o): Add it to build rule.
7961 (ax-ipa.o): Ditto.
7962 (OBS): Add format.o.
7963 (IPA_OBS): Add format.o.
7964 * server.c (handle_query): Claim support for breakpoint commands.
7965 (process_point_options): Add command case.
7966 (process_serial_event): Leave running if there are printfs in
7967 effect.
7968 * mem-break.h (any_persistent_commands): Declare.
7969 (add_breakpoint_commands): Declare.
7970 (gdb_no_commands_at_breakpoint): Declare.
7971 (run_breakpoint_commands): Declare.
7972 * mem-break.c (struct point_command_list): New struct.
7973 (struct breakpoint): New field command_list.
7974 (any_persistent_commands): New function.
7975 (add_commands_to_breakpoint): New function.
7976 (add_breakpoint_commands): New function.
7977 (gdb_no_commands_at_breakpoint): New function.
7978 (run_breakpoint_commands): New function.
7979 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7980 locally.
7981 * ax.c: Include format.h.
7982 (ax_printf): New function.
7983 (gdb_eval_agent_expr): Add printf opcode.
7984
7985 2012-06-13 Yao Qi <yao@codesourcery.com>
7986
7987 * server.c (start_inferior): Remove duplicated writes to fields
7988 'last_resume_kind' and 'last_status' of 'current_inferior'.
7989
7990 2012-06-12 Yao Qi <yao@codesourcery.com>
7991 Pedro Alves <palves@redhat.com>
7992
7993 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7994 comment.
7995 * server.c (handle_v_cont): Extend comment.
7996
7997 2012-06-11 Yao Qi <yao@codesourcery.com>
7998
7999 * linux-low.c (linux_attach): Add 'static'.
8000
8001 2012-06-06 Yao Qi <yao@codesourcery.com>
8002
8003 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8004
8005 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8006
8007 Fix gcc -flto compilation warning.
8008 * server.c (main): Make variable multi_mode and attach volatile.
8009
8010 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8011
8012 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8013 if the platform doesn't know about it.
8014
8015 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8016
8017 * Makefile.in (SFILES): Add linux-tile-low.c.
8018 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8019 * configure.srv: Handle tilegx-*-linux*.
8020 * linux-tile-low.c: New file.
8021
8022 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8023
8024 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8025
8026 2012-05-24 Pedro Alves <palves@redhat.com>
8027
8028 PR gdb/7205
8029
8030 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8031
8032 2012-05-24 Pedro Alves <palves@redhat.com>
8033
8034 PR gdb/7205
8035
8036 Replace target_signal with gdb_signal throughout.
8037
8038 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8039
8040 * linux-low.c (linux_store_registers): Avoid the copying sequence
8041 when no data has been retrieved by ptrace.
8042
8043 2012-05-22 Will Deacon <will.deacon@arm.com>
8044
8045 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8046 Include asm/ptrace.h.
8047 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8048 already defined.
8049
8050 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8051
8052 * linux-low.c (linux_store_registers): Don't re-retrieve data
8053 with ptrace that has already been obtained from /proc. Always
8054 copy any data retrieved with ptrace to the buffer supplied.
8055
8056 2012-05-11 Yao Qi <yao@codesourcery.com>
8057 Pedro Alves <palves@redhat.com>
8058
8059 * linux-low.c (enum stopping_threads_kind): New.
8060 (stopping_threads): Change type to `enum stopping_threads_kind'.
8061 (handle_extended_wait): If stopping and suspending threads, leave
8062 the new_lwp suspended too.
8063 (linux_wait_for_event): Adjust.
8064 (stop_all_lwps): Set `stopping_threads' to
8065 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8066 whether we're suspending threads or just stopping them. Assert no
8067 recursion happens.
8068
8069 2012-04-29 Yao Qi <yao@codesourcery.com>
8070
8071 * server.h: Move some code to ...
8072 * gdbthread.h: ... here. New.
8073 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8074 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8075 (nto-low.o, win32-low.o): Likewise.
8076 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8077 * regcache.c, remote-utils.c, server.c: Likewise.
8078 * target.c, tracepoint.c, win32-low.c: Likewise.
8079
8080 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8081
8082 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8083 (PTRACE_ARG4_TYPE): Likewise.
8084 (PTRACE_XFER_TYPE): Likewise.
8085 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8086 ptrace to PTRACE_ARG3_TYPE.
8087 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8088 (PTRACE_ARG4_TYPE): Likewise.
8089 (PTRACE_XFER_TYPE): Likewise.
8090 (linux_detach_one_lwp): Cast fourth argument of
8091 ptrace to long then PTRACE_ARG4_TYPE.
8092 (regsets_fetch_inferior_registers): Cast third argument of
8093 ptrace to long then PTRACE_ARG3_TYPE.
8094 (regsets_store_inferior_registers): Likewise.
8095
8096 2012-04-20 Pedro Alves <palves@redhat.com>
8097
8098 * configure: Regenerate.
8099
8100 2012-04-19 Pedro Alves <palves@redhat.com>
8101
8102 * Makefile.in (GNULIB_BUILDDIR): New.
8103 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8104 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8105 (all, install-only, uninstall, clean-info, all-lib, clean): No
8106 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8107 (maintainer-clean realclean distclean): Use subdir_do.
8108 (subdir_do): New.
8109 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8110 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8111 * acinclude.m4: Include acx_configure_dir.m4.
8112 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8113 calls. Call AC_PROG_RANLIB. Configure gnulib using
8114 ACX_CONFIGURE_DIR.
8115 (GNULIB): New.
8116 (GNULIB_STDINT_H): Adjust.
8117 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8118 * gdbreplay.c: Include build-gnulib/config.h.
8119 * server.h: Likewise.
8120 * aclocal.m4: Regenerate.
8121 * config.in: Regenerate.
8122 * configure: Regenerate.
8123
8124 2012-04-19 Pedro Alves <palves@redhat.com>
8125
8126 * Makefile.in (LIBGNU, INCGNU): Adjust.
8127 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8128 (all, install-only, uninstall, clean-info, all-lib, clean)
8129 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8130 * configure.ac: Adjust AC_OUTPUT output.
8131 * aclocal.m4: Regenerate.
8132 * configure: Regenerate.
8133
8134 2012-04-19 Pedro Alves <palves@redhat.com>
8135
8136 * Makefile.in (generated_files): New.
8137 (server_h): Remove the explicit dependency on config.h, and depend
8138 on $generated_files.
8139
8140 2012-04-19 Pedro Alves <palves@redhat.com>
8141
8142 * Makefile.in (INCGNU): Add -Ignulib.
8143
8144 2012-04-19 Pedro Alves <palves@redhat.com>
8145
8146 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8147 (INCGNU): ... this, and spell out -I here.
8148 (GNULIB_LIB): Rename to ...
8149 (LIBGNU): ... this.
8150 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8151
8152 2012-04-19 Pedro Alves <palves@redhat.com>
8153
8154 * config.in: Regenerate.
8155
8156 2012-04-19 Pedro Alves <palves@redhat.com>
8157
8158 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8159 * server.h (memmem): Remove declaration.
8160 * config.in: Regenerate.
8161 * configure: Regenerate.
8162
8163 2012-04-19 Yao Qi <yao@codesourcery.com>
8164
8165 * Makefile.in (SFILES): Add common/vec.c.
8166 (OBS): Add vec.o.
8167 (vec.o): New rule.
8168
8169 2012-04-19 Yao Qi <yao@codesourcery.com>
8170
8171 * remote-utils.c (prepare_resume_reply): Replace with macro
8172 target_core_of_thread.
8173 * server.c (handle_qxfer_threads_proper): Likewise.
8174 * target.h (traget_core_of_thread): New macro.
8175
8176 2012-04-18 Pedro Alves <palves@redhat.com>
8177
8178 * aclocal.m4: Regenerate.
8179 * configure: Regenerate.
8180
8181 2012-04-16 Yao Qi <yao@codesourcery.com>
8182
8183 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8184 duplicated on address.
8185
8186 2012-04-16 Yao Qi <yao@codesourcery.com>
8187
8188 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8189 (struct tracepoint_action_ops) <send>: New field.
8190 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8191 (agent_expr_send, x_tracepoint_action_send): New.
8192 (l_tracepoint_action_send): New.
8193 (cmd_qtdp): Download and install tracepoint
8194 according to `use_agent'.
8195 (run_inferior_command): Add one more parameter `len'.
8196 Update callers.
8197 (tracepoint_send_agent): New.
8198 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8199
8200 2012-04-16 Yao Qi <yao@codesourcery.com>
8201
8202 * tracepoint.c (download_tracepoints): Moved to ...
8203 (cmd_qtstart): ... here.
8204
8205 2012-04-14 Yao Qi <yao@codesourcery.com>
8206
8207 * tracepoint.c: Include inttypes.h.
8208 (struct collect_memory_action): Use sized types.
8209 (struct tracepoint): Likewise.
8210 (cmd_qtdp, stop_tracing): Update print specifiers.
8211 (cmd_qtp, response_tracepoint): Likewise.
8212 (collect_data_at_tracepoint): Likewise.
8213 (collect_data_at_step): Likewise.
8214
8215 2012-04-14 Yao Qi <yao@codesourcery.com>
8216
8217 Import gnulib module inttypes.
8218 * aclocal.m4, config.in, configure: Regenerated.
8219
8220 2012-04-14 Yao Qi <yao@codesourcery.com>
8221
8222 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8223 Makefile and config.status at last.
8224
8225 2012-04-13 Yao Qi <yao@codesourcery.com>
8226
8227 * tracepoint.c: Include stdint.h unconditionally.
8228
8229 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8230
8231 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8232 on BFD_HAVE_SYS_PROCFS_TYPE.
8233 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8234 * configure: Regenerate.
8235 * config.in: Likewise.
8236
8237 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8238
8239 * Makefile.in (clean): Also remove x32.c x32-linux.c
8240 x32-avx.c x32-avx-linux.c.
8241 (x32.o): New target.
8242 (x32.c): Likewise.
8243 (x32-linux.o): Likewise.
8244 (x32-linux.c): Likewise.
8245 (x32-avx.o): Likewise.
8246 (x32-avx.c): Likewise.
8247 (x32-avx-linux.o): Likewise.
8248 (x32-avx-linux.c): Likewise.
8249
8250 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8251 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8252 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8253 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8254 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8255 i386/x32-avx-linux.xml.
8256
8257 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8258 (init_registers_x32_avx_linux): Likwise.
8259 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8260 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8261
8262 2012-04-13 Pedro Alves <palves@redhat.com>
8263
8264 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8265 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8266 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8267 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8268 the sub-make.
8269
8270 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8271
8272 * linux-x86-low.c (compat_x32_clock_t): New.
8273 (compat_x32_siginfo_t): Likewise.
8274 (compat_x32_siginfo_from_siginfo): Likewise.
8275 (siginfo_from_compat_x32_siginfo): Likewise.
8276 (linux_is_elf64): Likewise.
8277 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8278 and siginfo_from_compat_x32_siginfo for x32.
8279 (x86_arch_setup): Set linux_is_elf64.
8280
8281 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8282
8283 PR gdb/13969
8284 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8285 e_machine field.
8286 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8287 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8288 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8289 compatible with process.
8290
8291 2012-04-12 Yao Qi <yao@codesourcery.com>
8292
8293 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8294 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8295 (install-only, install-info, clean): Handle sub dir gnulib.
8296 (all-lib, am--refresh): New targets.
8297 (memmem.o): Remove target.
8298 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8299 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8300 (AC_REPLACE_FUNCS): Remove memmem.
8301 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8302 (AC_OUTPUT): Generate Makefile in gnulib/.
8303 * aclocal.m4, config.in, configure: Regenerated.
8304
8305 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8306
8307 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8308
8309 2012-04-05 Pedro Alves <palves@redhat.com>
8310
8311 -Werror=strict-aliasing
8312
8313 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8314 pointer.
8315
8316 2012-04-04 Pedro Alves <palves@redhat.com>
8317
8318 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8319 (sparc_store_gregset_from_stack, sparc_store_gregset)
8320 (sparc_breakpoint_at): Fix formatting.
8321
8322 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8323
8324 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8325 are available.
8326 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8327 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8328 * config.in: Regenerate.
8329 * configure: Likewise.
8330
8331 2012-03-29 Pedro Alves <palves@redhat.com>
8332
8333 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8334 Correct ptrace arguments.
8335
8336 2012-03-28 Pedro Alves <palves@redhat.com>
8337
8338 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8339 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8340 (IA64_FR1_REGNUM): New defines.
8341 (ia64_fetch_register): New.
8342 (the_low_target): Install it.
8343 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8344 field.
8345 * linux-low.c (linux_fetch_registers): Try the
8346 the_low_target.fetch_register hook first.
8347
8348 * linux-arm-low.c (the_low_target): Adjust.
8349 * linux-bfin-low.c (the_low_target): Adjust.
8350 * linux-cris-low.c (the_low_target): Adjust.
8351 * linux-crisv32-low.c (the_low_target): Adjust.
8352 * linux-m32r-low.c (the_low_target): Adjust.
8353 * linux-m68k-low.c (the_low_target): Adjust.
8354 * linux-mips-low.c (the_low_target): Adjust.
8355 * linux-ppc-low.c (the_low_target): Adjust.
8356 * linux-s390-low.c (the_low_target): Adjust.
8357 * linux-sh-low.c (the_low_target): Adjust.
8358 * linux-sparc-low.c (the_low_target): Adjust.
8359 * linux-tic6x-low.c (the_low_target): Adjust.
8360 * linux-x86-low.c (the_low_target): Adjust.
8361 * linux-xtensa-low.c (the_low_target): Adjust.
8362
8363 2012-03-26 Pedro Alves <palves@redhat.com>
8364
8365 * server.c (handle_qxfer_libraries): Don't bail early if
8366 the_target->qxfer_libraries_svr4 is not NULL.
8367
8368 2012-03-26 Pedro Alves <palves@redhat.com>
8369
8370 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8371
8372 2012-03-23 Pedro Alves <palves@redhat.com>
8373
8374 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8375 "library-list-svr4" element's start tag when the the DSO list is
8376 empty.
8377
8378 2012-03-23 Pedro Alves <palves@redhat.com>
8379
8380 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8381 a variable whose type size is the same as the inferior's pointer
8382 size.
8383
8384 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8385
8386 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8387 struct siginfo.
8388 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8389 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8390 * linux-low.h: Include <signal.h>.
8391 (struct siginfo): Remove forward declaration.
8392 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8393 struct siginfo.
8394
8395 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8396
8397 * .gitignore: Ignore more files.
8398
8399 2012-03-19 Pedro Alves <palves@redhat.com>
8400 Jan Kratochvil <jan.kratochvil@redhat.com>
8401
8402 * server.c (cont_thread, general_thread): Add describing comments.
8403 (start_inferior): Clear `cont_thread'.
8404 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8405 of a process.
8406
8407 2012-03-15 Yao Qi <yao@codesourcery.com>
8408
8409 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8410 handling to ...
8411 (cmd_qtdp): ... here.
8412
8413 2012-03-15 Yao Qi <yao@codesourcery.com>
8414
8415 * tracepoint.c (struct tracepoint_action_ops): New.
8416 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8417 (m_tracepoint_action_download): New.
8418 (r_tracepoint_action_download): New.
8419 (x_tracepoint_action_download): New.
8420 (l_tracepoint_action_download): New.
8421 (add_tracepoint_action): Install `action->ops' according type.
8422 (download_tracepoint_1): Move code `download' function pointer
8423 of various tracepoint_action_ops.
8424
8425 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8426
8427 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8428 linux_ptrace_attach_warnings.
8429
8430 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8431
8432 * Makefile.in (linux-ptrace.o): New.
8433 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8434 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8435 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8436 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8437 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8438 of these targets.
8439 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8440
8441 2012-03-08 Yao Qi <yao@codesourcery.com>
8442 Pedro Alves <palves@redhat.com>
8443
8444 Fix PR server/13392.
8445 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8446 offset of JMP insn.
8447 * tracepoint.c (remove_tracepoint): New.
8448 (cmd_qtdp): Call remove_tracepoint when failed to install.
8449
8450 2012-03-07 Pedro Alves <palves@redhat.com>
8451
8452 * linux-low.c (get_detach_signal): New.
8453 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8454 Pass on pending signals to PTRACE_DETACH. Check the result of the
8455 ptrace call.
8456 * server.c (program_signals, program_signals_p): New.
8457 (handle_general_set): Handle QProgramSignals.
8458 * server.h (program_signals, program_signals_p): Declare.
8459
8460 2012-03-05 Pedro Alves <palves@redhat.com>
8461 Jan Kratochvil <jan.kratochvil@redhat.com>
8462
8463 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8464 New comment why.
8465
8466 2012-03-03 Yao Qi <yao@codesourcery.com>
8467
8468 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8469 agent_look_up_symbols.
8470
8471 2012-03-03 Yao Qi <yao@codesourcery.com>
8472
8473 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8474 (linux-x86-low.o): Likewise.
8475 * server.h: Remove in_process_agent_loaded.
8476 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8477 common/agent.c.
8478 Update callers.
8479
8480 2012-03-03 Yao Qi <yao@codesourcery.com>
8481
8482 * tracepoint.c (gdb_agent_capability): New global.
8483 (in_process_agent_loaded_ust): Renamed to
8484 `in_process_agent_supports_ust'.
8485 Update callers.
8486 (in_process_agent_supports_ust): Call agent_capability_check.
8487 (clear_installed_tracepoints): Assert that agent supports
8488 agent.
8489
8490 2012-03-03 Yao Qi <yao@codesourcery.com>
8491
8492 * linux-low.c (linux_supports_agent): New.
8493 (linux_target_ops): Initialize field `supports_agent' with
8494 linux_supports_agent.
8495 * target.h (struct target_ops) <supports_agent>: New.
8496 (target_supports_agent): New macro.
8497 * server.c (handle_general_set): Handle packet 'QAgent'.
8498 (handle_query): Send `QAgent+'.
8499 * Makefile.in (server.o): Depends on agent.h.
8500
8501 2012-03-03 Yao Qi <yao@codesourcery.com>
8502
8503 * Makefile.in (OBS): Add agent.o.
8504 Add new rule for agent.o.
8505 Track dependence of tracepoint.c on agent.h.
8506 * tracepoint.c (run_inferior_command_1):
8507 (run_inferior_command): Call agent_run_command.
8508 (gdb_ust_connect_sync_socket): Deleted. Move it to
8509 common/agent.c.
8510 (resume_thread, stop_thread): Likewise.
8511 (gdb_ust_socket_init): Renamed to ...
8512 (gdb_agent_socket_init): ... New.
8513 (gdb_ust_thread): Renamed to ...
8514 (gdb_agent_helper_thread): ... New.
8515 (gdb_ust_init): Move some code to ...
8516 (gdb_agent_init): ... here. New.
8517 [HAVE_UST]: Call gdb_ust_init.
8518 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8519 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8520 * config.in, configure: Regenerated.
8521
8522 2012-03-02 Pedro Alves <palves@redhat.com>
8523
8524 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8525 * linux-low.c (struct simple_pid_list): New.
8526 (stopped_pids): New a struct simple_pid_list pointer.
8527 (add_to_pid_list, pull_pid_from_list): New.
8528 (handle_extended_wait): Don't assume the first signal new children
8529 report is SIGSTOP. Adjust call to pull_pid_from_list.
8530 (linux_wait_for_lwp): Adjust.
8531
8532 2012-03-02 Yao Qi <yao@codesourcery.com>
8533
8534 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8535 debug log.
8536
8537 2012-03-02 Yao Qi <yao@codesourcery.com>
8538
8539 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8540 `stop_pc' and `tpoint'. Update caller.
8541
8542 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8543
8544 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8545 * linux-low.c (use_linux_regsets): New macro.
8546 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8547 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8548 (linux_register_in_regsets): New function.
8549 (usr_fetch_inferior_registers): Skip registers covered by
8550 regsets.
8551 (usr_store_inferior_registers): Likewise.
8552 (usr_fetch_inferior_registers): New macro.
8553 (usr_store_inferior_registers): Likewise.
8554 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8555 (linux_store_registers): Likewise.
8556 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8557 prototype.
8558 (init_registers_mips64_dsp_linux): Likewise.
8559 (init_registers_mips_linux): New macro.
8560 (init_registers_mips_dsp_linux): Likewise.
8561 (mips_dsp_num_regs): Likewise.
8562 (DSP_BASE, DSP_CONTROL): New fallback macros.
8563 (mips_base_regs): New macro.
8564 (mips_regmap): Use it. Fix the size.
8565 (mips_dsp_regmap): New variable.
8566 (mips_dsp_regset_bitmap): Likewise.
8567 (mips_arch_setup): New function.
8568 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8569 than mips_regmap.
8570 (mips_cannot_store_register): Likewise.
8571 (the_low_target): Update .arch_setup, .num_regs and .regmap
8572 initializers. Add .regset_bitmap initializer.
8573 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8574 initializer.
8575 * linux-bfin-low.c (the_low_target): Likewise.
8576 * linux-cris-low.c (the_low_target): Likewise.
8577 * linux-crisv32-low.c (the_low_target): Likewise.
8578 * linux-ia64-low.c (the_low_target): Likewise.
8579 * linux-m32r-low.c (the_low_target): Likewise.
8580 * linux-m68k-low.c (the_low_target): Likewise.
8581 * linux-ppc-low.c (the_low_target): Likewise.
8582 * linux-s390-low.c (the_low_target): Likewise.
8583 * linux-sh-low.c (the_low_target): Likewise.
8584 * linux-sparc-low.c (the_low_target): Likewise.
8585 * linux-tic6x-low.c (the_low_target): Likewise.
8586 * linux-x86-low.c (the_low_target): Likewise.
8587 * linux-xtensa-low.c (the_low_target): Likewise.
8588 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8589 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8590 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8591 srv_xmlfiles.
8592 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8593 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8594
8595 2012-02-29 Yao Qi <yao@codesourcery.com>
8596 Pedro Alves <palves@redhat.com>
8597
8598 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8599 `step_over_finished' is true.
8600
8601 2012-02-27 Pedro Alves <palves@redhat.com>
8602
8603 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8604 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8605
8606 2012-02-27 Pedro Alves <palves@redhat.com>
8607
8608 PR server/9684
8609 * linux-low.c (pid_is_stopped): New.
8610 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8611
8612 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8613
8614 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8615 of conditions.
8616
8617 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8618
8619 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8620
8621 2012-02-24 Luis Machado <lgustavo@codesourcery>
8622
8623 * server.c (handle_query): Advertise support for target-side
8624 breakpoint condition evaluation.
8625 (process_point_options): New function.
8626 (process_serial_event): When inserting a breakpoint, check for
8627 a target-side condition that should be evaluated.
8628
8629 * mem-break.c: Include regcache.h and ax.h.
8630 (point_cond_list_t): New data structure.
8631 (breakpoint) <cond_list>: New field.
8632 (find_gdb_breakpoint_at): Make non-static.
8633 (delete_gdb_breakpoint_at): Clear any target-side
8634 conditions.
8635 (clear_gdb_breakpoint_conditions): New function.
8636 (add_condition_to_breakpoint): Likewise.
8637 (add_breakpoint_condition): Likewise.
8638 (gdb_condition_true_at_breakpoint): Likewise.
8639 (gdb_breakpoint_here): Return result directly instead
8640 of going through a local variable.
8641
8642 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8643 (clear_gdb_breakpoint_conditions): Likewise.
8644 (add_breakpoint_condition): Likewise.
8645 (gdb_condition_true_at_breakpoint): Likewise.
8646
8647 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8648 (need_step_over_p): Take target-side breakpoint condition into
8649 consideration.
8650
8651 2012-02-24 Luis Machado <lgustavo@codesourcery>
8652
8653 * server.h: Include tracepoint.h.
8654 (agent_mem_read, agent_get_trace_state_variable_value,
8655 agent_set_trace_state_variable_value,
8656 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8657 get_set_tsv_func_addr): New prototypes.
8658
8659 * ax.h: New include file.
8660 * ax.c: New source file.
8661
8662 * tracepoint.c: Include ax.h.
8663 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8664 agent_expr, eval_result_type): Move to ax.h.
8665 (parse_agent_expr): Rename to ...
8666 (gdb_parse_agent_expr): ... this, make it non-static and move
8667 to ax.h.
8668 (unparse_agent_expr) Rename to ...
8669 (gdb_unparse_agent_expr): ... this, make it non-static and move
8670 to ax.h.
8671 (eval_agent_expr): Rename to ...
8672 (eval_tracepoint_agent_expr): ... this.
8673 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8674 forward declarations.
8675 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8676 (agent_get_trace_state_variable_value): New function.
8677 (agent_set_trace_state_variable_value): New function.
8678 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8679 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8680 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8681 (condition_true_at_tracepoint): Likewise.
8682 (parse_agent_expr): Rename to ...
8683 (gdb_parse_agent_expr): ... this and move to ax.c.
8684 (unparse_agent_expr): Rename to ...
8685 (gdb_unparse_agent_expr): ... this and move to ax.c.
8686 (gdb_agent_op_name): Move to ax.c.
8687 (eval_agent_expr): Rename to ...
8688 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8689 and move to ax.c.
8690 (eval_tracepoint_agent_expr): New function.
8691 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8692 non-static.
8693 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8694 ax.c.
8695 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8696 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8697 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8698 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8699 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8700 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8701 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8702 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8703 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8704 (compile_bytecodes): Remove forward declaration.
8705 (is_goto_target): Move to ax.c.
8706 (compile_bytecodes): Move to ax.c and call
8707 agent_get_trace_state_variable_value (...) and
8708 agent_set_trace_state_variable_value (...).
8709
8710 * Makefile.in: Update ax.c and IPA dependencies.
8711
8712 2012-02-24 Pedro Alves <palves@redhat.com>
8713
8714 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8715 (cmd_bigqtbuffer_circular): ... this. Only handle
8716 'QTBuffer:circular:'.
8717 (handle_tracepoint_general_set): Adjust.
8718
8719 2012-02-16 Yao Qi <yao@codesourcery.com>
8720
8721 * inferiors.c: Move code to ...
8722 * dll.c: .... here. New.
8723 * server.h: Declare clear_dlls.
8724 * Makefile.in (SFILES): Add dll.c.
8725 (OBS): Add dll.o
8726 (dll.o): New rule.
8727
8728 2012-02-11 Yao Qi <yao@codesourcery.com>
8729
8730 * server.c: (handle_monitor_command): Add a new parameter
8731 `own_buf'.
8732 (handle_query): Update caller.
8733
8734 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8735
8736 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8737 * configure, config.in: Regenerate.
8738 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8739 is not defined.
8740
8741 2012-02-02 Pedro Alves <palves@redhat.com>
8742
8743 Try SIGKILL first, then PTRACE_KILL.
8744 * linux-low.c (linux_kill_one_lwp): New.
8745 (linux_kill_one_lwp): Rename to ...
8746 (kill_one_lwp_callback): ... this. Use the new
8747 linux_kill_one_lwp.
8748
8749 2012-02-02 Pedro Alves <palves@redhat.com>
8750
8751 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8752 inferior.
8753
8754 2012-01-27 Pedro Alves <palves@redhat.com>
8755
8756 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8757 (elf_64_file_p): Make static.
8758 (linux_pid_exe_is_elf_64_file): New.
8759 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8760 Delete declarations.
8761 (linux_pid_exe_is_elf_64_file): Declare.
8762 * linux-x86-low.c (x86_arch_setup): Use
8763 linux_pid_exe_is_elf_64_file.
8764
8765 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8766
8767 * linux-low.c (linux_wait_for_event_1): Rename to ...
8768 (linux_wait_for_event): ... here and merge it with former
8769 linux_wait_for_event - new variable wait_ptid, use it.
8770 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8771
8772 2012-01-23 Pedro Alves <palves@redhat.com>
8773
8774 * server.c (main): Avoid yet another case of infinite loop while
8775 detaching/killing after a longjmp.
8776
8777 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8778
8779 Code cleanup.
8780 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8781
8782 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8783
8784 * hostio.c (handle_readlink): New function.
8785 (handle_vFile): Call it to handle "vFile:readlink" packets.
8786
8787 2012-01-20 Pedro Alves <palves@redhat.com>
8788 Ulrich Weigand <ulrich.weigand@linaro.org>
8789
8790 * server.c (handle_v_requests): Only support vAttach and vRun to
8791 start multiple processes when in extended protocol mode.
8792
8793 2012-01-17 Pedro Alves <palves@redhat.com>
8794
8795 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8796 memalign plus mprotect to allocate the scratch buffer.
8797
8798 2012-01-13 Pedro Alves <palves@redhat.com>
8799
8800 * server.c (attach_inferior): Clear `cont_thread'.
8801
8802 2012-01-13 Pedro Alves <palves@redhat.com>
8803
8804 * server.c (main): Avoid infinite loop while detaching/killing
8805 after a longjmp.
8806
8807 2012-01-09 Doug Evans <dje@google.com>
8808
8809 * server.c (start_inferior): Set last_ptid in --wrapper case.
8810
8811 2012-01-06 Yao Qi <yao@codesourcery.com>
8812
8813 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8814 defined.
8815 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8816
8817 2012-01-04 Yao Qi <yao@codesourcery.com>
8818
8819 * tracepoint.c (cmd_qtdp): Print debug message
8820 for static tracepoint.
8821
8822 2012-01-04 Yao Qi <yao@codesourcery.com>
8823
8824 * tracepoint.c (trace_vdebug): Differentiate debug message
8825 between gdbserver and IPA.
8826
8827 2012-01-03 Yao Qi <yao@codesourcery.com>
8828
8829 * tracepoint.c (tracepoint_was_hit): Don't collect for
8830 static tracepoint.
8831
8832 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8833
8834 * terminal.h: Reformat copyright header.
8835
8836 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8837
8838 * server.c (gdbserver_version): Update copyright year.
8839 * gdbreplay.c (gdbreplay_version): Likewise.
8840
8841 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8842
8843 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8844
8845 Revert:
8846 2011-12-18 Hui Zhu <teawater@gmail.com>
8847 * linux-low.c (linux_create_inferior): Save return value to ret.
8848
8849 2011-12-18 Hui Zhu <teawater@gmail.com>
8850
8851 * linux-low.c (linux_create_inferior): Save return value to ret.
8852
8853 2011-12-16 Doug Evans <dje@google.com>
8854
8855 * linux-low.c (linux_create_inferior): If stdio connection,
8856 redirect stdin from /dev/null, stdout to stderr.
8857 * remote-utils.c (remote_is_stdio): New static global.
8858 (remote_connection_is_stdio): New function.
8859 (remote_prepare): Handle stdio connection.
8860 (remote_open): Ditto.
8861 (remote_close): Don't close stdin for stdio connections.
8862 (read_prim,write_prim): New functions. Replace all calls to
8863 read/write to these.
8864 * server.c (main): Watch for "-" argument. Move call to
8865 remote_prepare before start_inferior.
8866 * server.h (STDIO_CONNECTION_NAME): New macro.
8867 (remote_connection_is_stdio): Declare.
8868
8869 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8870 in debugging output.
8871
8872 2011-12-15 Yao Qi <yao@codesourcery.com>
8873
8874 * tracepoint.c: Include sys/syscall.h.
8875 (gdb_ust_thread): Remove preprocessor conditional.
8876
8877 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8878
8879 * linux-low.c (linux_detach_one_lwp): Call
8880 the_low_target.prepare_to_resume before detaching.
8881
8882 2011-12-14 Yao Qi <yao@codesourcery.com>
8883
8884 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8885 of write.
8886
8887 2011-12-14 Yao Qi <yao@codesourcery.com>
8888
8889 * i386-low.c (i386_low_stopped_data_address): Initialize local
8890 variable `control'.
8891
8892 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8893
8894 PR remote/13492
8895
8896 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8897 DR_CONTROL unless necessary. Extend comments.
8898 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8899 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8900
8901 2011-12-13 Yao Qi <yao@codesourcery.com>
8902
8903 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8904 macros.
8905 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8906
8907 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8908
8909 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8910 Print new debug message for such case.
8911
8912 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8913
8914 Fix overlapping memcpy.
8915 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8916 the read_inferior_memory transfer.
8917 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8918 write_inferior_memory transfer.
8919 (set_fast_tracepoint_jump): New variable buf. Use it for the
8920 read_inferior_memory and write_inferior_memory transfers.
8921 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8922 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8923 Use it for the write_inferior_memory transfer.
8924 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8925 buffers.
8926
8927 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8928
8929 * linux-low.c (fetch_register, store_register): Make code
8930 consistent, fix formatting.
8931
8932 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8933
8934 * linux-low.c (usr_store_inferior_registers): Factor out code
8935 to handle individual registers into...
8936 (store_register): ... this new function.
8937
8938 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8939
8940 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8941 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8942 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8943 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8944 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8945 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8946 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8947 (srv_xmlfiles): Add new XML files.
8948
8949 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8950 and <sys/uio.h>.
8951 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8952 (init_registers_s390_linux32v1): Add prototype.
8953 (init_registers_s390_linux32v2): Likewise.
8954 (init_registers_s390_linux64v1): Likewise.
8955 (init_registers_s390_linux64v2): Likewise.
8956 (init_registers_s390x_linux64v1): Likewise.
8957 (init_registers_s390x_linux64v2): Likewise.
8958 (s390_num_regs): Increment to 52.
8959 (s390_regmap): Add orig_r2 register.
8960 (s390_num_regs_3264): Increment to 68.
8961 (s390_regmap_3264): Add orig_r2 register.
8962 (s390_collect_ptrace_register): Handle orig_r2 register.
8963 (s390_supply_ptrace_register): Likewise.
8964 (s390_fill_last_break): New function.
8965 (s390_store_last_break): Likewise.
8966 (s390_fill_system_call): New function.
8967 (s390_store_system_call): Likewise.
8968 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8969 register sets.
8970 (s390_check_regset): New function.
8971 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8972 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8973 Update target_regsets for available register sets.
8974
8975 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8976 Jan Kratochvil <jan.kratochvil@redhat.com>
8977
8978 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8979 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8980 New.
8981 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8982 * linux-low.h (struct process_info_private): New member r_debug.
8983 * server.c (handle_qxfer_libraries): Call
8984 the_target->qxfer_libraries_svr4.
8985 (handle_qxfer_libraries_svr4): New function.
8986 (qxfer_packets): New entry "libraries-svr4".
8987 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8988 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8989 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8990 PACKET_qXfer_libraries_svr4.
8991
8992 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8993
8994 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8995 PSW address/mask between 8-byte and 16-byte formats.
8996 (s390_supply_ptrace_register): Likewise.
8997 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8998 basic addressing mode bit.
8999
9000 2011-11-24 Stan Shebs <stan@codesourcery.com>
9001
9002 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9003
9004 2011-11-17 Stan Shebs <stan@codesourcery.com>
9005
9006 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9007 (tracing_start_time): New global.
9008 (tracing_stop_time): New global.
9009 (tracing_user_name): New global.
9010 (tracing_notes): New global.
9011 (tracing_stop_note): New global.
9012 (cmd_qtstart): Set traceframe_usage, start_time.
9013 (stop_tracing): Set stop_time.
9014 (cmd_qtstatus): Report additional status.
9015 (cmd_qtp): New function.
9016 (handle_tracepoint_query): Call it.
9017 (cmd_qtnotes): New function.
9018 (handle_tracepoint_general_set): Call it.
9019 (get_timestamp): Rename from tsv_get_timestamp.
9020
9021 2011-11-14 Stan Shebs <stan@codesourcery.com>
9022 Kwok Cheung Yeung <kcy@codesourcery.com>
9023
9024 * linux-x86-low.c (small_jump_insn): New.
9025 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9026 trampoline and error message, build a trampoline and issue a small
9027 jump instruction to it.
9028 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9029 trampoline and error message.
9030 (x86_get_min_fast_tracepoint_insn_len): New.
9031 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9032 * linux-low.h (struct linux_target_ops): Add arguments to
9033 install_fast_tracepoint_jump_pad operation, add new operation.
9034 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9035 arguments.
9036 (linux_get_min_fast_tracepoint_insn_len): New function.
9037 (linux_target_op): Add new operation.
9038 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9039 (gdb_trampoline_buffer_end): Ditto.
9040 (gdb_trampoline_buffer_error): Ditto.
9041 (struct ipa_sym_addresses): Add fields for new IPA variables.
9042 (symbol_list): Add entries for new IPA variables.
9043 (struct tracepoint): Add fields to hold the address range of the
9044 trampoline used by the tracepoint.
9045 (trampoline_buffer_head): New static variable.
9046 (trampoline_buffer_tail): Ditto.
9047 (claim_trampoline_space): New function.
9048 (have_fast_tracepoint_trampoline_buffer): New function.
9049 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9050 structure.
9051 (install_fast_tracepoint): Ditto, also add error buffer argument.
9052 (cmd_qtminftpilen): New function.
9053 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9054 (fast_tracepoint_from_trampoline_address): New function.
9055 (fast_tracepoint_collecting): Handle trampoline as part of jump
9056 pad space.
9057 (set_trampoline_buffer_space): New function.
9058 (initialize_tracepoint): Initialize new IPA variables.
9059 * target.h (struct target_ops): Add arguments to
9060 install_fast_tracepoint_jump_pad operation, add new
9061 get_min_fast_tracepoint_insn_len operation.
9062 (target_get_min_fast_tracepoint_insn_len): New.
9063 (install_fast_tracepoint_jump_pad): Add arguments.
9064 * server.h (IPA_BUFSIZ): Define.
9065 * linux-i386-ipa.c: Include extra header files.
9066 (initialize_fast_tracepoint_trampoline_buffer): New function.
9067 (initialize_low_tracepoint): Call it.
9068 * server.h (set_trampoline_buffer_space): Declare.
9069 (claim_trampoline_space): Ditto.
9070 (have_fast_tracepoint_trampoline_buffer): Ditto.
9071
9072 2011-11-14 Yao Qi <yao@codesourcery.com>
9073
9074 * server.c (handle_query): Handle InstallInTrace for qSupported.
9075 * tracepoint.c (add_tracepoint): Sort list.
9076 (install_tracepoint, download_tracepoint): New.
9077 (cmd_qtdp): Call them to install and download tracepoints.
9078 (sort_tracepoints): Removed.
9079 (cmd_qtstart): Update.
9080
9081 2011-11-14 Yao Qi <yao@codesourcery.com>
9082
9083 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9084 * mem-break.h: Declare.
9085 * tracepoint.c (cmd_qtstart): Move some code to ...
9086 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9087 New.
9088 (download_tracepoints): Move some code to ...
9089 (download_tracepoint_1): ... here. New.
9090
9091 2011-11-08 Yao Qi <yao@codesourcery.com>
9092
9093 * remote-utils.c (relocate_instruction): A comment fix.
9094
9095 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9096
9097 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9098 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9099 dr_status_mirror and dr_control_mirror from debug_reg_state.
9100 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9101 (i386_initial_stuff): Remove use of deleted globals.
9102 (i386_get_thread_context, i386_set_thread_context,
9103 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9104 from debug_reg_state.
9105
9106 2011-11-05 Yao Qi <yao@codesourcery.com>
9107
9108 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9109 address as TPOINT's.
9110
9111 2011-11-02 Stan Shebs <stan@codesourcery.com>
9112
9113 * tracepoint.c (agent_mem_read_string): New function.
9114 (eval_agent_expr): Call it for tracenz.
9115 * server.c (handle_query): Report support for tracenz.
9116
9117 2011-11-02 Yao Qi <yao@codesourcery.com>
9118
9119 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9120
9121 2011-11-02 Yao Qi <yao@codesourcery.com>
9122
9123 * target.h: Fix a typo in comment.
9124
9125 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9126
9127 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9128 clobber the breakpoints' shadows with fast tracepoint jumps.
9129 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9130 * target.c (write_inferior_memory): Also pass MYADDR down to
9131 check_mem_write.
9132
9133 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9134
9135 * configure.ac: Check support for personality routine.
9136 * configure: Regenerate.
9137 * config.in: Likewise.
9138 * linux-low.c: Include <sys/personality.h>.
9139 Define ADDR_NO_RANDOMIZE if necessary.
9140 (linux_create_inferior): Disable address space randomization when
9141 forking inferior, if requested.
9142 (linux_supports_disable_randomization): New function.
9143 (linux_target_ops): Install it.
9144 * server.h (disable_randomization): Declare.
9145 * server.c (disable_randomization): New global variable.
9146 (handle_general_set): Handle QDisableRandomization.
9147 (handle_query): Likewise for qSupported.
9148 (main): Support --disable-randomization and --no-disable-randomization
9149 command line arguments.
9150 * target.h (struct target_ops): Add supports_disable_randomization.
9151 (target_supports_disable_randomization): New macro.
9152
9153 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9154
9155 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9156 ifdef check.
9157 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9158 [!PT_GETDSBT] (target_loadmap): New definition.
9159 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9160 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9161 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9162 and PT_GETDSBT to LINUX_LOADMAP.
9163 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9164 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9165
9166 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9167
9168 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9169 (arm_linux_hwbp_cap): New static variable.
9170 (arm_linux_get_hwbp_cap): Replace by ...
9171 (arm_linux_init_hwbp_cap): ... this new function.
9172 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9173 (arm_linux_get_hw_watchpoint_count): Likewise.
9174 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9175 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9176 (arm_prepare_to_resume): Use perror_with_name instead of error.
9177
9178 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9179
9180 * linux-arm-low.c: Include <signal.h>.
9181 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9182 (struct arm_linux_hwbp_cap): New data type.
9183 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9184 (struct arm_linux_hw_breakpoint): New data type.
9185 (MAX_BPTS, MAX_WPTS): Define.
9186 (struct arch_process_info, struct arch_lwp_info): New data types.
9187 (arm_linux_get_hwbp_cap): New function.
9188 (arm_linux_get_hw_breakpoint_count): Likewise.
9189 (arm_linux_get_hw_watchpoint_count): Likewise.
9190 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9191 (arm_hwbp_control_initialize): Likewise.
9192 (arm_hwbp_control_is_enabled): Likewise.
9193 (arm_hwbp_control_is_initialized): Likewise.
9194 (arm_hwbp_control_disable): Likewise.
9195 (arm_linux_hw_breakpoint_equal): Likewise.
9196 (arm_linux_hw_point_initialize): Likewise.
9197 (struct update_registers_data): New data structure.
9198 (update_registers_callback: New function.
9199 (arm_insert_point): Likewise.
9200 (arm_remove_point): Likewise.
9201 (arm_stopped_by_watchpoint): Likewise.
9202 (arm_stopped_data_address): Likewise.
9203 (arm_new_process): Likewise.
9204 (arm_new_thread): Likewise.
9205 (arm_prepare_to_resume): Likewise.
9206 (the_low_target): Register arm_insert_point, arm_remove_point,
9207 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9208 arm_new_thread, and arm_prepare_to_resume.
9209
9210 2011-09-15 Stan Shebs <stan@codesourcery.com>
9211
9212 * server.h (struct emit_ops): Add compare-goto fields.
9213 * tracepoint.c (gdb_agent_op_sizes): New table.
9214 (emit_eq_goto): New function.
9215 (emit_ne_goto): New function.
9216 (emit_lt_goto): New function.
9217 (emit_le_goto): New function.
9218 (emit_gt_goto): New function.
9219 (emit_ge_goto): New function.
9220 (is_goto_target): New function.
9221 (compile_bytecodes): Recognize special cases of compare-goto
9222 combinations and call specialized emitters for them.
9223 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9224 (amd64_emit_ne_goto): New function.
9225 (amd64_emit_lt_goto): New function.
9226 (amd64_emit_le_goto): New function.
9227 (amd64_emit_gt_goto): New function.
9228 (amd64_emit_ge_goto): New function.
9229 (amd64_emit_ops): Add the new functions.
9230 (i386_emit_eq_goto): New function.
9231 (i386_emit_ne_goto): New function.
9232 (i386_emit_lt_goto): New function.
9233 (i386_emit_le_goto): New function.
9234 (i386_emit_gt_goto): New function.
9235 (i386_emit_ge_goto): New function.
9236 (i386_emit_ops): Add the new functions.
9237
9238 2011-09-08 Stan Shebs <stan@codesourcery.com>
9239
9240 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9241 (i386_emit_epilogue): Restore %ebx.
9242
9243 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9244
9245 * server.c (step_thread): Remove definition.
9246 (process_serial_event): Don't handle Hs.
9247 * server.h (step_thread): Remove declaration.
9248 * target.c (set_desired_inferior): Remove use of step_thread.
9249
9250 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9251
9252 * linux-low.c: Include linux-procfs.h.
9253 (linux_attach_lwp_1): Update comments.
9254 (linux_attach): Scan for existing threads when attaching to a
9255 process that is the tgid.
9256 * Makefile.in: Update dependencies.
9257
9258 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9259
9260 * configure.srv: Add linux-procfs.o dependencies.
9261
9262 2011-08-14 Yao Qi <yao@codesourcery.com>
9263
9264 * target.h (struct target_ops): Fix indent.
9265 * win32-low.c (win32_target_ops): Fix comment.
9266
9267 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9268 Yao Qi <yao@codesourcery.com>
9269
9270 * Makefile.in (clean): Remove tic6x-*.c files.
9271 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9272 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9273 (tic6x-c64xp-linux.c): Likewise.
9274 * configure.srv: Add support for tic6x-*-uclinux.
9275 * linux-tic6x-low.c: New.
9276 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9277
9278 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9279 Yao Qi <yao@codesourcery.com>
9280
9281 * target.h (struct target_ops): Add read_loadmap.
9282 * linux-low.c (struct target_loadseg): New type.
9283 (struct target_loadmap): New type.
9284 (linux_read_loadmap): New function.
9285 (linux_target_ops): Add linux_read_loadmap.
9286 * server.c (handle_query): Support qXfer:fdpic:read packet.
9287 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9288 to NULL.
9289
9290 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9291
9292 * win32-low.c: Include <stdint.h>.
9293
9294 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9295
9296 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9297 to the inferior here.
9298 (i386_remove_aligned_watchpoint): Ditto.
9299 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9300 fit part of the watchpoint in the debug registers.
9301 (i386_update_inferior_debug_regs): New.
9302 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9303 registers, and only update the inferior on success.
9304 (i386_low_remove_watchpoint): Ditto.
9305
9306 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9307
9308 * linux-low.c (compare_ints, unique, list_threads, show_process,
9309 linux_core_of_thread): Delete.
9310 (linux_target_ops): Change linux_core_of_thread to
9311 linux_common_core_of_thread.
9312 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9313 * utils.c (malloc_failure): Change type of argument.
9314 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9315 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9316 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9317 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9318 (IPA_OBJS): Add common-utils-ipa.o.
9319 (ptid_h, linux_osdata_h): New macros.
9320 (server_h): Add common/common-utils.h, common/xml-utils.h,
9321 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9322 common/ptid.h.
9323 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9324 ptid.o, buffer.o): New rules.
9325 (linux-low.o): Add common/linux-osdata.h as a dependency.
9326 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9327 * configure.ac: Add AC_HEADER_DIRENT check.
9328 * config.in: Regenerate.
9329 * configure: Regenerate.
9330 * remote-utils.c (xml_escape_text): Delete.
9331 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9332 buffer_xml_printf): Move to common/buffer.c.
9333 * server.c (main): Remove call to initialize_inferiors.
9334 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9335 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9336 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9337 internal_error, gdb_assert, gdb_assert_fail): Delete.
9338 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9339 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9340 common/buffer.h.
9341 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9342 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9343 initialize_inferiors): Delete.
9344
9345 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9346
9347 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9348 symbol error.
9349
9350 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9351
9352 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9353 assertion.
9354 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9355
9356 2011-05-26 Yao Qi <yao@codesourcery.com>
9357
9358 * Makefile.in (thread-db.o): Track dependence to
9359 common/gdb_thread_db.h.
9360 * thread-db.c: include gdb_thread_db.h from right place.
9361
9362 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9363
9364 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9365 __FILE__ and __LINE__ to internal_error.
9366
9367 2011-05-13 Doug Evans <dje@google.com>
9368
9369 * thread-db.c (try_thread_db_load_from_sdir): New function.
9370 (try_thread_db_load_from_dir): New function.
9371 (thread_db_load_search): Handle $sdir, ignore $pdir.
9372 Remove trying of system directories if search of
9373 libthread-db-search-path fails, that is now done via $sdir.
9374
9375 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9376
9377 * server.c (handle_query): Add EnableDisableTracepoints to the list
9378 of supported features.
9379 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9380 tracepoints.
9381 (cmd_qtenable_disable): New.
9382 (cmd_qtstart): Install tracepoints even if disabled.
9383 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9384 receiving a QTEnable or QTDisable packet.
9385 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9386 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9387 tracepoints.
9388 (gdb_probe): Skip data collection if static tracepoint is disabled.
9389
9390 2011-05-10 Doug Evans <dje@google.com>
9391
9392 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9393
9394 2011-05-04 Doug Evans <dje@google.com>
9395
9396 * linux-low.c (linux_join): Skip process lookup.
9397 * spu-low.c (spu_join): Ditto.
9398 * server.c (join_inferiors_callback): Delete.
9399 (process_serial_event): For 'D' packet (detach) call join_inferior
9400 directly.
9401
9402 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9403
9404 * README: Don't mention xscale*-*-linux*.
9405 * configure.srv (xscale*-*-linux*): Don't handle target.
9406
9407 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9408
9409 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9410 casting pointers.
9411 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9412 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9413 (i386_emit_void_call_2): Likewise.
9414
9415 2011-04-26 Yao Qi <yao@codesourcery.com>
9416
9417 * linux-low.c: Move common macros to linux-ptrace.h.
9418 Include linux-ptrace.h.
9419 * Makefile.in (linux_ptrace_h): New.
9420 (linux-low.o): Depends on linux-ptrace.h.
9421
9422 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9423
9424 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9425 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9426 (remote_prepare): New function with most of the TCP code from ...
9427 (remote_open): ... here. Detect PORT here unconditionally. Move also
9428 setting transport_is_reliable.
9429 * server.c (run_once): New variable.
9430 (gdbserver_usage): Document it.
9431 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9432 the first run if RUN_ONCE.
9433 * server.h (run_once, remote_prepare): New declarations.
9434
9435 2011-04-19 Tom Tromey <tromey@redhat.com>
9436
9437 * win32-low.c (handle_load_dll): Remove duplicate "the".
9438
9439 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9440
9441 Remove support for old Cygwin 1.5 versions.
9442 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9443 function to avoid warning.
9444 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9445 warning.
9446
9447 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9448
9449 * gdbserver/server.h (Macro _): Define it if not available.
9450
9451 2011-03-14 Michael Snyder <msnyder@vmware.com>
9452
9453 * hostio.c (handle_close): Remove unnecessary null test.
9454
9455 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9456
9457 * Makefile.in (maintainer-clean realclean distclean): Remove
9458 "make ... subdir_do" command.
9459
9460 2011-03-10 Michael Snyder <msnyder@vmware.com>
9461
9462 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9463
9464 * server.c (handle_v_run): Free alloced buffer on early return.
9465
9466 2011-03-09 Yao Qi <yao@codesourcery.com>
9467
9468 Revert:
9469 2011-03-04 Yao Qi <yao@codesourcery.com>
9470
9471 * Makefile.in: Remove GNU make feature --directory.
9472
9473 2011-03-05 Yao Qi <yao@codesourcery.com>
9474
9475 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9476 (subdir_do): New make target. Copied from gdb/Makefile.
9477 (maintainer-clean, realclean, distclean, clean): Call corresponding
9478 make targets in common/Makefile.
9479
9480 2011-02-11 Yao Qi <yao@codesourcery.com>
9481
9482 * configure.ac: Call AC_PROG_RANLIB.
9483 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9484 * configure: Regenerate.
9485
9486 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9487
9488 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9489
9490 2011-03-06 Yao Qi <yao@codesourcery.com>
9491
9492 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9493
9494 2011-03-05 Yao Qi <yao@codesourcery.com>
9495
9496 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9497 (subdir_do): New make target. Copied from gdb/Makefile.
9498 (maintainer-clean, realclean, distclean, clean): Call corresponding
9499 make targets in common/Makefile.
9500
9501 2011-03-04 Yao Qi <yao@codesourcery.com>
9502
9503 * Makefile.in: Remove GNU make feature --directory.
9504
9505 2011-03-04 Michael Snyder <msnyder@vmware.com>
9506
9507 * server.c (queue_stop_reply): Call xmalloc not malloc.
9508
9509 2011-03-02 Michael Snyder <msnyder@vmware.com>
9510
9511 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9512
9513 2011-02-28 Michael Snyder <msnyder@vmware.com>
9514
9515 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9516 (cmd_qtframe): Ditto.
9517 (cmd_qtbuffer): Ditto.
9518 (cmd_bigqtbuffer): Ditto.
9519
9520 * utils.c (decimal2str): Initialize 'width' to nine, then
9521 don't mess with it.
9522
9523 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9524
9525 * hostio.c (require_data): Free *data, not data.
9526
9527 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9528
9529 * hostio.c (require_data): Use free, not xfree.
9530
9531 2011-02-27 Michael Snyder <msnyder@vmware.com>
9532
9533 * server.c (handle_query): Discard unused value.
9534
9535 * hostio.c (require_data): Free malloc memory before returning
9536 error.
9537
9538 2011-02-26 Michael Snyder <msnyder@vmware.com>
9539
9540 * linux-low.c (list_threads): Call closedir for dirent.
9541
9542 2011-02-27 Michael Snyder <msnyder@vmware.com>
9543
9544 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9545 a case statement falls through.
9546
9547 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9548
9549 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9550 in comparison.
9551
9552 2011-02-26 Michael Snyder <msnyder@vmware.com>
9553
9554 * utils.c (decimal2str): Eliminate dead code and dead param.
9555 (pulongest): Drop dead param from call to decimal2str.
9556 (plongest): Ditto.
9557
9558 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9559
9560 Revert the following patch (not approved yet):
9561 2011-02-21 Hui Zhu <teawater@gmail.com>
9562 * tracepoint.c (tp_printf): New function.
9563 (eval_agent_expr): Handle gdb_agent_op_printf.
9564
9565 2011-02-21 Hui Zhu <teawater@gmail.com>
9566
9567 * tracepoint.c (tp_printf): New function.
9568 (eval_agent_expr): Handle gdb_agent_op_printf.
9569
9570 2011-02-18 Tom Tromey <tromey@redhat.com>
9571
9572 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9573 (tracepoint.o): Likewise.
9574 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9575 (gdb_agent_op_names): Likewise.
9576
9577 2011-02-18 Tom Tromey <tromey@redhat.com>
9578
9579 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9580 gdb_agent_op_rot>: New constants.
9581 (gdb_agent_op_names): Add pick and roll.
9582 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9583 cases.
9584
9585 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9586
9587 * aclocal.m4: Regenerated with aclocal-1.11.1.
9588
9589 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9590
9591 * server.c (handle_qxfer_traceframe_info): New.
9592 (qxfer_packets): Register "traceframe-info".
9593 (handle_query): Report support for qXfer:traceframe-info:read+.
9594 * tracepoint.c (match_blocktype): New.
9595 (traceframe_find_block_type): Rename to ...
9596 (traceframe_walk_blocks): ... this. Add callback filter argument,
9597 and use it.
9598 (traceframe_find_block_type): New, reimplemented on top of
9599 traceframe_walk_blocks.
9600 (build_traceframe_info_xml): New.
9601 (traceframe_read_info): New.
9602 * server.h (traceframe_read_info): Declare.
9603
9604 2011-02-11 Yao Qi <yao@codesourcery.com>
9605
9606 * configure.ac: Call AC_PROG_RANLIB.
9607 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9608 * configure: Regenerate.
9609
9610 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9611
9612 * server.c (gdb_read_memory): Change return semantics to allow
9613 partial transfers.
9614 (handle_search_memory_1): Adjust.
9615 (process_serial_event) <'m' packet>: Handle partial transfers.
9616 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9617
9618 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9619
9620 * regcache.c (init_register_cache): Initialize
9621 regcache->register_status.
9622 (free_register_cache): Release regcache->register_status.
9623 (regcache_cpy): Copy register_status.
9624 (registers_to_string): Print 'x's for unavailable registers.
9625 (supply_register): Mark the register's status valid or
9626 unavailable, depending on whether a buffer was passed in or not.
9627 (supply_register_zeroed): New.
9628 (supply_regblock): Mark the registers' status valid or
9629 unavailable, depending on whether a buffer was passed in or not.
9630 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9631 (struct regcache): New `register_status' field.
9632 (supply_register_zeroed): Declare.
9633 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9634 supply_register_zeroed, rather than passing a NULL buffer to
9635 supply_register.
9636 * tracepoint.c (fetch_traceframe_registers): Update comment.
9637
9638 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9639
9640 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9641 buffer explicit.
9642
9643 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9644
9645 * server.h (decode_xfer_write): Change prototype.
9646 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9647 and don't extract the annex here.
9648 * server.c (decode_xfer_read): Remove `annex' parameter,
9649 and don't extract the annex here.
9650 (decode_xfer): New.
9651 (struct qxfer): New.
9652 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9653 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9654 (handle_qxfer_statictrace): New functions, abstracted out from
9655 handle_query, and made to use the struct qxfer interface.
9656 (handle_threads_qxfer_proper): Rename to ...
9657 (handle_qxfer_threads_proper): ... this.
9658 (handle_threads_qxfer): Rename to ...
9659 (handle_qxfer_threads): ... this. Adjust.
9660 (qxfer_packets): New array.
9661 (handle_qxfer): New function.
9662 (handle_query): Use handle_qxfer.
9663
9664 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9665
9666 * gdbreplay.c: Shorten lines of >= 80 columns.
9667 * linux-low.c: Ditto.
9668 * linux-ppc-low.c: Ditto.
9669 * linux-s390-low.c: Ditto.
9670 * linux-sparc-low.c: Ditto.
9671 * linux-x86-low.c: Ditto.
9672 * linux-xtensa-low.c: Ditto.
9673 * mem-break.c: Ditto.
9674 * nto-low.c: Ditto.
9675 * regcache.h: Ditto.
9676 * remote-utils.c: Ditto.
9677 * server.c: Ditto.
9678 * server.h: Ditto.
9679 * thread-db.c: Ditto.
9680 * tracepoint.c: Ditto.
9681 * utils.c: Ditto.
9682 * win32-low.h: Ditto.
9683
9684 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9685
9686 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9687 update.
9688
9689 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9690
9691 * server.c (gdbserver_version): Update copyright year in version
9692 output.
9693 * gdbreplay.c (gdbreplay_version): Ditto.
9694
9695 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9696
9697 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9698 * linux-bfin-low.c: New file.
9699 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9700 PT_DATA_ADDR for BFIN targets.
9701 * Makefile.in (SFILES): Add linux-bfin-low.c.
9702 (clean): Remove reg-bfin.c.
9703 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9704 * README: Mention supported Blackfin targets.
9705
9706 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9707
9708 * .gitignore: New file.
9709
9710 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9711
9712 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9713
9714 2010-10-22 Jie Zhang <jie@codesourcery.com>
9715
9716 * Makefile.in: Add FLAGS_TO_PASS variable.
9717 (install): Remove dependency of install-only and recursively
9718 invoke make for install-only.
9719
9720 2010-10-04 Doug Evans <dje@google.com>
9721
9722 * Makefile.in (uninstall): Use $(DESTDIR).
9723
9724 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9725
9726 PR gdb/11842
9727
9728 * linux-x86-low.c (compat_siginfo_from_siginfo)
9729 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9730 si_code is < 0. Check for si_code == SI_TIMER before checking for
9731 si_code < 0.
9732
9733 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9734
9735 * lynx-i386-low.c: New file.
9736 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9737
9738 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9739
9740 * lynx-low.c (ptrace_request_to_str): Remove handling for
9741 request values that have been removed in LynxOS 5.x.
9742
9743 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9744
9745 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9746 <ptrace.h>
9747
9748 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9749
9750 * configure.ac: Add --enable-inprocess-agent option.
9751 * configure: Rebuilt.
9752
9753 2010-09-06 Yao Qi <yao@codesourcery.com>
9754
9755 * linux-low.c (linux_kill): Remove unused variable.
9756 (linux_stabilize_threads): Likewise.
9757 * server.c (start_inferior): Likewise.
9758 (queue_stop_reply_callback): Likewise.
9759 * tracepoint.c (do_action_at_tracepoint): Likewise.
9760
9761 2010-09-06 Yao Qi <yao@codesourcery.com>
9762
9763 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9764 on return.
9765
9766 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9767
9768 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9769
9770 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9771
9772 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9773 "$(IPA_DEPFILES)".
9774
9775 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9776
9777 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9778 gdbserver/lynx-ppc-low.c: New files.
9779 * Makefile.in (lynx_low_h): New variable.
9780 (lynx-low.o, lynx-ppc-low.o): New rules.
9781 * configure.ac: On LynxOS, link with -lnetinet.
9782 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9783 * configure: regenerate.
9784
9785 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9786
9787 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9788 * configure.ac: Add check for vasprintf and vsnprintf.
9789 * configure, config.in: Regenerate.
9790 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9791
9792 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9793
9794 * gdbreplay.c: Move include of alloca.h up, next to include of
9795 malloc.h.
9796 * server.h: Add include of malloc.h.
9797 * mem-break.c: Remove include of malloc.h.
9798 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9799
9800 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9801
9802 * Makefile.in (memmem.o): Build with -Wno-error.
9803
9804 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9805
9806 * utils.c (xsnprintf): Make non-static.
9807 * server.h: Add xsnprintf declaration.
9808 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9809 replace calls to snprintf by calls to xsnprintf throughout.
9810
9811 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9812
9813 * configure.ac: Add configure check for alloca.
9814 * configure, config.in: Regenerate.
9815 * server.h: Include alloca.h if it exists.
9816 * gdbreplay.c: Include alloca.h if it exists.
9817
9818 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9819
9820 * linux-low.c (__SIGRTMIN): Define if not already defined.
9821 (linux_create_inferior): Check for __ANDROID__ rather than
9822 __SIGRTMIN.
9823 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9824 are already deferred.
9825 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9826 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9827 stopped and already has a pending signal to report.
9828 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9829 a pending signal to report or is moving out of a jump pad.
9830 (linux_init_signals): Check for __ANDROID__ rather than
9831 __SIGRTMIN.
9832
9833 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9834
9835 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9836 debug_threads check. Avoid a linear search when not doing debug
9837 output.
9838
9839 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9840
9841 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9842 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9843 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9844 (process_event): Change local fd's type to gdb_fildes_t.
9845 (create_file_handler): Adjust prototype.
9846 (delete_file_handler): Adjust prototype.
9847 (handle_file_event): Adjust prototype. Use pfildes.
9848 (create_file_event): Adjsut prototype.
9849 * remote-utils.c (remote_desc, listen_desc): Change type to
9850 gdb_fildes_t.
9851 * server.h: New gdb_fildes_t typedef.
9852 [USE_WIN32API]: Include winsock2.h.
9853 (delete_file_handler, add_file_handler): Adjust prototypes.
9854 (pfildes): Declare.
9855 * utils.c (pfildes): New.
9856
9857 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9858
9859 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9860 * configure: Regenerate.
9861
9862 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9863
9864 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9865 (linux_done_accessing_memory): ... this.
9866 (linux_target_ops): Adjust.
9867 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9868 * nto-low.c (nto_target_ops): Adjust comment.
9869 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9870 * spu-low.c (spu_target_ops): Adjust comment.
9871 * target.h (target_ops): Rename unprepare_to_access_memory field
9872 to done_accessing_memory.
9873 (unprepare_to_access_memory): Rename to ...
9874 (done_accessing_memory): ... this.
9875
9876 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9877
9878 * linux-low.c (linux_prepare_to_access_memory): New.
9879 (linux_unprepare_to_access_memory): New.
9880 (linux_target_ops): Install them.
9881 * server.c (read_memory): Rename to ...
9882 (gdb_read_memory): ... this. Use
9883 prepare_to_access_memory/prepare_to_access_memory.
9884 (write_memory): Rename to ...
9885 (gdb_write_memory): ... this. Use
9886 prepare_to_access_memory/prepare_to_access_memory.
9887 (handle_search_memory_1): Adjust.
9888 (process_serial_event): Adjust.
9889 * target.h (struct target_ops): New fields
9890 prepare_to_access_memory and unprepare_to_access_memory.
9891 (prepare_to_access_memory, unprepare_to_access_memory): New.
9892 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9893 prepare_to_access_memory/prepare_to_access_memory.
9894 * nto-low.c (nto_target_ops): Adjust.
9895 * spu-low.c (spu_target_ops): Adjust.
9896 * win32-low.c (win32_target_ops): Adjust.
9897
9898 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9899
9900 * Makefile.in (WARN_CFLAGS): Get it from configure.
9901 (WERROR_CFLAGS): New.
9902 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9903 * configure.ac: Introduce --enable-werror, which adds -Werror to
9904 the compiler command line. Enabled by default. Disable with
9905 --disable-werror. Add -Wdeclaration-after-statement
9906 Wpointer-arith and -Wformat-nonliteral to warning flags.
9907 * configure: Regenerate.
9908
9909 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9910
9911 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9912
9913 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9914
9915 * gdbreplay.c (remote_error): New.
9916 (gdbchar): New.
9917 (expect): Use gdbchar. Check for error reading from GDB.
9918 Clarify sync error output.
9919 (play): Check for errors writing to GDB.
9920 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9921 * remote-utils.c (getpkt): Check for errors writing to the remote
9922 descriptor.
9923
9924 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9925
9926 * linux-low.c (linux_wait_1): Move non-debugging code out of
9927 `debug_threads' control.
9928
9929 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9930
9931 * linux-low.c (linux_wait_1): Don't set last_status here.
9932 * server.c (push_event, queue_stop_reply_callback): Assert we're
9933 not pushing a TARGET_WAITKIND_IGNORE event.
9934 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9935 (myresume, handle_target_event): Set the thread's last_resume_kind
9936 and last_status from the target returned status.
9937
9938 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9939
9940 PR threads/10729
9941
9942 * linux-x86-low.c (update_debug_registers_callback): New.
9943 (i386_dr_low_set_addr): Use it.
9944 (i386_dr_low_get_addr): New.
9945 (i386_dr_low_set_control): Use update_debug_registers_callback.
9946 (i386_dr_low_get_control): New.
9947 (i386_dr_low_get_status): Adjust.
9948 * linux-low.c (linux_stop_lwp): New.
9949 * linux-low.h (linux_stop_lwp): Declare.
9950
9951 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9952 argument instead of a i386_debug_reg_state.
9953 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9954 a i386_debug_reg_state.
9955 (i386_insert_aligned_watchpoint): Adjust.
9956 (i386_remove_aligned_watchpoint): Adjust.
9957 (i386_low_stopped_data_address): Read the debug registers from the
9958 inferior instead of from the mirrors.
9959 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9960 (i386_dr_low_get_addr): Declare.
9961 (i386_dr_low_get_control): Declare.
9962 (i386_dr_low_get_status): Change prototype.
9963
9964 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9965 (i386_dr_low_get_addr): New.
9966 (i386_dr_low_get_control): New.
9967 (i386_dr_low_get_status): Adjust prototype. Return
9968 dr_status_mirror.
9969 (i386_initial_stuff): Clear dr_status_mirror and
9970 dr_control_mirror.
9971 (i386_get_thread_context): Adjust.
9972 (i386_set_thread_context): Adjust.
9973 (i386_thread_added): Adjust.
9974
9975 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9976
9977 * linux-low.h (linux_thread_area): Delete declaration.
9978
9979 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9980
9981 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9982 after its termination.
9983
9984 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9985
9986 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9987 (gdb_wants_all_stopped): Delete.
9988 (linux_wait_1): Don't call them.
9989 * server.c (handle_v_cont): Tag all threads as want-stopped.
9990 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9991 stopped as "client-wants-stopped".
9992
9993 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9994
9995 * Makefile.in (signals_h): New.
9996 (server_h): Depend on it.
9997 (server.o): Don't depend on $(signals_def).
9998 (signals.o): Depend on $(signals_def).
9999
10000 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10001
10002 * Makefile.in (signals_def): New.
10003 (server_h): Append include/gdb/signals.h and signals_def.
10004 (server.o): Append signals_def.
10005
10006 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10007
10008 * server.c (handle_target_event): Use target_signal_to_host for
10009 resume_info.sig initialization.
10010 * target.h (struct thread_resume) <sig>: New comment.
10011
10012 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10013
10014 * server.c (handle_query): strcpy() the returned string from paddress()
10015 instead of sprintf().
10016 * utils.c (paddress): Return phex_nz().
10017
10018 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10019
10020 * server.c (handle_v_cont): Call mourn_inferior if process
10021 just exited.
10022 (myresume): Likewise.
10023
10024 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10025
10026 Static tracepoints, and integration with UST.
10027
10028 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10029 * mem-break.c (uninsert_all_breakpoints)
10030 (reinsert_all_breakpoints): New.
10031 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10032 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10033 (gdb_agent_ust_loaded, helper_thread_id)
10034 (gdb_agent_helper_thread_id): New macros.
10035 (struct ipa_sym_addresses): Add addr_ust_loaded,
10036 addr_helper_thread_id, addr_cmd_buf.
10037 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10038 (in_process_agent_loaded_ust): New.
10039 (write_e_ust_not_loaded): New.
10040 (maybe_write_ipa_ust_not_loaded): New.
10041 (struct collect_static_trace_data_action): New.
10042 (enum tracepoint_type) <static_tracepoint>: New.
10043 (struct tracepoint) <handle>: Mention static tracepoints.
10044 (struct static_tracepoint_ctx): New.
10045 (CMD_BUF_SIZE): New.
10046 (add_tracepoint_action): Handle static tracepoint actions.
10047 (unprobe_marker_at): New.
10048 (clear_installed_tracepoints): Handle static tracepoints.
10049 (cmd_qtdp): Handle static tracepoints.
10050 (probe_marker_at): New.
10051 (cmd_qtstart): Handle static tracepoints.
10052 (response_tracepoint): Handle static tracepoints.
10053 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10054 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10055 (get_context_regcache): Handle static tracepoints.
10056 (do_action_at_tracepoint): Handle static tracepoint actions.
10057 (traceframe_find_block_type): Handle static trace data blocks.
10058 (traceframe_read_sdata): New.
10059 (download_tracepoints): Download static tracepoint actions.
10060 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10061 (GDB_PROBE_NAME): New.
10062 (ust_ops): New.
10063 (GET_UST_SYM): New.
10064 (USTF): New.
10065 (dlsym_ust): New.
10066 (ust_marker_to_static_tracepoint): New.
10067 (gdb_probe): New.
10068 (collect_ust_data_at_tracepoint): New.
10069 (gdb_ust_probe): New.
10070 (UNIX_PATH_MAX, SOCK_DIR): New.
10071 (gdb_ust_connect_sync_socket): New.
10072 (resume_thread, stop_thread): New.
10073 (run_inferior_command): New.
10074 (init_named_socket): New.
10075 (gdb_ust_socket_init): New.
10076 (cstr_to_hexstr): New.
10077 (next_st): New.
10078 (first_marker, next_marker): New.
10079 (response_ust_marker): New.
10080 (cmd_qtfstm, cmd_qtsstm): New.
10081 (unprobe_marker_at, probe_marker_at): New.
10082 (cmd_qtstmat, gdb_ust_thread): New.
10083 (gdb_ust_init): New.
10084 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10085 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10086 (ST_REGENTRY): New.
10087 (x86_64_st_collect_regmap): New.
10088 (X86_64_NUM_ST_COLLECT_GREGS): New.
10089 (AMD64_RIP_REGNUM): New.
10090 (supply_static_tracepoint_registers): New.
10091 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10092 (ST_REGENTRY): New.
10093 (i386_st_collect_regmap): New.
10094 (i386_NUM_ST_COLLECT_GREGS): New.
10095 (supply_static_tracepoint_registers): New.
10096 * server.c (handle_query): Handle qXfer:statictrace:read.
10097 <qSupported>: Report support for StaticTracepoints, and
10098 qXfer:statictrace:read features.
10099 * server.h (traceframe_read_sdata)
10100 (supply_static_tracepoint_registers): Declare.
10101 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10102 (unpack_varlen_hex): Include in IPA build.
10103 * Makefile.in (ustlibs, ustinc): New.
10104 (IPA_OBJS): Add remote-utils-ipa.o.
10105 ($(IPA_LIB)): Link -ldl and -lpthread.
10106 (UST_CFLAGS): New.
10107 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10108 * config.in, configure: Regenerate.
10109
10110 2010-06-20 Ian Lance Taylor <iant@google.com>
10111 Pedro Alves <pedro@codesourcery.com>
10112
10113 * linux-x86-low.c (always_true): Delete.
10114 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10115 trying to fool the compiler with always_true.
10116
10117 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10118
10119 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10120 conditions in gdbserver.
10121
10122 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10123
10124 * spu-low.c (spu_read_memory): Wrap around local store limit.
10125 (spu_write_memory): Likewise.
10126
10127 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10128
10129 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10130 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10131 LONGEST uses.
10132 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10133 uses.
10134 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10135 uses with LONGEST uses.
10136
10137 2010-06-14 Stan Shebs <stan@codesourcery.com>
10138 Pedro Alves <pedro@codesourcery.com>
10139
10140 Bytecode compiler.
10141
10142 * linux-x86-low.c: Include limits.h.
10143 (add_insns): New.
10144 (always_true): New.
10145 (EMIT_ASM): New.
10146 (EMIT_ASM32): New.
10147 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10148 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10149 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10150 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10151 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10152 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10153 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10154 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10155 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10156 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10157 (amd64_emit_void_call_2): New.
10158 (amd64_emit_ops): New.
10159 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10160 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10161 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10162 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10163 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10164 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10165 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10166 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10167 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10168 (i386_emit_stack_adjust, i386_emit_int_call_1)
10169 (i386_emit_void_call_2): New.
10170 (i386_emit_ops): New.
10171 (x86_emit_ops): New.
10172 (the_low_target): Install x86_emit_ops.
10173 * server.h (struct emit_ops): New.
10174 (get_raw_reg_func_addr): Declare.
10175 (current_insn_ptr, emit_error): Declare.
10176 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10177 (set_trace_state_variable_value): New defines.
10178 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10179 addr_get_trace_state_variable_value and
10180 addr_set_trace_state_variable_value.
10181 (symbol_list): New fields for get_raw_reg,
10182 get_trace_state_variable_value and set_trace_state_variable_value.
10183 (condfn): New typedef.
10184 (struct tracepoint): New field `compiled_cond'.
10185 (do_action_at_tracepoint): Clear compiled_cond.
10186 (get_trace_state_variable_value, set_trace_state_variable_value):
10187 Export in the IPA.
10188 (condition_true_at_tracepoint): If there's a compiled condition,
10189 run that.
10190 (current_insn_ptr, emit_error): New globals.
10191 (struct bytecode_address): New.
10192 (get_raw_reg_func_addr): New.
10193 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10194 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10195 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10196 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10197 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10198 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10199 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10200 (compile_tracepoint_condition, compile_bytecodes): New.
10201 * target.h (emit_ops): Forward declare.
10202 (struct target_ops): New field emit_ops.
10203 (target_emit_ops): New.
10204 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10205 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10206 * linux-low.c (linux_emit_ops): New.
10207 (linux_target_ops): Install it.
10208 * linux-low.h (struct linux_target_ops): New field emit_ops.
10209
10210 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10211
10212 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10213 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10214
10215 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10216 Stan Shebs <stan@codesourcery.com>
10217
10218 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10219 (all): Depend on $(extra_libraries).
10220 (install-only): Install the IPA.
10221 (IPA_OBJS, IPA_LIB): New.
10222 (clean): Remove the IPA lib.
10223 (IPAGENT_CFLAGS): New.
10224 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10225 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10226 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10227 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10228 * configure.ac: Check for atomic builtins support in the compiler.
10229 (IPA_DEPFILES, extra_libraries): Define.
10230 * configure.srv (ipa_obj): Add description.
10231 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10232 (i[34567]86-*-linux*): Set ipa_obj.
10233 (x86_64-*-linux*): Set ipa_obj.
10234 * linux-low.c (stabilizing_threads): New.
10235 (supports_fast_tracepoints): New.
10236 (linux_detach): Stabilize threads before detaching.
10237 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10238 the lwp is either not stabilizing, or is moving out of a jump pad.
10239 (linux_fast_tracepoint_collecting): New.
10240 (maybe_move_out_of_jump_pad): New.
10241 (enqueue_one_deferred_signal): New.
10242 (dequeue_one_deferred_signal): New.
10243 (linux_wait_for_event_1): If moving out of a jump pad, defer
10244 pending signals to later.
10245 (linux_stabilize_threads): New.
10246 (linux_wait_1): Check if threads need moving out of jump pads, and
10247 do it if so.
10248 (stuck_in_jump_pad_callback): New.
10249 (move_out_of_jump_pad_callback): New.
10250 (lwp_running): New.
10251 (linux_resume_one_lwp): Handle moving out of jump pads.
10252 (linux_set_resume_request): Dequeue deferred signals.
10253 (need_step_over_p): Also step over fast tracepoint jumps.
10254 (start_step_over): Also uninsert fast tracepoint jumps.
10255 (finish_step_over): Also reinsert fast tracepoint jumps.
10256 (linux_install_fast_tracepoint_jump): New.
10257 (linux_target_ops): Install linux_stabilize_threads and
10258 linux_install_fast_tracepoint_jump_pad.
10259 * linux-low.h (linux_target_ops) <get_thread_area,
10260 install_fast_tracepoint_jump_pad>: New fields.
10261 (struct lwp_info) <collecting_fast_tracepoint,
10262 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10263 (linux_get_thread_area): Declare.
10264 * linux-x86-low.c (jump_insn): New.
10265 (x86_get_thread_area): New.
10266 (append_insns): New.
10267 (push_opcode): New.
10268 (amd64_install_fast_tracepoint_jump_pad): New.
10269 (i386_install_fast_tracepoint_jump_pad): New.
10270 (x86_install_fast_tracepoint_jump_pad): New.
10271 (the_low_target): Install x86_get_thread_area and
10272 x86_install_fast_tracepoint_jump_pad.
10273 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10274 (struct fast_tracepoint_jump): New.
10275 (fast_tracepoint_jump_insn): New.
10276 (fast_tracepoint_jump_shadow): New.
10277 (find_fast_tracepoint_jump_at): New.
10278 (fast_tracepoint_jump_here): New.
10279 (delete_fast_tracepoint_jump): New.
10280 (set_fast_tracepoint_jump): New.
10281 (uninsert_fast_tracepoint_jumps_at): New.
10282 (reinsert_fast_tracepoint_jumps_at): New.
10283 (set_breakpoint_at): Use write_inferior_memory.
10284 (uninsert_raw_breakpoint): Use write_inferior_memory.
10285 (check_mem_read): Mask out fast tracepoint jumps.
10286 (check_mem_write): Mask out fast tracepoint jumps.
10287 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10288 (set_fast_tracepoint_jump): Declare.
10289 (delete_fast_tracepoint_jump)
10290 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10291 (reinsert_fast_tracepoint_jumps_at): Declare.
10292 * regcache.c: Don't compile many functions when building the
10293 in-process agent library.
10294 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10295 the register buffer in the heap.
10296 (free_register_cache): If the register buffer isn't owned by the
10297 regcache, don't free it.
10298 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10299 pre-existing register caches.
10300 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10301 type.
10302 (convert_ascii_to_int): : Constify `from' parameter type.
10303 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10304 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10305 the needed buffer in-place.
10306 (relocate_instruction): New.
10307 * server.c (handle_query) <qSymbols>: If the target supports
10308 tracepoints, give it a chance of looking up symbols. Report
10309 support for fast tracepoints.
10310 (handle_status): Stabilize threads.
10311 (process_serial_event): Adjust.
10312 * server.h (struct fast_tracepoint_jump): Forward declare.
10313 (struct process_info) <fast_tracepoint_jumps>: New field.
10314 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10315 (decode_X_packet, decode_M_packet): Adjust.
10316 (relocate_instruction): Declare.
10317 (in_process_agent_loaded): Declare.
10318 (tracepoint_look_up_symbols): Declare.
10319 (struct fast_tpoint_collect_status): Declare.
10320 (fast_tracepoint_collecting): Declare.
10321 (force_unlock_trace_buffer): Declare.
10322 (handle_tracepoint_bkpts): Declare.
10323 (initialize_low_tracepoint)
10324 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10325 * target.h (struct target_ops) <stabilize_threads,
10326 install_fast_tracepoint_jump_pad>: New fields.
10327 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10328 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10329 [HAVE_STDINT_H]: Include stdint.h.
10330 (trace_debug_1): Rename to ...
10331 (trace_vdebug): ... this.
10332 (trace_debug): Rename to ...
10333 (trace_debug_1): ... this. Add `level' parameter.
10334 (trace_debug): New.
10335 (ATTR_USED, ATTR_NOINLINE): New.
10336 (IP_AGENT_EXPORT): New.
10337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10338 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10339 (about_to_request_buffer_space, trace_buffer_is_full)
10340 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10341 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10342 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10343 (traceframe_write_count, traceframes_created)
10344 (trace_state_variables)
10345 New renaming defines.
10346 (struct ipa_sym_addresses): New.
10347 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10348 (symbol_list): New.
10349 (ipa_sym_addrs): New.
10350 (all_tracepoint_symbols_looked_up): New.
10351 (in_process_agent_loaded): New.
10352 (write_e_ipa_not_loaded): New.
10353 (maybe_write_ipa_not_loaded): New.
10354 (tracepoint_look_up_symbols): New.
10355 (debug_threads) [IN_PROCESS_AGENT]: New.
10356 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10357 (UNKNOWN_SIDE_EFFECTS): New.
10358 (stop_tracing): New.
10359 (flush_trace_buffer): New.
10360 (stop_tracing_bkpt): New.
10361 (flush_trace_buffer_bkpt): New.
10362 (read_inferior_integer): New.
10363 (read_inferior_uinteger): New.
10364 (read_inferior_data_pointer): New.
10365 (write_inferior_data_pointer): New.
10366 (write_inferior_integer): New.
10367 (write_inferior_uinteger): New.
10368 (struct collect_static_trace_data_action): Delete.
10369 (enum tracepoint_type): New.
10370 (struct tracepoint) <type>: New field `type'.
10371 <actions_str, step_actions, step_actions_str>: Only include in
10372 GDBserver.
10373 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10374 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10375 (tracepoints): Use IP_AGENT_EXPORT.
10376 (last_tracepoint): Don't include in the IPA.
10377 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10378 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10379 (alloced_trace_state_variables): New.
10380 (trace_state_variables): Use IP_AGENT_EXPORT.
10381 (traceframe_t): Delete unused variable.
10382 (circular_trace_buffer): Don't include in the IPA.
10383 (trace_buffer_start): Delete.
10384 (struct trace_buffer_control): New.
10385 (trace_buffer_free): Delete.
10386 (struct ipa_trace_buffer_control): New.
10387 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10388 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10389 New.
10390 (trace_buffer_ctrl): New.
10391 (TRACE_BUFFER_CTRL_CURR): New.
10392 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10393 Reimplement as macros.
10394 (trace_buffer_wrap): Delete.
10395 (traceframe_write_count, traceframe_read_count)
10396 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10397 (struct tracepoint_hit_ctx) <type>: New field.
10398 (struct fast_tracepoint_ctx): New.
10399 (memory_barrier): New.
10400 (cmpxchg): New.
10401 (record_tracepoint_error): Update atomically in the IPA.
10402 (clear_inferior_trace_buffer): New.
10403 (about_to_request_buffer_space): New.
10404 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10405 updating the same buffer.
10406 (add_tracepoint): Default the tracepoint's type to trap
10407 tracepoint, and orig_size to -1.
10408 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10409 internal variables.
10410 (create_trace_state_variable): New parameter `gdb'. Handle it.
10411 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10412 (cmd_qtdp): Handle fast tracepoints.
10413 (cmd_qtdv): Adjust.
10414 (max_jump_pad_size): New.
10415 (gdb_jump_pad_head): New.
10416 (get_jump_space_head): New.
10417 (claim_jump_space): New.
10418 (sort_tracepoints): New.
10419 (MAX_JUMP_SIZE): New.
10420 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10421 IPA.
10422 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10423 support. Upload fast traceframes, and delete internal IPA
10424 breakpoints.
10425 (stop_tracing_handler): New.
10426 (flush_trace_buffer_handler): New.
10427 (cmd_qtstop): Upload fast tracepoints.
10428 (response_tracepoint): Handle fast tracepoints.
10429 (tracepoint_finished_step): Upload fast traceframes. Set the
10430 tracepoint hit context's tracepoint type.
10431 (handle_tracepoint_bkpts): New.
10432 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10433 type. Add comment about fast tracepoints.
10434 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10435 non-existing action_str field.
10436 (get_context_regcache): Handle fast tracepoints.
10437 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10438 to the regcache.
10439 (fast_tracepoint_from_jump_pad_address): New.
10440 (fast_tracepoint_from_ipa_tpoint_address): New.
10441 (collecting_t): New.
10442 (force_unlock_trace_buffer): New.
10443 (fast_tracepoint_collecting): New.
10444 (collecting): New.
10445 (gdb_collect): New.
10446 (write_inferior_data_ptr): New.
10447 (target_tp_heap): New.
10448 (target_malloc): New.
10449 (download_agent_expr): New.
10450 (UALIGN): New.
10451 (download_tracepoints): New.
10452 (download_trace_state_variables): New.
10453 (upload_fast_traceframes): New.
10454 (IPA_FIRST_TRACEFRAME): New.
10455 (IPA_NEXT_TRACEFRAME_1): New.
10456 (IPA_NEXT_TRACEFRAME): New.
10457 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10458 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10459 (gdb_jump_pad_buffer_end): New.
10460 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10461 (initialize_tracepoint): Adjust.
10462 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10463 buffer. Initialize the low module.
10464 * utils.c (PREFIX, TOOLNAME): New.
10465 (malloc_failure): Use PREFIX.
10466 (error): In the IPA, an error causes an exit.
10467 (fatal, warning): Use PREFIX.
10468 (internal_error): Use TOOLNAME.
10469 (NUMCELLS): Increase to 10.
10470 * configure, config.in: Regenerate.
10471
10472 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10473
10474 * server.c (handle_query) <qSupported>: Do two passes over the
10475 qSupported string to avoid nesting strtok.
10476
10477 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10478
10479 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10480 (CDEPS): New.
10481 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10482 -Wl,--dynamic-list.
10483 * configure: Regenerate.
10484 * proc-service.list: New.
10485
10486 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10487
10488 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10489 New comment.
10490
10491 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10492
10493 * gdbreplay.c (remote_open): Check error return from socket() call by
10494 its equality to -1 not by it being negative.
10495 * remote-utils.c (remote_open): Likewise.
10496
10497 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10498
10499 * config.h: Regenerate.
10500
10501 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10502
10503 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10504 doesn't provide PTRACE_GET_THREAD_AREA.
10505
10506 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10507
10508 * linux-m68k-low.c: Include <asm/ptrace.h>
10509 (ps_get_thread_area): Implement.
10510
10511 2010-05-03 Doug Evans <dje@google.com>
10512
10513 * event-loop.c (struct callback_event): New struct.
10514 (callback_list): New global.
10515 (append_callback_event, delete_callback_event): New functions.
10516 (process_callback): New function.
10517 (start_event_loop): Call it.
10518 * remote-utils.c (NOT_SCHEDULED): Define.
10519 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10520 moved out of readchar.
10521 (readchar): Rewrite. Call reschedule before returning.
10522 (reset_readchar): New function.
10523 (remote_close): Call it.
10524 (process_remaining, reschedule): New functions.
10525 * server.h (callback_handler_func): New typedef.
10526 (append_callback_event, delete_callback_event): Declare.
10527
10528 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10529
10530 * proc-service.c (ps_pglobal_lookup): Use
10531 thread_db_look_up_one_symbol.
10532 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10533 parameter. Use it instead of all_symbols_looked_up.
10534 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10535 field.
10536 (all_symbols_looked_up): Don't declare.
10537 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10538 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10539 field.
10540 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10541 Set all_symbols_looked_up here.
10542 (thread_db_look_up_one_symbol): New.
10543 (thread_db_get_tls_address): Adjust.
10544 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10545 thread_db object on the heap, and tentatively set it in the
10546 process structure.
10547 (thread_db_init): Don't set all_symbols_looked_up here.
10548 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10549
10550 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10551
10552 * linux-low.c (linux_kill, linux_detach): Adjust.
10553 (status_pending_p_callback): Remove redundant statement. Check
10554 for !TARGET_WAITIKIND_IGNORE, instead of
10555 TARGET_WAITKIND_STOPPED.
10556 (handle_tracepoints): Make sure LWP is locked. Adjust.
10557 (linux_wait_for_event_1): Adjust.
10558 (linux_cancel_breakpoints): New.
10559 (unsuspend_one_lwp): New.
10560 (unsuspend_all_lwps): New.
10561 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10562 (send_sigstop_callback): Change return type to int, add new
10563 `except' parameter and handle it.
10564 (suspend_and_send_sigstop_callback): New.
10565 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10566 pass them down. If SUSPEND, also increment the lwp's suspend
10567 count.
10568 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10569 (need_step_over_p): Don't consider suspended LWPs.
10570 (start_step_over): Adjust.
10571 (proceed_one_lwp): Change return type to int, add new `except'
10572 parameter and handle it.
10573 (unsuspend_and_proceed_one_lwp): New.
10574 (proceed_all_lwps): Use find_inferior instead of
10575 for_each_inferior.
10576 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10577 also decrement the suspend count of LWPs. Pass `except' down,
10578 instead of hacking its suspend count.
10579 (linux_pause_all): Add `freeze' parameter. Adjust.
10580 (linux_unpause_all): New.
10581 (linux_target_ops): Install linux_unpause_all.
10582 * server.c (handle_status): Adjust.
10583 * target.h (struct target_ops): New fields `unpause_all' and
10584 `cancel_breakpoints'. Add new parameter to `pause_all'.
10585 (pause_all): Add new `freeze' parameter.
10586 (unpause_all): New.
10587 (cancel_breakpoints): New.
10588 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10589 cancel breakpoints.
10590 (cmd_qtstart): Pause threads.
10591 (stop_tracing): Pause threads, and cancel breakpoints.
10592 * win32-low.c (win32_target_ops): Adjust.
10593
10594 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10595
10596 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10597 the inferior right away from here...
10598 (linux_wait_1): ... to here, and adjust to check the thread's
10599 last_resume_kind instead of the lwp's step or stop_expected flags.
10600
10601 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10602
10603 * README: Use consistent `GDB' and `GDBserver' spellings.
10604
10605 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10606
10607 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10608 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10609 (linux_detach_one_lwp): Assume the lwp is stopped.
10610 (any_thread_of): Delete.
10611 (linux_detach): Stop all lwps here. Don't blindly delete all
10612 breakpoints.
10613 (delete_lwp_callback): New.
10614 (linux_mourn): Delete all lwps of the process that is gone.
10615 (linux_wait_1): Don't delete the last lwp of the process here.
10616 * mem-break.h (mark_breakpoints_out): Declare.
10617 * mem-break.c (mark_breakpoints_out): New.
10618 (free_all_breakpoints): Use it.
10619 * server.c (handle_target_event): If the process is gone, mark
10620 breakpoints out.
10621 * thread-db.c (struct thread_db) <create_bp>: New field.
10622 (thread_db_enable_reporting): Fix prototype. Store a thread event
10623 breakpoint reference in the thread_db struct.
10624 (thread_db_load_search): Clear the thread_db object.
10625 (try_thread_db_load_1): Ditto.
10626 (switch_to_process): New.
10627 (disable_thread_event_reporting): Use it.
10628 (remove_thread_event_breakpoints): New.
10629 (thread_db_detach, thread_db_mourn): Use it.
10630
10631 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10632
10633 * linux-low.c (linux_enable_event_reporting): New.
10634 (linux_wait_for_event_1, handle_extended_wait): Use it.
10635
10636 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10637
10638 * linux-low.c (linux_kill_one_lwp, linux_kill)
10639 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10640 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10641 SIGSTOP even if the LWP is stopped.
10642 (send_sigstop_callback): New.
10643 (stop_all_lwps): Use send_sigstop_callback instead.
10644 (linux_resume_one_thread): Adjust.
10645 (proceed_one_lwp): Still proceed an LWP that the client has
10646 requested to stop, if we haven't reported it as stopped yet. Make
10647 sure that LWPs the client want stopped, have a pending SIGSTOP.
10648
10649 2010-04-26 Doug Evans <dje@google.com>
10650
10651 * server.c (handle_general_set): Make static.
10652
10653 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10654 Print received char after testing for error/eof instead of before.
10655 (input_interrupt): Tweak comment.
10656
10657 2010-04-23 Doug Evans <dje@google.com>
10658
10659 * server.c (start_inferior): Print inferior argv if --debug.
10660
10661 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10662
10663 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10664 * nto-x86-low.c: Include server.h
10665
10666 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10667
10668 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10669 be consistent with other sources of this directory.
10670 (init_registers_amd64): Correct name of source file of this function
10671 in the comment.
10672
10673 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10674
10675 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10676 64-bit executables.
10677
10678 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10679
10680 * win32-i386-low.c: Add 64-bit support.
10681 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10682 (init_registers_amd64): Declare.
10683 (mappings): Add 64-bit version of array.
10684 (init_windows_x86): New function.
10685 (the_low_target): Change init_arch field to init_windows_x86.
10686
10687 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10688
10689 * win32-low.c: Adapt to support also 64-bit architecture.
10690 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10691 (get_image_name): Use SIZE_T type for local variable `done'.
10692 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10693 (toolhelp_get_dll_name): Idem.
10694 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10695 Use uintptr_t typecast to avoid warning.
10696 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10697 (handle_exception): Use phex_nz to avoid warning.
10698 (win32_wait): Remove unused local variable `process'.
10699
10700 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10701
10702 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10703 `amd64-avx.o'.
10704
10705 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10706
10707 * configure.ac: Use `ws2_32' library for srv_mingw.
10708 * configure: Regenerate.
10709 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10710 * remote-utils.c: Likewise.
10711
10712 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10713
10714 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10715 if __x86_64__ is defined.
10716
10717 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10718
10719 * configure: Regenerate.
10720
10721 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10722
10723 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10724 * target.h (target_ops): New get_tib_address field.
10725 * win32-low.h (win32_thread_info): Add thread_local_base field.
10726 * win32-low.c (child_add_thread): Add tlb argument.
10727 Set thread_local_base field to TLB.
10728 (get_child_debug_event): Adapt to child_add_thread change.
10729 (win32_get_tib_address): New function.
10730 (win32_target_ops): Set get_tib_address field to
10731 win32_get_tib_address.
10732 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10733
10734 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10735
10736 * linux-low.c (linux_mourn): Also remove the process.
10737 * server.c (handle_target_event): Don't remove the process here.
10738 * nto-low.c (nto_mourn): New.
10739 (nto_target_ops): Install it.
10740 * spu-low.c (spu_mourn): New.
10741 (spu_target_ops): Install it.
10742 * win32-low.c (win32_mourn): New.
10743 (win32_target_ops): Install it.
10744
10745 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10746
10747 * server.h (buffer_xml_printf): Remove redundant `;'.
10748
10749 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10750
10751 * regcache.c (set_register_cache): Invalidate regcaches before
10752 changing the register cache layout.
10753 (regcache_invalidate_one): Allow a NULL regcache.
10754 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10755 regcaches before changing the register cache layout or the target
10756 regsets.
10757
10758 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10759
10760 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10761 variable warning on Linux/x86-64.
10762
10763 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10764
10765 GDBserver disconnected tracing support.
10766
10767 * linux-low.c (linux_remove_process): Delete.
10768 (add_lwp): Don't set last_resume_kind here.
10769 (linux_kill): Use `mourn'.
10770 (linux_detach): Use `thread_db_detach', and `mourn'.
10771 (linux_mourn): New.
10772 (linux_attach_lwp_1): Adjust comment.
10773 (linux_attach): last_resume_kind moved the thread_info; adjust.
10774 (status_pending_p_callback): Adjust.
10775 (linux_wait_for_event_1): Adjust.
10776 (count_events_callback, select_singlestep_lwp_callback)
10777 (select_event_lwp_callback, cancel_breakpoints_callback)
10778 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10779 (proceed_one_lwp): Adjust.
10780 (linux_async): Add debug output.
10781 (linux_thread_stopped): New.
10782 (linux_pause_all): New.
10783 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10784 linux_pause_all.
10785 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10786 (thread_db_free): Delete declaration.
10787 (thread_db_detach, thread_db_mourn): Declare.
10788 * thread-db.c (thread_db_init): Use thread_db_mourn.
10789 (thread_db_free): Delete, split in two.
10790 (disable_thread_event_reporting): New.
10791 (thread_db_detach): New.
10792 (thread_db_mourn): New.
10793
10794 * server.h (struct thread_info) <last_resume_kind>: New field.
10795 <attached>: Add comment.
10796 <gdb_detached>: New field.
10797 (handler_func): Change return type to int.
10798 (handle_serial_event, handle_target_event): Ditto.
10799 (gdb_connected): Declare.
10800 (tracing): Delete.
10801 (disconnected_tracing): Declare.
10802 (stop_tracing): Declare.
10803
10804 * server.c (handle_query) <qSupported>: Report support for
10805 disconnected tracing.
10806 (queue_stop_reply_callback): Account for running threads.
10807 (gdb_wants_thread_stopped): New.
10808 (gdb_wants_all_threads_stopped): New.
10809 (gdb_reattached_process): New.
10810 (handle_status): Clear the `gdb_detached' flag of all processes.
10811 In all-stop, stop all threads.
10812 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10813 (process_serial_event): If the remote connection breaks, or if an
10814 exit was forced with "monitor exit", force an event loop exit.
10815 Handle disconnected tracing on detach.
10816 (handle_serial_event): Adjust.
10817 (handle_target_event): If GDB isn't connected, forward events back
10818 to the inferior, unless the last process exited, in which case,
10819 exit gdbserver. Adjust interface.
10820
10821 * remote-utils.c (remote_open): Don't block in accept. Instead
10822 register an event loop source on the listen socket file
10823 descriptor. Refactor bits into ...
10824 (listen_desc): ... this new global.
10825 (gdb_connected): ... this new function.
10826 (enable_async_notification): ... this new function.
10827 (handle_accept_event): ... this new function.
10828 (remote_close): Clear remote_desc.
10829
10830 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10831
10832 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10833 New fields.
10834 (mourn_inferior): Define.
10835 (target_process_qsupported): Avoid the dangling else problem.
10836 (thread_stopped): Define.
10837 (pause_all): Define.
10838 (target_waitstatus_to_string): Declare.
10839 * target.c (target_waitstatus_to_string): New.
10840
10841 * tracepoint.c (tracing): Make extern.
10842 (disconnected_tracing): New.
10843 (stop_tracing): Make extern. Handle tracing stops due to GDB
10844 disconnecting.
10845 (cmd_qtdisconnected): New.
10846 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10847 (handle_tracepoint_general_set): Handle QTDisconnected.
10848
10849 * event-loop.c (event_handler_func): Change return type to int.
10850 (process_event): Bail out if the event handler wants the event
10851 loop to stop.
10852 (handle_file_event): Ditto.
10853 (start_event_loop): Bail out if the event handler wants the event
10854 loop to stop.
10855
10856 * nto-low.c (nto_target_ops): Adjust.
10857 * spu-low.c (spu_wait): Don't remove the process here.
10858 (spu_target_ops): Adjust.
10859 * win32-low.c (win32_wait): Don't remove the process here.
10860 (win32_target_ops): Adjust.
10861
10862 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10863
10864 * regcache.c (realloc_register_cache): Invalidate inferior's
10865 regcache before recreating it.
10866
10867 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10868
10869 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10870
10871 2010-04-09 Stan Shebs <stan@codesourcery.com>
10872 Pedro Alves <pedro@codesourcery.com>
10873
10874 * server.h (LONGEST): New.
10875 (struct thread_info) <while_stepping>: New field.
10876 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10877 Declare.
10878 (initialize_tracepoint, handle_tracepoint_general_set)
10879 (handle_tracepoint_query, tracepoint_finished_step)
10880 (tracepoint_was_hit, release_while_stepping_state_list):
10881 (current_traceframe): Declare.
10882 * server.c (handle_general_set): Handle tracepoint packets.
10883 (read_memory): New.
10884 (write_memory): New.
10885 (handle_search_memory_1): Use read_memory.
10886 (handle_query): Report support for conditional tracepoints, trace
10887 state variables, and tracepoint sources. Handle tracepoint
10888 queries.
10889 (main): Initialize the tracepoints module.
10890 (process_serial_event): Handle traceframe reads/writes.
10891
10892 * linux-low.c (handle_tracepoints): New.
10893 (linux_wait_1): Call it.
10894 (linux_resume_one_lwp): Handle while-stepping.
10895 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10896 (linux_target_ops): Install them.
10897 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10898 New field.
10899 * linux-x86-low.c (x86_supports_tracepoints): New.
10900 (the_low_target). Install it.
10901
10902 * mem-break.h (delete_breakpoint): Declare.
10903 * mem-break.c (delete_breakpoint): Make external.
10904
10905 * target.h (struct target_ops): Add `supports_tracepoints',
10906 `read_pc', and `write_pc' fields.
10907 (target_supports_tracepoints): Define.
10908 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10909 (phex_nz): New.
10910
10911 * regcache.h (struct regcache) <registers_owned>: New field.
10912 (init_register_cache, regcache_cpy): Declare.
10913 (regcache_read_pc, regcache_write_pc): Declare.
10914 (register_cache_size): Declare.
10915 (supply_regblock): Declare.
10916 * regcache.c (init_register_cache): New.
10917 (new_register_cache): Use it.
10918 (regcache_cpy): New.
10919 (register_cache_size): New.
10920 (supply_regblock): New.
10921 (regcache_read_pc, regcache_write_pc): New.
10922
10923 * tracepoint.c: New.
10924
10925 * Makefile.in (OBS): Add tracepoint.o.
10926 (tracepoint.o): New rule.
10927
10928 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10929
10930 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10931 (i386-mmx.o): New.
10932 (i386-mmx.c): Likewise.
10933 (i386-mmx-linux.o): Likewise.
10934 (i386-mmx-linux.c): Likewise.
10935
10936 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10937 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10938 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10939 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10940
10941 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10942 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10943 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10944
10945 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10946
10947 * Makefile.in (clean): Updated.
10948 (i386-avx.o): New.
10949 (i386-avx.c): Likewise.
10950 (i386-avx-linux.o): Likewise.
10951 (i386-avx-linux.c): Likewise.
10952 (amd64-avx.o): Likewise.
10953 (amd64-avx.c): Likewise.
10954 (amd64-avx-linux.o): Likewise.
10955 (amd64-avx-linux.c): Likewise.
10956
10957 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10958 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10959 (srv_amd64_regobj): Add amd64-avx.o.
10960 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10961 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10962 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10963 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10964 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10965 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10966 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10967
10968 * i387-fp.c: Include "i386-xstate.h".
10969 (i387_xsave): New.
10970 (i387_cache_to_xsave): Likewise.
10971 (i387_xsave_to_cache): Likewise.
10972 (x86_xcr0): Likewise.
10973
10974 * i387-fp.h (i387_cache_to_xsave): Likewise.
10975 (i387_xsave_to_cache): Likewise.
10976 (x86_xcr0): Likewise.
10977
10978 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10979 * linux-crisv32-low.c (target_regsets): Likewise.
10980 * linux-m68k-low.c (target_regsets): Likewise.
10981 * linux-mips-low.c (target_regsets): Likewise.
10982 * linux-ppc-low.c (target_regsets): Likewise.
10983 * linux-s390-low.c (target_regsets): Likewise.
10984 * linux-sh-low.c (target_regsets): Likewise.
10985 * linux-sparc-low.c (target_regsets): Likewise.
10986 * linux-xtensa-low.c (target_regsets): Likewise.
10987
10988 * linux-low.c: Include <sys/uio.h>.
10989 (regsets_fetch_inferior_registers): Support nt_type.
10990 (regsets_store_inferior_registers): Likewise.
10991 (linux_process_qsupported): New.
10992 (linux_target_ops): Add linux_process_qsupported.
10993
10994 * linux-low.h (regset_info): Add nt_type.
10995 (linux_target_ops): Add process_qsupported.
10996
10997 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10998 and <sys/uio.h>.
10999 (init_registers_i386_avx_linux): New.
11000 (init_registers_amd64_avx_linux): Likewise.
11001 (xmltarget_i386_linux_no_xml): Likewise.
11002 (xmltarget_amd64_linux_no_xml): Likewise.
11003 (PTRACE_GETREGSET): Likewise.
11004 (PTRACE_SETREGSET): Likewise.
11005 (x86_fill_xstateregset): Likewise.
11006 (x86_store_xstateregset): Likewise.
11007 (use_xml): Likewise.
11008 (x86_linux_update_xmltarget): Likewise.
11009 (x86_linux_process_qsupported): Likewise.
11010 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11011 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11012 init_registers_i386_linux here. Call
11013 x86_linux_update_xmltarget.
11014 (the_low_target): Add x86_linux_process_qsupported.
11015
11016 * server.c (handle_query): Call target_process_qsupported.
11017
11018 * target.h (target_ops): Add process_qsupported.
11019 (target_process_qsupported): New.
11020
11021 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11022
11023 * inferiors.c (add_thread): Set last_status kind to
11024 TARGET_WAITKIND_IGNORE.
11025 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11026 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11027 (linux_wait_1): Move `thread' local definition to block that uses
11028 it. Don't NULL initialize `event_child'.
11029 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11030 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11031 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11032
11033 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11034
11035 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11036 an extended waitstatus, or by a watchpoint.
11037 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11038 thread was stepping or has been stopped by a watchpoint.
11039
11040 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11041
11042 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11043 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11044 of another, then delete the previous, and validate all
11045 breakpoints.
11046 (validate_inserted_breakpoint): New.
11047 (delete_disabled_breakpoints): New.
11048 (validate_breakpoints): New.
11049 (check_mem_read): Validate breakpoints before trusting their
11050 shadow. Delete disabled breakpoints.
11051 (check_mem_write): Validate breakpoints before trusting they
11052 should be inserted. Delete disabled breakpoints.
11053 * mem-break.h (validate_breakpoints):
11054 * server.c (handle_query): Validate breakpoints when we see a
11055 qSymbol query.
11056
11057 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11058
11059 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11060 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11061 if we could tell there's a GDB breakpoint at stop_pc.
11062 (need_step_over_p): Don't do a step over if we find a GDB
11063 breakpoint at the resume PC.
11064
11065 * mem-break.c (struct raw_breakpoint): New.
11066 (enum bkpt_type): New type `gdb_breakpoint'.
11067 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11068 fields. New field `raw'.
11069 (find_raw_breakpoint_at): New.
11070 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11071 breakpoint instead.
11072 (set_breakpoint_at): Adjust.
11073 (delete_raw_breakpoint): New.
11074 (release_breakpoint): New.
11075 (delete_breakpoint): Rename to...
11076 (delete_breakpoint_1): ... this. Add proc parameter. Use
11077 release_breakpoint. Return ENOENT.
11078 (delete_breakpoint): Reimplement.
11079 (find_breakpoint_at): Delete.
11080 (find_gdb_breakpoint_at): New.
11081 (delete_breakpoint_at): Delete.
11082 (set_gdb_breakpoint_at): New.
11083 (delete_gdb_breakpoint_at): New.
11084 (gdb_breakpoint_here): New.
11085 (set_reinsert_breakpoint): Use release_breakpoint.
11086 (uninsert_breakpoint): Rename to ...
11087 (uninsert_raw_breakpoint): ... this.
11088 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11089 (reinsert_raw_breakpoint): Change parameter type to
11090 raw_breakpoint.
11091 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11092 instead.
11093 (check_breakpoints): Adjust. Use release_breakpoint.
11094 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11095 (breakpoint_inserted_here): Ditto.
11096 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11097 Don't trust the breakpoint's shadow if it is not inserted.
11098 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11099 (delete_all_breakpoints): Adjust.
11100 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11101 use delete_breakpoint_1.
11102
11103 * mem-break.h (breakpoints_supported): Delete declaration.
11104 (set_gdb_breakpoint_at): Declare.
11105 (gdb_breakpoint_here): Declare.
11106 (delete_breakpoint_at): Delete.
11107 (delete_gdb_breakpoint_at): Declare.
11108
11109 * server.h (struct raw_breakpoint): Forward declare.
11110 (struct process_info): New field `raw_breakpoints'.
11111
11112 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11113 breakpoints.
11114
11115 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11116
11117 * linux-low.c (status_pending_p_callback): Fix comment.
11118 (linux_wait_for_event_1): Move most of the internal breakpoint
11119 handling from here...
11120 (linux_wait_1): ... to here.
11121 (count_events_callback): New.
11122 (select_singlestep_lwp_callback): New.
11123 (select_event_lwp_callback): New.
11124 (cancel_breakpoints_callback): New.
11125 (select_event_lwp): New.
11126 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11127 priority to all LWPs that have had events that should be reported
11128 to the client. Cancel breakpoints when about to reporting the
11129 event to the client, not while stopping lwps. No longer cancel
11130 finished single-steps here.
11131 (cancel_finished_single_step): Delete.
11132 (cancel_finished_single_steps): Delete.
11133
11134 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11135
11136 * mem-break.c (enum bkpt_type): New.
11137 (struct breakpoint): New field `type'.
11138 (set_breakpoint_at): Change return type to struct breakpoint
11139 pointer. Set type to `other_breakpoint' by default.
11140 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11141 in the breakpoint list.
11142 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11143 (reinsert_breakpoint): Rename to ...
11144 (reinsert_raw_breakpoint): ... this.
11145 (reinsert_breakpoints_at): Adjust.
11146 * mem-break.h (struct breakpoint): Declare.
11147 (set_breakpoint_at): Change return type to struct breakpoint
11148 pointer.
11149
11150 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11151
11152 * server.c (handle_query): Assign, not compare.
11153
11154 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11155
11156 Teach linux gdbserver to step-over-breakpoints.
11157
11158 * linux-low.c (can_hardware_single_step): New.
11159 (supports_breakpoints): New.
11160 (handle_extended_wait): If stopping threads, read the stop pc of
11161 the new cloned LWP.
11162 (get_pc): New.
11163 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11164 low target doesn't support retrieving the PC.
11165 (add_lwp): Set last_resume_kind to resume_continue.
11166 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11167 (linux_attach): Don't clear stop_expected. Set the lwp's
11168 last_resume_kind to resume_stop.
11169 (linux_detach_one_lwp): Don't check for removed breakpoints.
11170 (check_removed_breakpoint): Delete.
11171 (status_pending_p): Rename to ...
11172 (status_pending_p_callback): ... this. Don't check for removed
11173 breakpoints. Don't consider threads that are stopped from GDB's
11174 perspective.
11175 (linux_wait_for_lwp): Always read the stop_pc here.
11176 (cancel_breakpoint): New.
11177 (step_over_bkpt): New global.
11178 (linux_wait_for_event_1): Implement stepping over breakpoints.
11179 (gdb_wants_lwp_stopped): New.
11180 (gdb_wants_all_stopped): New.
11181 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11182 single-step traps here. Store the thread's last reported target
11183 wait status.
11184 (send_sigstop): Don't clear stop_expected. Always set it,
11185 instead.
11186 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11187 (cancel_finished_single_step): New.
11188 (cancel_finished_single_steps): New.
11189 (wait_for_sigstop): Don't cancel finished single-step traps here.
11190 (linux_resume_one_lwp): Don't check for removed breakpoints.
11191 Don't set `step' on non-hardware step archs.
11192 (linux_set_resume_request): Ignore resume_stop requests if already
11193 stopping or stopped. Set the lwp's last_resume_kind.
11194 (resume_status_pending_p): Don't check for removed breakpoints.
11195 (need_step_over_p): New.
11196 (start_step_over): New.
11197 (finish_step_over): New.
11198 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11199 requests. Clear the thread's last reported target waitstatus.
11200 Don't use the `suspended' flag. Don't consider pending breakpoints.
11201 (linux_resume): Start a step-over if necessary.
11202 (proceed_one_lwp): New.
11203 (proceed_all_lwps): New.
11204 (unstop_all_lwps): New.
11205 * linux-low.h (struct lwp_info): Rewrite comment for the
11206 `suspended' flag. Add the `stop_pc' field. Delete the
11207 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11208 Add `'last_resume_kind' and `need_step_over' fields.
11209 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11210 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11211 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11212 (set_raw_breakpoint_at): New.
11213 (set_breakpoint_at): Rewrite to use it.
11214 (reinsert_breakpoint_handler): Delete.
11215 (set_reinsert_breakpoint): New.
11216 (reinsert_breakpoint_by_bp): Delete.
11217 (delete_reinsert_breakpoints): New.
11218 (uninsert_breakpoint): Rewrite.
11219 (uninsert_breakpoints_at): New.
11220 (reinsert_breakpoint): Rewrite.
11221 (reinsert_breakpoints_at): New.
11222 (check_breakpoints): Rewrite.
11223 (breakpoint_here): New.
11224 (breakpoint_inserted_here): New.
11225 (check_mem_read): Adjust.
11226 * mem-break.h (breakpoints_supported, breakpoint_here)
11227 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11228 (reinsert_breakpoint_by_bp): Delete declaration.
11229 (delete_reinsert_breakpoints): Declare.
11230 (reinsert_breakpoint): Delete declaration.
11231 (reinsert_breakpoints_at): Declare.
11232 (uninsert_breakpoint): Delete declaration.
11233 (uninsert_breakpoints_at): Declare.
11234 (check_breakpoints): Adjust prototype.
11235 * server.h: Adjust include order.
11236 (struct thread_info): Declare here. Add a `last_status' field.
11237
11238 2010-03-23 Michael Snyder <msnyder@vmware.com>
11239
11240 * server.c (crc32): New function.
11241 (handle_query): Add handling for 'qCRC:' request.
11242
11243 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11244
11245 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11246 lwp had been stopped by a watchpoint.
11247
11248 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11249
11250 * server.h (internal_error): Declare.
11251 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11252 * utils.c (internal_error): New function.
11253
11254 2010-03-15 Andreas Schwab <schwab@redhat.com>
11255
11256 * configure.srv: Fix typo setting srv_regobj.
11257
11258 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11259
11260 * linux-low.c (fetch_register): Avoid passing a non string literal
11261 format to `error'.
11262 (usr_store_inferior_registers): Ditto.
11263
11264 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11265
11266 * linux-low.c (linux_write_memory): Bail out early if peeking
11267 memory failed.
11268
11269 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11270
11271 * linux-low.h (struct lwp_info): New fields
11272 `stopped_by_watchpoint' and `stopped_data_address'.
11273 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11274 here, and cache them in the lwp object.
11275 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11276 directly.
11277 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11278 field.
11279 (linux_stopped_by_watchpoint): Rewrite.
11280 (linux_stopped_data_address): Rewrite.
11281
11282 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11283
11284 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11285 switching the current inferior, not before.
11286
11287 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11288
11289 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11290 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11291 i386-linux.c and amd64-linux.c.
11292 (reg-i386.o): Removed.
11293 (reg-i386.c): Likewise.
11294 (reg-i386-linux.o): Likewise.
11295 (reg-i386-linux.c): Likewise.
11296 (reg-x86-64.o): Likewise.
11297 (reg-x86-64.c): Likewise.
11298 (reg-x86-64-linux.o): Likewise.
11299 (reg-x86-64-linux.c): Likewise.
11300 (i386.o): New.
11301 (i386.c): Likewise.
11302 (i386-linux.o): Likewise.
11303 (i386-linux.c): Likewise.
11304 (amd64.o): Likewise.
11305 (amd64.c): Likewise.
11306 (amd64-linux.o): Likewise.
11307 (amd64-linux.c): Likewise.
11308
11309 * configure.srv (srv_i386_regobj): New.
11310 (srv_i386_linux_regobj): Likewise.
11311 (srv_amd64_regobj): Likewise.
11312 (srv_amd64_linux_regobj): Likewise.
11313 (srv_i386_32bit_xmlfiles): Likewise.
11314 (srv_i386_64bit_xmlfiles): Likewise.
11315 (srv_i386_xmlfiles): Likewise.
11316 (srv_amd64_xmlfiles): Likewise.
11317 (srv_i386_linux_xmlfiles): Likewise.
11318 (srv_amd64_linux_xmlfiles): Likewise.
11319 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11320 srv_xmlfiles to $srv_i386_xmlfiles.
11321 (i[34567]86-*-mingw32ce*): Likewise.
11322 (i[34567]86-*-mingw*): Likewise.
11323 (i[34567]86-*-nto*): Likewise.
11324 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11325 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11326 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11327 (x86_64-*-linux*): Likewise.
11328
11329 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11330 (init_registers_amd64_linux): New.
11331 (x86_arch_setup): Replace init_registers_x86_64_linux with
11332 init_registers_amd64_linux.
11333
11334 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11335
11336 * configure.ac: Check for libdl. If it is not available link against
11337 static libthread_db.
11338 * configure: Regenerate.
11339
11340 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11341
11342 PR9605
11343
11344 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11345 handing a read watchpoint.
11346 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11347
11348 2010-02-12 Doug Evans <dje@google.com>
11349
11350 * linux-low.c (linux_supports_tracefork_flag): Document.
11351 (linux_look_up_symbols): Add comment.
11352
11353 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11354
11355 * regcache.c (supply_register): Clear regcache if buf is NULL.
11356
11357 2010-02-02 Nicolas Roche <roche@sourceware.org>
11358 Joel Brobecker <brobecker@adacore.com>
11359
11360 * inferiors.c (find_inferior): Add function documentation.
11361 (unloaded_dll): Handle the case where the unloaded dll has not
11362 been previously registered in the dll list.
11363
11364 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11365
11366 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11367 (thumb2_breakpoint): New.
11368 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11369
11370 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11373 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11374 breakpoints.
11375
11376 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11377
11378 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11379
11380 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11381
11382 * linux-s390-low.c (s390_collect_ptrace_register)
11383 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11384
11385 2010-01-21 Doug Evans <dje@google.com>
11386
11387 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11388 (PTRACE_ARG4_TYPE): New macro.
11389 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11390 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11391 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11392 (usr_store_inferior_registers): Ditto.
11393 (linux_read_memory, linux_write_memory): Ditto.
11394 (linux_test_for_tracefork): Ditto.
11395
11396 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11397 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11398
11399 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11400
11401 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11402 target.
11403
11404 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11405
11406 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11407 prototype to take a regcache. Adjust.
11408
11409 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11410
11411 * regcache.h (struct thread_info): Forward declare.
11412 (struct regcache): New.
11413 (new_register_cache): Adjust prototype.
11414 (get_thread_regcache): Declare.
11415 (free_register_cache): Adjust prototype.
11416 (registers_to_string, registers_from_string): Ditto.
11417 (supply_register, supply_register_by_name, collect_register)
11418 (collect_register_as_string, collect_register_by_name): Ditto.
11419 * regcache.c (struct inferior_regcache_data): Delete.
11420 (get_regcache): Rename to ...
11421 (get_thread_regcache): ... this. Adjust. Switch inferior before
11422 fetching registers.
11423 (regcache_invalidate_one): Adjust.
11424 (regcache_invalidate): Fix prototype.
11425 (new_register_cache): Return the new register cache.
11426 (free_register_cache): Change prototype.
11427 (realloc_register_cache): Adjust.
11428 (registers_to_string): Change prototype to take a regcache. Adjust.
11429 (registers_from_string): Ditto.
11430 (register_data): Ditto.
11431 (supply_register): Ditto.
11432 (supply_register_by_name): Ditto.
11433 (collect_register): Ditto.
11434 (collect_register_as_string): Ditto.
11435 (collect_register_by_name): Ditto.
11436 * server.c (process_serial_event): Adjust.
11437 * linux-low.h (regset_fill_func, regset_store_func): Change
11438 prototype.
11439 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11440 Change prototype.
11441 * linux-low.c (get_stop_pc): Adjust.
11442 (check_removed_breakpoint): Adjust.
11443 (linux_wait_for_event): Adjust.
11444 (linux_resume_one_lwp): Adjust.
11445 (fetch_register): Add regcache parameter. Adjust.
11446 (usr_store_inferior_registers): Ditto.
11447 (regsets_fetch_inferior_registers): Ditto.
11448 (regsets_store_inferior_registers): Ditto.
11449 (linux_fetch_registers, linux_store_registers): Ditto.
11450 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11451 regcache. Adjust.
11452 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11453 Ditto.
11454 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11455 prototype to take a regcache.
11456 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11457 * remote-utils.c (convert_ascii_to_int, outreg)
11458 (prepare_resume_reply): Change prototype to take a regcache.
11459 Adjust.
11460 * target.h (struct target_ops) <fetch_registers, store_registers>:
11461 Change prototype to take a regcache.
11462 (fetch_inferior_registers, store_inferior_registers): Change
11463 prototype to take a regcache. Adjust.
11464 * proc-service.c (ps_lgetregs): Adjust.
11465 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11466 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11467 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11468 take a regcache. Adjust.
11469 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11470 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11471 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11472 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11473 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11474 (cris_cannot_fetch_register):
11475 (cris_breakpoint_at): Change prototype to take a regcache.
11476 Adjust.
11477 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11478 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11479 to take a regcache. Adjust.
11480 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11481 Adjust.
11482 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11483 take a regcache. Adjust.
11484 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11485 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11486 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11487 * linux-mips-low.c (mips_get_pc):
11488 (mips_set_pc): Change prototype to take a regcache. Adjust.
11489 (mips_reinsert_addr): Adjust.
11490 (mips_collect_register): Change prototype to take a regcache.
11491 Adjust.
11492 (mips_supply_register):
11493 (mips_collect_register_32bit, mips_supply_register_32bit)
11494 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11495 (mips_store_fpregset): Ditto.
11496 * linux-ppc-low.c (ppc_supply_ptrace_register)
11497 (ppc_supply_ptrace_register): Ditto.
11498 (parse_spufs_run): Adjust.
11499 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11500 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11501 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11502 take a regcache. Adjust.
11503 * linux-s390-low.c (s390_collect_ptrace_register)
11504 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11505 (s390_set_pc): Change prototype to take a regcache. Adjust.
11506 (s390_arch_setup): Adjust.
11507 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11508 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11509 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11510 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11511 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11512 regcache. Adjust.
11513 (sparc_breakpoint_at): Adjust.
11514 * linux-xtensa-low.c (xtensa_fill_gregset):
11515 (xtensa_store_gregset):
11516 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11517 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11518 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11519 prototype to take a regcache. Adjust.
11520 * win32-arm-low.c (arm_fetch_inferior_register)
11521 (arm_store_inferior_register): Change prototype to take a
11522 regcache. Adjust.
11523 * win32-i386-low.c (i386_fetch_inferior_register)
11524 (i386_store_inferior_register): Change prototype to take a
11525 regcache. Adjust.
11526 * win32-low.c (child_fetch_inferior_registers)
11527 (child_store_inferior_registers): Change prototype to take a
11528 regcache. Adjust.
11529 (win32_wait): Adjust.
11530 (win32_fetch_inferior_registers): Change prototype to take a
11531 regcache. Adjust.
11532 (win32_store_inferior_registers): Adjust.
11533 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11534 store_inferior_register>: Change prototype to take a regcache.
11535
11536 2010-01-20 Doug Evans <dje@google.com>
11537
11538 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11539 #ifdef.
11540 (linux_wait_for_event1, linux_init_signals): Ditto.
11541 (W_STOPCODE): Provide definition if missing.
11542
11543 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11544
11545 * linux-low.c (linux_core_of_thread): New.
11546 (compare_ints, show_process, list_threads): New.
11547 (linux_qxfer_osdata): Report threads and cores.
11548 (linux_target_op): Register linux_core_of_thread.
11549 * remote-utils.c (prepare_resume_reply): Report the core.
11550 (buffer_xml_printf): Support %d specifier.
11551 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11552 New.
11553 (handle_query): Handle qXfer:threads. Announce availability
11554 thereof.
11555 * target.h (struct target_ops): New field core_of_thread.
11556
11557 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11558
11559 * Makefile.in (clean): Remove new generated files.
11560 (reg-s390.o, reg-s390.c): Remove rules.
11561 (reg-s390x.o, reg-s390x.c): Likewise.
11562 (s390-linux32.o, s390-linux32.c): Add rules.
11563 (s390-linux64.o, s390-linux64.c): Likewise.
11564 (s390x-linux64.o, s390x-linux64.c): Likewise.
11565 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11566 * linux-s390-low.c: Include <elf.h>.
11567 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11568 (init_registers_s390): Remove prototype.
11569 (init_registers_s390x): Likewise.
11570 (init_registers_s390_linux32): Add prototype.
11571 (init_registers_s390_linux64): Likewise.
11572 (init_registers_s390x_linux64): Likewise.
11573 (s390_num_regs_3264): New define.
11574 (s390_regmap_3264): New global variable.
11575 (s390_cannot_fetch_register): Remove obsolete check.
11576 (s390_cannot_store_register): Likewise.
11577 (s390_collect_ptrace_register): Handle upper/lower register halves.
11578 (s390_supply_ptrace_register): Likewise.
11579 (s390_fill_gregset): Update to register number changes.
11580 (s390_get_hwcap): New routine.
11581 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11582 Install appropriate regmap and register set.
11583
11584 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11585
11586 * server.c (gdbserver_version): Update copyright year to 2010.
11587 * gdbreplay.c (gdbreplay_version): Likewise.
11588
11589 2009-12-28 Doug Evans <dje@google.com>
11590
11591 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11592 elf/external.h. Include <elf.h> instead but only if necessary.
11593
11594 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11595
11596 * linux-low.c (linux_remove_process): Remove `detaching'
11597 parameter. Don't release/detach from thread_db here.
11598 (linux_kill): Release/detach from thread_db here, ...
11599 (linux_detach): ... and here, before actually detaching.
11600 (linux_wait_1): ... and here, when a process exits.
11601 * thread-db.c (any_thread_of): New.
11602 (thread_db_free): Switch the current inferior to a thread of the
11603 passed in process.
11604
11605 2009-12-21 Doug Evans <dje@google.com>
11606
11607 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11608
11609 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11610 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11611 warning ifndef __NR_tkill. Move setting of errno there too.
11612 Delete unnecessary resetting of errno after syscall.
11613 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11614
11615 * configure.ac: Check for dladdr.
11616 * config.in: Regenerate.
11617 * configure: Regenerate.
11618 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11619 (try_thread_db_load): Update.
11620
11621 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11622
11623 2009-12-18 Doug Evans <dje@google.com>
11624
11625 * event-loop.c: Include unistd.h if it exists.
11626
11627 * linux-low.c (my_waitpid): Move definition away from being in
11628 between linux_tracefork_child/linux_test_for_tracefork.
11629
11630 * gdb_proc_service.h (psaddr_t): Fix type.
11631 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11632 signature to match glibc.
11633
11634 2009-12-16 Doug Evans <dje@google.com>
11635
11636 * linux-low.c (linux_read_memory): Fix argument to read.
11637
11638 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11639
11640 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11641 events, don't leave current_inferior pointing at null.
11642
11643 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11644
11645 * win32-low.c (LOG): Delete.
11646 (OUTMSG): Output to stderr.
11647 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11648 on compile time LOG macro.
11649 (win32_wait): Fix debug output.
11650
11651 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11652
11653 * win32-low.c (win32_add_one_solib): If the dll name is
11654 "ntdll.dll", prepend the system directory to the dll path.
11655
11656 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11657
11658 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11659
11660 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11661 Vladimir Prus <vladimir@codesourcery.com>
11662
11663 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11664 * configure.ac: Check for __mcoldfire__ and set
11665 gdb_cv_m68k_is_coldfire.
11666 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11667 reg-cf.o and reg-m68k.o.
11668 * configure: Regenerated.
11669
11670 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11671
11672 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11673 Pass it to thread_db_free.
11674 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11675 proper `detaching' argument to linux_remove_process.
11676 * linux-low.h (thread_db_free): Add `detaching' parameter.
11677 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11678 to thread_db_free.
11679 (thread_db_free): Add `detaching' parameter. Only
11680 call td_ta_clear_event if detaching from process.
11681
11682 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11683
11684 * thread-db.c (thread_db_free): Fix typo.
11685
11686 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11687
11688 PR gdb/10838
11689 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11690
11691 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11692
11693 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11694 with an i686 compiler.
11695 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11696 needed.
11697 * configure: Rebuilt.
11698
11699 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11700
11701 PR gdb/10783
11702
11703 * server.c (handle_search_memory_1): Correct read_addr initialization
11704 in loop for searching subsequent chunks.
11705
11706 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11707
11708 * configure.ac: New --with-libthread-db option.
11709 * thread-db.c: Allow direct dependence on libthread_db.
11710 (thread_db_free): Adjust.
11711 * config.in: Regenerate.
11712 * configure: Likewise.
11713
11714 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11715
11716 PR gdb/10757
11717 * thread-db.c (attach_thread): New function.
11718 (maybe_attach_thread): Return success/failure.
11719 (find_new_threads_callback): Adjust.
11720 (thread_db_find_new_threads): Loop until no new threads.
11721
11722 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11723
11724 * proc-service.c (ps_lgetregs): Formatting.
11725
11726 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11727
11728 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11729 * configure.ac: Adjust.
11730 * linux-low.h (struct process_info_private): Move members to struct
11731 thread_db.
11732 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11733 * linux-low.c (linux_remove_process): Adjust.
11734 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11735 * server.c (handle_query): Move code ...
11736 (handle_monitor_command): ... here. New function.
11737 * target.h (struct target_ops): New member.
11738 * thread-db.c (struct thread_db): New.
11739 (libthread_db_search_path): New variable.
11740 (thread_db_create_event, thread_db_enable_reporting)
11741 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11742 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11743 (try_thread_db_load_1, dladdr_to_soname): New functions.
11744 (try_thread_db_load, thread_db_load_search): New functions.
11745 (thread_db_init): Search for libthread_db.
11746 (thread_db_free): New function.
11747 (thread_db_handle_monitor_command): Likewise.
11748 * config.in: Regenerate.
11749 * configure: Regenerate.
11750
11751 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11752
11753 * spu-low.c (spu_kill): Wait for inferior to terminate.
11754 Call clear_inferiors.
11755 (spu_detach): Call clear_inferiors.
11756
11757 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11758
11759 * aclocal.m4: Regenerate.
11760 * config.in: Likewise.
11761 * configure: Likewise.
11762
11763 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11764
11765 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11766 (parse_spufs_run): New function.
11767 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11768 (ppc_breakpoint_at): Handle SPU breakpoints.
11769
11770 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11771
11772 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11773 (SPUFS_MAGIC): Define.
11774 (spu_enumerate_spu_ids): New function.
11775 (linux_qxfer_spu): New function.
11776 (linux_target_ops): Install linux_qxfer_spu.
11777
11778 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11779
11780 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11781 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11782 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11783 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11784 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11785 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11786 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11787 (init_registers_powerpc_cell32l): Add prototype.
11788 (init_registers_powerpc_cell64l): Likewise.
11789 (ppc_arch_setup): Detect Cell/B.E. architecture.
11790
11791 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11792
11793 * Makefile.in (datarootdir): New variable.
11794
11795 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11796
11797 * linux-low.c (linux_write_memory): Update debugging output.
11798 * Makefile.in (clean): Add new descriptions.
11799 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11800 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11801 * configure.srv: Add new files for arm*-*-linux*.
11802 * linux-arm-low.c: Add new declarations.
11803 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11804 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11805 (HWCAP_VFPv3D16): New.
11806 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11807 instead of __IWMMXT__.
11808 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11809 (arm_arch_setup): New.
11810 (target_regsets): Remove #ifdef. Add VFP regset.
11811 (the_low_target): Use arm_arch_setup.
11812
11813 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11814
11815 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11816 the main thread again.
11817
11818 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11819
11820 Adding Neutrino gdbserver.
11821 * configure: Regenerated.
11822 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11823 * configure.srv (i[34567]86-*-nto*): New target.
11824 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11825 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11826 (nto_comctrl) [__QNX__]: New function.
11827 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11828
11829 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11830
11831 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11832 srv_tgtobj.
11833
11834 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11835 Pedro Alves <pedro@codesourcery.com>
11836
11837 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11838 don't support CONTEXT_EXTENDED_REGISTERS.
11839 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11840 (the_low_target): Install them.
11841 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11842 failing with ERROR_PIPE_NOT_CONNECTED.
11843
11844 2009-06-30 Doug Evans <dje@google.com>
11845 Pierre Muller <muller@ics.u-strasbg.fr>
11846
11847 Add h/w watchpoint support to x86-linux, win32-i386.
11848 * Makefile.in (SFILES): Add i386-low.c
11849 (i386_low_h): Define.
11850 (i386-low.o): Add dependencies.
11851 (linux-x86-low.o): Add i386-low.h dependency.
11852 (win32-i386-low.o): Ditto.
11853 * i386-low.c: New file.
11854 * i386-low.h: New file.
11855 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11856 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11857 * linux-low.c (linux_add_process): Initialize arch_private.
11858 (linux_remove_process): Free arch_private.
11859 (add_lwp): Initialize arch_private.
11860 (delete_lwp): Free arch_private.
11861 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11862 provided.
11863 * linux-low.h (process_info_private): New member arch_private.
11864 (lwp_info): New member arch_private.
11865 (linux_target_ops): New members new_process, new_thread,
11866 prepare_to_resume.
11867 (ptid_of): New macro.
11868 * linux-x86-low.c: Include stddef.h, i386-low.h.
11869 (arch_process_info): New struct.
11870 (arch_lwp_info): New struct.
11871 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11872 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11873 (i386_dr_low_get_status): New function.
11874 (x86_insert_point, x86_remove_point): New functions.
11875 (x86_stopped_by_watchpoint): New function.
11876 (x86_stopped_data_address): New function.
11877 (x86_linux_new_process, x86_linux_new_thread): New functions.
11878 (x86_linux_prepare_to_resume): New function.
11879 (the_low_target): Add entries for insert_point, remove_point,
11880 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11881 prepare_to_resume.
11882 * server.c (debug_hw_points): New global.
11883 (monitor_show_help): Document set debug-hw-points.
11884 (handle_query): Process "set debug-hw-points".
11885 * server.h (debug_hw_points): Declare.
11886 (paddress): Declare.
11887 * utils.c (NUMCELLS, CELLSIZE): New macros.
11888 (get_sell, xsnprintf, paddress): New functions.
11889 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11890 remove_point, stopped_by_watchpoint, stopped_data_address.
11891 * win32-i386-low.c: Include i386-low.h.
11892 (debug_reg_state): Replaces dr.
11893 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11894 (i386_dr_low_get_status): New function.
11895 (i386_insert_point, i386_remove_point): New functions.
11896 (i386_stopped_by_watchpoint): New function.
11897 (i386_stopped_data_address): New function.
11898 (i386_initial_stuff): Update.
11899 (get_thread_context,set_thread_context,i386_thread_added): Update.
11900 (the_low_target): Add entries for insert_point,
11901 remove_point, stopped_by_watchpoint, stopped_data_address.
11902 * win32-low.c (win32_insert_watchpoint): New function.
11903 (win32_remove_watchpoint): New function.
11904 (win32_stopped_by_watchpoint): New function.
11905 (win32_stopped_data_address): New function.
11906 (win32_target_ops): Add entries for insert_watchpoint,
11907 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11908 * win32-low.h (win32_target_ops): New members insert_point,
11909 remove_point, stopped_by_watchpoint, stopped_data_address.
11910
11911 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11912
11913 * server.c (process_serial_event): Re-return unsupported, not
11914 error, if the type isn't recognized. Re-allow supporting only
11915 insert or remove packets. Also call require_running for
11916 breakpoints. Add missing break statement to default case. Tidy.
11917 * target.h (struct target_ops): Rename insert_watchpoint to
11918 insert_point, and remove_watchpoint to remove_point.
11919
11920 * linux-low.h (struct linux_target_ops): Likewise.
11921 * linux-low.c (linux_insert_watchpoint): Rename to ...
11922 (linux_insert_point): ... this. Adjust.
11923 (linux_remove_watchpoint): Rename to ...
11924 (linux_remove_point): ... this. Adjust.
11925 (linux_target_ops): Adjust.
11926 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11927 (cris_insert_point): ... this.
11928 (cris_remove_watchpoint): Rename to ...
11929 (cris_remove_point): ... this.
11930 (the_low_target): Adjust.
11931
11932 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11933
11934 * server.c (handle_v_kill): Pass signal_pid to
11935 kill_inferior if multi_process is zero.
11936
11937 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11938
11939 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11940 * target.h (target_ops): Comment for *_watchpoint to make it clear
11941 the functions can get types '0' and '1'.
11942
11943 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11944
11945 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11946 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11947 * regcache.c (get_regcache): Likewise.
11948 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11949 * win32-low.c (child_fetch_inferior_registers): Remove check for
11950 regno 0.
11951
11952 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11953 Pedro Alves <pedro@codesourcery.com>
11954
11955 * target.h (struct target_ops) <supports_multi_process>: New
11956 callback.
11957 (target_supports_multi_process): New.
11958 * server.c (handle_query): Even if GDB reports support, only
11959 enable multi-process if the target also supports it. Report
11960 multi-process support only if the target backend supports it.
11961 * linux-low.c (linux_supports_multi_process): New function.
11962 (linux_target_ops): Install it as target_supports_multi_process
11963 callback.
11964
11965 2009-05-24 Doug Evans <dje@google.com>
11966
11967 Global renaming of find_thread_pid to find_thread_ptid.
11968 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11969 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11970 All callers updated.
11971
11972 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11973 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11974 directly.
11975
11976 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11977 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11978 (linux_resume_one_lwp): Ditto.
11979
11980 2009-05-23 Doug Evans <dje@google.com>
11981
11982 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11983 from struct inferior_list_entry * to struct lwp_info *.
11984 All callers updated.
11985
11986 2009-05-13 Doug Evans <dje@google.com>
11987
11988 * linux-x86-low.c: Don't include assert.h.
11989 (x86_siginfo_fixup): Use fatal, not assert.
11990 (x86_arch_setup): Fix comment.
11991
11992 2009-05-12 Doug Evans <dje@google.com>
11993
11994 Biarch support for i386/amd64 gdbserver.
11995 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11996 Add linux-x86-low.c.
11997 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11998 (linux-x86-low.o): Add.
11999 * linux-x86-64-low.c: Delete.
12000 * linux-i386-low.c: Delete.
12001 * linux-x86-low.c: New file.
12002 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12003 linux-x86-low.o.
12004 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12005 linux-x86-low.o.
12006 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12007 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12008 (linux_child_pid_to_exec_file): New function.
12009 (elf_64_header_p, elf_64_file_p): New functions.
12010 (siginfo_fixup): New function.
12011 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12012 give target a chance to convert layout.
12013 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12014 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12015
12016 2009-05-07 Doug Evans <dje@google.com>
12017
12018 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12019 (regsets_store_inferior_registers): Ditto.
12020
12021 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12022
12023 PR server/10048
12024
12025 * linux-low.c (must_set_ptrace_flags): Delete.
12026 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12027 of the global.
12028 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12029 `lwp->must_set_ptrace_flags' instead.
12030 (linux_wait_for_event_1): Set ptrace options here.
12031 (linux_wait_1): ... not here.
12032
12033 2009-04-30 Doug Evans <dje@google.com>
12034
12035 * inferiors.c (started_inferior_callback): New function.
12036 (attached_inferior_callback): New function.
12037 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12038 * server.c (print_started_pid, print_attached_pid): New functions.
12039 (detach_or_kill_for_exit): New function.
12040 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12041 * server.h (have_started_inferiors_p): Declare.
12042 (have_attached_inferiors_p): Declare.
12043
12044 * inferiors.c (remove_process): Fix memory leak, free process.
12045 * linux-low.c (linux_remove_process): New function.
12046 (linux_kill): Call it instead of remove_process.
12047 (linux_detach, linux_wait_1): Ditto.
12048
12049 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12050
12051 * configure.srv: Add x86 Windows CE target.
12052
12053 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12054
12055 * inferiors.c (get_thread_process): Make global.
12056 * server.h (get_thread_process): Add prototype.
12057 * thread-db.c (find_one_thread): Use get_thread_process
12058 instead of current_process.
12059 (thread_db_get_tls_address): Do not crash if called when
12060 thread layer is not yet initialized.
12061
12062 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12063
12064 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12065 * spu-low.c (current_tid): Rename to ...
12066 (current_ptid): ... this.
12067 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12068 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12069 ptid_get_lwp (current_ptid) instead of current_tid.
12070 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12071 instead of current_tid. Use find_process_pid to verify pid
12072 argument is valid. Pass proper argument to remove_process.
12073 (spu_thread_alive): Compare current_ptid instead of current_tid.
12074 (spu_resume): Likewise.
12075
12076 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12077
12078 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12079 variable.
12080
12081 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12082
12083 Implement the multiprocess extensions, and add linux multiprocess
12084 support.
12085
12086 * server.h (ULONGEST): Declare.
12087 (struct ptid, ptid_t): New.
12088 (minus_one_ptid, null_ptid): Declare.
12089 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12090 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12091 (struct inferior_list_entry): Change `id' type from unsigned from
12092 to ptid_t.
12093 (struct sym_cache, struct breakpoint, struct
12094 process_info_private): Forward declare.
12095 (struct process_info): Declare.
12096 (current_process): Declare.
12097 (all_processes): Declare.
12098 (initialize_inferiors): Declare.
12099 (add_thread): Adjust to use ptid_t.
12100 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12101 (add_process, remove_process, find_thread_pid): Declare.
12102 (find_inferior_id): Adjust to use ptid_t.
12103 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12104 (multi_process): Declare.
12105 (push_event): Adjust to use ptid_t.
12106 (read_ptid, write_ptid): Declare.
12107 (prepare_resume_reply): Adjust to use ptid_t.
12108 (clear_symbol_cache): Declare.
12109 * inferiors.c (all_processes): New.
12110 (null_ptid, minus_one_ptid): New.
12111 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12112 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12113 (add_thread): Change unsigned long to ptid. Remove gdb_id
12114 parameter. Adjust.
12115 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12116 (gdb_id_to_thread): Rename to ...
12117 (find_thread_pid): ... this. Change unsigned long to ptid.
12118 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12119 (loaded_dll, pull_pid_from_list): Adjust.
12120 (add_process, remove_process, find_process_pid)
12121 (get_thread_process, current_process, initialize_inferiors): New.
12122 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12123 (struct target_waitstatus) <related_pid>: Ditto.
12124 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12125 return type to int.
12126 (struct target_ops) <join>: Add `pid' argument.
12127 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12128 (struct target_ops) <wait>: Add `ptid' field. Change return type
12129 to ptid.
12130 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12131 (mywait): Add `ptid' argument. Change return type to ptid_t.
12132 (target_pid_to_str): Declare.
12133 * target.c (set_desired_inferior): Adjust to use ptids.
12134 (mywait): Add new `ptid' argument. Adjust.
12135 (target_pid_to_str): New.
12136 * mem-break.h (free_all_breakpoints): Declare.
12137 * mem-break.c (breakpoints): Delelete.
12138 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12139 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12140 to use per-process breakpoint list.
12141 (free_all_breakpoints): New.
12142 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12143 (symbol_cache, all_symbols_looked_up): Delete.
12144 (hexchars): New.
12145 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12146 read_ptid): New.
12147 (prepare_resume_reply): Change ptid argument's type from unsigned
12148 long to ptid_t. Adjust. Implement W;process and X;process.
12149 (free_sym_cache, clear_symbol_cache): New.
12150 (look_up_one_symbol): Adjust to per-process symbol cache. *
12151 * server.c (cont_thread, general_thread, step_thread): Change type
12152 to ptid_t.
12153 (attached): Delete.
12154 (multi_process): New.
12155 (last_ptid): Change type to ptid_t.
12156 (struct vstop_notif) <ptid>: Change type to ptid_t.
12157 (queue_stop_reply, push_event): Change `ptid' argument's type to
12158 ptid_t.
12159 (discard_queued_stop_replies): Add `pid' argument.
12160 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12161 changes. Don't reference the `attached' global.
12162 (attach_inferior): Adjust to mywait interface changes.
12163 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12164 features. Handle and report "multiprocess+". Handle
12165 "qAttached:PID".
12166 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12167 changes.
12168 (handle_v_kill): New.
12169 (handle_v_stopped): Adjust to use target_pid_to_str.
12170 (handle_v_requests): Allow multiple attaches and runs when
12171 multiprocess extensions are in effect. Handle "vKill".
12172 (myresume): Adjust to use ptids.
12173 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12174 (handle_status): Adjust to discard_queued_stop_replies interface
12175 change.
12176 (first_thread_of, kill_inferior_callback)
12177 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12178 (main): Call initialize_inferiors. Adjust to use ptids, killing
12179 and detaching from all inferiors. Handle multiprocess packet
12180 variants.
12181 * linux-low.h: Include gdb_proc_service.h.
12182 (struct process_info_private): New.
12183 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12184 <lwpid_of>: Use ptid_get_lwp.
12185 (get_lwp_thread): Adjust.
12186 (struct lwp_info): Add `dead' member.
12187 (find_lwp_pid): Declare.
12188 * linux-low.c (thread_db_active): Delete.
12189 (new_inferior): Adjust comment.
12190 (inferior_pid): Delete.
12191 (linux_add_process): New.
12192 (handle_extended_wait): Adjust.
12193 (add_lwp): Change unsigned long to ptid.
12194 (linux_create_inferior): Add process to processes table. Adjust
12195 to use ptids. Don't set new_inferior here.
12196 (linux_attach_lwp): Rename to ...
12197 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12198 it. Adjust to use ptids.
12199 (linux_attach_lwp): New.
12200 (linux_attach): Add process to processes table. Don't set
12201 new_inferior here.
12202 (struct counter): New.
12203 (second_thread_of_pid_p, last_thread_of_process_p): New.
12204 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12205 multiple processes.
12206 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12207 processes. Remove process from process table.
12208 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12209 to multiple processes.
12210 (any_thread_of): New.
12211 (linux_detach): Add `pid' argument, and handle it. Remove process
12212 from processes table.
12213 (linux_join): Add `pid' argument. Handle it.
12214 (linux_thread_alive): Change unsighed long argument to ptid_t.
12215 Consider dead lwps as not being alive.
12216 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12217 threads we're not interested in.
12218 (same_lwp, find_lwp_pid): New.
12219 (linux_wait_for_lwp): Change `pid' argument's type from int to
12220 ptid_t. Adjust.
12221 (linux_wait_for_event): Rename to ...
12222 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12223 from int to ptid_t. Adjust.
12224 (linux_wait_for_event): New.
12225 (linux_wait_1): Add `ptid' argument. Change return type to
12226 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12227 that exit from the process table.
12228 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12229 Adjust.
12230 (mark_lwp_dead): New.
12231 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12232 stopping all threads, mark its main lwp as dead.
12233 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12234 ptids.
12235 (fetch_register, usr_store_inferior_registers)
12236 (regsets_fetch_inferior_registers)
12237 (regsets_store_inferior_registers, linux_read_memory)
12238 (linux_write_memory): Inline `inferior_pid'.
12239 (linux_look_up_symbols): Adjust to use per-process
12240 `thread_db_active'.
12241 (linux_request_interrupt): Adjust to use ptids.
12242 (linux_read_auxv): Inline `inferior_pid'.
12243 (initialize_low): Don't reference thread_db_active.
12244 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12245 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12246 (ps_getpid): Return the pid of the current inferior.
12247 * thread-db.c (proc_handle, thread_agent): Delete.
12248 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12249 per-process data.
12250 (find_one_thread): Change argument type to ptid_t. Adjust to
12251 per-process data.
12252 (maybe_attach_thread): Adjust to per-process data and ptids.
12253 (thread_db_find_new_threads): Ditto.
12254 (thread_db_init): Ditto.
12255 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12256 processes table. Adjust to use ptids.
12257 (spu_kill, spu_detach): Adjust interface. Remove process from
12258 processes table.
12259 (spu_join, spu_thread_alive): Adjust interface.
12260 (spu_wait): Adjust interface. Remove process from processes
12261 table. Adjust to use ptids.
12262 * win32-low.c (current_inferior_tid): Delete.
12263 (current_inferior_ptid): New.
12264 (debug_event_ptid): New.
12265 (thread_rec): Take a ptid. Adjust.
12266 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12267 (child_delete_thread): Ditto.
12268 (do_initial_child_stuff): Add `attached' argument. Add process to
12269 processes table.
12270 (child_fetch_inferior_registers, child_store_inferior_registers):
12271 Adjust.
12272 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12273 (win32_attach): Pass 1 to do_initial_child_stuff.
12274 (win32_kill): Adjust interface. Remove process from processes
12275 table.
12276 (win32_detach): Ditto.
12277 (win32_join): Adjust interface.
12278 (win32_thread_alive): Take a ptid.
12279 (win32_resume): Adjust to use ptids.
12280 (get_child_debug_event): Ditto.
12281 (win32_wait): Adjust interface. Remove exiting process from
12282 processes table.
12283
12284 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12285
12286 Non-stop mode support.
12287
12288 * server.h (non_stop): Declare.
12289 (gdb_client_data, handler_func): Declare.
12290 (delete_file_handler, add_file_handler, start_event_loop):
12291 Declare.
12292 (handle_serial_event, handle_target_event, push_event)
12293 (putpkt_notif): Declare.
12294 * target.h (enum resume_kind): New.
12295 (struct thread_resume): Replace `step' field by `kind' field.
12296 (TARGET_WNOHANG): Define.
12297 (struct target_ops) <wait>: Add `options' argument.
12298 <supports_non_stop, async, start_non_stop>: New fields.
12299 (target_supports_non_stop, target_async): New.
12300 (start_non_stop): Declare.
12301 (mywait): Add `options' argument.
12302 * target.c (mywait): Add `options' argument. Print child exit
12303 notifications here.
12304 (start_non_stop): New.
12305 * server.c (non_stop, own_buf, mem_buf): New globals.
12306 (struct vstop_notif): New.
12307 (notif_queue): New global.
12308 (queue_stop_reply, push_event, discard_queued_stop_replies)
12309 (send_next_stop_reply): New.
12310 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12311 interface changes.
12312 (attach_inferior): In non-stop mode, don't wait for the target
12313 here.
12314 (handle_general_set): Handle QNonStop.
12315 (handle_query): When handling qC, return the current general
12316 thread, instead of the first thread of the list.
12317 (handle_query): If the backend supports non-stop mode, include
12318 QNonStop+ in the qSupported query response.
12319 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12320 and non-stop mode.
12321 (handle_v_attach, handle_v_run): Handle non-stop mode.
12322 (handle_v_stopped): New.
12323 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12324 (myresume): Adjust to use resume_kind. Handle non-stop.
12325 (queue_stop_reply_callback): New.
12326 (handle_status): Handle non-stop mode.
12327 (main): Clear non_stop flag on reconnection. Use the event-loop.
12328 Refactor serial protocol handling from here ...
12329 (process_serial_event): ... to this new function. When GDB
12330 selects any thread, select one here. In non-stop mode, wait until
12331 GDB acks all pending events before exiting.
12332 (handle_serial_event, handle_target_event): New.
12333 * remote-utils.c (remote_open): Install remote_desc in the event
12334 loop.
12335 (remote_close): Remove remote_desc from the event loop.
12336 (putpkt_binary): Rename to...
12337 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12338 (putpkt_binary): New as wrapper around putpkt_binary_1.
12339 (putpkt_notif): New.
12340 (prepare_resume_reply): In non-stop mode, don't change the
12341 general_thread.
12342 * event-loop.c: New.
12343 * Makefile.in (OBJ): Add event-loop.o.
12344 (event-loop.o): New rule.
12345
12346 * linux-low.h (pid_of): Moved here.
12347 (lwpid_of): New.
12348 (get_lwp_thread): Use lwpid_of.
12349 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12350 * linux-low.c (pid_of): Delete.
12351 (inferior_pid): Use lwpid_of.
12352 (linux_event_pipe): New.
12353 (target_is_async_p): New.
12354 (delete_lwp): New.
12355 (handle_extended_wait): Use lwpid_of.
12356 (add_lwp): Don't set lwpid field.
12357 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12358 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12359 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12360 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12361 first. Adjust to linux_wait_for_event interface changes. Use
12362 lwpid_of.
12363 (linux_detach): Don't delete the main lwp here.
12364 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12365 (status_pending_p): Don't consider explicitly suspended lwps.
12366 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12367 pointer. Add OPTIONS argument. Change return type to int. Use
12368 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12369 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12370 pointer. Add status pointer argument. Return a pid instead of a
12371 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12372 changes. In non-stop mode, don't switch to a random thread.
12373 (linux_wait): Rename to...
12374 (linux_wait_1): ... this. Add target_options argument, and handle
12375 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12376 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12377 clean exit and signal exit code. Don't stop all threads in
12378 non-stop mode. In all-stop mode, only stop all threads when
12379 reporting a stop to GDB. Handle explicit thread stop requests.
12380 (async_file_flush, async_file_mark): New.
12381 (linux_wait): New.
12382 (send_sigstop): Use lwpid_of.
12383 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12384 interface changes. In non-stop mode, don't switch to a random
12385 thread.
12386 (linux_resume_one_lwp): Use lwpid_of.
12387 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12388 (linux_resume_one_thread): ... this. Handle resume_stop. In
12389 non-stop mode, don't look for pending flag in all threads.
12390 (resume_status_pending_p): Don't consider explicitly suspended
12391 threads.
12392 (my_waitpid): Reimplement. Emulate __WALL.
12393 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12394 Use lwpid_of.
12395 (sigchld_handler, linux_supports_non_stop, linux_async)
12396 (linux_start_non_stop): New.
12397 (linux_target_ops): Register linux_supports_non_stop, linux_async
12398 and linux_start_non_stop.
12399 (initialize_low): Install SIGCHLD handler.
12400 * thread-db.c (thread_db_create_event, find_one_thread)
12401 (thread_db_get_tls_address): Use lwpid_of.
12402 * win32-low.c (win32_detach): Adjust to use resume_kind.
12403 (win32_wait): Add `options' argument.
12404 * spu-low.c (spu_resume): Adjust to use resume_kind.
12405 (spu_wait): Add `options' argument.
12406
12407 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12408
12409 Decouple target code from remote protocol.
12410
12411 * target.h (enum target_waitkind): New.
12412 (struct target_waitstatus): New.
12413 (struct target_ops) <wait>: Return an unsigned long. Take a
12414 target_waitstatus pointer instead of a char pointer.
12415 (mywait): Likewise.
12416 * target.c (mywait): Change prototype to return an unsigned long.
12417 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12418 * server.h (thread_from_wait, old_thread_from_wait): Delete
12419 declarations.
12420 (prepare_resume_reply): Change prototype to take a
12421 target_waitstatus.
12422 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12423 (last_status, last_ptid): New.
12424 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12425 pid instead of a signal.
12426 (attach_inferior): Remove "status" and "signal" parameters.
12427 Adjust.
12428 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12429 not as an address.
12430 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12431 (handle_v_requests, myresume): Remove "status" and "signal"
12432 parameters. Adjust.
12433 (handle_status): New.
12434 (main): Delete local `status'. Adjust.
12435 * remote-utils.c: Include target.h.
12436 (prepare_resume_reply): Change prototype to take a
12437 target_waitstatus. Adjust.
12438
12439 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12440 interface.
12441 * spu-low.c (spu_wait): Adjust.
12442 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12443 Delete.
12444 (win32_wait): Adjust.
12445
12446 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12447
12448 * target.h (struct thread_resume): Delete leave_stopped member.
12449 (struct target_ops): Add a `n' argument to the `resume' callback.
12450 * server.c (start_inferior): Adjust.
12451 (handle_v_cont, myresume): Adjust.
12452 * linux-low.c (check_removed_breakpoint): Adjust to resume
12453 interface change, and to removed leave_stopped field.
12454 (resume_ptr): Delete.
12455 (struct thread_resume_array): New.
12456 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12457 resume interface change.
12458 (linux_continue_one_thread, linux_queue_one_thread)
12459 (resume_status_pending_p): Check if the resume field is NULL
12460 instead of checking the leave_stopped member.
12461 (linux_resume): Adjust to the target resume interface change.
12462 * spu-low.c (spu_resume): Adjust to the target resume interface
12463 change.
12464 * win32-low.c (win32_detach, win32_resume): Ditto.
12465
12466 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12467
12468 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12469 flag.
12470 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12471 pending.
12472 (linux_continue_one_thread): Only preserve the stepping flag if
12473 there's a pending breakpoint.
12474
12475 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12476
12477 * server.c (main): After the inferior having exited, call
12478 remote_close before exiting gdbserver.
12479
12480 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12481
12482 Fix size of FPSCR in Power 7 processors.
12483 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12484 (PPC_FEATURE_HAS_DFP): New #define.
12485 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12486 size of the FPSCR.
12487
12488 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12489
12490 * server.c (handle_query) Whitespace and formatting.
12491
12492 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12493
12494 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12495 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12496 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12497 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12498 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12499 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12500 Makefile.in, configure.ac: Fix whitespace throughout.
12501 * configure: Regenerate.
12502
12503 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12504
12505 * inferiors.c (find_inferior): Make it safe for the callback
12506 function to delete the currently iterated inferior.
12507
12508 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12509
12510 * Makefile.in (linuw_low_h): Move higher.
12511 (thread-db.o): Depend on $(linux_low_h).
12512
12513 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12514
12515 Rename "process" to "lwp" throughout.
12516
12517 * linux-low.c (all_processes): Rename to...
12518 (all_lwps): ... this.
12519 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12520 (add_process): Rename to ...
12521 (add_lwp): ... this. Adjust.
12522 (linux_create_inferior): Adjust.
12523 (linux_attach_lwp): Adjust.
12524 (linux_attach): Adjust.
12525 (linux_kill_one_process): Rename to ...
12526 (linux_kill_one_lwp): ... this. Adjust.
12527 (linux_kill): Adjust.
12528 (linux_detach_one_process): Rename to ...
12529 (linux_detach_one_lwp): ... this. Adjust.
12530 (linux_detach): Adjust.
12531 (check_removed_breakpoint): Adjust.
12532 (status_pending_p): Adjust.
12533 (linux_wait_for_process): Rename to ...
12534 (linux_wait_for_lwp): ... this. Adjust.
12535 (linux_wait_for_event): Adjust.
12536 (send_sigstop): Adjust.
12537 (wait_for_sigstop): Adjust.
12538 (stop_all_processes): Rename to ...
12539 (stop_all_lwps): ... this.
12540 (linux_resume_one_process): Rename to ...
12541 (linux_resume_one_lwp): ... this. Adjust.
12542 (linux_set_resume_request, linux_continue_one_thread)
12543 (linux_queue_one_thread, resume_status_pending_p)
12544 (usr_store_inferior_registers, regsets_store_inferior_registers)
12545 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12546 Adjust.
12547 * linux-low.h (get_process): Rename to ...
12548 (get_lwp): ... this. Adjust.
12549 (get_thread_process): Rename to ...
12550 (get_thread_lwp): ... this. Adjust.
12551 (get_process_thread): Rename to ...
12552 (get_lwp_thread): ... this. Adjust.
12553 (struct process_info): Rename to ...
12554 (struct lwp_info): ... this.
12555 (all_processes): Rename to ...
12556 (all_lwps): ... this.
12557 * proc-service.c (ps_lgetregs): Adjust.
12558 * thread-db.c (thread_db_create_event, find_one_thread)
12559 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12560
12561 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12562
12563 * server.c (handle_query): Handle "qAttached".
12564
12565 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12566
12567 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12568 GPLv3, update license URL.
12569
12570 2009-03-01 Doug Evans <dje@google.com>
12571
12572 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12573 (server_h): Add gdb_signals.h.
12574 (signals.o): Update.
12575 * server.h (target_signal_from_host,target_signal_to_host_p)
12576 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12577
12578 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12579
12580 * remote-utils.c (getpkt): Also generate remote-debug
12581 information if noack_mode is set.
12582
12583 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12584
12585 * server.c (handle_query): Report qXfer:siginfo:read and
12586 qXfer:siginfo:write as supported and handle them.
12587 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12588 * linux-low.c (linux_xfer_siginfo): New.
12589 (linux_target_ops): Set it.
12590
12591 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12592
12593 * server.c (gdbserver_usage): Mention --remote-debug.
12594 (main): Accept '--remote-debug' switch.
12595
12596 2009-01-18 Doug Evans <dje@google.com>
12597
12598 * regcache.c (new_register_cache): No need to check result of xcalloc.
12599 * server.c (handle_search_memory): Back out calls to xmalloc,
12600 result is checked and error is returned to user upon failure.
12601 (handle_query): Ditto. Add more checks for result of malloc.
12602 (handle_v_cont): Check result of malloc, report error back to
12603 user upon failure.
12604 (handle_v_run): Ditto. Call freeargv.
12605 * server.h (freeargv): Declare.
12606 * utils.c (freeargv): New fn.
12607
12608 2009-01-15 Doug Evans <dje@google.com>
12609
12610 * gdbreplay.c (perror_with_name): Make arg const char *.
12611 * server.h (target_signal_to_name): Make return type const char *.
12612 * thread-db.c (thread_db_err_str): Make return type const char *.
12613 * utils.c (perror_with_name): Make arg const char *.
12614
12615 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12616
12617 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12618 when handling a EXIT_PROCESS_DEBUG_EVENT.
12619
12620 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12621
12622 * gdbreplay.c (gdbreplay_version): Update copyright year.
12623 * server.c (gdbserver_version): Likewise.
12624
12625 2009-01-05 Doug Evans <dje@google.com>
12626
12627 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12628 (handle_extended_wait): Improve comment.
12629
12630 2008-12-13 Doug Evans <dje@google.com>
12631
12632 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12633 * server.h (ATTR_MALLOC): New macro.
12634 (xmalloc,xcalloc,xstrdup): Declare.
12635 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12636 * inferiors.c: Ditto.
12637 * linux-low.c: Ditto.
12638 * mem-break.c: Ditto.
12639 * regcache.c: Ditto.
12640 * remote-utils.c: Ditto.
12641 * server.c: Ditto.
12642 * target.c: Ditto.
12643 * win32-low.c: Ditto.
12644
12645 2008-12-12 Doug Evans <dje@google.com>
12646
12647 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12648 in debugging printf.
12649
12650 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12651
12652 2008-12-09 Doug Evans <dje@google.com>
12653
12654 * linux-low.h (struct process_info): Delete member tid, unused.
12655 * thread-db.c (find_one_thread): Update.
12656 (maybe_attach_thread): Update.
12657
12658 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12659
12660 * target.h (struct target_ops): Add qxfer_osdata member.
12661 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12662 and dirent.h.
12663 (linux_qxfer_osdata): New functions.
12664 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12665 callback.
12666 * server.c (handle_query): Handle "qXfer:osdata:read:".
12667 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12668 (buffer_xml_printf): New functions.
12669 * server.h (struct buffer): New.
12670 (buffer_grow_str, buffer_grow_str0): New macros.
12671 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12672 (buffer_xml_printf): Declare.
12673
12674 2008-11-24 Doug Evans <dje@google.com>
12675
12676 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12677
12678 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12679
12680 * server.c (handle_v_run): Always use the supplied argument list.
12681
12682 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12683
12684 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12685 (xtensa_regmap_table): Add entry for scompare1.
12686
12687 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12688
12689 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12690 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12691 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12692 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12693 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12694 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12695 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12696 XML target descriptions.
12697 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12698 when inferior is running on an ISA 2.05 or later processor. Add
12699 special case to return offset for full 64-bit slot of FPSCR when
12700 in 32-bits.
12701
12702 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12703
12704 * Makefile.in (SFILES, clean): Added sparc64 files.
12705 (reg-sparc64.o, reg-sparc64.c): New.
12706 * configure.srv (sparc*-*-linux*): New configuration.
12707 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12708 syscall arguments for SPARC.
12709 (regsets_store_inferior_registers): Likewise.
12710 * linux-sparc-low.c: New file.
12711
12712 2008-10-21 Doug Evans <dje@google.com>
12713
12714 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12715 (READLINE_DIR,READLINE_DEP): Delete.
12716 (INTERNAL_CFLAGS): Update.
12717 (LINTFLAGS): Update.
12718
12719 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12720
12721 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12722 whole argv from the last run, not just argv[0].
12723
12724 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12725
12726 * regcache.c (new_register_cache): Return NULL if the register
12727 cache size isn't known yet.
12728 (free_register_cache): Avoid dereferencing a NULL regcache.
12729
12730 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12731
12732 * configure.srv: Merge MIPS and MIPS64.
12733
12734 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12735
12736 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12737
12738 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12739
12740 * Makefile.in: Add required vsx dependencies.
12741
12742 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12743 Declare init_registers_powerpc_vsx32l.
12744 Declare init_registers_powerpc_vsx64l.
12745 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12746 (ppc_arch_setup): Check for VSX in hwcap.
12747 (ppc_fill_vsxregset): New function.
12748 (ppc_store_vsxregset): New function.
12749 Add new VSX entry in regset_info target_regsets.
12750
12751 * configure.srv: Add new VSX dependencies.
12752
12753 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12754
12755 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12756 (remote_open): Set or clear transport_is_reliable.
12757 (putpkt_binary): Don't expect acks in noack mode.
12758 (getpkt): Don't send ack/nac in noack mode.
12759 * server.c (handle_general_set): Handle QStartNoAckMode.
12760 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12761 qSupported.
12762 (main): Reset noack_mode on every connection.
12763 * server.h (noack_mode): Declare.
12764
12765 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12766
12767 * Makefile.in (GDBREPLAY_OBS): New variable.
12768 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12769
12770 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12771 Daniel Jacobowitz <dan@codesourcery.com>
12772
12773 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12774 (usr_store_inferior_registers): Likewise.
12775 (regsets_store_inferior_registers): Likewise.
12776
12777 2008-07-31 Rolf Jansen <rj@surtec.com>
12778 Pedro Alves <pedro@codesourcery.com>
12779
12780 * configure.ac: Check for memmem declaration.
12781 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12782 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12783 (disable_packet_qfThreadInfo): Unconditionally compile.
12784 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12785 * configure, config.in: Regenerate.
12786
12787 2008-07-28 Doug Kwan <dougkwan@google.com>
12788
12789 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12790 (linux_write_memory): Remove declaration of errno.
12791
12792 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12793
12794 * linux-low.c (handle_extended_wait): Do not use "status"
12795 variable uninitialized.
12796
12797 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12798
12799 * server.c (handle_v_attach): Inhibit reporting dll changes.
12800
12801 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12802
12803 * remote-utils.c (prepare_resume_reply): If requested, don't
12804 output "thread:TID" in the T stop reply.
12805
12806 * server.c (disable_packet_vCont, disable_packet_Tthread)
12807 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12808 (handle_query): If requested, disable support for qC, qfThreadInfo
12809 and qsThreadInfo.
12810 (handle_v_requests): If requested, disable support for vCont.
12811 (gdbserver_show_disableable): New.
12812 (main): Handle --disable-packet and --disable-packet=LIST.
12813
12814 * server.h (disable_packet_vCont, disable_packet_Tthread)
12815 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12816
12817 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12818
12819 * server.c (gdbserver_usage): Mention --version.
12820
12821 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12822
12823 * Makefile.in (gdbreplay.o): New rule.
12824
12825 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12826
12827 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12828 message, not gdbserver.
12829
12830 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12831 Nathan Sidwell <nathan@codesourcery.com>
12832 Joseph Myers <joseph@codesourcery.com>
12833
12834 * acinclude.m4: Include ../../config/acx.m4.
12835 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12836 * configure, config.in: Regenerate.
12837 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12838 * server.c (gdbserver_version): Print PKGVERSION.
12839 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12840 (main): Adjust gdbserver_usage calls.
12841 * gdbreplay.c (version, host_name): Add declarations.
12842 (gdbreplay_version, gdbreplay_usage): New.
12843 (main): Accept --version and --help options.
12844
12845 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12846
12847 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12848 (arm_breakpoint_at): Handle Thumb.
12849 (the_low_target): Add comment.
12850
12851 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12852
12853 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12854
12855 2008-05-09 Doug Evans <dje@google.com>
12856
12857 * server.h (decode_search_memory_packet): Declare.
12858 * remote-utils.c (decode_search_memory_packet): New fn.
12859 * server.c (handle_search_memory_1): New fn.
12860 (handle_search_memory): New fn.
12861 (handle_query): Process qSearch:memory packets.
12862
12863 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12864
12865 * regcache.c (registers_length): Remove.
12866 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12867 full register packet.
12868 * regcache.h (registers_length): Remove prototype.
12869 * server.h (PBUFSIZ): Define to 16384.
12870
12871 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12872
12873 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12874 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12875 powerpc-64l.o, and powerpc-altivec64l.o.
12876 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12877 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12878 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12879 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12880 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12881 to srv_xmlfiles.
12882
12883 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12884 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12885 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12886 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12887 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12888 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12889 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12890 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12891 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12892 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12893 (clean): Update.
12894
12895 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12896 (init_registers_powerpc_32l): ... this new prototype.
12897 (init_registers_powerpc_32): Remove, replace by ...
12898 (init_registers_powerpc_altivec32l): ... this new prototype.
12899 (init_registers_powerpc_e500): Remove, replace by ...
12900 (init_registers_powerpc_e500l): ... this new prototype.
12901 (init_registers_ppc64): Remove, replace by ...
12902 (init_registers_powerpc_64l): ... this new prototype.
12903 (init_registers_powerpc_64): Remove, replace by ...
12904 (init_registers_powerpc_altivec64l): ... this new prototype.
12905 (ppc_num_regs): Set to 73.
12906 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12907 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12908 (ppc_cannot_store_register): Handle orig_r3 and trap.
12909 (ppc_arch_setup): Update init_registers_... calls.
12910 (ppc_fill_gregset): Handle orig_r3 and trap.
12911
12912 * inferiors.c (clear_inferiors): Reset current_inferior.
12913
12914 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12915
12916 * acinclude.m4: Add override.m4.
12917 * configure: Regenerate.
12918
12919 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12920
12921 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12922 initial call to init_register_ppc64.
12923
12924 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12925
12926 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12927 single powerpc*-*-linux* case.
12928 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12929
12930 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12931
12932 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12933 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12934 from reg_xmlfiles.
12935 * linux-ppc-low.c: Include <elf.h>.
12936 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12937 (ppc_hwcap): New global variable.
12938 (ppc_regmap): Remove __SPE__ #ifdef sections.
12939 (ppc_regmap_e500): New global variable.
12940 (ppc_cannot_store_register): Update __SPE__ special case.
12941 (ppc_get_hwcap): New function.
12942 (ppc_arch_setup): Use it to determine whether inferior supports
12943 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12944 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12945 Do not access registers if target does not support AltiVec.
12946 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12947 Do not access registers if target does not support SPE.
12948 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12949
12950 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12951
12952 * linux-low.c (disabled_regsets, num_regsets): New.
12953 (use_regsets_p): Delete.
12954 (linux_wait_for_process): Clear disabled_regsets.
12955 (regsets_fetch_inferior_registers): Check and set it.
12956 (regsets_store_inferior_registers): Likewise.
12957 (linux_fetch_registers, linux_store_registers): Do not use
12958 use_regsets_p.
12959 (initialize_low): Allocate disabled_regsets.
12960
12961 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * Makefile.in (LIBOBJS): New.
12964 (OBS): Use LIBOBJS.
12965 (memmem.o): New rule.
12966 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12967 * configure: Regenerated.
12968
12969 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12970
12971 * server.c (handle_query): Never return "unsupported" for
12972 qXfer:features:read queries.
12973
12974 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12975
12976 * server.c (get_features_xml): Fix inverted condition.
12977 (handle_query): Always support qXfer:feature:read.
12978
12979 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * server.c (wrapper_argv): New.
12982 (start_inferior): Handle wrapper_argv. If set, expect an extra
12983 trap.
12984 (gdbserver_usage): Document --wrapper.
12985 (main): Parse --wrapper.
12986
12987 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12988
12989 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12990 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12991 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12992 (ppc_set_pc): Likewise.
12993 (ppc_arch_setup): New function.
12994 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12995 of collect_register.
12996 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12997
12998 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12999
13000 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13001 instead of linux-ppc64-low.o.
13002 * linux-ppc64-low.c: Remove file.
13003 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13004 (linux-ppc64-low.o): Remove rule.
13005
13006 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13007 (init_registers_powerpc_64): Likewise.
13008 (ppc_regmap): Conditionally define depending on __powerpc64__.
13009 (ppc_cannot_store_register): Do not special-case "fpscr" when
13010 compiled on __powerpc64__.
13011 (ppc_collect_ptrace_register): New function.
13012 (ppc_supply_ptrace_register): New function.
13013 (ppc_breakpoint): Change type to "unsigned int".
13014 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13015 (the_low_target): Conditionally provide initializers for the
13016 arch_setup member depending on __powerpc64__. Install
13017 collect_ptrace_register and supply_ptrace_register members.
13018
13019 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13020
13021 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13022 * server.c (gdbserver_xmltarget): Define.
13023 (get_features_xml): Use it to replace "target.xml" and arch_string.
13024
13025 * configure.srv: Remove srv_xmltarget. Add XML files that were
13026 mentioned there to srv_xmlfiles instead. Remove conditional tests
13027 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13028 srv_xmlfiles and srv_regobj to include all possible choices.
13029 * configure.ac (srv_xmltarget): Remove.
13030 (srv_xmlfiles): Do not add "target.xml".
13031 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13032 checks for supplementary target information.
13033 * configure: Regenerate.
13034 * Makefile.in (XML_TARGET): Remove.
13035 (target.xml): Remove rule.
13036 (clean): Do not clean up target.xml.
13037 (.PRECIOUS): Do not mention target.xml.
13038
13039 * target.h (struct target_ops): Remove arch_string member.
13040 * linux-low.c (linux_arch_string): Remove.
13041 (linux_target_ops): Remove arch_string initializer.
13042 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13043 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13044 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13045 * spu-low.c (spu_arch_string): Remove.
13046 (spu_target_ops): Remove arch_string initializer.
13047 * win32-low.c (win32_arch_string): Remove.
13048 (win32_target_ops): Remove arch_string initializer.
13049 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13050 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13051 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13052
13053 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13054
13055 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13056 by collect_ptrace_register and supply_ptrace_register hooks.
13057 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13058 instead of checking for the_low_target.left_pad_xfer.
13059 (usr_store_inferior_registers): Use collect_ptrace_register callback
13060 instead of checking for the_low_target.left_pad_xfer.
13061
13062 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13063 (s390_supply_ptrace_register): Likewise.
13064 (s390_fill_gregset): Call s390_collect_ptrace_register.
13065 (the_low_target): Update.
13066
13067 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13068 (ppc_supply_ptrace_register): Likewise.
13069 (the_low_target): Update.
13070
13071 * linux-i386-low.c (the_low_target): Update.
13072 * linux-x86-64-low.c (the_low_target): Update.
13073
13074 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13075
13076 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13077 reg-s390.o and reg-s390x.o.
13078
13079 * linux-low.c (new_inferior): New global variable.
13080 (linux_create_inferior, linux_attach): Set it.
13081 (linux_wait_for_process): Call the_low_target.arch_setup after the
13082 target has stopped for the first time.
13083 (initialize_low): Do not call the_low_target.arch_setup.
13084
13085 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13086 (s390_set_pc): Likewise.
13087 (s390_arch_setup): New function.
13088 (the_low_target): Use s390_arch_setup as arch_setup routine.
13089
13090 * regcache.c (realloc_register_cache): New function.
13091 (set_register_cache): Call it for each existing regcache.
13092
13093 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13094
13095 * server.h (init_registers): Remove prototype.
13096
13097 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13098 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13099 instead of init_registers ().
13100 * linux-arm-low.c (init_registers_arm): Add prototype.
13101 (init_registers_arm_with_iwmmxt): Likewise.
13102 (the_low_target): Add initializer for arch_setup field.
13103 * linux-cris-low.c (init_registers_cris): Add prototype.
13104 (the_low_target): Add initializer for arch_setup field.
13105 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13106 (the_low_target): Add initializer for arch_setup field.
13107 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13108 (the_low_target): Add initializer for arch_setup field.
13109 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13110 (the_low_target): Add initializer for arch_setup field.
13111 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13112 (the_low_target): Add initializer for arch_setup field.
13113 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13114 (the_low_target): Add initializer for arch_setup field.
13115 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13116 (init_registers_mips64_linux): Likewise.
13117 (the_low_target): Add initializer for arch_setup field.
13118 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13119 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13120 (the_low_target): Add initializer for arch_setup field.
13121 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13122 (init_registers_powerpc_64): Likewise.
13123 (the_low_target): Add initializer for arch_setup field.
13124 * linux-s390-low.c (init_registers_s390): Add prototype.
13125 (init_registers_s390x): Likewise.
13126 (the_low_target): Add initializer for arch_setup field.
13127 * linux-sh-low.c (init_registers_sh): Add prototype.
13128 (the_low_target): Add initializer for arch_setup field.
13129 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13130 (the_low_target): Add initializer for arch_setup field.
13131 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13132 (the_low_target): Add initializer for arch_setup field.
13133
13134 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13135 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13136 instead of init_registers ().
13137 * win32-arm-low.c (init_registers_arm): Add prototype.
13138 (the_low_target): Add initializer for arch_setup field.
13139 * win32-i386-low.c (init_registers_i386): Add prototype.
13140 (the_low_target): Add initializer for arch_setup field.
13141
13142 * spu-low.c (init_registers_spu): Add prototype.
13143 (initialize_low): Call initialie_registers_spu () instead of
13144 initialize_registers ().
13145
13146 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13147
13148 * server.c (handle_v_requests): When handling the vRun and vAttach
13149 packets, if already debugging a process, don't kill it. Return an
13150 error instead.
13151
13152 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13153
13154 * server.c (handle_query): Correct length check.
13155
13156 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13157
13158 * win32-low.c (do_initial_child_stuff): Add process handle
13159 parameter. Set current_process_handle and current_process_id from the
13160 parameters. Clear globals.
13161 (win32_create_inferior): Don't set current_process_handle and
13162 current_process_id here. Instead pass them on the call to
13163 do_initial_child_stuff.
13164 (win32_attach): Likewise.
13165 (win32_clear_inferiors): New.
13166 (win32_kill): Don't close the current process handle or the
13167 current thread handle here. Instead call win32_clear_inferiors.
13168 (win32_detach): Don't open a new handle to the process. Call
13169 win32_clear_inferiors.
13170 (win32_join): Don't rely on current_process_handle; open a new
13171 handle using the process id.
13172 (win32_wait): Call win32_clear_inferiors when the inferior process
13173 has exited.
13174
13175 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13176
13177 * server.c (monitor_show_help): Add "exit".
13178
13179 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13180
13181 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13182 (clean): Add reg-xtensa.c.
13183 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13184 * configure.srv (xtensa*-*-linux*) New target.
13185 * linux-xtensa-low.c: New.
13186 * xtensa-xtregs.c: New.
13187
13188 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13189
13190 * hostio.c: Don't include errno.h.
13191 (errno_to_fileio_errno): Move to hostio-errno.
13192 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13193 error number outputting to the target->hostio_last_error callback.
13194 (hostio_packet_error): Use FILEIO_EINVAL directly.
13195 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13196 calls to hostio_error.
13197 * hostio-errno.c: New.
13198 * server.h (hostio_last_error_from_errno): Declare.
13199 * target.h (target_ops): Add hostio_last_error member.
13200 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13201 as hostio_last_error handler.
13202 * spu-low.c (spu_target_ops): Likewise.
13203 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13204 (wince_hostio_last_error): New functions.
13205 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13206 as hostio_last_error handler.
13207 (win32_target_ops) [!_WIN32_WCE]: Register
13208 hostio_last_error_from_errno as hostio_last_error handler.
13209 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13210 (hostio-errno.o): New rule.
13211 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13212 * configure.srv (srv_hostio_err_objs): New variable. Default to
13213 hostio-errno.o.
13214 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13215 * configure: Regenerate.
13216
13217 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13218
13219 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13220 (linux_kill, linux_detach): Clean up the process list.
13221 * remote-utils.c (remote_open): Improve port number parsing.
13222 (putpkt_binary, input_interrupt): Only send interrupts if the target
13223 is running.
13224 * server.c (extended_protocol): Make static.
13225 (attached): Define earlier.
13226 (exit_requested, response_needed, program_argv): New variables.
13227 (target_running): New.
13228 (start_inferior): Clear attached here.
13229 (attach_inferior): Set attached here.
13230 (require_running): Define.
13231 (handle_query): Use require_running and target_running. Implement
13232 "monitor exit".
13233 (handle_v_attach, handle_v_run): New.
13234 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13235 (gdbserver_usage): Update.
13236 (main): Redo argument parsing. Handle --debug and --multi. Handle
13237 --attach along with other options or after the port. Save
13238 program_argv. Support no initial program. Resynchronize
13239 communication with GDB after an error. Handle "monitor exit".
13240 Use require_running and target_running. Always allow the extended
13241 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13242 restart in extended mode.
13243 * README: Refer to the GDB manual. Update --attach usage.
13244
13245 2007-12-20 Andreas Schwab <schwab@suse.de>
13246
13247 * linux-low.c (STACK_SIZE): Define.
13248 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13249 (linux_test_for_tracefork): Likewise.
13250
13251 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13252
13253 * linux-low.c (linux_wait_for_event): Update messages. Do not
13254 reinsert auto-delete breakpoints.
13255 * mem-break.c (struct breakpoint): Change return type of handler to
13256 int.
13257 (set_breakpoint_at): Update handler type.
13258 (reinsert_breakpoint_handler): Return 1 instead of calling
13259 delete_breakpoint.
13260 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13261 setting a new one.
13262 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13263 * mem-break.h (set_breakpoint_at): Update handler type.
13264 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13265 * win32-low.c (auto_delete_breakpoint): New.
13266 (get_child_debug_event): Use it.
13267
13268 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13269
13270 * configure.ac: Check for pread and pwrite.
13271 * hostio.c (handle_pread): Fall back to lseek and read.
13272 (handle_pwrite): Fall back to lseek and write.
13273 * config.in, configure: Regenerated.
13274
13275 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13276
13277 * server.c (myresume): Add own_buf argument.
13278 (main): Update calls.
13279
13280 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13283 * remote-utils.c (remote_open): Do not call disable_async_io.
13284 (block_async_io): Delete.
13285 (unblock_async_io): Make static.
13286 (initialize_async_io): New.
13287 * server.c (handle_v_cont): Handle async I/O here.
13288 (myresume): Likewise. Move other common resume tasks here...
13289 (main): ... from here. Call initialize_async_io. Disable async
13290 I/O before the main loop.
13291 * server.h (initialize_async_io): Declare.
13292 (block_async_io, unblock_async_io): Delete prototypes.
13293 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13294
13295 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13296
13297 * remote-utils.c (readchar): Allow binary data in received messages.
13298
13299 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13300
13301 * win32-low.c (attaching): New global.
13302 (win32_create_inferior): Clear the `attaching' global.
13303 (win32_attach): Set the `attaching' global.
13304 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13305 attaching. Only set a breakpoint at the entry point if not
13306 attaching.
13307
13308 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13309
13310 * server.c (main): Don't report dll events on the initial
13311 connection on attaches.
13312
13313 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13314
13315 * server.c (main): Relax numerical bases supported for the pid of
13316 the --attach command line argument.
13317
13318 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13319
13320 * win32-low.c (win32_attach): Call OpenProcess before
13321 DebugActiveProcess, not after. Add last error output to error
13322 call.
13323
13324 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13325
13326 * win32-low.c (win32_get_thread_context)
13327 (win32_set_thread_context): New functions.
13328 (thread_rec): Use win32_get_thread_context.
13329 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13330 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13331 field.
13332
13333 2007-12-03 Leo Zayas
13334 Pedro Alves <pedro_alves@portugalmail.pt>
13335
13336 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13337 global variables.
13338 (child_add_thread): Minor cleanup.
13339 (child_continue): Resume artificially suspended threads before
13340 calling ContinueDebugEvent.
13341 (suspend_one_thread): New.
13342 (fake_breakpoint_event): New.
13343 (get_child_debug_event): Change return type to int. Check here if
13344 gdb sent an interrupt request. If a soft interrupt was requested,
13345 fake a breakpoint event. Return 0 if there is no event to handle,
13346 and 1 otherwise.
13347 (win32_wait): Don't check here if gdb sent an interrupt request.
13348 Ensure there is a valid event to handle.
13349 (win32_request_interrupt): Add soft interruption method as last
13350 resort.
13351
13352 2007-12-03 Leo Zayas
13353 Pedro Alves <pedro_alves@portugalmail.pt>
13354
13355 * win32-low.h (win32_thread_info): Add descriptions to the
13356 structure members. Replace `suspend_count' counter by a
13357 `suspended' flag.
13358 * win32-low.c (thread_rec): Update condition of when to get the
13359 context from the inferior. Rely on ContextFlags being set if it
13360 has already been retrieved. Only suspend the inferior thread if
13361 we haven't already. Warn if that fails.
13362 (continue_one_thread): s/suspend_count/suspended/. Only call
13363 ResumeThread once. Warn if that fails.
13364
13365 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13366
13367 * win32-low.c (win32_wait): Don't read from the inferior when it
13368 has already exited.
13369
13370 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13371
13372 * Makefile.in (win32_low_h): New variable.
13373 (win32-low.o): Add dependency on $(win32_low_h).
13374 (win32-arm-low.o, win32-i386-low.o): New rules.
13375
13376 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13377
13378 * hostio.c: Correct copyright year.
13379
13380 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * Makefile.in (OBS): Add hostio.o.
13383 (hostio.o): New rule.
13384 * server.h (handle_vFile): Declare.
13385 * hostio.c: New file.
13386 * server.c (handle_v_requests): Take packet_len and new_packet_len
13387 for binary packets. Call handle_vFile.
13388 (main): Update call to handle_v_requests.
13389
13390 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13391
13392 * linux-low.c: Include <sched.h>.
13393
13394 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13395
13396 * linux-low.c (linux_tracefork_grandchild): New.
13397 (linux_tracefork_child): Use clone.
13398 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13399
13400 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13401
13402 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13403
13404 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13405
13406 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13407
13408 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13409
13410 * inferiors.c (change_inferior_id): Delete.
13411 (add_pid_to_list, pull_pid_from_list): New.
13412 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13413 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13414 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13415 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13416 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13417 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13418 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13419 (using_threads): Always set to 1.
13420 (handle_extended_wait): New.
13421 (add_process): Do not set TID.
13422 (linux_create_inferior): Set must_set_ptrace_flags.
13423 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13424 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13425 (linux_thread_alive): Rename TID argument to LWPID.
13426 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13427 (linux_wait_for_event): Do not use TID or check using_threads. Update
13428 call to dead_thread_notify. Call handle_extended_wait.
13429 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13430 (send_sigstop): Delete sigstop_sent.
13431 (wait_for_sigstop): Avoid TID.
13432 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13433 (linux_test_for_tracefork): New.
13434 (linux_lookup_signals): Use thread_db_active and
13435 linux_supports_tracefork_flag.
13436 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13437 * linux-low.h (get_process_thread): Avoid TID.
13438 (struct process_ifo): Move thread_known and tid to the end. Remove
13439 sigstop_sent.
13440 (linux_attach_lwp, thread_db_init): Update prototypes.
13441 * server.h (change_inferior_id): Delete prototype.
13442 (add_pid_to_list, pull_pid_from_list): New prototypes.
13443 * thread-db.c (thread_db_use_events): New.
13444 (find_first_thread): Rename to...
13445 (find_one_thread): ...this. Update callers and messages. Do not
13446 call fatal. Check thread_db_use_events. Do not call
13447 change_inferior_id or new_thread_notify.
13448 (maybe_attach_thread): Update. Do not call new_thread_notify.
13449 (thread_db_init): Set thread_db_use_events. Check use_events.
13450 * utils.c (fatal, warning): Correct message prefix.
13451
13452 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13453
13454 * Makefile.in (clean): Remove new files.
13455 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13456 (powerpc-64.o, powerpc-64.c): New rules.
13457 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13458 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13459 with SPE.
13460 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13461 SPE targets.
13462 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13463 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13464 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13465 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13466 (target_regsets): Add AltiVec and SPE register sets.
13467 * configure.ac: Check for AltiVec and SPE.
13468 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13469 (ppc_fill_vrregset, ppc_store_vrregset): New.
13470 (target_regsets): Add AltiVec register set.
13471 * configure: Regenerated.
13472
13473 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13474
13475 * linux-low.c (O_LARGEFILE): Define.
13476 (linux_read_memory): Use /proc/PID/mem.
13477 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13478 * configure, config.in: Regenerated.
13479
13480 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13481
13482 * linux-low.c (linux_wait_for_event): Do not pass signals while
13483 single-stepping.
13484
13485 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13486
13487 * win32-low.c (create_process): New.
13488 (win32_create_inferior): Use create_process instead of
13489 CreateProcess. If create_process failed retry appending an ".exe"
13490 suffix. Store the GetLastError result immediatelly after
13491 create_process calls and use it on the call to error.
13492
13493 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13494
13495 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13496
13497 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13498
13499 * configure.ac: Switch license to GPLv3.
13500
13501 2007-08-01 Michael Snyder <msnyder@access-company.com>
13502
13503 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13504
13505 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13506
13507 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13508 typedef.
13509 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13510 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13511 CloseToolhelp32Snapshot.
13512 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13513 CloseToolhelp32Snapshot.
13514
13515 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13516
13517 * server.c (main): Check for inferior exit before main loop.
13518
13519 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13520
13521 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13522 instead of on tmp_desc.
13523
13524 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13525 Daniel Jacobowitz <dan@codesourcery.com>
13526
13527 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13528 (add_thread): Minor cleanups.
13529 (clear_inferiors): Move lower in the file. Clear the DLL
13530 list.
13531 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13532 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13533 (xml_escape_text): New.
13534 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13535 for qSupported.
13536 (handle_v_cont): Report errors.
13537 (gdbserver_version): Update.
13538 (main): Correct size of own_buf. Do not report initial DLL events.
13539 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13540 (unloaded_dll, xml_escape_text): New.
13541 * win32-low.c (enum target_waitkind): Update comments.
13542 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13543 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13544 (win32_EnumProcessModules, win32_GetModuleInformation)
13545 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13546 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13547 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13548 (win32_Module32First, win32_Module32Next, load_toolhelp)
13549 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13550 (get_child_debug_event): Handle DLL events.
13551 (win32_wait): Likewise.
13552
13553 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13554
13555 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13556 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13557
13558 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13559
13560 * win32-low.c (handle_output_debug_string): Ignore event if not
13561 waiting.
13562
13563 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13564
13565 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13566
13567 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13568
13569 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13570
13571 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13572
13573 * inferiors.c (change_inferior_id): Add comment.
13574 * linux-low.c (check_removed_breakpoint): Add an early
13575 prototype. Improve debug output.
13576 (linux_attach): Doc update.
13577 (linux_detach_one_process, linux_detach): Clean up before releasing
13578 each process.
13579 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13580 * linux-low.h (struct process_info): Doc improvement.
13581 * mem-break.c (delete_all_breakpoints): New.
13582 * mem-break.h (delete_all_breakpoints): New prototype.
13583 * thread-db.c (find_first_thread): New.
13584 (thread_db_create_event): Call it instead of
13585 thread_db_find_new_threads. Clean up unused variables.
13586 (maybe_attach_thread): Remove first thread handling.
13587 (thread_db_find_new_threads): Use find_first_thread.
13588 (thread_db_get_tls_address): Likewise.
13589
13590 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13591
13592 * thread-db.c (thread_db_find_new_threads): Add prototype.
13593 (thread_db_create_event): Check for the main thread before adding
13594 a new thread.
13595 (maybe_attach_thread): Only enable event reporting if TID == 0.
13596 (thread_db_get_tls_address): Check for new threads.
13597
13598 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * linux-low.c (linux_create_inferior): Try execv before execvp.
13601 * spu-low.c (spu_create_inferior): Likewise.
13602
13603 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13604
13605 * linux-low.c (linux_create_inferior): Change execv to execvp.
13606 * spu-low.c (spu_create_inferior): Likewies.
13607
13608 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13609
13610 * Makefile.in (clean): Clean new files instead of deleted ones.
13611 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13612 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13613 rules.
13614 * configure.srv: Specify XML files and new regformats for MIPS and
13615 MIPS64 GNU/Linux.
13616 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13617 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13618 an entry for the restart register.
13619 (mips_cannot_fetch_register, mips_cannot_store_register)
13620 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13621 register names to match the XML descriptions.
13622 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13623 restart register instead of $0.
13624
13625 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13626 Markus Deuling <deuling@de.ibm.com>
13627
13628 * remote-utils.c (decode_xfer_write): New function.
13629 * server.h (decode_xfer_write): Add prototype.
13630 * server.c (handle_query): Add PACKET_LEN argument. Support
13631 qXfer:spu:read and qXfer:spu:write packets.
13632 (main): Pass packet_len to handle_query.
13633 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13634 * target.h (target_ops): Add qxfer_spu.
13635
13636 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13637
13638 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13639 accessing non-seekable spufs files.
13640
13641 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13642
13643 * server.c (handle_query): Add reply for qC packet.
13644
13645 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13646 Leo Zayas <lerele@champenstudios@com>
13647
13648 * server.h (check_remote_input_interrupt_request): New function.
13649 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13650 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13651 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13652 (check_remote_input_interrupt_request): New function.
13653 * server.h (check_remote_input_interrupt_request): Declare.
13654 * win32-low.c (winapi_DebugBreakProcess,
13655 winapi_GenerateConsoleCtrlEvent): New typedefs.
13656 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13657 to 250 ms.
13658 (win32_wait): Check for remote interrupt request
13659 with check_remote_input_interrupt_request.
13660 (win32_request_interrupt): New function.
13661 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13662
13663 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13664
13665 * win32-low.c (debug_registers_changed,
13666 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13667 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13668 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13669 (thread_rec): Get context using the low target.
13670 (child_add_thread): Call thread_added on the low target,
13671 which does the same thing.
13672 (regptr): Delete.
13673 (do_initial_child_stuff): Remove debug registers references.
13674 Set context using the low target. Resume threads after
13675 setting the contexts.
13676 (child_continue): Remove dead variable. Remove debug
13677 registers references.
13678 (child_fetch_inferior_registers): Go through the low target.
13679 (do_child_store_inferior_registers): Remove.
13680 (child_store_inferior_registers): Go through the low target.
13681 (win32_resume): Remove debug registers references.
13682 Set context using the low target.
13683 (handle_exception): Change return type to void. Don't record
13684 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13685 first chance exception.
13686 (get_child_debug_event): Change return type to void. Remove
13687 goto loop. Always return after waiting for debug event.
13688 (win32_wait): Convert to switch statement. Handle spurious
13689 events.
13690
13691 * win32-i386-low.c (debug_registers_changed,
13692 debug_registers_used): New.
13693 (initial_stuff): Rename to ...
13694 (i386_initial_stuff): ... this. Clear debug registers
13695 state variables.
13696 (store_debug_registers): Delete.
13697 (i386_get_thread_context): New.
13698 (load_debug_registers): Delete.
13699 (i386_set_thread_context): New.
13700 (i386_thread_added): New.
13701 (single_step): Rename to ...
13702 (i386_single_step): ... this.
13703 (do_fetch_inferior_registers): Rename to ...
13704 (i386_fetch_inferior_register): ... this.
13705 (i386_store_inferior_register): New.
13706 (the_low_target): Adapt to new interface.
13707
13708 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13709 (arm_get_thread_context): New.
13710 (arm_set_thread_context): New.
13711 (regptr): New.
13712 (do_fetch_inferior_registers): Rename to ...
13713 (arm_fetch_inferior_register): ... this.
13714 (arm_store_inferior_register): New.
13715 (arm_wince_breakpoint): Reimplement as unsigned long.
13716 (arm_wince_breakpoint_len): Define.
13717 (the_low_target): Adapt to new interface.
13718
13719 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13720 load_debug_registers. Add get_thread_context, set_thread_context,
13721 thread_added and store_inferior_register. Rename
13722 fetch_inferior_registers to fetch_inferior_register.
13723 (regptr): Remove declaration.
13724
13725 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13726
13727 * linux-low.c (linux_detach): Change return type to int. Return 0.
13728 * spu-low.c (spu_detach): Likewise.
13729
13730 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13731
13732 * target.h (target_ops): Change return type of detach to int.
13733 Add join.
13734 (join_inferior): New.
13735 * server.c (main): Don't skip detach support on mingw32.
13736 If the inferior doesn't support detaching return error.
13737 Call join_inferior instead of using waitpid.
13738 * linux-low.c (linux_join): New.
13739 (linux_target_op): Add linux_join.
13740 * spu-low.c (spu_join): New.
13741 (spu_target_ops): Add spu_join.
13742 * win32-low.c (win32_detach): Adapt to new interface.
13743 Reopen current_process_handle before detaching. Issue a child
13744 resume before detaching.
13745 (win32_join): New.
13746 (win32_target_op): Add win32_join.
13747
13748 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13749
13750 * win32-low.c (win32-attach): Fix return value.
13751 * target.h (target_ops): Describe ATTACH return values.
13752
13753 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13754
13755 * win32-low.c (GETPROCADDRESS): Define.
13756 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13757 (winapi_DebugSetProcessKillOnExit): Likewise.
13758 (win32_create_inferior): Force usage of ansi CreateProcessA.
13759 (win32_attach): Use GETPROCADDRESS.
13760 (win32_detach): Likewise.
13761
13762 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13763
13764 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13765
13766 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13767
13768 * win32-low.c: Commit leftover changes from 2007-03-29.
13769
13770 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13771
13772 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13773 fields short instead of int. Add explicit padding.
13774 (i387_cache_to_fsave): Remove unnecessary casts.
13775 (i387_fsave_to_cache): Doc fix.
13776 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13777
13778 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13779
13780 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13781 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13782
13783 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13784
13785 * configure.srv (arm*-*-mingw32ce*): Move near the other
13786 arm targets.
13787
13788 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13789
13790 * configure.ac: Add errno checking.
13791 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13792 sys/file.h and malloc.h.
13793 (AC_CHECK_DECLS): Add perror.
13794 (srv_mingwce): Handle.
13795 * configure.srv (i[34567]86-*-cygwin*): Add
13796 win32-i386-low.o to srv_tgtobj.
13797 (i[34567]86-*-mingw*): Likewise.
13798 (arm*-*-mingw32ce*): Add case.
13799 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13800 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13801 [__MINGW32CE__] (strerror): New function.
13802 [__MINGW32CE__] (errno): Define to GetLastError.
13803 [__MINGW32CE__] (COUNTOF): New macro.
13804 (remote_open): Remove extra close call.
13805 * mem-break.c (delete_breakpoint_at): New function.
13806 * mem-break.h (delete_breakpoint_at): Declare.
13807 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13808 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13809 [USE_WIN32API] (read, write): Add char* casts.
13810 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13811 * server.h: Include wincecompat.h on Windows CE.
13812 [HAVE_ERRNO_H]: Check.
13813 (perror): Declare if not declared.
13814 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13815 (perror_with_name): Remove errno declaration.
13816 * wincecompat.h: New.
13817 * wincecompat.c: New.
13818 * win32-low.h: New.
13819 * win32-arm-low.c: New.
13820 * win32-i386-low.c: New.
13821 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13822 (OUTMSG2): Make it safe.
13823 (_T): New macro.
13824 (COUNTOF): New macro.
13825 (NUM_REGS): Get it from the low target.
13826 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13827 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13828 (thread_rec): Let low target handle debug registers.
13829 (child_add_thread): Likewise.
13830 (child_init_thread_list): Likewise.
13831 (continue_one_thread): Likewise.
13832 (regptr): New.
13833 (do_child_fetch_inferior_registers): Move to ...
13834 * win32-i386-low.c: ... here, and rename to ...
13835 (do_fetch_inferior_registers): ... this.
13836 * win32-low.c (child_fetch_inferior_registers):
13837 Go through the low target.
13838 (do_child_store_inferior_registers): Use regptr.
13839 (strwinerror): New function.
13840 (win32_create_inferior): Handle Windows CE.
13841 Use strwinerror instead of strerror on Windows error
13842 codes. Add program to the error output.
13843 Don't close the main thread handle on Windows CE.
13844 (win32_attach): Use coredll.dll on Windows CE.
13845 (win32_kill): Close current process and current
13846 thread handles.
13847 (win32_detach): Use coredll.dll on Windows CE.
13848 (win32_resume): Let low target handle debug registers, and
13849 step request.
13850 (handle_exception): Add/Remove initial breakpoint. Avoid
13851 non-existant WSTOPSIG on Windows CE.
13852 (win32_read_inferior_memory): Cast to remove warning.
13853 (win32_arch_string): Go through the low target.
13854 (initialize_low): Call set_breakpoint_data with the low
13855 target's breakpoint.
13856 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13857 FOP_REGNUM, mappings): Move to ...
13858 * win32-i386-low.c: ... here.
13859 * win32-low.c (win32_thread_info): Move to ...
13860 * win32-low.h: ... here.
13861 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13862 win32-arm-low.c and wincecompat.c.
13863 (all:): Add $EXEEXT.
13864 (install-only:): Likewise.
13865 (gdbserver:): Likewise.
13866 (gdbreplay:): Likewise.
13867 * config.in: Regenerate.
13868 * configure: Regenerate.
13869
13870 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13871
13872 * win32-low.c: Rename typedef thread_info to
13873 win32_thread_info throughout.
13874
13875 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13876
13877 * win32-i386-low.c: Rename to ...
13878 * win32-low.c: ... this.
13879 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13880 * Makefile.in: Likewise.
13881
13882 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13883
13884 * remote-utils.c (monitor_output): Constify msg parameter.
13885 * server.h (monitor_output): Likewise.
13886 * win32-i386-low.c (handle_output_debug_string): New.
13887 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13888 handle_output_debug_string.
13889 (get_child_debug_event): Likewise.
13890
13891 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13892
13893 * server.c (main): Correct strtoul check.
13894
13895 2007-03-27 Jon Ringle <jon@ringle.org>
13896
13897 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13898
13899 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13900
13901 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13902
13903 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13904
13905 * terminal.h: Check HAVE_SGTTY_H.
13906
13907 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13908
13909 * remote-utils.c (remote_open): Print out the assigned port number.
13910
13911 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * remote-utils.c (monitor_output): New function.
13914 * server.c (debug_threads): Define here.
13915 (monitor_show_help): New function.
13916 (handle_query): Handle qRcmd.
13917 (main): Do not handle 'd' packet.
13918 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13919 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13920 of debug_threads.
13921
13922 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13923
13924 * Makefile.in (EXEEXT): New.
13925 (clean): Use $(EXEEXT).
13926
13927 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13928
13929 * target.h (target_ops): Rename send_signal to request_interrupt,
13930 and remove enum target_signal parameter.
13931 * linux-low.c (linux_request_interrupt): Rename from
13932 linux_send_signal, and always send SIGINT.
13933 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13934 and always send SIGINT.
13935 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13936 of send_signal.
13937 (input_interrupt): Likewise.
13938
13939 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13940
13941 * server.c (get_features_xml): Check if target implemented
13942 arch_string.
13943 * win32-i386-low.c (win32_arch_string): New.
13944 (win32_target_ops): Add win32_arch_string as arch_string member.
13945
13946 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13947
13948 * spu-low.c (spu_arch_string): New.
13949 (spu_target_ops): Add spu_arch_string.
13950
13951 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13952
13953 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13954 * configure.ac: Do not check for terminal.h.
13955 * configure, config.in: Regenerated.
13956
13957 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13958
13959 * Makefile.in (OBS): Add $(XML_BUILTIN).
13960 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13961 (clean): Update.
13962 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13963 (arm-with-iwmmxt.c): New.
13964 * config.in, configure: Regenerate.
13965 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13966 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13967 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13968 (arm*-*-linux*): Add iWMMXt and regset support.
13969 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13970 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13971 (arm_store_wmmxregset, target_regsets): New.
13972 * server.c (get_features_xml): Take annex argument. Check builtin
13973 XML documents.
13974 (handle_query): Handle multiple annexes.
13975
13976 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13977
13978 * remote-utils.c [USE_WIN32API] (read, write): Define.
13979 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13980 write.
13981
13982 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * linux-i386-low.c (the_low_target): Set arch_string.
13985 * linux-x86-64-low.c (the_low_target): Likewise.
13986 * linux-low.c (linux_arch_string): New.
13987 (linux_target_ops): Add it.
13988 * linux-low.h (struct linux_target_ops): Add arch_string.
13989 * server.c (write_qxfer_response): Use const void * for DATA.
13990 (get_features_xml): New.
13991 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13992 * target.h (struct target_ops): Add arch_string method.
13993
13994 2007-01-03 Denis Pilat <denis.pilat@st.com>
13995 Daniel Jacobowitz <dan@codesourcery.com>
13996
13997 * linux-low.c (linux_kill): Handle being called with no threads.
13998 * win32-i386-low.c (win32_kill): Likewise.
13999 (get_child_debug_event): Clear current_process_handle.
14000
14001 2006-12-30 Denis PILAT <denis.pilat@st.com>
14002 Daniel Jacobowitz <dan@codesourcery.com>
14003
14004 * remote-utils.c (remote_open): Check the type of specified
14005 serial port devices before opening them.
14006 * server.c (main): Kill the inferior if an error occurs during
14007 the first remote_open.
14008
14009 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14010
14011 * README: Update supported targets.
14012
14013 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * Makefile.in (clean): Remove reg-mips64.c.
14016 (reg-mips64.c, reg-mips64.o): New rules.
14017 * configure.srv: Handle mips64. Include regset support for mips.
14018 * linux-mips-low.c (union mips_register): New.
14019 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14020 (mips_breakpoint, mips_breakpoint_at): Use int.
14021 (mips_collect_register, mips_supply_register)
14022 (mips_collect_register_32bit, mips_supply_register_32bit)
14023 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14024 (mips_store_fpregset, target_regsets): New.
14025 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14026
14027 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14028
14029 * configure.srv: Add target "spu*-*-*".
14030 * Makefile.in (clean): Remove reg-spu.c.
14031 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14032 * spu-low.c: New file.
14033
14034 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14035
14036 * configure.ac: Correct td_thr_tls_get_addr test.
14037 * configure: Regenerated.
14038
14039 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14040
14041 * linux-low.c (linux_wait_for_event): Reformat. Use the
14042 pass_signals array.
14043 * remote-utils.c (decode_address_to_semicolon): New.
14044 * server.c (pass_signals, handle_general_set): New.
14045 (handle_query): Mention QPassSignals for qSupported.
14046 (main): Call handle_general_set.
14047 * server.h (pass_signals, decode_address_to_semicolon): New.
14048
14049 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14050
14051 * server.c (handle_query): Correct error handling for read_auxv.
14052
14053 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14054
14055 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14056 and srv_linux_thread_db to yes.
14057 * linux-s390-low.c (s390_fill_gregset): New function.
14058 (target_regsets): Define data structure.
14059
14060 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14061
14062 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14063 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14064 * config.in, configure: Regenerated.
14065 * inferiors.c (gdb_id_to_thread): New function.
14066 (gdb_id_to_thread_id): Use it.
14067 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14068 * linux-low.h (struct process_info): Add th member.
14069 (thread_db_get_tls_address): New prototype.
14070 * remote-utils.c (decode_address): Make non-static.
14071 * server.c (handle_query): Handle qGetTLSAddr.
14072 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14073 * target.h (struct target_ops): Add get_tls_address.
14074 * thread-db.c (maybe_attach_thread): Save the thread handle.
14075 (thread_db_get_tls_address): New.
14076
14077 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14078
14079 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14080 (linux_resume_one_process): Take a siginfo_t *. Update all
14081 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14082 (struct pending_signals): Add a siginfo_t.
14083 (linux_wait_for_process): Always set last_status.
14084 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14085 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14086 * linux-low.h (struct process_info): Add last_status.
14087
14088 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * remote-utils.c (try_rle): New function.
14091 (putpkt_binary): Use it.
14092
14093 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14096 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14097 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14098 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14099 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14100 point registers.
14101
14102 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14103
14104 * server.c (terminal_fd): New variable.
14105 (old_foreground_pgrp): Likewise.
14106 (restore_old_foreground_pgrp): New function.
14107 (start_inferior): Record the terminal file descriptor in terminal_fd
14108 and its original foreground group in old_foreground_pgrp. Register
14109 restore_old_foreground_pgrp with atexit().
14110
14111 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14112
14113 * server.c (handle_query): Correct qPart to qXfer.
14114
14115 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14116
14117 * configure.ac: Check for more headers which are missing on
14118 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14119 * configure.srv: Add Cygwin and mingw32.
14120 * remote-utils.c: Don't include headers unconditionally which
14121 are missing on mingw32. Include <winsock.h> for mingw32.
14122 (remote_open): Adjust for mingw32 support. Flush
14123 standard error after writing to it.
14124 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14125 (unblock_async_io, enable_async_io, disable_async_io)
14126 (readchar, getpkt): Update for Winsock support.
14127 (prepare_resume_reply): Expect a protocol signal number.
14128 * server.c: Disable <sys/wait.h> on mingw32.
14129 (start_inferior): Adjust for mingw32 support. Flush
14130 standard error after writing to it.
14131 (attach_inferior): Likewise. Use protocol signal
14132 numbers.
14133 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14134 and names.
14135 * win32-i386-low.c: New file.
14136 * Makefile.in (XM_CLIBS): Set.
14137 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14138 (win32-i386-low.o): New dependency rule.
14139 * linux-low.c (linux_wait): Use target signal numbers.
14140 * target.h (struct target_ops): Doc fix.
14141 * server.h (target_signal_to_name): New prototype.
14142 * gdbreplay.c: Don't include headers unconditionally which
14143 are missing on mingw32. Include <winsock.h> for mingw32.
14144 (remote_close, remote_open): Adjust for Winsock support.
14145 * configure, config.in: Regenerated.
14146
14147 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * server.c (decode_xfer_read, write_qxfer_response): New.
14150 (handle_query): Take a packet length argument. Handle
14151 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14152 the qSupported response.
14153 (main): Update call to handle_query.
14154
14155 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14156
14157 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14158 (putpkt_binary): Renamed from putpkt and adjusted for binary
14159 data.
14160 (putpkt): New wrapper for putpkt_binary.
14161 (readchar): Don't mask off the high bit.
14162 (decode_X_packet): New function.
14163 * server.c (main): Call putpkt_binary if a handler sets the packet
14164 length. Save the length of the incoming packet. Handle 'X'.
14165 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14166
14167 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14168
14169 * server.c (handle_query): Handle qSupported.
14170
14171 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * remote-utils.c (all_symbols_looked_up): New variable.
14174 (look_up_one_symbol): Check it.
14175 * server.h (look_up_one_symbol): New declaration.
14176 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14177
14178 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * Makefile.in (linux-arm-low.o): Update dependencies.
14181 * linux-arm-low.c: Include "gdb_proc_service.h".
14182 (PTRACE_GET_THREAD_AREA): Define.
14183 (ps_get_thread_area): New function.
14184
14185 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14186
14187 * configure.srv (m68k*-*-uclinux*): New target.
14188 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14189 (linux_resume_one_process): Remove extraneous cast.
14190 (linux_read_offsets): New.
14191 (linux_target_op): Add linux_read_offsets on mmuless systems.
14192 * server.c (handle_query): Add qOffsets logic.
14193 * target.h (struct target_ops): Add read_offsets.
14194
14195 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14196
14197 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14198 (PTRACE_GET_THREAD_AREA): Define.
14199 (ps_get_thread_area): New function.
14200 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14201 (linux-x86-64-low.o): Update.
14202
14203 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14204
14205 * configure.ac: Remove checks for prfpregset_t.
14206 * gdb_proc_service.h: New file.
14207 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14208 new "gdb_proc_service.h".
14209 * proc-service.c: Likewise.
14210 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14211 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14212 * Makefile.in (gdb_proc_service_h): Updated.
14213 * configure, config.in: Regenerated.
14214
14215 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14216
14217 * remote-utils.c (prepare_resume_reply): Move declaration
14218 of gdb_id_from_wait to the top of the block.
14219
14220 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14221
14222 * linux-low.c (regsets_store_inferior_registers): Read the regset
14223 from the target before filling it.
14224
14225 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14226
14227 * server.c (attach_inferior): Return SIGTRAP for a successful
14228 attach.
14229
14230 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * Makefile.in (OBS): Add version.o.
14233 (STAGESTUFF): Delete.
14234 (version.o): Add dependencies.
14235 (version.c): Replace rule.
14236 (clean): Remove version.c.
14237 * server.c (gdbserver_version): New.
14238 (gdbserver_usage): Use printf.
14239 (main): Handle --version and --help.
14240 * server.h (version, host_name): Add declarations.
14241
14242 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14243
14244 * linux-arm-low.c:
14245 * linux-arm-low.c:
14246 * inferiors.c:
14247 * i387-fp.h:
14248 * i387-fp.c:
14249 * gdbreplay.c:
14250 * regcache.c:
14251 * proc-service.c:
14252 * mem-break.h:
14253 * mem-break.c:
14254 * linux-x86-64-low.c:
14255 * linux-sh-low.c:
14256 * linux-s390-low.c:
14257 * linux-ppc64-low.c:
14258 * linux-ppc-low.c:
14259 * linux-mips-low.c:
14260 * linux-m68k-low.c:
14261 * linux-m32r-low.c:
14262 * linux-low.h:
14263 * linux-low.c:
14264 * linux-ia64-low.c:
14265 * linux-i386-low.c:
14266 * linux-crisv32-low.c:
14267 * thread-db.c:
14268 * terminal.h:
14269 * target.h:
14270 * target.c:
14271 * server.h:
14272 * server.c:
14273 * remote-utils.c:
14274 * regcache.h:
14275 * utils.c:
14276 * Makefile.in:
14277 * configure.ac:
14278 * gdbserver.1: Add (C) after Copyright. Update the FSF
14279 address.
14280
14281 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14284 (arm_breakpoint_at): Recognize both breakpoints.
14285 (the_low_target): Use the correct breakpoint instruction.
14286
14287 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14290 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14291 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14292 (the_low_target): Update.
14293
14294 2005-10-25 Andreas Schwab <schwab@suse.de>
14295
14296 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14297
14298 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14299 (ia64_num_regs): Reduce to 462.
14300
14301 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14302
14303 * acinclude.m4: Correct quoting.
14304 * aclocal.m4: Regenerated.
14305
14306 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14307 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14308 (thread_db_init): Call thread_db_err_str.
14309 * configure.ac: Check for TD_VERSION.
14310 * config.in, configure: Regenerated.
14311
14312 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14313
14314 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14315
14316 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14317
14318 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14319 is not available. Define HAVE_PTRACE_GETREGS if it is.
14320 * config.in, configure: Regenerated.
14321 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14322 * linux-i386-low.c, linux-m68k-low.c: Update to use
14323 HAVE_PTRACE_GETREGS.
14324 * linux-low.c (regsets_fetch_inferior_registers)
14325 (regsets_store_inferior_registers): Only return 0 if we processed
14326 GENERAL_REGS.
14327 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14328 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14329
14330 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14331
14332 * inferiors.c (struct thread_info): Add gdb_id.
14333 (add_thread): Add gdb_id argument.
14334 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14335 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14336 calls to add_thread.
14337 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14338 * server.c (handle_query): Use thread_to_gdb_id.
14339 (handle_v_cont, main): Use gdb_id_to_thread_id.
14340 * server.h (add_thread): Update prototype.
14341 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14342 prototypes.
14343
14344 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14345
14346 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14347 left-padded registers.
14348 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14349 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14350
14351 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14352
14353 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14354 * configure: Regenerate.
14355 * config.in: Regenerate.
14356 * server.h (NEED_DECLARATION_STRERROR):
14357 Replace with !HAVE_DECL_STRERROR.
14358
14359 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14360
14361 * linux-low.c (linux_wait, linux_send_signal): Don't test
14362 an unsigned long variable for > 0 if it could be MAX_ULONG.
14363 * server.c (myresume): Likewise.
14364 * target.c (set_desired_inferior): Likewise.
14365
14366 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14367
14368 * configure.ac: Simplify and improve check for socklen_t.
14369 * configure, config.in: Regenerate.
14370
14371 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * acconfig.h: Remove.
14374 * configure.ac: Add a test for socklen_t. Use three-argument
14375 AC_DEFINE throughout.
14376 * config.in: Regenerated using autoheader 2.59.
14377 * configure: Regenerated.
14378
14379 * gdbreplay.c (socklen_t): Provide a default.
14380 (remote_open): Use socklen_t.
14381 * remote-utils.c (socklen_t): Provide a default.
14382 (remote_open): Use socklen_t.
14383 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14384 unsigned char.
14385
14386 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14387 char for buffers.
14388 * linux-low.c (linux_read_memory, linux_write_memory)
14389 (linux_read_auxv): Likewise.
14390 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14391 (check_mem_write): Likewise.
14392 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14393 Likewise.
14394 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14395 (registers_from_string, register_data): Likewise.
14396 * server.c (handle_query, main): Likewise.
14397 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14398 (decode_M_packet): Likewise.
14399 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14400 * target.h (struct target_ops): Update read_memory, write_memory,
14401 and read_auxv.
14402 (read_inferior_memory, write_inferior_memory): Update.
14403 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14404 to unsigned char *.
14405 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14406 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14407 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14408 linux-s390-low.c, linux-sh-low.c: Update for changes in
14409 read_inferior_memory and the_low_target->breakpoint.
14410
14411 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14412
14413 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14414 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14415 * configure.srv: Add powerpc64-*-linux*.
14416 * linux-ppc64-low.c: New file.
14417
14418 2005-05-23 Orjan Friberg <orjanf@axis.com>
14419
14420 * linux-cris-low.c: New file with support for CRIS.
14421 * linux-crisv32-low.c: Ditto for CRISv32.
14422 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14423 (clean): Add reg-cris.c and reg-crisv32.c.
14424 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14425 reg-crisv32.o, and reg-crisv32.c to make rules.
14426 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14427 recognized targets.
14428
14429 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14430
14431 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14432 of sizeof (PTRACE_XFER_TYPE).
14433 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14434
14435 2005-05-12 Orjan Friberg <orjanf@axis.com>
14436
14437 * target.h (struct target_ops): Add insert_watchpoint,
14438 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14439 pointers for hardware watchpoint support.
14440 * linux-low.h (struct linux_target_ops): Ditto.
14441 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14442 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14443 to linux_target_ops.
14444 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14445 reply packet.
14446 * server.c (main): Recognize 'Z' and 'z' packets.
14447
14448 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14449
14450 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14451 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14452 (the_low_target): Add new members.
14453
14454 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14455
14456 * proc-service.c (ps_lgetregs): Search all_processes instead of
14457 all_threads.
14458
14459 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14460
14461 * server.c (start_inferior): Change return type to int.
14462 (attach_inferior): Change sigptr to int *.
14463 (handle_v_cont, handle_v_requests): Change signal to int *.
14464 (main): Change signal to int.
14465
14466 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14467
14468 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14469 * configure.srv: Add m32r*-*-linux*.
14470 * linux-m32r-low.c: New file.
14471
14472 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14475
14476 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14477
14478 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14479 Take unsigned long arguments for PIDs.
14480 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14481 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14482 (wait_for_sigstop, linux_resume_one_process)
14483 (regsets_fetch_inferior_registers, linux_send_signal)
14484 (linux_read_auxv): Likewise. Update the types of variables holding
14485 PIDs. Update format string specifiers.
14486 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14487 * remote-utils.c (prepare_resume_reply): Likewise.
14488 * server.c (cont_thread, general_thread, step_thread)
14489 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14490 unsigned long.
14491 (handle_query): Update format specifiers.
14492 (handle_v_cont, main): Use strtoul for thread IDs.
14493 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14494 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14495 (general_thread, step_thread, thread_from_wait)
14496 (old_thread_from_wait): Update.
14497 * target.h (struct thread_resume): Use unsigned long for THREAD.
14498 (struct target_ops): Use unsigned long for arguments to attach and
14499 thread_alive.
14500
14501 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * acinclude.m4: Include bfd/bfd.m4 directly.
14504 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14505 <agriffis@toolchain.org>.
14506 * aclocal.m4, configure: Regenerated.
14507
14508 2005-01-07 Andrew Cagney <cagney@gnu.org>
14509
14510 * configure.ac: Rename configure.in, require autoconf 2.59.
14511 * configure: Re-generate.
14512
14513 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14514
14515 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14516 LIBS when finished.
14517 * aclocal.m4: Regenerated.
14518 * configure: Regenerated.
14519
14520 2004-11-21 Andreas Schwab <schwab@suse.de>
14521
14522 * linux-m68k-low.c (m68k_num_gregs): Define.
14523 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14524 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14525 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14526 (m68k_breakpoint_at): New. Add to the_low_target.
14527
14528 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14529 srv_linux_thread_db to yes.
14530
14531 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14532
14533 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14534 (ARCH_SET_FS): Likewise.
14535 (ARCH_GET_FS): Likewise.
14536 (ARCH_GET_GS): Likewise.
14537
14538 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14539
14540 * linux-i386-low.c (ps_get_thread_area): New.
14541 * linux-x86-64-low.c (ps_get_thread_area): New.
14542 * linux-low.c: Include <sys/syscall.h>.
14543 (linux_kill_one_process): Don't kill the first thread here.
14544 (linux_kill): Kill the first thread here.
14545 (kill_lwp): New function.
14546 (send_sigstop, linux_send_signal): Use it.
14547 * proc-service.c: Clean up #ifdefs.
14548 (fpregset_info): Delete.
14549 (ps_lgetregs): Update and enable implementation.
14550 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14551 implementations.
14552 * remote-utils.c (struct sym_cache, symbol_cache): New.
14553 (input_interrupt): Print a clearer message.
14554 (async_io_enabled): New variable.
14555 (enable_async_io, disable_async_io): Use it. Update comments.
14556 (look_up_one_symbol): Use the symbol cache.
14557 * thread-db.c (thread_db_look_up_symbols): New function.
14558 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14559
14560 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14561
14562 * configure.in: Test for -rdynamic.
14563 * configure: Regenerated.
14564 * Makefile (INTERNAL_LDFLAGS): New.
14565 (gdbserver, gdbreplay): Use it.
14566
14567 2004-09-02 Andrew Cagney <cagney@gnu.org>
14568
14569 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14570
14571 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14572
14573 * linux-low.c (linux_wait): Clear all_processes list also.
14574
14575 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14576
14577 * linux-low.c: Include <errno.h>. Remove extern declaration of
14578 errno.
14579
14580 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14581
14582 * gdbreplay.c, server.h, utils.c: Update copyright years.
14583
14584 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14585
14586 * server.c (main): Print child status or termination signal from
14587 variable 'signal', not 'sig'.
14588
14589 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14590
14591 * linux-low.c (linux_read_memory): Change return type to
14592 int. Check for and return error from ptrace().
14593 * target.c (read_inferior_memory): Change return type to int. Pass
14594 back return status from the_target->read_memory().
14595 * target.h (struct target_ops): Adapt *read_memory() prototype.
14596 Update comment.
14597 (read_inferior_memory): Adapt prototype.
14598 * server.c (main): Return an error packet if
14599 read_inferior_memory() returns an error.
14600
14601 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14602
14603 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14604 Unify with other clean targets.
14605
14606 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14607
14608 * server.c (handle_v_cont): Call set_desired_inferior.
14609
14610 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14611
14612 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14613
14614 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14615
14616 * linux-low.c (linux_wait): Unblock async I/O.
14617 (linux_resume): Block and enable async I/O.
14618 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14619 * server.h (block_async_io, unblock_async_io): Add prototypes.
14620
14621 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14622
14623 * remote-utils.c (remote_open): Print a status notice after
14624 opening a TCP port.
14625 * server.c (attach_inferior): Print a status notice after
14626 attaching.
14627
14628 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14629
14630 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14631
14632 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14633
14634 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14635 error packet.
14636 * server.c, target.h: Update copyright years.
14637
14638 2004-02-25 Roland McGrath <roland@redhat.com>
14639
14640 * target.h (struct target_ops): New member `read_auxv'.
14641 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14642 * linux-low.c (linux_read_auxv): New function.
14643 (linux_target_ops): Initialize `read_auxv' member to that.
14644
14645 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14646
14647 Committed by Jim Blandy <jimb@redhat.com>.
14648
14649 * linux-s390-low.c (s390_num_regs): Update.
14650 (s390_regmap): Remove control registers. Use __s390x__ predefine
14651 instead of GPR_SIZE to distiguish s390 and s390x targets.
14652
14653 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14654
14655 * linux-low.c: Update copyright year.
14656 (check_removed_breakpoint): Clear pending_is_breakpoint.
14657 (linux_set_resume_request, linux_queue_one_thread)
14658 (resume_status_pending_p): New functions.
14659 (linux_continue_one_thread): Use process->resume.
14660 (linux_resume): Only resume threads if there are no pending events.
14661 * linux-low.h (struct process_info): Add resume request
14662 pointer.
14663
14664 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14665
14666 * regcache.c (new_register_cache): Clear the allocated register
14667 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14668
14669 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14670
14671 * linux-low.c (linux_resume): Take a struct thread_resume *
14672 argument.
14673 (linux_wait): Update call.
14674 (resume_ptr): New static variable.
14675 (linux_continue_one_thread): Renamed from
14676 linux_continue_one_process. Use resume_ptr.
14677 (linux_resume): Use linux_continue_one_thread.
14678 * server.c (handle_v_cont, handle_v_requests): New functions.
14679 (myresume): New function.
14680 (main): Handle 'v' case.
14681 * target.h (struct thread_resume): New type.
14682 (struct target_ops): Change argument of "resume" to struct
14683 thread_resume *.
14684 (myresume): Delete macro.
14685
14686 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14687
14688 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14689 (uninstall): Support DESTDIR.
14690
14691 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14692
14693 * configure.srv: Add xscale*linux copy of arm*linux entry.
14694
14695 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14696
14697 * linux-arm-low.c (arm_reinsert_addr): New function.
14698 (the_low_target): Add arm_reinsert_addr.
14699
14700 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14701
14702 * mem-break.c: Remove whitespace at end of file.
14703
14704 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14705
14706 * configure.in: Check whether we need to prototype strerror.
14707 * server.h: Optionally prototype strerror.
14708 * gdbreplay.c (perror_with_name): Use strerror.
14709 * linux-low.c (linux_attach_lwp): Use strerror.
14710 * utils.c (perror_with_name): Use strerror.
14711 * config.in, configure: Regenerated.
14712
14713 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14714
14715 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14716 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14717
14718 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14719
14720 * Makefile.in (SFILES): Update.
14721 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14722 low-sun3.c: Remove files.
14723
14724 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14725
14726 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14727 (linux_detach_one_process, linux_detach): New functions.
14728 (linux_target_ops): Add linux_detach.
14729 * server.c (main): Handle 'D' packet.
14730 * target.h (struct target_ops): Add "detach" member.
14731 (detach_inferior): Define.
14732
14733 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14734
14735 From Kelley Cook <kelleycook@wideopenwest.com>:
14736 * configure.srv: Accept i[34567]86 variants.
14737
14738 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14739
14740 * linux-low.c (linux_wait_for_event): Correct comment typos.
14741 (linux_resume_one_process): Call check_removed_breakpoint.
14742 (linux_send_signal): New function.
14743 (linux_target_ops): Add linux_send_signal.
14744 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14745 of kill.
14746 * target.h (struct target_ops): Add send_signal.
14747
14748 2003-05-29 Jim Blandy <jimb@redhat.com>
14749
14750 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14751 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14752 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14753 away part of the register's value.
14754
14755 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14756
14757 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14758 (linux_wait_for_event, linux_init_signals): Likewise.
14759
14760 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14761
14762 * configure.in: Check for stdlib.h.
14763 * configure: Regenerated.
14764 * config.in: Regenerated.
14765
14766 2003-01-04 Andreas Schwab <schwab@suse.de>
14767
14768 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14769
14770 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14771
14772 * Makefile.in: Remove obsolete code.
14773
14774 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14775
14776 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14777 defined(PT_FPR0_HI).
14778
14779 2002-11-17 Stuart Hughes <seh@zee2.com>
14780
14781 * linux-arm-low.c (arm_num_regs): Increase.
14782 (arm_regmap): Include status register.
14783
14784 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14785
14786 * linux-low.c (register_addr): Remove incorrect -1 check.
14787
14788 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14789
14790 * linux-low.c (linux_create_inferior): Call setpgid. Return
14791 the new PID.
14792 (unstopped_p, linux_signal_pid): Remove.
14793 (linux_target_ops): Remove linux_signal_pid.
14794 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14795 global instead of target method.
14796 * target.h (struct target_ops): Remove signal_pid. Update comment
14797 for create_inferior.
14798 * server.c (signal_pid): New variable.
14799 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14800 gdbserver. Set the child to be the foreground process group.
14801 (attach_inferior): Set signal_pid.
14802
14803 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14804
14805 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14806
14807 2002-08-20 Jim Blandy <jimb@redhat.com>
14808
14809 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14810 default for this.
14811
14812 2002-08-01 Andrew Cagney <cagney@redhat.com>
14813
14814 * Makefile.in: Make chill references obsolete.
14815
14816 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14817
14818 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14819 * configure: Regenerate.
14820 * config.in: Regenerate.
14821
14822 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14823
14824 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14825 (perror_with_name, remote_close, remote_open, expect, play): Static.
14826
14827 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14828
14829 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14830 byte offsets instead of an array of indexes.
14831 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14832
14833 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14834
14835 * regcache.c: Add comment.
14836
14837 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14838
14839 * thread-db.c: New file.
14840 * proc-service.c: New file.
14841 * acinclude.m4: New file.
14842 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14843 proc-service.o, and thread-db.o.
14844 (linux-low.o): Add USE_THREAD_DB.
14845 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14846 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14847 * aclocal.m4: Regenerated.
14848 * config.in: Regenerated.
14849 * configure: Regenerated.
14850 * configure.in: Check for proc_service.h, sys/procfs.h,
14851 thread_db.h, and linux/elf.h headrs.
14852 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14853 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14854 Check for -lthread_db and thread support.
14855 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14856 PowerPC, and SuperH.
14857 * i387-fp.c: Constify arguments.
14858 * i387-fp.h: Likewise.
14859 * inferiors.c: (struct thread_info): Renamed from
14860 `struct inferior_info'. Remove PID member. Use generic inferior
14861 list header. All uses updated.
14862 (inferiors, signal_pid): Removed.
14863 (all_threads): New variable.
14864 (get_thread): Define.
14865 (add_inferior_to_list): New function.
14866 (for_each_inferior): New function.
14867 (change_inferior_id): New function.
14868 (add_inferior): Removed.
14869 (remove_inferior): New function.
14870 (add_thread): New function.
14871 (free_one_thread): New function.
14872 (remove_thread): New function.
14873 (clear_inferiors): Use for_each_inferior and free_one_thread.
14874 (find_inferior): New function.
14875 (find_inferior_id): New function.
14876 (inferior_target_data): Update argument type.
14877 (set_inferior_target_data): Likewise.
14878 (inferior_regcache_data): Likewise.
14879 (set_inferior_regcache_data): Likewise.
14880 * linux-low.c (linux_bp_reinsert): Remove.
14881 (all_processes, stopping_threads, using_thrads)
14882 (struct pending_signals, debug_threads, pid_of): New.
14883 (inferior_pid): Replace with macro.
14884 (struct inferior_linux_data): Remove.
14885 (get_stop_pc, add_process): New functions.
14886 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14887 Use add_process and add_thread.
14888 (linux_attach_lwp): New function, based on old linux_attach. Use
14889 add_process and add_thread. Set stop_expected for new threads.
14890 (linux_attach): New function.
14891 (linux_kill_one_process): New function.
14892 (linux_kill): Kill all LWPs.
14893 (linux_thread_alive): Use find_inferior_id.
14894 (check_removed_breakpoints, status_pending_p): New functions.
14895 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14896 Update. Use WNOHANG. Wait for cloned processes also. Update process
14897 struct for the found process.
14898 (linux_wait_for_event): New function.
14899 (linux_wait): Use it. Support LWPs.
14900 (send_sigstop, wait_for_sigstop, stop_all_processes)
14901 (linux_resume_one_process, linux_continue_one_process): New functions.
14902 (linux_resume): Support LWPs.
14903 (REGISTER_RAW_SIZE): Remove.
14904 (fetch_register): Use register_size instead. Call supply_register.
14905 (usr_store_inferior_registers): Likewise. Call collect_register.
14906 Fix recursive case.
14907 (regsets_fetch_inferior_registers): Improve error message.
14908 (regsets_store_inferior_registers): Add debugging.
14909 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14910 (unstopped_p, linux_signal_pid): New functions.
14911 (linux_target_ops): Add linux_signal_pid.
14912 (linux_init_signals): New function.
14913 (initialize_low): Call it. Initialize using_threads.
14914 * regcache.c (inferior_regcache_data): Add valid
14915 flag.
14916 (get_regcache): Fetch registers lazily. Add fetch argument
14917 and update all callers.
14918 (regcache_invalidate_one, regcache_invalidate): New
14919 functions.
14920 (new_register_cache): Renamed from create_register_cache.
14921 Return the new regcache.
14922 (free_register_cache): Change argument to a void *.
14923 (registers_to_string, registers_from_string): Call get_regcache
14924 with fetch flag set.
14925 (register_data): Make static. Pass fetch flag to get_regcache.
14926 (supply_register): Call get_regcache with fetch flag clear.
14927 (collect_register): Call get_regcache with fetch flag set.
14928 (collect_register_as_string): New function.
14929 * regcache.h: Update.
14930 * remote-utils.c (putpkt): Flush after debug output and use
14931 stderr.
14932 Handle input interrupts while waiting for an ACK.
14933 (input_interrupt): Use signal_pid method.
14934 (getpkt): Flush after debug output and use stderr.
14935 (outreg): Use collect_register_as_string.
14936 (new_thread_notify, dead_thread_notify): New functions.
14937 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14938 and general_thread.
14939 (look_up_one_symbol): Flush after debug output.
14940 * server.c (step_thread, server_waiting): New variables.
14941 (start_inferior): Don't use signal_pid. Update call to mywait.
14942 (attach_inferior): Update call to mywait.
14943 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14944 (main): Don't fetch/store registers explicitly. Use
14945 set_desired_inferior. Support proposed ``Hs'' packet. Update
14946 calls to mywait.
14947 * server.h: Update.
14948 (struct inferior_list, struct_inferior_list_entry): New.
14949 * target.c (set_desired_inferior): New.
14950 (write_inferior_memory): Constify.
14951 (mywait): New function.
14952 * target.h: Update.
14953 (struct target_ops): New signal_pid method.
14954 (mywait): Removed macro, added prototype.
14955
14956 * linux-low.h (regset_func): Removed.
14957 (regset_fill_func, regset_store_func): New.
14958 (enum regset_type): New.
14959 (struct regset_info): Add type field. Use new operation types.
14960 (struct linux_target_ops): stop_pc renamed to get_pc.
14961 Add decr_pc_after_break and breakpoint_at.
14962 (get_process, get_thread_proess, get_process_thread)
14963 (strut process_info, all_processes, linux_attach_lwp)
14964 (thread_db_init): New.
14965
14966 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14967 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14968 (the_low_target): Add new members.
14969 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14970 (i386_store_fpxregset): Constify.
14971 (target_regsets): Add new kind identifier.
14972 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14973 (i386_set_pc): Add debugging.
14974 (i386_breakpoint_at): New function.
14975 (the_low_target): Add new members.
14976 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14977 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14978 (mips_breakpoint_at): New.
14979 (the_low_target): Add new members.
14980 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14981 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14982 (the_low_target): Add new members.
14983 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14984 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14985 (the_low_target): Add new members.
14986 * linux-x86-64-low.c (target_regsets): Add new kind
14987 identifier.
14988
14989 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14990
14991 From Martin Pool <mbp@samba.org>:
14992 * server.c (gdbserver_usage): New function.
14993 (main): Call it.
14994
14995 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14996
14997 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14998 stop_at -> stop_pc.
14999
15000 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15001
15002 * Makefile.in: Remove obsolete code.
15003
15004 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15005
15006 * linux-low.c (regsets_fetch_inferior_registers),
15007 (regsets_store_inferior_registers): Removed cast to int from
15008 ptrace() calls.
15009 * regcache.h: Added declaration of struct inferior_info.
15010
15011 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15012
15013 * inferiors.c (struct inferior_info): Add regcache_data.
15014 (add_inferior): Call create_register_cache.
15015 (clear_inferiors): Call free_register_cache.
15016 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15017 * regcache.c (struct inferior_regcache_data): New.
15018 (registers): Remove.
15019 (get_regcache): New function.
15020 (create_register_cache, free_register_cache): New functions.
15021 (set_register_cache): Don't initialize the register cache here.
15022 (registers_to_string, registers_from_string, register_data): Call
15023 get_regcache.
15024 * regcache.h: Add prototypes.
15025 * server.h: Likewise.
15026
15027 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15028
15029 * mem-break.c: New file.
15030 * mem-break.h: New file.
15031 * Makefile.in: Add mem-break.o rule; update server.h
15032 dependencies.
15033 * inferiors.c (struct inferior_info): Add target_data
15034 member.
15035 (clear_inferiors): Free target_data member if set.
15036 (inferior_target_data, set_inferior_target_data): New functions.
15037 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15038 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15039 * linux-low.c (linux_bp_reinsert): New variable.
15040 (struct inferior_linux_data): New.
15041 (linux_create_inferior): Use set_inferior_target_data.
15042 (linux_attach): Likewise. Call add_inferior.
15043 (linux_wait_for_one_inferior): New function.
15044 (linux_wait): Call it.
15045 (linux_write_memory): Add const.
15046 (initialize_low): Call set_breakpoint_data.
15047 * linux-low.h (struct linux_target_ops): Add breakpoint
15048 handling members.
15049 * server.c (attach_inferior): Remove extra add_inferior
15050 call.
15051 * server.h: Include mem-break.h. Update inferior.c
15052 prototypes.
15053 * target.c (read_inferior_memory)
15054 (write_inferior_memory): New functions.
15055 * target.h (read_inferior_memory)
15056 (write_inferior_memory): Change macros to prototypes.
15057 (struct target_ops): Update comments. Add const to write_memory
15058 definition.
15059
15060 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15061
15062 * linux-low.c (usr_store_inferior_registers): Support
15063 registers which are allowed to fail to store.
15064 * linux-low.h (linux_target_ops): Likewise.
15065 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15066 (ppc_cannot_store_register): FPSCR may not be storable.
15067
15068 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15069
15070 * server.h: Include <string.h> if HAVE_STRING_H.
15071 * ChangeLog: Correct paths in last ChangeLog entry.
15072
15073 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15074
15075 * linux-low.h: Remove obsolete prototypes.
15076 (struct linux_target_ops): New.
15077 (extern the_low_target): New.
15078 * linux-low.c (num_regs, regmap): Remove declarations.
15079 (register_addr): Use the_low_target explicitly.
15080 (fetch_register): Likewise.
15081 (usr_fetch_inferior_registers): Likewise.
15082 (usr_store_inferior_registers): Likewise.
15083 * linux-arm-low.c (num_regs): Remove.
15084 (arm_num_regs): Define.
15085 (arm_regmap): Renamed from regmap, made static.
15086 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15087 made static.
15088 (arm_cannot_store_register): Renamed from cannot_store_register,
15089 made static.
15090 (the_low_target): New.
15091 * linux-i386-low.c (num_regs): Remove.
15092 (i386_num_regs): Define.
15093 (i386_regmap): Renamed from regmap, made static.
15094 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15095 made static.
15096 (i386_cannot_store_register): Renamed from cannot_store_register,
15097 made static.
15098 (the_low_target): New.
15099 * linux-ia64-low.c (num_regs): Remove.
15100 (ia64_num_regs): Define.
15101 (ia64_regmap): Renamed from regmap, made static.
15102 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15103 made static.
15104 (ia64_cannot_store_register): Renamed from cannot_store_register,
15105 made static.
15106 (the_low_target): New.
15107 * linux-m68k-low.c (num_regs): Remove.
15108 (m68k_num_regs): Define.
15109 (m68k_regmap): Renamed from regmap, made static.
15110 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15111 made static.
15112 (m68k_cannot_store_register): Renamed from cannot_store_register,
15113 made static.
15114 (the_low_target): New.
15115 * linux-mips-low.c (num_regs): Remove.
15116 (mips_num_regs): Define.
15117 (mips_regmap): Renamed from regmap, made static.
15118 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15119 made static.
15120 (mips_cannot_store_register): Renamed from cannot_store_register,
15121 made static.
15122 (the_low_target): New.
15123 * linux-ppc-low.c (num_regs): Remove.
15124 (ppc_num_regs): Define.
15125 (ppc_regmap): Renamed from regmap, made static.
15126 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15127 made static.
15128 (ppc_cannot_store_register): Renamed from cannot_store_register,
15129 made static.
15130 (the_low_target): New.
15131 * linux-s390-low.c (num_regs): Remove.
15132 (s390_num_regs): Define.
15133 (s390_regmap): Renamed from regmap, made static.
15134 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15135 made static.
15136 (s390_cannot_store_register): Renamed from cannot_store_register,
15137 made static.
15138 (the_low_target): New.
15139 * linux-sh-low.c (num_regs): Remove.
15140 (sh_num_regs): Define.
15141 (sh_regmap): Renamed from regmap, made static.
15142 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15143 made static.
15144 (sh_cannot_store_register): Renamed from cannot_store_register,
15145 made static.
15146 (the_low_target): New.
15147 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15148 (the_low_target): New.
15149
15150 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15151
15152 * Makefile.in: Add stamp-h target.
15153 * configure.in: Create stamp-h.
15154 * configure: Regenerated.
15155
15156 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15157
15158 * inferiors.c: New file.
15159 * target.c: New file.
15160 * target.h: New file.
15161 * Makefile.in: Add target.o and inferiors.o. Update
15162 dependencies.
15163 * linux-low.c (inferior_pid): New static variable,
15164 moved from server.c.
15165 (linux_create_inferior): Renamed from create_inferior.
15166 Call add_inferior. Return 0 on success instead of a PID.
15167 (linux_attach): Renamed from myattach.
15168 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15169 (linux_thread_alive): Renamed from mythread_alive.
15170 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15171 child dies.
15172 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15173 (regsets_store_inferior_registers): Correct error message.
15174 Add missing ``return 0''.
15175 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15176 (linux_store_registers): Renamed from store_inferior_registers.
15177 (linux_read_memory): Renamed from read_inferior_memory.
15178 (linux_write_memory): Renamed from write_inferior_memory.
15179 (linux_target_ops): New structure.
15180 (initialize_low): Call set_target_ops ().
15181 * remote-utils.c (unhexify): New function.
15182 (hexify): New function.
15183 (input_interrupt): Send signals to ``signal_pid''.
15184 * server.c (inferior_pid): Remove.
15185 (start_inferior): Update create_inferior call.
15186 (attach_inferior): Call add_inferior.
15187 (handle_query): New function.
15188 (main): Call handle_query for `q' packets.
15189 * server.h: Include "target.h". Remove obsolete prototypes.
15190 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15191
15192 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15193
15194 * Makefile.in: Add WARN_CFLAGS. Update configury
15195 dependencies.
15196 * configure.in: Check for <string.h>
15197 * configure: Regenerate.
15198 * config.in: Regenerate.
15199 * gdbreplay.c: Include needed system headers.
15200 (remote_open): Remove strchr prototype.
15201 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15202 * regcache.c (supply_register): Change buf argument to const void *.
15203 (supply_register_by_name): Likewise.
15204 (collect_register): Change buf argument to void *.
15205 (collect_register_by_name): Likewise.
15206 * regcache.h: Add missing prototypes.
15207 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15208 * server.c (handle_query): New function.
15209 (attached): New static variable, moved out of main.
15210 (main): Quiet longjmp clobber warnings.
15211 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15212 * utils.c (error): Remove NORETURN.
15213 (fatal): Likewise.
This page took 0.325854 seconds and 3 git commands to generate.