]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/ChangeLog
Deduplicate require_running macros and move them up
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (require_running): Rename to ...
4 (require_running_or_return): ... this ...
5 (require_running_or_break): ... and this.
6 (handle_query, process_serial_event): Adjust.
7
8 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
9
10 * linux-low.c (linux_set_resume_request): Remove unused
11 variables.
12
13 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
14
15 * server.c (first_thread_of): Remove.
16 (process_serial_event): Replace usage of first_thread_of with
17 find_any_thread_of_pid.
18 * tracepoint.c (same_process_p): Remove.
19 (gdb_agent_about_to_close): Replace usage of same_process_p with
20 find_any_thread_of_pid.
21 * linux-x86-low.c (same_process_callback): Remove.
22 (x86_arch_setup_process_callback): Replace usage of
23 same_process_callback with find_any_thread_of_pid.
24 * thread-db.c (any_thread_of): Remove.
25 (switch_to_process): Replace usage of any_thread_of with
26 find_any_thread_of_pid.
27 * inferiors.c (thread_pid_matches_callback): Remove.
28 (find_thread_process): Adjust to use find_any_thread_of_pid.
29
30 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
31
32 * regcache.c (get_thread_regcache): Guard calls to "memset"
33 with "!VEC_empty".
34
35 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
36
37 * linux-low.c (handle_extended_wait): Use
38 "allocate_target_description" instead of "XNEW".
39 * linux-x86-low.c (initialize_low_arch): Likewise.
40
41 2017-09-05 Yao Qi <yao.qi@linaro.org>
42
43 * configure.srv (srv_i386_regobj): Remove.
44 (srv_amd64_regobj): Remove.
45 (srv_regobj): Set it to "" for x86 non-linux targets.
46 * linux-x86-tdesc.c (i386_linux_read_description):
47 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
48 (init_registers_i386): Remove the declaration.
49 (tdesc_i386): Remove the declaration.
50 (lynx_i386_arch_setup): Call i386_create_target_description.
51 * nto-x86-low.c: Likewise.
52 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
53 [!__x86_64__]: include arch/i386.h.
54 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
55
56 2017-09-05 Yao Qi <yao.qi@linaro.org>
57
58 * configure.srv (srv_amd64_linux_xmlfiles): Remove
59 i386/amd64-XXX-linux from it.
60
61 2017-09-05 Yao Qi <yao.qi@linaro.org>
62
63 * configure.srv: Empty srv_amd64_linux_regobj if $development is
64 false.
65 (ipa_amd64_linux_regobj): Remove.
66 (ipa_x32_linux_regobj): Remove.
67
68 2017-09-05 Yao Qi <yao.qi@linaro.org>
69
70 * Makefile.in (arch-amd64.o): New rule.
71 * configure.srv: Append arch-amd64.o.
72 * linux-amd64-ipa.c: Include common/x86-xstate.h.
73 (get_ipa_tdesc): Call amd64_linux_read_description.
74 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
75 and init_registers_amd64_XXX.
76 * linux-x86-low.c (x86_linux_read_description): Call
77 amd64_linux_read_description.
78 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
79 (initialize_low_arch): Don't call init_registers_x32_XXX and
80 init_registers_amd64_XXX.
81 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
82 and tdesc_amd64_XXX.
83 [__x86_64__] (amd64_tdesc_test): New function.
84 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
85 and init_registers_amd64_XXX.
86 * linux-x86-tdesc.c: Include arch/amd64.h.
87 (xcr0_to_tdesc_idx): New function.
88 (i386_linux_read_description): New function.
89 (amd64_get_ipa_tdesc_idx): New function.
90 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
91 (amd64_get_ipa_tdesc): Declare.
92
93 2017-09-05 Yao Qi <yao.qi@linaro.org>
94
95 * configure.srv (srv_i386_linux_xmlfiles): Remove
96 i386/i386-XXX-linux.xml from it.
97
98 2017-09-05 Yao Qi <yao.qi@linaro.org>
99
100 * configure.srv: Set srv_i386_linux_regobj empty if $development
101 is false.
102 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
103 initialize_low_tdesc.
104 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
105 with #if initialize_low_tdesc.
106 * linux-x86-tdesc-selftest.c: New file.
107 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
108
109 2017-09-05 Yao Qi <yao.qi@linaro.org>
110
111 * Makefile.in (arch-i386.o): New rule.
112 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
113 (x86_64-*-linux*): Likewise.
114 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
115 include arch/i386.h.
116 (i386_linux_read_description): Remove code and call
117 i386_create_target_description.
118 * tdesc.c (allocate_target_description): New function.
119 * tdesc.h (set_tdesc_architecture): Remove declaration.
120 (set_tdesc_osabi): Likewise.
121
122 2017-09-05 Yao Qi <yao.qi@linaro.org>
123
124 * linux-x86-tdesc.c: Don't include <inttypes.h>.
125 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
126 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
127 .xmltarget.
128 * server.c (get_features_xml): Call tdesc_get_features_xml.
129 * tdesc.c (set_tdesc_architecture): New function.
130 (set_tdesc_osabi): New function.
131 (tdesc_get_features_xml): New function.
132 (tdesc_create_feature): Add an argument.
133 * tdesc.h (struct target_desc) <features>: New field.
134 <arch, osabi>: New field.
135 (~target_desc): xfree features, arch, and osabi.
136 (target_desc::oerator==): Don't compare .xmltarget.
137 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
138 (set_tdesc_osabi): Likewise.
139 (tdesc_get_features_xml): Likewise.
140
141 2017-09-05 Yao Qi <yao.qi@linaro.org>
142
143 * linux-x86-tdesc.c: Include selftest.h.
144 (i386_tdesc_test): New function.
145 (initialize_low_tdesc): Call selftests::register_test.
146 * tdesc.h: Include regdef.h.
147 (target_desc): Override operator == and !=.
148
149 2017-09-05 Yao Qi <yao.qi@linaro.org>
150
151 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
152 (ipa_obj): Likewise.
153 * linux-i386-ipa.c: Include common/x86-xstate.h
154 (get_ipa_tdesc): Call i386_linux_read_description.
155 (initialize_low_tracepoint): Don't call init_registers_XXX
156 functions, call initialize_low_tdesc instead.
157 * linux-x86-low.c (x86_linux_read_description): Call
158 i386_linux_read_description.
159 (initialize_low_arch): Don't call init_registers_i386_XXX
160 functions, call initialize_low_tdesc.
161 * linux-x86-tdesc.c: New file.
162 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
163 (i386_get_ipa_tdesc_idx): Declare.
164 (i386_get_ipa_tdesc): Declare.
165 (initialize_low_tdesc): Declare.
166
167 2017-09-05 Yao Qi <yao.qi@linaro.org>
168
169 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
170 instead of 0.
171
172 2017-09-05 Yao Qi <yao.qi@linaro.org>
173
174 * Makefile.in (IPA_OBJS): Add vec-ipa.o
175 * regcache.c (get_thread_regcache): Use VEC_length.
176 (init_register_cache): Likewise.
177 (regcache_cpy): Likewise.
178 (registers_to_string): Iterate reg_defs via VEC_iterate.
179 (find_regno): Likewise.
180 (find_register_by_number): Use VEC_index.
181 (register_size): Call find_register_by_number.
182 (register_data): Call find_register_by_number.
183 (supply_regblock): Use VEC_length.
184 (regcache_raw_read_unsigned): Likewise.
185 * tdesc.c (init_target_desc): Iterate reg_defs via
186 VEC_iterate.
187 (default_description): Update initializer.
188 (copy_target_description): Don't update field num_registers.
189 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
190 <num_registers>: Remove.
191
192 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
193
194 * Makefile.in (.SECONDARY): Define target.
195
196 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
197
198 * linux-low.c (linux_wait_1): Adjust.
199 * server.c (queue_stop_reply_callback): Adjust.
200
201 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
202
203 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
204 QEnvironmentUnset and QEnvironmentReset packets.
205 (handle_query): Inform remote that QEnvironmentHexEncoded,
206 QEnvironmentUnset and QEnvironmentReset are supported.
207
208 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
209
210 * inferiors.h (inferior_target_data): Rename to ...
211 (thread_target_data): ... this.
212 (inferior_regcache_data): Rename to ...
213 (thread_regcache_data): ... this.
214 (set_inferior_regcache_data): Rename to ...
215 (set_thread_regcache_data): ... this.
216 * inferiors.c (inferior_target_data): Rename to ...
217 (thread_target_data): ... this.
218 (inferior_regcache_data): Rename to ...
219 (thread_regcache_data): ... this.
220 (set_inferior_regcache_data): Rename to ...
221 (set_thread_regcache_data): ... this.
222 (free_one_thread): Update.
223 * linux-low.h (get_thread_lwp): Update.
224 * regcache.c (get_thread_regcache): Update.
225 (regcache_invalidate_thread): Update.
226 (free_register_cache_thread): Update.
227 * win32-i386-low.c (update_debug_registers_callback): Update.
228 (win32_get_current_dr): Update.
229 * win32-low.c (thread_rec): Update.
230 (delete_thread_info): Update.
231 (continue_one_thread): Update.
232 (suspend_one_thread): Update.
233
234 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
235
236 * inferiors.c (set_inferior_target_data): Remove.
237 * inferiors.h (set_inferior_target_data): Remove.
238
239 2017-08-18 Yao Qi <yao.qi@linaro.org>
240
241 * Makefile.in (OBS): Add selftest.o.
242 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
243 * configure, config.in: Re-generated.
244 * server.c: Include common/sefltest.h.
245 (captured_main): Handle option --selftest.
246
247 2017-08-09 Yao Qi <yao.qi@linaro.org>
248
249 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
250 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
251 i386-avx-mpx.o and i386-mmx.o.
252 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
253 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
254 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
255 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
256 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
257 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
258 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
259 i386/amd64-avx-mpx.xml.
260
261 2017-08-09 Yao Qi <yao.qi@linaro.org>
262
263 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
264 and x32-avx-avx512.o.
265 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
266 i386/x32-avx-avx512.xml.
267
268 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
269
270 * tracepoint.h (enum class fast_tpoint_collect_result): New
271 enumeration.
272 (fast_tracepoint_collecting): Change return type to
273 fast_tpoint_collect_result.
274 * tracepoint.c (fast_tracepoint_collecting): Likewise.
275 * linux-low.h: Include tracepoint.h.
276 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
277 fast_tpoint_collect_result.
278 * linux-low.c (handle_tracepoints): Adjust.
279 (linux_fast_tracepoint_collecting): Change return type to
280 fast_tpoint_collect_result.
281 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
282 linux_wait_1, stuck_in_jump_pad_callback,
283 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
284 proceed_one_lwp): Adjust to type change.
285
286 2017-07-10 Yao Qi <yao.qi@linaro.org>
287
288 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
289
290 2017-06-29 Yao Qi <yao.qi@linaro.org>
291
292 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
293 Remove.
294 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
295
296 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
297
298 * Makefile.in (IPA_OBJS): Sort and format one item per line.
299
300 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * linux-low.c (linux_create_inferior): Adjust code to access the
303 environment information via 'gdb_environ' class.
304 * lynx-low.c (lynx_create_inferior): Likewise.
305 * server.c (our_environ): Make it an instance of 'gdb_environ'.
306 (get_environ): Return a pointer to 'our_environ'.
307 (captured_main): Initialize 'our_environ'.
308 * server.h (get_environ): Adjust prototype.
309 * spu-low.c (spu_create_inferior): Adjust code to access the
310 environment information via 'gdb_environ' class.
311
312 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
313
314 * linux-low.c (linux_read_memory, linux_write_memory): Remove
315 usage of "register" keyword.
316
317 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
318
319 * configure: Re-generate.
320
321 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
322
323 * configure: Re-generate.
324
325 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
326
327 * Makefile.in (COMPILE.pre): Add "-x c++".
328
329 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
330
331 * fork-child.c: Conditionally include <signal.h>.
332
333 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
334
335 * server.c (handle_general_set): Handle new packet
336 "QStartupWithShell".
337 (handle_query): Add "QStartupWithShell" to the list of supported
338 packets.
339 (gdbserver_usage): Add help text explaining the
340 new "--startup-with-shell" and "--no-startup-with-shell" CLI
341 options.
342 (captured_main): Recognize and act upon the presence of the new
343 CLI options.
344
345 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
346 Pedro Alves <palves@redhat.com>
347
348 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
349 * configure: Regenerate.
350 * configure.srv (srv_linux_obj): Add "fork-child.o" and
351 "fork-inferior.o".
352 (i[34567]86-*-lynxos*): Likewise.
353 (spu*-*-*): Likewise.
354 * fork-child.c: New file.
355 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
356 and "environ.h".
357 (linux_ptrace_fun): New function.
358 (linux_create_inferior): Adjust function prototype to reflect
359 change on "target.h". Adjust function code to use
360 "fork_inferior".
361 (linux_request_interrupt): Delete "signal_pid".
362 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
363 (lynx_ptrace_fun): New function.
364 (lynx_create_inferior): Adjust function prototype to reflect
365 change on "target.h". Adjust function code to use
366 "fork_inferior".
367 * nto-low.c (nto_create_inferior): Adjust function prototype and
368 code to reflect change on "target.h". Update comments.
369 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
370 "common-terminal.h" and "environ.h".
371 (terminal_fd): Moved to fork-child.c.
372 (old_foreground_pgrp): Likewise.
373 (restore_old_foreground_pgrp): Likewise.
374 (last_status): Make it global.
375 (last_ptid): Likewise.
376 (our_environ): New variable.
377 (startup_with_shell): Likewise.
378 (program_name): Likewise.
379 (program_argv): Rename to...
380 (program_args): ...this.
381 (wrapper_argv): New variable.
382 (start_inferior): Delete function.
383 (get_exec_wrapper): New function.
384 (get_exec_file): Likewise.
385 (get_environ): Likewise.
386 (prefork_hook): Likewise.
387 (post_fork_inferior): Likewise.
388 (postfork_hook): Likewise.
389 (postfork_child_hook): Likewise.
390 (handle_v_run): Update code to deal with arguments coming from the
391 remote host. Update calls from "start_inferior" to
392 "create_inferior".
393 (captured_main): Likewise. Initialize environment variable. Call
394 "have_job_control".
395 * server.h (post_fork_inferior): New prototype.
396 (get_environ): Likewise.
397 (last_status): Declare.
398 (last_ptid): Likewise.
399 (signal_pid): Likewise.
400 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
401 (spu_ptrace_fun): New function.
402 (spu_create_inferior): Adjust function prototype to reflect change
403 on "target.h". Adjust function code to use "fork_inferior".
404 * target.c (target_terminal_init): New function.
405 (target_terminal_inferior): Likewise.
406 (target_terminal_ours): Likewise.
407 * target.h: Include <vector>.
408 (struct target_ops) <create_inferior>: Update prototype.
409 (create_inferior): Update macro.
410 * utils.c (gdb_flush_out_err): New function.
411 * win32-low.c (win32_create_inferior): Adjust function prototype
412 and code to reflect change on "target.h".
413
414 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
415
416 * inferiors.c (switch_to_thread): New function.
417
418 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
419
420 * Makefile.in (SFILE): Add "common/job-control.c".
421 (OBS): Add "job-control.o".
422
423 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
424
425 * Makefile: Remove "@host_makefile_frag@".
426
427 2017-05-05 Pedro Alves <palves@redhat.com>
428
429 * configure: Regenerate.
430
431 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
432
433 * configure: Regenerate.
434
435 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
436
437 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
438 software_single_step change of return type to
439 std::vector<CORE_ADDR>.
440 * linux-low.c (install_software_single_step_breakpoints):
441 Likewise.
442 * linux-low.h (install_software_single_step_breakpoints):
443 Likewise.
444
445 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
446
447 * remote-utils.c: Include "gdb_termios.h" instead of
448 "terminal.h".
449 * terminal.h: Delete file.
450
451 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
452
453 * server.c: Include <vector>.
454 <program_argv, wrapper_argv>: Convert to std::vector.
455 (start_inferior): Rewrite function to use C++.
456 (handle_v_run): Likewise. Update code that calculates the argv
457 based on the vRun packet; use C++.
458 (captured_main): Likewise.
459
460 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
461
462 * server.c (handle_v_cont): Initialize thread_resume::thread
463 with null_ptid.
464
465 2017-04-05 Pedro Alves <palves@redhat.com>
466
467 * configure: Regenerate.
468
469 2017-04-05 Pedro Alves <palves@redhat.com>
470
471 * gdbreplay.c (sync_error): Constify.
472 * linux-x86-low.c (push_opcode): Constify.
473
474 2017-04-05 Pedro Alves <palves@redhat.com>
475
476 * win32-low.c (get_child_debug_event)
477 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
478 Report TARGET_WAITKIND_SPURIOUS instead.
479
480 2017-04-05 Pedro Alves <palves@redhat.com>
481
482 * remote-utils.c (remote_prepare, remote_open): Constify.
483 * remote-utils.h (remote_prepare, remote_open): Constify.
484 * server.c (captured_main): Constify 'port' handling.
485
486 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
487
488 * Makefile.in (clean): Clear .deps.
489
490 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
491
492 * .gitignore: Remove generated files, replace with wildcard.
493 * (clean): Replace removal of generated files with wildcard.
494 (version.c): Replace with...
495 (version-generated.c): ...this.
496 (xml-builtin.c): Replace with...
497 (xml-builtin-generated.c): ...this.
498 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
499 (%.c: *regformats*): Replace with...
500 (%-generated.c: *regformats*): ...this.
501
502 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
503
504 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
505 (xtensa_fill_gregset): Call collect_register_by_name for
506 threadptr register.
507 (xtensa_store_gregset): Call supply_register_by_name for
508 threadptr register.
509
510 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
511
512 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
513 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
514 (xtensa_store_gregset): Call supply_register for all registers in
515 a0_regnum..a0_regnum + C0_NREGS range.
516
517 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
518
519 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
520 (ax-ipa.o: ax.c): Remove.
521 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
522 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
523 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
524 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
525 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
526
527 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
530 (print-utils-ipa.o: ../common/print-utils.c): Remove.
531 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
532 (errors-ipa.o: ../common/errors.c): Remove.
533 (format-ipa.o: ../common/format.c): Remove.
534 (common-utils-ipa.o: ../common/common-utils.c): Remove.
535
536 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
537
538 * Makefile.in (%-ipa.o: %.c): New rule.
539 (tracepoint-ipa.o: tracepoint.c): Remove.
540 (utils-ipa.o: utils.c): Remove.
541 (remote-utils-ipa.o: remote-utils.c): Remove.
542 (regcache-ipa.o: regcache.c): Remove.
543 (i386-linux-ipa.o: i386-linux.c): Remove.
544 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
545 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
546 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
547 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
548 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
549 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
550 (amd64-linux-ipa.o: amd64-linux.c): Remove.
551 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
552 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
553 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
554 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
555 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
556 (aarch64-ipa.o: aarch64.c): Remove.
557 (s390-linux32-ipa.o: s390-linux32.c): Remove.
558 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
559 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
560 (s390-linux64-ipa.o: s390-linux64.c): Remove.
561 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
562 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
563 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
564 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
565 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
566 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
567 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
568 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
569 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
570 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
571 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
572 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
573 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
574 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
575 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
576 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
577 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
578 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
579 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
580 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
581 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
582 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
583 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
584 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
585 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
586 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
587 (tdesc-ipa.o: tdesc.c): Remove.
588 (x32-linux-ipa.o: x32-linux.c): Remove.
589 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
590 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
591
592 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
593
594 * Makefile.in (%.o: ../arch/%.c): New rule.
595 (arm.o: ../arch/arm.c): Remove.
596 (arm-linux.o: ../arch/arm-linux.c): Remove.
597 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
598 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
599
600 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
601
602 * Makefile.in (%.o: ../nat/%.c): New rule.
603 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
604 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
605 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
606 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
607 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
608 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
609 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
610 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
611 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
612 (linux-personality.o: ../nat/linux-personality.c): Remove.
613 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
614 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
615 (x86-linux.o: ../nat/x86-linux.c): Remove.
616 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
617 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
618
619 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
620
621 * Makefile.in (%.o: ../common/%.c): New rule.
622 (signals.o: ../common/signals.c): Remove.
623 (print-utils.o: ../common/print-utils.c): Remove.
624 (rsp-low.o: ../common/rsp-low.c): Remove.
625 (common-utils.o: ../common/common-utils.c): Remove.
626 (posix-strerror.o: ../common/posix-strerror.c): Remove.
627 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
628 (vec.o: ../common/vec.c): Remove.
629 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
630 (xml-utils.o: ../common/xml-utils.c): Remove.
631 (ptid.o: ../common/ptid.c): Remove.
632 (buffer.o: ../common/buffer.c): Remove.
633 (format.o: ../common/format.c): Remove.
634 (filestuff.o: ../common/filestuff.c): Remove.
635 (agent.o: ../common/agent.c): Remove.
636 (errors.o: ../common/errors.c): Remove.
637 (environ.o: ../common/environ.c): Remove.
638 (common-debug.o: ../common/common-debug.c): Remove.
639 (cleanups.o: ../common/cleanups.c): Remove.
640 (common-exceptions.o: ../common/common-exceptions.c): Remove.
641 (fileio.o: ../common/fileio.c): Remove.
642 (common-regcache.o: ../common/common-regcache.c): Remove.
643 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
644 (new-op.o: ../common/new-op.c): Remove.
645 (btrace-common.o: ../common/btrace-common.c): Remove.
646
647 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
648
649 * Makefile.in (%.o: ../target/%.c): New rule.
650 (waitstatus.o: ../target/waitstatus.c): Remove.
651
652 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
653
654 * Makefile.in
655 (%.c: ../regformats/%.dat,
656 (%.c: ../regformats/arm/%.dat,
657 (%.c: ../regformats/i386/%.dat,
658 (%.c: ../regformats/rs6000/%.dat): New rules.
659 (aarch64.c): Remove.
660 (reg-arm.c): Remove.
661 (arm-with-iwmmxt.c): Remove.
662 (arm-with-vfpv2.c): Remove.
663 (arm-with-vfpv3.c): Remove.
664 (arm-with-neon.c): Remove.
665 (reg-bfin.c): Remove.
666 (reg-cris.c): Remove.
667 (reg-crisv32.c): Remove.
668 (i386.c): Remove.
669 (i386-linux.c): Remove.
670 (i386-avx.c): Remove.
671 (i386-avx-linux.c): Remove.
672 (i386-avx-avx512.c): Remove.
673 (i386-avx-avx512-linux.c): Remove.
674 (i386-mpx.c): Remove.
675 (i386-mpx-linux.c): Remove.
676 (i386-avx-mpx-avx512-pku.c): Remove.
677 (i386-avx-mpx-avx512-pku-linux.c): Remove.
678 (i386-avx-mpx.c): Remove.
679 (i386-avx-mpx-linux.c): Remove.
680 (i386-mmx.c): Remove.
681 (i386-mmx-linux.c): Remove.
682 (reg-ia64.c): Remove.
683 (reg-m32r.c): Remove.
684 (reg-m68k.c): Remove.
685 (reg-cf.c): Remove.
686 (mips-linux.c): Remove.
687 (mips-dsp-linux.c): Remove.
688 (mips64-linux.c): Remove.
689 (mips64-dsp-linux.c): Remove.
690 (nios2-linux.c): Remove.
691 (powerpc-32.c): Remove.
692 (powerpc-32l.c): Remove.
693 (powerpc-altivec32l.c): Remove.
694 (powerpc-cell32l.c): Remove.
695 (powerpc-vsx32l.c): Remove.
696 (powerpc-isa205-32l.c): Remove.
697 (powerpc-isa205-altivec32l.c): Remove.
698 (powerpc-isa205-vsx32l.c): Remove.
699 (powerpc-e500l.c): Remove.
700 (powerpc-64l.c): Remove.
701 (powerpc-altivec64l.c): Remove.
702 (powerpc-cell64l.c): Remove.
703 (powerpc-vsx64l.c): Remove.
704 (powerpc-isa205-64l.c): Remove.
705 (powerpc-isa205-altivec64l.c): Remove.
706 (powerpc-isa205-vsx64l.c): Remove.
707 (s390-linux32.c): Remove.
708 (s390-linux32v1.c): Remove.
709 (s390-linux32v2.c): Remove.
710 (s390-linux64.c): Remove.
711 (s390-linux64v1.c): Remove.
712 (s390-linux64v2.c): Remove.
713 (s390-te-linux64.c): Remove.
714 (s390-vx-linux64.c): Remove.
715 (s390-tevx-linux64.c): Remove.
716 (s390x-linux64.c): Remove.
717 (s390x-linux64v1.c): Remove.
718 (s390x-linux64v2.c): Remove.
719 (s390x-te-linux64.c): Remove.
720 (s390x-vx-linux64.c): Remove.
721 (s390x-tevx-linux64.c): Remove.
722 (tic6x-c64xp-linux.c): Remove.
723 (tic6x-c64x-linux.c): Remove.
724 (tic6x-c62x-linux.c): Remove.
725 (reg-sh.c): Remove.
726 (reg-sparc64.c): Remove.
727 (reg-spu.c): Remove.
728 (amd64.c): Remove.
729 (amd64-linux.c): Remove.
730 (amd64-avx.c): Remove.
731 (amd64-avx-linux.c): Remove.
732 (amd64-avx-avx512.c): Remove.
733 (amd64-avx-avx512-linux.c): Remove.
734 (amd64-mpx.c): Remove.
735 (amd64-mpx-linux.c): Remove.
736 (amd64-avx-mpx-avx512-pku.c): Remove.
737 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
738 (amd64-avx-mpx.c): Remove.
739 (amd64-avx-mpx-linux.c): Remove.
740 (x32.c): Remove.
741 (x32-linux.c): Remove.
742 (x32-avx.c): Remove.
743 (x32-avx-linux.c): Remove.
744 (x32-avx-avx512.c): Remove.
745 (x32-avx-avx512-linux.c): Remove.
746 (reg-xtensa.c): Remove.
747 (reg-tilegx.c): Remove.
748 (reg-tilegx32.c): Remove.
749
750 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
751
752 * Makefile.in (SFILES): Add "common/environ.c".
753 (OBJS): Add "common/environ.h".
754
755 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
756
757 * configure.ac: Check if the fs_base and gs_base members of
758 `struct user_regs_struct' exist.
759 * config.in: Regenerated.
760 * configure: Likewise.
761
762 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
763
764 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
765 target_read_memory.
766 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
767 (get_next_pcs_syscall_next_pc): Likewise.
768
769 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
770
771 * win32-i386-low.c: Fix incorrect reference to a couple source files.
772 * nto-x86-low.c: Likewise.
773
774 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
775
776 * Makefile.in: Include disable-implicit-rules.mk.
777
778 2016-11-23 Pedro Alves <palves@redhat.com>
779
780 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
781 (debug_vprintf): Use std::chrono::steady_clock instead of
782 gettimeofday. Use '.' instead of ':'.
783 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
784 (get_timestamp): Use std::chrono::steady_clock instead of
785 gettimeofday.
786
787 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
788
789 * Makefile.in: Fix whitespace formatting.
790
791 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
792
793 * Makefile.in (SFILES, OBS): Flatten list and order
794 alphabetically.
795
796 2016-11-23 Pedro Alves <palves@redhat.com>
797
798 * event-loop.c (handle_file_event): Use warning.
799 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
800 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
801 Use warning.
802
803 2016-11-23 Pedro Alves <palves@redhat.com>
804
805 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
806 output.
807 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
808 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
809 debug_printf and debug_flush for debug output.
810 * server.c (handle_general_set): Likewise.
811 * thread-db.c (try_thread_db_load): Use debug_printf for debug
812 output.
813
814 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
815
816 * Makefile.in (.c.o): Replace rule with ...
817 (%.o: %.c): ... this one.
818
819 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
820
821 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
822 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
823 make.
824 * configure.ac: Remove checks for the make program.
825 * configure: Re-generate.
826
827 2016-10-28 Pedro Alves <palves@redhat.com>
828
829 * Makefile.in (CXX_DIALECT): Get from configure.
830 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
831 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
832 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
833 * config.in: Regenerate.
834 * configure: Regenerate.
835
836 2016-10-27 Yao Qi <yao.qi@linaro.org>
837
838 * linux-low.c (linux_supports_range_stepping): Return true if
839 can_software_single_step return true.
840
841 2016-10-27 Yao Qi <yao.qi@linaro.org>
842
843 * inferiors.c (find_inferior_in_random): New function.
844 * inferiors.h (find_inferior_in_random): Declare.
845 * linux-low.c (linux_wait_for_event_filtered): Call
846 find_inferior_in_random instead of find_inferior.
847
848 2016-10-27 Yao Qi <yao.qi@linaro.org>
849
850 * linux-low.c (linux_wait_1): If single-step breakpoints are
851 inserted, remove them.
852
853 2016-10-26 Pedro Alves <palves@redhat.com>
854
855 * linux-low.c (handle_extended_wait): Link parent/child fork
856 threads.
857 (linux_wait_1): Unlink them.
858 (linux_set_resume_request): Ignore resume requests for
859 already-resumed and unhandled fork child threads.
860 * linux-low.h (struct lwp_info) <fork_relative>: New field.
861 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
862 New functions.
863 (handle_v_requests) <vCont>: Don't call require_running.
864 * server.h (in_queued_stop_replies): New declaration.
865
866 2016-10-24 Yao Qi <yao.qi@linaro.org>
867
868 PR server/20733
869 * linux-aarch64-low.c (append_insns): Cast the return value to
870 'uint32_t *'.
871
872 2016-10-10 Yao Qi <yao.qi@linaro.org>
873
874 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
875
876 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
877
878 * target.c (target_supports_multi_process): New function, moved
879 from...
880 * target.h (target_supports_multi_process): ... here. Remove
881 macro.
882
883 2016-10-05 Tom Tromey <tom@tromey.com>
884
885 PR remote/20655:
886 * tracepoint.c (handle_tracepoint_bkpts): Check
887 ipa_error_tracepoint, not ipa_stopping_tracepoint.
888
889 2016-10-05 Yao Qi <yao.qi@linaro.org>
890
891 * configure.srv: Update the path of arm-*.xml files.
892
893 2016-10-05 Terry Guo <terry.guo@arm.com>
894 Yao Qi <yao.qi@linaro.org>
895
896 * Makefile.in: Adjust the path of rules.
897 * configure.srv: Update the path of xml files.
898 * regformats/arm-with-iwmmxt.dat: Regenerated.
899 * regformats/arm-with-neon.dat: Likewise.
900 * regformats/arm-with-vfpv2.dat: Likewise.
901 * regformats/arm-with-vfpv3.dat Likewise.
902
903 2016-09-30 Yao Qi <yao.qi@linaro.org>
904
905 PR gdbserver/20627
906 * target.c (target_stop_and_wait): Don't call
907 target_continue_no_signal, use resume_stop instead.
908
909 2016-09-26 Yao Qi <yao.qi@linaro.org>
910
911 * linux-low.c (linux_wait_1): Call debug_exit.
912
913 2016-09-23 Pedro Alves <palves@redhat.com>
914
915 * Makefile.in (SFILES): Add common/new-op.c.
916 (OBS): Add common/new-op.o.
917 (new-op.o): New rule.
918
919 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
920
921 * .gitinore: Ignore more files.
922
923 2016-09-21 Yao Qi <yao.qi@linaro.org>
924
925 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
926 23.
927
928 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
929
930 * server.c (start_inferior): Call target_mourn_inferior instead of
931 mourn_inferior; pass ptid_t argument to it.
932 (resume): Likewise.
933 (handle_target_event): Likewise.
934 * target.c (target_mourn_inferior): New function.
935 * target.h (mourn_inferior): Delete macro.
936
937 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
938
939 * linux-low.c (lwp_is_stepping): New function.
940
941 2016-09-06 Carl Love <cel@us.ibm.com>
942
943 * server.c (start_inferior): Fixed comment, requested comment change
944 didn't get updated correctly. Removed reference to ptrace () call as
945 it is only true on Linux systems.
946
947 2016-09-06 Carl Love <cel@us.ibm.com>
948
949 * server.c (start_inferior): Do not call
950 function target_post_create_inferior () if the
951 inferior process has already exited.
952
953 2016-09-05 Pedro Alves <palves@redhat.com>
954
955 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
956 (COMPILE.pre, CC_LD): Use CXX directly.
957 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
958 * acinclude.m4: Don't include build-with-cxx.m4.
959 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
960 * configure: Regenerate.
961
962 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
963
964 PR gdb/19495
965 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
966 call writing data to own_buf.
967
968 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
969
970 * target.c (mywait): Call target_wait instead of
971 the_target->wait.
972 (target_wait): New function.
973
974 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
975
976 * server.c (start_inferior): New variable 'ptid'. Replace calls
977 to the_target->resume by target_continue{,_no_signal}, depending
978 on the case.
979 * target.c (target_stop_and_wait): Call target_continue_no_signal
980 instead of the_target->resume.
981 (target_continue): New function.
982
983 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
984
985 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
986
987 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
988
989 PR server/20491
990 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
991 ps_prochandle.
992 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
993 * linux-arm-low.c (ps_get_thread_area): Likewise.
994 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
995 * linux-m68k-low.c (ps_get_thread_area): Likewise.
996 * linux-mips-low.c (ps_get_thread_area): Likewise.
997 * linux-nios2-low.c (ps_get_thread_area): Likewise.
998 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
999 * linux-x86-low.c (ps_get_thread_area): Likewise.
1000 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1001
1002 2016-08-19 Pedro Alves <palves@redhat.com>
1003
1004 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1005
1006 2016-08-19 Pedro Alves <palves@redhat.com>
1007
1008 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1009 comment. Use memcpy instead of casting through unsigned long.
1010
1011 2016-08-19 Pedro Alves <palves@redhat.com>
1012
1013 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1014 allocating around 0x80000000.
1015
1016 2016-08-19 Pedro Alves <palves@redhat.com>
1017
1018 PR gdb/20415
1019 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1020 (x32-avx512-linux-ipa.o): New rules.
1021 * configure.ac (x86_64-*-linux*): New x32 check.
1022 * configure.srv (ipa_x32_linux_regobj): New.
1023 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1024 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1025 descriptions.
1026 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1027 descriptions.
1028 * configure: Regenerate.
1029
1030 2016-08-09 Pedro Alves <palves@redhat.com>
1031
1032 PR gdb/18653
1033 * Makefile.in (OBS): Add signals-state-save-restore.o.
1034 (signals-state-save-restore.o): New rule.
1035 * config.in: Regenerate.
1036 * configure: Regenerate.
1037 * linux-low.c: Include "signals-state-save-restore.h".
1038 (linux_create_inferior): Call
1039 restore_original_signals_state.
1040 * server.c: Include "dispositions-save-restore.h".
1041 (captured_main): Call save_original_signals_state.
1042
1043 2016-08-05 Pedro Alves <palves@redhat.com>
1044
1045 * configure: Regenerate.
1046
1047 2016-08-04 Yao Qi <yao.qi@linaro.org>
1048
1049 * linux-low.c (regsets_fetch_inferior_registers): Check
1050 errno is ESRCH or not.
1051
1052 2016-08-02 Yao Qi <yao.qi@linaro.org>
1053
1054 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1055 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1056 (thread_db_load_search): Update.
1057 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1058 td_ta_set_event and td_ta_event_getmsg.
1059
1060 2016-07-26 Pedro Alves <palves@redhat.com>
1061
1062 PR server/20414
1063 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1064 of unsigned long for 64-bit registers and use uint32_t instead of
1065 unsigned int for 32-bit registers.
1066
1067 2016-07-26 Pedro Alves <palves@redhat.com>
1068
1069 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1070 to 'ptrace'.
1071
1072 2016-07-21 Tom Tromey <tom@tromey.com>
1073
1074 * configure: Rebuild.
1075
1076 2016-07-21 Yao Qi <yao.qi@linaro.org>
1077
1078 * mem-break.c (find_gdb_breakpoint): Cast bp to
1079 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1080
1081 2016-07-21 Yao Qi <yao.qi@linaro.org>
1082
1083 * server.c (handle_v_requests): Support s and S actions
1084 if target_supports_software_single_step return true.
1085
1086 2016-07-21 Yao Qi <yao.qi@linaro.org>
1087
1088 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1089 is resume_step, call maybe_hw_step.
1090 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1091 and unstop them.
1092 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1093 breakpoints or not.
1094 (proceed_one_lwp): If resume request is resume_step, install
1095 reinsert breakpoints and call maybe_hw_step.
1096
1097 2016-07-21 Yao Qi <yao.qi@linaro.org>
1098
1099 * linux-low.c (proceed_one_lwp): Declare.
1100 (linux_resume_one_thread): Remove local variable 'step'.
1101 Lift code enqueue signal. Call proceed_one_lwp instead of
1102 linux_resume_one_lwp.
1103
1104 2016-07-21 Yao Qi <yao.qi@linaro.org>
1105
1106 * linux-low.c (linux_resume_one_thread): Call
1107 enqueue_pending_signal.
1108
1109 2016-07-21 Yao Qi <yao.qi@linaro.org>
1110
1111 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1112 * inferiors.c (do_restore_current_thread_cleanup): New function.
1113 (make_cleanup_restore_current_thread): Likewise.
1114 * linux-low.c (install_software_single_step_breakpoints): Call
1115 make_cleanup_restore_current_thread. Switch current_thread to
1116 thread.
1117
1118 2016-07-21 Yao Qi <yao.qi@linaro.org>
1119
1120 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1121 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1122 (clone_one_breakpoint): Likewise.
1123 (delete_reinsert_breakpoints): Change parameter to thread.
1124 Callers updated.
1125 (has_reinsert_breakpoints): Likewise.
1126 (uninsert_reinsert_breakpoints): Likewise.
1127 (reinsert_reinsert_breakpoints): Likewise.
1128 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1129 (delete_reinsert_breakpoints): Likewise.
1130 (reinsert_reinsert_breakpoints): Likewise.
1131 (uninsert_reinsert_breakpoints): Likewise.
1132 (has_reinsert_breakpoints): Likewise.
1133
1134 2016-07-21 Yao Qi <yao.qi@linaro.org>
1135
1136 * inferiors.c (get_thread_process): Make parameter const.
1137 * inferiors.h (get_thread_process): Update declaration.
1138 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1139 Add new parameters child_thread and parent_thread. Callers
1140 updated.
1141 * mem-break.h (clone_all_breakpoints): Update declaration.
1142
1143 2016-07-21 Yao Qi <yao.qi@linaro.org>
1144
1145 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1146 <command_list, handler>: Remove.
1147 (struct gdb_breakpoint): New.
1148 (struct other_breakpoint): New.
1149 (struct reinsert_breakpoint): New.
1150 (is_gdb_breakpoint): New function.
1151 (any_persistent_commands): Update command_list if
1152 is_gdb_breakpoint returns true.
1153 (set_breakpoint): Create breakpoints according to their types.
1154 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1155 (set_gdb_breakpoint_1): Likewise.
1156 (set_gdb_breakpoint): Likewise.
1157 (clear_breakpoint_conditions): Change parameter type to
1158 'struct gdb_breakpoint *'.
1159 (clear_breakpoint_commands): Likewise.
1160 (clear_breakpoint_conditions_and_commands): Likewise.
1161 (add_condition_to_breakpoint): Likewise.
1162 (add_breakpoint_condition): Likewise.
1163 (add_commands_to_breakpoint): Likewise.
1164 (check_breakpoints): Check other_breakpoint.
1165 (clone_one_breakpoint): Clone breakpopint according to its type.
1166 * mem-break.h (struct gdb_breakpoint): Declare.
1167 (set_gdb_breakpoint): Update declaration.
1168 (clear_breakpoint_conditions_and_commands): Likewise.
1169 (add_breakpoint_condition): Likewise.
1170 (add_breakpoint_commands): Likewise.
1171 * server.c (process_point_options): Change parameter type to
1172 'struct gdb_breakpoint *'.
1173
1174 2016-07-21 Yao Qi <yao.qi@linaro.org>
1175
1176 * mem-break.c (set_breakpoint_at): Rename it to ...
1177 (set_breakpoint_type_at): ... it.
1178 (set_breakpoint_at): Call set_breakpoint_type_at.
1179 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1180 * mem-break.h (set_breakpoint_at): Update comments.
1181
1182 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1183
1184 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1185 to buf parameter.
1186 (nios2_store_gregset): Likewise.
1187
1188 2016-07-01 Pedro Alves <palves@redhat.com>
1189 Antoine Tremblay <antoine.tremblay@ericsson.com>
1190
1191 * linux-low.c: Change interface to take the target lwp_info
1192 pointer directly and return void. Handle detaching from a zombie
1193 thread.
1194 (linux_detach_lwp_callback): New function.
1195 (linux_detach): Detach from the leader thread after detaching from
1196 the clone threads.
1197
1198 2016-06-28 Yao Qi <yao.qi@linaro.org>
1199
1200 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1201 for variable new_offset.
1202 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1203 (aarch64_ftrace_insn_reloc_cb): Likewise.
1204 (aarch64_ftrace_insn_reloc_tb): Likewise.
1205 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1206 PRIx64 instead of PRIx32.
1207
1208 2016-06-28 Yao Qi <yao.qi@linaro.org>
1209
1210 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1211 (the_low_target): Install arm_get_syscall_trapinfo.
1212
1213 2016-06-28 Yao Qi <yao.qi@linaro.org>
1214
1215 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1216 function.
1217 (the_low_target): Install aarch64_get_syscall_trapinfo.
1218
1219 2016-06-28 Yao Qi <yao.qi@linaro.org>
1220
1221 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1222 Callers updated.
1223 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1224 Remove parameter sysno.
1225 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1226 sysret.
1227
1228 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1229
1230 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1231 (s390_emit_ne_goto): Likewise.
1232 (s390_emit_lt_goto): Likewise.
1233 (s390_emit_le_goto): Likewise.
1234 (s390_emit_gt_goto): Likewise.
1235 (s390_emit_ge_goto): Likewise.
1236 (s390x_emit_eq_goto): Likewise.
1237 (s390x_emit_ne_goto): Likewise.
1238 (s390x_emit_lt_goto): Likewise.
1239 (s390x_emit_le_goto): Likewise.
1240 (s390x_emit_gt_goto): Likewise.
1241 (s390x_emit_ge_goto): Likewise.
1242 (s390_emit_ops_impl): Mark variable static.
1243 (s390x_emit_ops): Likewise.
1244
1245 2016-06-17 Yao Qi <yao.qi@linaro.org>
1246
1247 * linux-low.c (handle_extended_wait): Call
1248 uninsert_reinsert_breakpoints for the parent process. Remove
1249 reinsert breakpoints from the child process. Reinsert them to
1250 the parent process when vfork is done.
1251 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1252 (reinsert_reinsert_breakpoints): New function.
1253 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1254 (reinsert_reinsert_breakpoints): Declare.
1255
1256 2016-06-17 Yao Qi <yao.qi@linaro.org>
1257
1258 * linux-low.c (handle_extended_wait): If the parent is doing
1259 step-over, remove the reinsert breakpoints from the forked child.
1260
1261 2016-06-17 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-low.c (unsuspend_all_lwps): Declare.
1264 (linux_low_filter_event): If thread exited, call finish_step_over.
1265 If step-over is finished, unsuspend other threads.
1266
1267 2016-06-17 Yao Qi <yao.qi@linaro.org>
1268
1269 * linux-low.c (linux_resume_one_lwp_throw): Assert
1270 has_reinsert_breakpoints returns false.
1271 * mem-break.c (delete_disabled_breakpoints): Assert
1272 bp type isn't reinsert_breakpoint.
1273
1274 2016-06-17 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-low.c (maybe_hw_step): New function.
1277 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1278 (finish_step_over): Switch current_thread to lwp temporarily,
1279 and assert has_reinsert_breakpoints returns true.
1280 (proceed_one_lwp): Call maybe_hw_step.
1281 * mem-break.c (has_reinsert_breakpoints): New function.
1282 * mem-break.h (has_reinsert_breakpoints): Declare.
1283
1284 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1285
1286 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1287
1288 2016-05-17 Yao Qi <yao.qi@linaro.org>
1289
1290 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1291 instead of find_inferior.
1292
1293 2016-05-05 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1296 Initialize res to zero.
1297
1298 2016-05-05 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1301 to uint32_t.
1302
1303 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1304
1305 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1306 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1307 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1308
1309 2016-04-28 Par Olsson <par.olsson@windriver.com>
1310 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * tracepoint.c (write_inferior_int8): New function.
1313 (cmd_qtenable_disable): Write enable flag using
1314 write_inferior_int8.
1315
1316 2016-04-25 Yao Qi <yao.qi@linaro.org>
1317
1318 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1319 (need_step_over_p): Return zero if the LWP has pending signals
1320 can be delivered on software single step target.
1321
1322 2016-04-25 Yao Qi <yao.qi@linaro.org>
1323
1324 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1325 return instead of error.
1326
1327 2016-04-22 Yao Qi <yao.qi@linaro.org>
1328
1329 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1330 to 23.
1331
1332 2016-04-22 Yao Qi <yao.qi@linaro.org>
1333
1334 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1335 signal when stepping over breakpoint with software single
1336 step.
1337
1338 2016-04-21 Pedro Alves <palves@redhat.com>
1339
1340 * linux-s390-low.c (s390_collect_ptrace_register)
1341 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1342 add casts.
1343 (s390_check_regset): Use void * instead of gdb_byte *.
1344
1345 2016-04-20 Pedro Alves <palves@redhat.com>
1346
1347 * configure: Renegerate.
1348
1349 2016-04-20 Yao Qi <yao.qi@linaro.org>
1350
1351 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1352 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1353 number 16.
1354 (arm_store_gregset): Likewise.
1355
1356 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1357
1358 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1359 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1360 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1361 (amd64-avx-mpx-linux.c): New rules.
1362 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1363 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1364 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1365 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1366 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1367 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1368 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1369 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1370 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1371 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1372 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1373 * linux-x86-low.c (x86_linux_read_description): Add case for
1374 X86_XSTATE_AVX_MPX_MASK.
1375 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1376 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1377 init_registers_i386_avx_mpx_linux.
1378 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1379 (initialize_low_tracepoint): Call
1380 init_registers_i386_avx_mpx_linux.
1381 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1382 (initialize_low_tracepoint): Call
1383 init_registers_amd64_avx_mpx_linux.
1384 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1385 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1386 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1387 declarations.
1388
1389 2016-04-18 Pedro Alves <palves@redhat.com>
1390
1391 * configure: Regenerate.
1392
1393 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1394
1395 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1396 (aarch64_emit_sub): Likewise.
1397
1398 2016-04-12 Pedro Alves <palves@redhat.com>
1399
1400 * utils.c (prepare_to_throw_exception): Delete.
1401
1402 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1403
1404 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1405
1406 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1407
1408 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1409
1410 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1411
1412 * linux-aarch64-ipa.c: Add <elf.h> include.
1413 * linux-ppc-ipa.c: Add <elf.h> include.
1414 * linux-s390-ipa.c: Add <elf.h> include.
1415
1416 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1417
1418 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1419 (get_raw_reg_ptr): Likewise.
1420 (get_trace_state_variable_value_ptr): Likewise.
1421 (set_trace_state_variable_value_ptr): Likewise.
1422 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1423 char *.
1424
1425 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1426 Marcin Kościelnicki <koriakin@0x04.net>
1427
1428 PR/17221
1429 * linux-ppc-low.c (emit_insns): New function.
1430 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1431 (ppc_emit_prologue): New function.
1432 (ppc_emit_epilogue): New function.
1433 (ppc_emit_add): New function.
1434 (ppc_emit_sub): New function.
1435 (ppc_emit_mul): New function.
1436 (ppc_emit_lsh): New function.
1437 (ppc_emit_rsh_signed): New function.
1438 (ppc_emit_rsh_unsigned): New function.
1439 (ppc_emit_ext): New function.
1440 (ppc_emit_zero_ext): New function.
1441 (ppc_emit_log_not): New function.
1442 (ppc_emit_bit_and): New function.
1443 (ppc_emit_bit_or): New function.
1444 (ppc_emit_bit_xor): New function.
1445 (ppc_emit_bit_not): New function.
1446 (ppc_emit_equal): New function.
1447 (ppc_emit_less_signed): New function.
1448 (ppc_emit_less_unsigned): New function.
1449 (ppc_emit_ref): New function.
1450 (ppc_emit_const): New function.
1451 (ppc_emit_reg): New function.
1452 (ppc_emit_pop): New function.
1453 (ppc_emit_stack_flush): New function.
1454 (ppc_emit_swap): New function.
1455 (ppc_emit_stack_adjust): New function.
1456 (ppc_emit_call): New function.
1457 (ppc_emit_int_call_1): New function.
1458 (ppc_emit_void_call_2): New function.
1459 (ppc_emit_if_goto): New function.
1460 (ppc_emit_goto): New function.
1461 (ppc_emit_eq_goto): New function.
1462 (ppc_emit_ne_goto): New function.
1463 (ppc_emit_lt_goto): New function.
1464 (ppc_emit_le_goto): New function.
1465 (ppc_emit_gt_goto): New function.
1466 (ppc_emit_ge_goto): New function.
1467 (ppc_write_goto_address): New function.
1468 (ppc_emit_ops_impl): New static variable.
1469 (ppc64v1_emit_prologue): New function.
1470 (ppc64v2_emit_prologue): New function.
1471 (ppc64_emit_epilogue): New function.
1472 (ppc64_emit_add): New function.
1473 (ppc64_emit_sub): New function.
1474 (ppc64_emit_mul): New function.
1475 (ppc64_emit_lsh): New function.
1476 (ppc64_emit_rsh_signed): New function.
1477 (ppc64_emit_rsh_unsigned): New function.
1478 (ppc64_emit_ext): New function.
1479 (ppc64_emit_zero_ext): New function.
1480 (ppc64_emit_log_not): New function.
1481 (ppc64_emit_bit_and): New function.
1482 (ppc64_emit_bit_or): New function.
1483 (ppc64_emit_bit_xor): New function.
1484 (ppc64_emit_bit_not): New function.
1485 (ppc64_emit_equal): New function.
1486 (ppc64_emit_less_signed): New function.
1487 (ppc64_emit_less_unsigned): New function.
1488 (ppc64_emit_ref): New function.
1489 (ppc64_emit_const): New function.
1490 (ppc64v1_emit_reg): New function.
1491 (ppc64v2_emit_reg): New function.
1492 (ppc64_emit_pop): New function.
1493 (ppc64_emit_stack_flush): New function.
1494 (ppc64_emit_swap): New function.
1495 (ppc64v1_emit_call): New function.
1496 (ppc64v2_emit_call): New function.
1497 (ppc64v1_emit_int_call_1): New function.
1498 (ppc64v2_emit_int_call_1): New function.
1499 (ppc64v1_emit_void_call_2): New function.
1500 (ppc64v2_emit_void_call_2): New function.
1501 (ppc64_emit_if_goto): New function.
1502 (ppc64_emit_eq_goto): New function.
1503 (ppc64_emit_ne_goto): New function.
1504 (ppc64_emit_lt_goto): New function.
1505 (ppc64_emit_le_goto): New function.
1506 (ppc64_emit_gt_goto): New function.
1507 (ppc64_emit_ge_goto): New function.
1508 (ppc64v1_emit_ops_impl): New static variable.
1509 (ppc64v2_emit_ops_impl): New static variable.
1510 (ppc_emit_ops): New function.
1511 (linux_low_target): Wire in ppc_emit_ops.
1512
1513 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1514 Marcin Kościelnicki <koriakin@0x04.net>
1515
1516 PR/17221
1517 * Makefile.in: Add powerpc-*-ipa.o
1518 * configure.srv: Add ipa_obj for powerpc*-linux.
1519 * linux-ppc-ipa.c: New file.
1520 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1521 includes.
1522 (PPC_FIELD): New macro.
1523 (PPC_SEXT): New macro.
1524 (PPC_OP6): New macro.
1525 (PPC_BO): New macro.
1526 (PPC_LI): New macro.
1527 (PPC_BD): New macro.
1528 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1529 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1530 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1531 (ppc_get_thread_area): New function.
1532 (is_elfv2_inferior): New function.
1533 (gen_ds_form): New function.
1534 (GEN_STD): New macro.
1535 (GEN_STDU): New macro.
1536 (GEN_LD): New macro.
1537 (GEN_LDU): New macro.
1538 (gen_d_form): New function.
1539 (GEN_ADDI): New macro.
1540 (GEN_ADDIS): New macro.
1541 (GEN_LI): New macro.
1542 (GEN_LIS): New macro.
1543 (GEN_ORI): New macro.
1544 (GEN_ORIS): New macro.
1545 (GEN_LWZ): New macro.
1546 (GEN_STW): New macro.
1547 (GEN_STWU): New macro.
1548 (gen_xfx_form): New function.
1549 (GEN_MFSPR): New macro.
1550 (GEN_MTSPR): New macro.
1551 (GEN_MFCR): New macro.
1552 (GEN_MTCR): New macro.
1553 (GEN_SYNC): New macro.
1554 (GEN_LWSYNC): New macro.
1555 (gen_x_form): New function.
1556 (GEN_OR): New macro.
1557 (GEN_MR): New macro.
1558 (GEN_LWARX): New macro.
1559 (GEN_STWCX): New macro.
1560 (GEN_CMPW): New macro.
1561 (gen_md_form): New function.
1562 (GEN_RLDICL): New macro.
1563 (GEN_RLDICR): New macro.
1564 (gen_i_form): New function.
1565 (GEN_B): New macro.
1566 (GEN_BL): New macro.
1567 (gen_b_form): New function.
1568 (GEN_BNE): New macro.
1569 (GEN_LOAD): New macro.
1570 (GEN_STORE): New macro.
1571 (gen_limm): New function.
1572 (gen_atomic_xchg): New function.
1573 (gen_call): New function.
1574 (ppc_relocate_instruction): New function.
1575 (ppc_install_fast_tracepoint_jump_pad): New function.
1576 (ppc_get_min_fast_tracepoint_insn_len): New function.
1577 (ppc_get_ipa_tdesc_idx): New function.
1578 (the_low_target): Wire in the new functions.
1579 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1580 tdescs.
1581 * linux-ppc-tdesc.h: New file.
1582
1583 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1584
1585 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1586 (alloc_jump_pad_buffer): New function.
1587 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1588 (alloc_jump_pad_buffer): New function.
1589 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1590 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1591 (alloc_jump_pad_buffer): New function.
1592 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1593 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1594 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1595 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1596
1597 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1598
1599 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1600 * linux-amd64-ipa.c: Likewise.
1601 * linux-i386-ipa.c: Likewise.
1602 * linux-s390-ipa.c: Likewise.
1603 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1604 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1605 set_trace_state_variable_value_ptr.
1606 (struct ipa_sym_addresses): Likewise.
1607 (symbol_list): Likewise.
1608 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1609 accessing gdb_collect directly.
1610 (gdb_collect_ptr_type): New typedef.
1611 (get_raw_reg_ptr_type): New typedef.
1612 (get_trace_state_variable_value_ptr_type): New typedef.
1613 (set_trace_state_variable_value_ptr_type): New typedef.
1614 (gdb_collect_ptr): New global.
1615 (get_raw_reg_ptr): New global.
1616 (get_trace_state_variable_value_ptr): New global.
1617 (set_trace_state_variable_value_ptr): New global.
1618 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1619 accessing get_raw_reg directly.
1620 (get_get_tsv_func_addr): Likewise for
1621 get_trace_state_variable_value_ptr.
1622 (get_set_tsv_func_addr): Likewise for
1623 set_trace_state_variable_value_ptr.
1624 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1625
1626 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1627
1628 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1629
1630 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1631
1632 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1633 packets.
1634 (relocate_instruction): Remove own_buf.
1635 * server.c (own_buf): Make global.
1636 (handle_v_requests): Make global.
1637 * server.h (own_buf): New declaration.
1638 (handle_v_requests): New prototype.
1639
1640 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1641
1642 PR 18377
1643 * linux-s390-low.c (add_insns): New function.
1644 (s390_emit_prologue): New function.
1645 (s390_emit_epilogue): New function.
1646 (s390_emit_add): New function.
1647 (s390_emit_sub): New function.
1648 (s390_emit_mul): New function.
1649 (s390_emit_lsh): New function.
1650 (s390_emit_rsh_signed): New function.
1651 (s390_emit_rsh_unsigned): New function.
1652 (s390_emit_ext): New function.
1653 (s390_emit_log_not): New function.
1654 (s390_emit_bit_and): New function.
1655 (s390_emit_bit_or): New function.
1656 (s390_emit_bit_xor): New function.
1657 (s390_emit_bit_not): New function.
1658 (s390_emit_equal): New function.
1659 (s390_emit_less_signed): New function.
1660 (s390_emit_less_unsigned): New function.
1661 (s390_emit_ref): New function.
1662 (s390_emit_if_goto): New function.
1663 (s390_emit_goto): New function.
1664 (s390_write_goto_address): New function.
1665 (s390_emit_litpool): New function.
1666 (s390_emit_const): New function.
1667 (s390_emit_call): New function.
1668 (s390_emit_reg): New function.
1669 (s390_emit_pop): New function.
1670 (s390_emit_stack_flush): New function.
1671 (s390_emit_zero_ext): New function.
1672 (s390_emit_swap): New function.
1673 (s390_emit_stack_adjust): New function.
1674 (s390_emit_set_r2): New function.
1675 (s390_emit_int_call_1): New function.
1676 (s390_emit_void_call_2): New function.
1677 (s390_emit_eq_goto): New function.
1678 (s390_emit_ne_goto): New function.
1679 (s390_emit_lt_goto): New function.
1680 (s390_emit_le_goto): New function.
1681 (s390_emit_gt_goto): New function.
1682 (s390_emit_ge_goto): New function.
1683 (s390x_emit_prologue): New function.
1684 (s390x_emit_epilogue): New function.
1685 (s390x_emit_add): New function.
1686 (s390x_emit_sub): New function.
1687 (s390x_emit_mul): New function.
1688 (s390x_emit_lsh): New function.
1689 (s390x_emit_rsh_signed): New function.
1690 (s390x_emit_rsh_unsigned): New function.
1691 (s390x_emit_ext): New function.
1692 (s390x_emit_log_not): New function.
1693 (s390x_emit_bit_and): New function.
1694 (s390x_emit_bit_or): New function.
1695 (s390x_emit_bit_xor): New function.
1696 (s390x_emit_bit_not): New function.
1697 (s390x_emit_equal): New function.
1698 (s390x_emit_less_signed): New function.
1699 (s390x_emit_less_unsigned): New function.
1700 (s390x_emit_ref): New function.
1701 (s390x_emit_if_goto): New function.
1702 (s390x_emit_const): New function.
1703 (s390x_emit_call): New function.
1704 (s390x_emit_reg): New function.
1705 (s390x_emit_pop): New function.
1706 (s390x_emit_stack_flush): New function.
1707 (s390x_emit_zero_ext): New function.
1708 (s390x_emit_swap): New function.
1709 (s390x_emit_stack_adjust): New function.
1710 (s390x_emit_int_call_1): New function.
1711 (s390x_emit_void_call_2): New function.
1712 (s390x_emit_eq_goto): New function.
1713 (s390x_emit_ne_goto): New function.
1714 (s390x_emit_lt_goto): New function.
1715 (s390x_emit_le_goto): New function.
1716 (s390x_emit_gt_goto): New function.
1717 (s390x_emit_ge_goto): New function.
1718 (s390_emit_ops): New function.
1719 (struct linux_target_ops): Fill in emit_ops hook.
1720
1721 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1722
1723 PR 18377
1724 * Makefile.in: Add s390 IPA files.
1725 * configure.srv: Build IPA for s390.
1726 * linux-s390-ipa.c: New file.
1727 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1728 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1729 (tdesc_s390_linux32): Likewise.
1730 (init_registers_s390_linux32v1): Likewise.
1731 (tdesc_s390_linux32v1): Likewise.
1732 (init_registers_s390_linux32v2): Likewise.
1733 (tdesc_s390_linux32v2): Likewise.
1734 (init_registers_s390_linux64): Likewise.
1735 (tdesc_s390_linux64): Likewise.
1736 (init_registers_s390_linux64v1): Likewise.
1737 (tdesc_s390_linux64v1): Likewise.
1738 (init_registers_s390_linux64v2): Likewise.
1739 (tdesc_s390_linux64v2): Likewise.
1740 (init_registers_s390_te_linux64): Likewise.
1741 (tdesc_s390_te_linux64): Likewise.
1742 (init_registers_s390_vx_linux64): Likewise.
1743 (tdesc_s390_vx_linux64): Likewise.
1744 (init_registers_s390_tevx_linux64): Likewise.
1745 (tdesc_s390_tevx_linux64): Likewise.
1746 (init_registers_s390x_linux64): Likewise.
1747 (tdesc_s390x_linux64): Likewise.
1748 (init_registers_s390x_linux64v1): Likewise.
1749 (tdesc_s390x_linux64v1): Likewise.
1750 (init_registers_s390x_linux64v2): Likewise.
1751 (tdesc_s390x_linux64v2): Likewise.
1752 (init_registers_s390x_te_linux64): Likewise.
1753 (tdesc_s390x_te_linux64): Likewise.
1754 (init_registers_s390x_vx_linux64): Likewise.
1755 (tdesc_s390x_vx_linux64): Likewise.
1756 (init_registers_s390x_tevx_linux64): Likewise.
1757 (tdesc_s390x_tevx_linux64): Likewise.
1758 (have_hwcap_s390_vx): New static variable.
1759 (s390_arch_setup): Fill have_hwcap_s390_vx.
1760 (s390_get_thread_area): New function.
1761 (s390_ft_entry_gpr_esa): New const.
1762 (s390_ft_entry_gpr_zarch): New const.
1763 (s390_ft_entry_misc): New const.
1764 (s390_ft_entry_fr): New const.
1765 (s390_ft_entry_vr): New const.
1766 (s390_ft_main_31): New const.
1767 (s390_ft_main_64): New const.
1768 (s390_ft_exit_fr): New const.
1769 (s390_ft_exit_vr): New const.
1770 (s390_ft_exit_misc): New const.
1771 (s390_ft_exit_gpr_esa): New const.
1772 (s390_ft_exit_gpr_zarch): New const.
1773 (append_insns): New function.
1774 (s390_relocate_instruction): New function.
1775 (s390_install_fast_tracepoint_jump_pad): New function.
1776 (s390_get_min_fast_tracepoint_insn_len): New function.
1777 (s390_get_ipa_tdesc_idx): New function.
1778 (struct linux_target_ops): Wire in the above functions.
1779 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1780 * linux-s390-tdesc.h: New file.
1781
1782 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1783
1784 * linux-s390-low.c (s390_supports_tracepoints): New function.
1785 (struct linux_target_ops): Fill supports_tracepoints hook.
1786
1787 2016-03-18 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-low.c (lwp_signal_can_be_delivered): New function.
1790 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1791
1792 2016-03-18 Yao Qi <yao.qi@linaro.org>
1793
1794 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1795 0 if signal is enqueued. Remove 'signal' from one debugging
1796 message. Move one debugging message to some lines below.
1797 Remove code setting 'signal' to 0.
1798
1799 2016-03-18 Yao Qi <yao.qi@linaro.org>
1800
1801 * linux-low.c (linux_low_filter_event): Remove redundant
1802 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1803
1804 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1805
1806 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1807 (struct linux_target_ops): Wire in the above.
1808
1809 2016-03-03 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-low.c: Update comments to start_step_over.
1812
1813 2016-03-03 Yao Qi <yao.qi@linaro.org>
1814
1815 PR server/19736
1816 * linux-low.c (handle_extended_wait): Set child suspended
1817 if event_lwp->bp_reinsert isn't zero.
1818
1819 2016-03-02 Yao Qi <yao.qi@linaro.org>
1820
1821 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1822 enqueue_pending_signal.
1823
1824 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1825
1826 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1827 is actually loaded.
1828
1829 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1830
1831 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1832 (s390_regmap_3264) [!__s390x__]: New global.
1833 (s390_collect_ptrace_register): Skip map entries containing -1.
1834 (s390_supply_ptrace_register): Ditto.
1835 (s390_fill_gprs_high): New function.
1836 (s390_store_gprs_high): New function.
1837 (s390_regsets): Add NT_S390_HIGH_GPRS.
1838 (s390_get_hwcap): Enable on 31-bit.
1839 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1840 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1841 Detect NT_S390_HIGH_GPRS.
1842 (s390_usrregs_info_3264): Enable on 31-bit.
1843 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1844 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1845
1846 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1847
1848 PR gdb/13808
1849 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1850 * configure.srv: Ditto.
1851 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1852 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1853 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1854 (init_registers_amd64_linux): Remove prototype.
1855 (tdesc_amd64_linux): Remove declaration.
1856 (get_ipa_tdesc): New function.
1857 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1858 initialize remaining tdescs.
1859 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1860 (init_registers_i386_linux): Remove prototype.
1861 (tdesc_i386_linux): Remove declaration.
1862 (get_ipa_tdesc): New function.
1863 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1864 initialize remaining tdescs.
1865 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1866 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1867 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1868 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1869 (x86_get_ipa_tdesc_idx): New function.
1870 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1871 * linux-x86-tdesc.h: New file.
1872 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1873 (target_get_ipa_tdesc_idx): New macro.
1874 * tracepoint.c (ipa_tdesc_idx): New macro.
1875 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1876 (symbol_list): Add ipa_tdesc_idx.
1877 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1878 (ipa_tdesc): Remove.
1879 (ipa_tdesc_idx): New variable.
1880 (get_context_regcache): Use get_ipa_tdesc.
1881 (gdb_collect): Ditto.
1882 (gdb_probe): Ditto.
1883 * tracepoint.h (get_ipa_tdesc): New prototype.
1884 (ipa_tdesc): Remove.
1885
1886 2016-02-24 Pedro Alves <palves@redhat.com>
1887
1888 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1889 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1890 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1891 Factor out common code between the USE_SIGTRAP_SIGINFO and
1892 !USE_SIGTRAP_SIGINFO blocks.
1893 (linux_low_filter_event): Call save_stop_reason instead of
1894 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1895 Update comments.
1896 (linux_wait_1): Update comments.
1897
1898 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1899
1900 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1901 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1902 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1903 ppc_insert_point, ppc_remove_point.
1904
1905 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1906
1907 * linux-s390-low.c (s390_supports_z_point_type): New function.
1908 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1909
1910 2016-02-16 Yao Qi <yao.qi@linaro.org>
1911
1912 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1913 PC. Get pc from regcache_read_pc.
1914
1915 2016-02-12 Yao Qi <yao.qi@linaro.org>
1916
1917 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1918 or linux_get_pc_32bit.
1919 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1920
1921 2016-02-12 Yao Qi <yao.qi@linaro.org>
1922
1923 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1924 arm_linux_get_next_pcs_fixup.
1925
1926 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1927
1928 * tracepoint.c (x_tracepoint_action_download): Change
1929 write_inferior_data_ptr to write_inferior_data_pointer.
1930 (cmd_qtstart): Likewise.
1931 (write_inferior_data_ptr): Remove.
1932 (download_agent_expr): Change write_inferior_data_ptr to
1933 write_inferior_data_pointer.
1934 (download_tracepoint_1): Likewise.
1935 (download_tracepoint): Likewise.
1936 (download_trace_state_variables): Likewise.
1937
1938 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1939 Marcin Kościelnicki <koriakin@0x04.net>
1940
1941 * tracepoint.c (struct tracepoint_action_ops): Remove.
1942 (struct tracepoint_action): Remove ops.
1943 (m_tracepoint_action_download, r_tracepoint_action_download)
1944 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1945 size and offset accordingly.
1946 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1947 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1948 (tracepoint_action_send, tracepoint_action_download): New functions.
1949 Helpers for trace action handlers.
1950 (add_tracepoint_action): Remove setup actions ops.
1951 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1952
1953 2016-02-10 Yao Qi <yao.qi@linaro.org>
1954
1955 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1956
1957 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1958
1959 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1960 to AC_OUTPUT.
1961 * configure: Regenerate.
1962
1963 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1964
1965 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1966 void * to gdb_byte *.
1967 * linux-low.c (siginfo_fixup): Likewise.
1968 (linux_xfer_siginfo): Likewise.
1969 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1970 Likewise.
1971 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1972
1973 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1974
1975 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1976 to srv_tgtobj.
1977 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1978 to srv_tgtobj.
1979 * linux-x86-low.c [__x86_64__]: Include
1980 "nat/amd64-linux-siginfo.h".
1981 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1982 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1983 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1984 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1985 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1986 (cpt_si_fd, si_timerid, si_overrun): Move from
1987 nat/amd64-linux-siginfo.c.
1988 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1989
1990 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1991
1992 * server.c (skip_to_semicolon): Remove.
1993 (process_point_options): Use strchrnul instead of
1994 skip_to_semicolon.
1995
1996 2016-01-26 Yao Qi <yao.qi@linaro.org>
1997
1998 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1999 * linux-low.c (install_software_single_step_breakpoints): Don't
2000 call regcache_read_pc.
2001 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2002 argument pc.
2003
2004 2016-01-26 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-low.c (install_software_single_step_breakpoints): Call
2007 regcache_read_pc instead of get_pc.
2008
2009 2016-01-26 Yao Qi <yao.qi@linaro.org>
2010
2011 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2012 (unblock_async_io): Rename to ...
2013 (block_unblock_async_io): ... it. New function.
2014 (enable_async_io): Don't install SIGIO handler. Unblock it
2015 instead.
2016 (disable_async_io): Don't ignore SIGIO. Block it instead.
2017 (initialize_async_io): Install SIGIO handler. Don't call
2018 unblock_async_io.
2019
2020 2016-01-26 Yao Qi <yao.qi@linaro.org>
2021
2022 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2023 first character is '\003', call *the_target->request_interrupt.
2024
2025 2016-01-25 Yao Qi <yao.qi@linaro.org>
2026
2027 * remote-utils.c (new_thread_notify): Remove.
2028 (dead_thread_notify): Likewise.
2029 * remote-utils.h (new_thread_notify): Remove declaration.
2030 (dead_thread_notify): Likewise.
2031
2032 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2033
2034 * gdb.trace/pending.exp: Fix expected message on continue.
2035
2036 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2037
2038 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2039 it works properly on big-endian machines where sizeof (CORE_ADDR)
2040 != sizeof (void *).
2041
2042 2016-01-21 Pedro Alves <palves@redhat.com>
2043
2044 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2045 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2046 * configure: Regenerate.
2047
2048 2016-01-21 Yao Qi <yao.qi@linaro.org>
2049
2050 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2051 is_thumb and set it according to CPSR saved on the stack.
2052 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2053 arm_sigreturn_next_pc.
2054
2055 2016-01-18 Yao Qi <yao.qi@linaro.org>
2056
2057 * linux-low.c (linux_set_pc_64bit): New function.
2058 (linux_get_pc_64bit): New function.
2059 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2060 Declare.
2061 * linux-sparc-low.c (debug_threads): Remove declaration.
2062 (sparc_get_pc): Remove.
2063 (the_low_target): Use linux_get_pc_64bit instead of
2064 sparc_get_pc.
2065 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2066 (the_low_target): Use linux_get_pc_64bit and
2067 linux_set_pc_64bit.
2068
2069 2016-01-18 Yao Qi <yao.qi@linaro.org>
2070
2071 * linux-arm-low.c (debug_threads): Remove declaration.
2072 (arm_get_pc, arm_set_pc): Remove.
2073 (the_low_target): Use linux_get_pc_32bit and
2074 linux_set_pc_32bit.
2075 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2076 (the_low_target): Use linux_get_pc_32bit and
2077 linux_set_pc_32bit.
2078 * linux-cris-low.c (debug_threads): Remove declaration.
2079 (cris_get_pc, cris_set_pc,): Remove.
2080 (the_low_target): Use linux_get_pc_32bit and
2081 linux_set_pc_32bit.
2082 * linux-crisv32-low.c (debug_threads): Remove declaration.
2083 (cris_get_pc, cris_set_pc): Remove.
2084 (the_low_target): Use linux_get_pc_32bit and
2085 linux_set_pc_32bit.
2086 * linux-low.c: Include inttypes.h.
2087 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2088 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2089 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2090 (the_low_target): Use linux_get_pc_32bit and
2091 linux_set_pc_32bit.
2092 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2093 (the_low_target): Use linux_get_pc_32bit and
2094 linux_set_pc_32bit.
2095 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2096 (the_low_target): Use linux_get_pc_32bit and
2097 linux_set_pc_32bit.
2098 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2099 (the_low_target): Use linux_get_pc_32bit and
2100 linux_set_pc_32bit.
2101 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2102 (the_low_target): Use linux_get_pc_32bit and
2103 linux_set_pc_32bit.
2104
2105 2016-01-18 Gary Benson <gbenson@redhat.com>
2106
2107 * configure.ac (AC_FUNC_FORK): New check.
2108 * config.in: Regenerate.
2109 * configure: Likewise.
2110
2111 2016-01-14 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2114 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2115 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2116 arm_get_next_pcs_ctor.
2117
2118 2016-01-12 Josh Stone <jistone@redhat.com>
2119 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2120
2121 * inferiors.h: Include "gdb_vecs.h".
2122 (struct process_info): Add syscalls_to_catch.
2123 * inferiors.c (remove_process): Free syscalls_to_catch.
2124 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2125 syscall_return stops.
2126 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2127 * server.c (handle_general_set): Handle QCatchSyscalls.
2128 (handle_query): Report support for QCatchSyscalls.
2129 * target.h (struct target_ops): Add supports_catch_syscall.
2130 (target_supports_catch_syscall): New macro.
2131 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2132 (struct lwp_info): Add syscall_state.
2133 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2134 Maintain syscall_state and syscalls_to_catch across exec.
2135 (get_syscall_trapinfo): New function, proxy to the_low_target.
2136 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2137 (linux_low_filter_event): Toggle syscall_state entry/return for
2138 syscall traps, and set it ignored for all others.
2139 (gdb_catching_syscalls_p): New function.
2140 (gdb_catch_this_syscall_p): New function.
2141 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2142 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2143 (linux_supports_catch_syscall): New function.
2144 (linux_target_ops): Install it.
2145 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2146 (the_low_target): Install it.
2147
2148 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2149
2150 * acinclude.m4: Include new ../warning.m4 file.
2151 * configure: Regenerated.
2152 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2153
2154 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2155
2156 * ax.c (is_goto_target): Mark static.
2157 * linux-low.c (register_addr): Likewise.
2158 (linux_fetch_registers, linux_store_registers): Likewise.
2159 * mem-break.c (any_persistent_commands): Fix old prototype.
2160 (add_commands_to_breakpoint): Mark static.
2161 * regcache.c (find_register_by_name): Delete unused func.
2162 * remote-utils.c (hex_or_minus_one): Mark static.
2163 * server.c (monitor_show_help): Mark static.
2164 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2165 handle_v_requests): Likewise.
2166
2167 2016-01-12 Pedro Alves <palves@redhat.com>
2168
2169 Remove use of the registered trademark symbol throughout.
2170
2171 2016-01-08 Yao Qi <yao.qi@linaro.org>
2172
2173 * remote-utils.c (getpkt): If c is '\003', call target hook
2174 request_interrupt.
2175
2176 2016-01-06 Yao Qi <yao.qi@linaro.org>
2177
2178 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2179 linux-aarch32-low.c.
2180 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2181 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2182 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2183 (thumb2_breakpoint): Declare.
2184 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2185 linux-aarch32-low.h.
2186 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2187 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2188 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2189
2190 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2191
2192 * gdbreplay.c (gdbreplay_version): Change copyright year in
2193 version message.
2194 * server.c (gdbserver_version): Likewise.
2195
2196 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2197
2198 * server.c (crc32_table): Delete.
2199 (crc32): Use libiberty's xcrc32 function.
2200
2201 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2202
2203 * lynx-low.c (lynx_delete_thread_callback): New function.
2204 (lynx_mourn): Properly delete our process and all of its
2205 threads. Remove call to clear_inferiors.
2206
2207 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2208
2209 * target.c (thread_search_callback): Add check that
2210 the thread_stopped target callback is not NULL before
2211 calling it.
2212
2213 2015-12-21 Yao Qi <yao.qi@linaro.org>
2214
2215 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2216 arm breakpoint.
2217
2218 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2219
2220 * server.c (handle_query): Call target_supports_software_single_step.
2221
2222 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2223
2224 * linux-low.c (single_step): New function.
2225 (linux_resume_one_lwp_throw): Call single_step.
2226 (start_step_over): Likewise.
2227
2228 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2229
2230 * Makefile.in (SFILES): Append arch/arm-linux.c,
2231 arch/arm-get-next-pcs.c.
2232 (arm-linux.o): New rule.
2233 (arm-get-next-pcs.o): New rule.
2234 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2235 arm-linux.o.
2236 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2237 to linux-aarch32-low.c.
2238 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2239 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2240 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2241 (thumb2_breakpoint_len): Likewise.
2242 (arm_is_thumb_mode): Make non-static.
2243 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2244 from linux-aarch32-low.c.
2245 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2246 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2247 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2248 (thumb2_breakpoint_len): Likewise.
2249 (arm_is_thumb_mode): New declaration.
2250 * linux-arm-low.c: Include arch/arm-linux.h
2251 aarch/arm-get-next-pcs.h, sys/syscall.h.
2252 (get_next_pcs_ops): New struct.
2253 (get_next_pcs_addr_bits_remove): New function.
2254 (get_next_pcs_is_thumb): New function.
2255 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2256 (arm_sigreturn_next_pc): Likewise.
2257 (get_next_pcs_syscall_next_pc): Likewise.
2258 (arm_gdbserver_get_next_pcs): Likewise.
2259 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2260 Initialize.
2261 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2262 * server.h: Include gdb_vecs.h.
2263
2264 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2265
2266 * Makefile.in (SFILES): Append common/common-regcache.c.
2267 (OBS): Append common-regcache.o.
2268 (common-regcache.o): New rule.
2269 * regcache.c (init_register_cache): Initialize cache to
2270 REG_UNAVAILABLE.
2271 (regcache_raw_read_unsigned): New function.
2272 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2273 register_status enum.
2274
2275 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2276
2277 * linux-aarch64-low.c (the_low_targets): Rename
2278 breakpoint_reinsert_addr to get_next_pcs.
2279 * linux-arm-low.c (the_low_targets): Likewise.
2280 * linux-bfin-low.c (the_low_targets): Likewise.
2281 * linux-cris-low.c (the_low_targets): Likewise.
2282 * linux-crisv32-low.c (the_low_targets): Likewise.
2283 * linux-low.c (can_software_single_step): Likewise.
2284 (install_software_single_step_breakpoints): New function.
2285 (start_step_over): Use install_software_single_step_breakpoints.
2286 * linux-low.h: New CORE_ADDR vector.
2287 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2288 get_next_pcs.
2289 * linux-mips-low.c (the_low_targets): Likewise.
2290 * linux-nios2-low.c (the_low_targets): Likewise.
2291 * linux-sparc-low.c (the_low_targets): Likewise.
2292
2293 2015-12-17 Pedro Alves <palves@redhat.com>
2294
2295 * linux-low.c (linux_kill_one_lwp): Remove references to
2296 LinuxThreads.
2297 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2298 to 'kill'.
2299 (linux_init_signals): Delete.
2300 (initialize_low): Adjust.
2301 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2302
2303 2015-12-16 Pedro Alves <palves@redhat.com>
2304
2305 * configure.ac (compiler warning flags): When testing a
2306 -Wno-foo option, check whether -Wfoo works instead.
2307 * configure: Regenerate.
2308
2309 2015-12-11 Don Breazeal <donb@codesourcery.com>
2310
2311 * server.c (process_serial_event): Don't exit from gdbserver
2312 in remote mode if there are still active inferiors.
2313
2314 2015-12-11 Yao Qi <yao.qi@linaro.org>
2315
2316 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2317 arm_breakpoint_at if the process is 32-bit.
2318
2319 2015-12-11 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2322 arm breakpoint.
2323
2324 2015-12-07 Yao Qi <yao.qi@linaro.org>
2325
2326 * configure.srv: Append arm.o to srv_tgtobj for
2327 aarch64*-*-linux* target.
2328 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2329 from linux-arm-low.c.
2330 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2331 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2332 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2333 (thumb2_breakpoint_len): Likewise.
2334 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2335 (arm_breakpoint_kinds): Likewise.
2336 (arm_breakpoint_kind_from_pc): Likewise.
2337 (arm_sw_breakpoint_from_kind): Likewise.
2338 (arm_breakpoint_kind_from_current_state): Likewise.
2339 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2340 (arm_sw_breakpoint_from_kind): Declare.
2341 (arm_breakpoint_kind_from_current_state): Declare.
2342 (arm_breakpoint_at): Declare.
2343 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2344 arm_sw_breakpoint_from_kind if process is 32-bit.
2345 (aarch64_breakpoint_kind_from_pc): New function.
2346 (aarch64_breakpoint_kind_from_current_state): New function.
2347 (the_low_target): Initialize fields breakpoint_kind_from_pc
2348 and breakpoint_kind_from_current_state.
2349 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2350 linux-aarch32-low.c.
2351 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2352 (arm_breakpoint, arm_breakpoint_len): Likewise.
2353 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2354 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2355 (arm_is_thumb_mode): Likewise.
2356 (arm_breakpoint_at): Likewise.
2357 (arm_breakpoint_kind_from_pc): Likewise.
2358 (arm_sw_breakpoint_from_kind): Likewise.
2359 (arm_breakpoint_kind_from_current_state): Likewise.
2360
2361 Revert:
2362 2015-08-04 Yao Qi <yao.qi@linaro.org>
2363
2364 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2365 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2366 * server.c (extended_protocol): Remove "static".
2367 * server.h (extended_protocol): Declare it.
2368
2369 2015-12-04 Josh Stone <jistone@redhat.com>
2370
2371 * target.h (struct target_ops) <arch_setup>: Rename to ...
2372 (struct target_ops) <post_create_inferior>: ... this.
2373 (target_arch_setup): Rename to ...
2374 (target_post_create_inferior): ... this, calling post_create_inferior.
2375 * server.c (start_inferior): Update target_arch_setup calls to
2376 target_post_create_inferior.
2377 * linux-low.c (linux_low_ptrace_options): Forward declare.
2378 (linux_arch_setup): Update its comment for general use.
2379 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2380 (struct linux_target_ops): Use linux_post_create_inferior.
2381 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2382 to post_create_inferior.
2383 * nto-low.c (struct nto_target_ops): Likewise.
2384 * spu-low.c (struct spu_target_ops): Likewise.
2385 * win32-low.c (struct win32_target_ops): Likewise.
2386
2387 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2388
2389 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2390
2391 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2392
2393 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2394 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2395 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2396 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2397 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2398 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2399 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2400 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2401 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2402 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2403 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2404 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2405
2406 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2407
2408 * linux-low.c (linux_look_up_symbols): Don't call
2409 linux_supports_traceclone.
2410 * linux-low.h (thread_db_init): Remove use_events argument.
2411 * thread-db.c (thread_db_use_event): Remove global variable.
2412 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2413 (struct thread_db) <td_create_bp>: Remove field.
2414 (thread_db_create_event): Remove function.
2415 (thread_db_enable_reporting): Likewise.
2416 (find_one_thread): Don't check for thread_db_use_events.
2417 (attach_thread): Likewise.
2418 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2419 (try_thread_db_load_1): Don't check for thread_db_use_events.
2420 (thread_db_init): Remove use_events argument and thread events
2421 handling.
2422 (remove_thread_event_breakpoints): Remove function.
2423 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2424
2425 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2426
2427 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2428 New function.
2429 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2430 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2431 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2432 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2433 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2434 Initialize.
2435 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2436 New function.
2437 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2438 * linux-low.c (can_hardware_single_step): Use
2439 supports_hardware_single_step.
2440 (can_software_single_step): New function.
2441 (start_step_over): Call can_software_single_step.
2442 (linux_supports_hardware_single_step): New function.
2443 (struct target_ops) <supports_software_single_step>: Initialize.
2444 * linux-low.h (struct linux_target_ops)
2445 <supports_hardware_single_step>: Initialize.
2446 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2447 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2448 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2449 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2450 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2451 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2452 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2453 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2454 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2455 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2456 Initialize.
2457 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2458 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2459 Initialize.
2460 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2462 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2463 New function.
2464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2465 * target.h (struct target_ops): <supports_software_single_step>:
2466 New field.
2467 (target_supports_software_single_step): New macro.
2468
2469 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2470
2471 * linux-low.c (linux_wait_1): Fix pc advance condition.
2472 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2473 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2474
2475 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2476
2477 * linux-arm-low.c (arm_is_thumb_mode): New function.
2478 (arm_breakpoint_at): Use arm_is_thumb_mode.
2479 (arm_breakpoint_kind_from_current_state): New function.
2480 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2481 Initialize.
2482 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2483 (linux_breakpoint_kind_from_current_state): New function.
2484 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2485 * linux-low.h (struct linux_target_ops)
2486 <breakpoint_kind_from_current_state>: New field.
2487 * target.h (struct target_ops): Likewise.
2488 (target_breakpoint_kind_from_current_state): New macro.
2489
2490 2015-11-30 Pedro Alves <palves@redhat.com>
2491
2492 * linux-low.c (linux_resume): Wake up the event loop before
2493 returning.
2494
2495 2015-11-30 Pedro Alves <palves@redhat.com>
2496
2497 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2498 check.
2499 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2500 to -1.
2501 * target.c (struct thread_search): New structure.
2502 (thread_search_callback): New function.
2503 (prev_general_thread): New global.
2504 (prepare_to_access_memory, done_accessing_memory): New functions.
2505 * target.h (prepare_to_access_memory, done_accessing_memory):
2506 Replace macros with function declarations.
2507
2508 2015-11-30 Pedro Alves <palves@redhat.com>
2509
2510 PR 14618
2511 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2512 report TARGET_WAITKIND_NO_RESUMED.
2513 * remote-utils.c (prepare_resume_reply): Handle
2514 TARGET_WAITKIND_NO_RESUMED.
2515 * server.c (report_no_resumed): New global.
2516 (handle_query) <qSupported>: Handle "no-resumed+". Report
2517 "no-resumed+" support.
2518 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2519 return error if the client doesn't support no-resumed events.
2520 (push_stop_notification): New function.
2521 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2522 events if the client supports them.
2523
2524 2015-11-30 Pedro Alves <palves@redhat.com>
2525
2526 * linux-low.c (thread_still_has_status_pending_p): Don't check
2527 vCont;t here.
2528 (lwp_resumed): New function.
2529 (status_pending_p_callback): Return early if the LWP is not
2530 supposed to be resumed.
2531
2532 2015-11-30 Pedro Alves <palves@redhat.com>
2533
2534 * linux-low.c (handle_extended_wait): Assert that the LWP's
2535 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2536 thread create events, leave the new child's status pending.
2537 (linux_low_filter_event): If GDB wants to hear about thread exit
2538 events, leave the LWP marked dead and don't delete it.
2539 (linux_wait_for_event_filtered): Don't check for thread exit.
2540 (filter_exit_event): New function.
2541 (linux_wait_1): Use it, when returning an exit event.
2542 (linux_resume_one_lwp_throw): Assert that the LWP's
2543 waitstatus is TARGET_WAITKIND_IGNORE.
2544 * remote-utils.c (prepare_resume_reply): Handle
2545 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2546 * server.c (report_thread_events): New global.
2547 (handle_general_set): Handle QThreadEvents.
2548 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2549 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2550 TARGET_WAITKIND_THREAD_EXITED.
2551 * server.h (report_thread_events): Declare.
2552
2553 2015-11-30 Pedro Alves <palves@redhat.com>
2554
2555 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2556 the thread's last_resume_kind was resume_stop.
2557
2558 2015-11-30 Pedro Alves <palves@redhat.com>
2559
2560 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2561 before returning.
2562
2563 2015-11-30 Pedro Alves <palves@redhat.com>
2564
2565 * server.c (handle_v_requests): Handle vCtrlC.
2566
2567 2015-11-30 Pedro Alves <palves@redhat.com>
2568
2569 * gdbthread.h (find_any_thread_of_pid): Declare.
2570 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2571 functions.
2572 * server.c (handle_query): If current_thread is NULL, look for
2573 another thread of the selected process.
2574
2575 2015-11-26 Daniel Colascione <dancol@dancol.org>
2576 Simon Marchi <simon.marchi@ericsson.com>
2577
2578 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2579 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2580 name in reply.
2581 * target.h (struct target_ops) <thread_name>: New field.
2582 (target_thread_name): New macro.
2583
2584 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2585
2586 * regcache.h (regcache_invalidate_pid): Add declaration.
2587 * regcache.c (regcache_invalidate_pid): New function, extracted
2588 from regcache_invalidate.
2589 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2590 Add trivial documentation comment.
2591 * lynx-low.c: Use regcache_invalidate_pid instead of
2592 regcache_invalidate.
2593
2594 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2595
2596 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2597 and Elf64_auxv_t if the target is Android.
2598
2599 2015-11-22 Doug Evans <xdje42@gmail.com>
2600
2601 * target.h: #include <sys/types.h>.
2602
2603 2015-11-19 Pedro Alves <palves@redhat.com>
2604
2605 * linux-low.c (linux_process_qsupported): Change prototype.
2606 Adjust.
2607 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2608 Change prototype.
2609 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2610 and adjust to loop over all features.
2611 * server.c (handle_query) <qSupported>: Adjust to call
2612 target_process_qsupported once, passing it a vector of unprocessed
2613 features.
2614 * target.h (struct target_ops) <process_qsupported>: Change
2615 prototype.
2616 (target_process_qsupported): Adjust.
2617
2618 2015-11-19 Pedro Alves <palves@redhat.com>
2619
2620 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2621 mode.
2622 * configure: Regenerate.
2623
2624 2015-11-19 Pedro Alves <palves@redhat.com>
2625
2626 * configure: Regenerate.
2627
2628 2015-11-19 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2631 type to uint32_t.
2632
2633 2015-11-19 Yao Qi <yao.qi@linaro.org>
2634
2635 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2636 (struct aarch64_operand): Move enum out.
2637
2638 2015-11-19 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2641 struct user_fpsimd_state *.
2642 (aarch64_store_fpregset): Likewise.
2643
2644 2015-11-19 Yao Qi <yao.qi@linaro.org>
2645
2646 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2647 struct user_pt_regs *.
2648 (aarch64_store_gregset): Likewise.
2649
2650 2015-11-18 Pedro Alves <palves@redhat.com>
2651
2652 * Makefile.in (all_object_files): Add $IPA_OBJS.
2653
2654 2015-11-17 Pedro Alves <palves@redhat.com>
2655
2656 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2657 GDB_SIGNAL_0 and gdb_signal_to_string.
2658
2659 2015-11-17 Pedro Alves <palves@redhat.com>
2660
2661 * win32-low.c (handle_output_debug_string): Remove parameter.
2662 (win32_kill): Remove our_status local and adjust call to
2663 handle_output_debug_string.
2664 (get_child_debug_event): Adjust call to
2665 handle_output_debug_string.
2666
2667 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2668
2669 * linux-mips-low.c (mips_fill_gregset): Add cast.
2670 (mips_store_gregset): Likewise.
2671 (mips_fill_fpregset): Likewise.
2672 (mips_store_fpregset): Likewise.
2673
2674 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2677 priv.
2678
2679 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2680
2681 * linux-mips-low.c (mips_linux_new_thread): Change type of
2682 watch_type to enum target_hw_bp_type.
2683
2684 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2685
2686 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2687 Change return type to arm_hwbp_type.
2688
2689 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2690
2691 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2692 (arm_store_gregset): Likewise.
2693 * linux-arm-low.c (arm_get_hwcap): Likewise.
2694 (arm_read_description): Likewise.
2695
2696 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2697
2698 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2699
2700 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2701
2702 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2703 (ppc_fill_vsxregset): Likewise.
2704 (ppc_store_vsxregset): Likewise.
2705 (ppc_fill_vrregset): Likewise.
2706 (ppc_store_vrregset): Likewise.
2707 (ppc_fill_evrregset): Likewise.
2708 (ppc_store_evrregset): Likewise.
2709
2710 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2711
2712 * linux-ppc-low.c (ppc_usrregs_info): Remove
2713 forward-declaration.
2714 (ppc_arch_setup): Move lower in file.
2715
2716 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2717
2718 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2719 (ps_pdwrite): Likewise.
2720
2721 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2722
2723 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2724 to after assert checks.
2725
2726 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2727
2728 * proc-service.c (ps_pdread): Add/adjust casts.
2729 (ps_pdwrite): Add/adjust casts.
2730
2731 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2732
2733 * server.c (handle_search_memory_1): Cast return value of
2734 memmem.
2735
2736 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2737
2738 * server.c (write_qxfer_response): Change type of data to
2739 gdb_byte *.
2740
2741 2015-10-29 Pedro Alves <palves@redhat.com>
2742
2743 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2744
2745 2015-10-29 Pedro Alves <palves@redhat.com>
2746
2747 * tracepoint.c (clear_installed_tracepoints): Add casts.
2748
2749 2015-10-29 Pedro Alves <palves@redhat.com>
2750
2751 * server.c (handle_v_cont, process_serial_event): Add enum
2752 gdb_signal casts to signal parsing code.
2753
2754 2015-10-29 Pedro Alves <palves@redhat.com>
2755
2756 * linux-low.h (NULL_REGSET): Define.
2757 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2758 * linux-arm-low.c (arm_regsets): Likewise.
2759 * linux-crisv32-low.c (cris_regsets): Likewise.
2760 * linux-m68k-low.c (m68k_regsets): Likewise.
2761 * linux-mips-low.c (mips_regsets): Likewise.
2762 * linux-nios2-low.c (nios2_regsets): Likewise.
2763 * linux-ppc-low.c (ppc_regsets): Likewise.
2764 * linux-s390-low.c (s390_regsets): Likewise.
2765 * linux-sh-low.c (sh_regsets): Likewise.
2766 * linux-sparc-low.c (sparc_regsets): Likewise.
2767 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2768 * linux-tile-low.c (tile_regsets): Likewise.
2769 * linux-x86-low.c (x86_regsets): Likewise.
2770 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2771
2772 2015-10-29 Pedro Alves <palves@redhat.com>
2773
2774 * linux-low.h (NULL_REGSET): Define.
2775 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2776 * linux-arm-low.c (arm_regsets): Likewise.
2777 * linux-crisv32-low.c (cris_regsets): Likewise.
2778 * linux-m68k-low.c (m68k_regsets): Likewise.
2779 * linux-mips-low.c (mips_regsets): Likewise.
2780 * linux-nios2-low.c (nios2_regsets): Likewise.
2781 * linux-ppc-low.c (ppc_regsets): Likewise.
2782 * linux-s390-low.c (s390_regsets): Likewise.
2783 * linux-sh-low.c (sh_regsets): Likewise.
2784 * linux-sparc-low.c (sparc_regsets): Likewise.
2785 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2786 * linux-tile-low.c (tile_regsets): Likewise.
2787 * linux-x86-low.c (x86_regsets): Likewise.
2788 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2789
2790 2015-10-26 Doug Evans <dje@google.com>
2791
2792 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2793
2794 2015-10-26 Doug Evans <dje@google.com>
2795
2796 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2797
2798 2015-10-26 Doug Evans <dje@google.com>
2799
2800 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2801 for debug_printf.
2802 (attach_thread, find_new_threads_callback): Ditto.
2803
2804 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * mem-break.h (set_breakpoint_data): Remove.
2807
2808 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2809
2810 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2811 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2812 (initialize_low): Remove set_breakpoint_data call.
2813 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2814 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2815 (initialize_low): Remove set_breakpoint_data call.
2816 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2817 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2818 (initialize_low): Remove set_breakpoint_data call.
2819
2820 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2821
2822 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2823 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2824 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2825 * target.h (target_breakpoint_kind_from_pc): New macro.
2826
2827 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2828
2829 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2830 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2831 the default breakpoint kind.
2832
2833 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2834
2835 * linux-arm-low.c (arm_supports_z_point_type): Add software
2836 breakpoint support.
2837
2838 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2839
2840 * linux-arm-low.c: Refactor breakpoint definitions.
2841 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2842 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2843
2844 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2845
2846 * Makefile.in: Add arm.c/o.
2847 * configure.srv: Likewise.
2848 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2849 (arm_breakpoint_kind_from_pc): New function.
2850 (arm_sw_breakpoint_from_kind): Return proper kind.
2851 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2852
2853 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2854
2855 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2856 removal.
2857 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2858 (struct raw_breakpoint) <size>: Remove.
2859 (struct raw_breakpoint) <kind>: Add.
2860 (bp_size): New function.
2861 (bp_opcode): Likewise.
2862 (find_raw_breakpoint_at): Adjust for kind.
2863 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2864 (remove_memory_breakpoint): Adjust for kind call bp_size.
2865 (set_raw_breakpoint_at): Adjust for kind.
2866 (set_breakpoint): Likewise.
2867 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2868 (delete_raw_breakpoint): Adjust for kind.
2869 (delete_breakpoint): Likewise.
2870 (find_gdb_breakpoint): Likewise.
2871 (set_gdb_breakpoint_1): Likewise.
2872 (set_gdb_breakpoint): Likewise.
2873 (delete_gdb_breakpoint_1): Likewise.
2874 (delete_gdb_breakpoint): Likewise.
2875 (uninsert_raw_breakpoint): Likewise.
2876 (reinsert_raw_breakpoint): Likewise.
2877 (set_breakpoint_data): Remove.
2878 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2879 (check_mem_read): Adjust for kind call bp_size.
2880 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2881 (clone_one_breakpoint): Adjust for kind.
2882 * mem-break.h (set_gdb_breakpoint): Likewise.
2883 (delete_gdb_breakpoint): Likewise.
2884 * server.c (process_serial_event): Likewise.
2885
2886 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2887
2888 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2889 (struct linux_target_ops) <breakpoint>: Remove.
2890 (struct linux_target_ops) <breakpoint_len>: Remove.
2891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2893 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2894 (arm_sw_breakpoint_from_kind): New function.
2895 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2896 (struct linux_target_ops) <breakpoint>: Remove.
2897 (struct linux_target_ops) <breakpoint_len>: Remove.
2898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2900 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2901 (struct linux_target_ops) <breakpoint>: Remove.
2902 (struct linux_target_ops) <breakpoint_len>: Remove.
2903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2905 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2906 (struct linux_target_ops) <breakpoint>: Remove.
2907 (struct linux_target_ops) <breakpoint_len>: Remove.
2908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2910 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2911 and sw_breakpoint_from_kind to increment the pc.
2912 (linux_breakpoint_kind_from_pc): New function.
2913 (linux_sw_breakpoint_from_kind): New function.
2914 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2915 (initialize_low): Call breakpoint_kind_from_pc and
2916 sw_breakpoint_from_kind to replace breakpoint_data/len.
2917 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2918 New field.
2919 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2920 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2921 (struct linux_target_ops) <breakpoint>: Remove.
2922 (struct linux_target_ops) <breakpoint_len>: Remove.
2923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2925 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2926 (struct linux_target_ops) <breakpoint>: Remove.
2927 (struct linux_target_ops) <breakpoint_len>: Remove.
2928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2930 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2931 (struct linux_target_ops) <breakpoint>: Remove.
2932 (struct linux_target_ops) <breakpoint_len>: Remove.
2933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2935 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2936 (struct linux_target_ops) <breakpoint>: Remove.
2937 (struct linux_target_ops) <breakpoint_len>: Remove.
2938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2940 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2941 (struct linux_target_ops) <breakpoint>: Remove.
2942 (struct linux_target_ops) <breakpoint_len>: Remove.
2943 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2945 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2946 (struct linux_target_ops) <breakpoint>: Remove.
2947 (struct linux_target_ops) <breakpoint_len>: Remove.
2948 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2949 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2950 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2951 (struct linux_target_ops) <breakpoint>: Remove.
2952 (struct linux_target_ops) <breakpoint_len>: Remove.
2953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2955 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2956 (struct linux_target_ops) <breakpoint>: Remove.
2957 (struct linux_target_ops) <breakpoint_len>: Remove.
2958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2960 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2961 (struct linux_target_ops) <breakpoint>: Remove.
2962 (struct linux_target_ops) <breakpoint_len>: Remove.
2963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2965 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2966 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2967 (struct linux_target_ops) <breakpoint>: Remove.
2968 (struct linux_target_ops) <breakpoint_len>: Remove.
2969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2971 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2972 (struct linux_target_ops) <breakpoint>: Remove.
2973 (struct linux_target_ops) <breakpoint_len>: Remove.
2974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2976
2977 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2978
2979 * linux-cris-low.c (cris_get_pc): Remove void arg.
2980
2981 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2982
2983 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2984 variable name.
2985
2986 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2987
2988 * inferiors.c (thread_pid_matches_callback): New function.
2989 (find_thread_process): New function.
2990 (remove_thread): Reset current_thread.
2991 (remove_process): Assert threads have been removed first.
2992
2993 2015-10-15 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2996 if it is 3.
2997 (aarch64_remove_point): Likewise.
2998 * regcache.c (regcache_register_size): New function.
2999
3000 2015-10-12 Yao Qi <yao.qi@linaro.org>
3001
3002 * linux-aarch64-low.c: Update all callers as emit_load_store
3003 is renamed to aarch64_emit_load_store.
3004
3005 2015-10-12 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c: Update all callers of function renaming
3008 from emit_insn to aarch64_emit_insn.
3009
3010 2015-10-12 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3013 arch/aarch64-insn.h.
3014 (struct aarch64_memory_operand): Likewise.
3015 (ENCODE): Likewise.
3016 (emit_insn): Move to arch/aarch64-insn.c.
3017 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3018 (emit_load_store): Move to arch/aarch64-insn.c.
3019 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3020 (can_encode_int32): Remove.
3021
3022 2015-10-12 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3025 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3026 (aarch64_relocate_instruction): Likewise.
3027 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3028 (struct aarch64_insn_visitor): Likewise.
3029
3030 2015-10-12 Yao Qi <yao.qi@linaro.org>
3031
3032 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3033 (struct aarch64_insn_visitor): New.
3034 (struct aarch64_insn_relocation_data): New.
3035 (aarch64_ftrace_insn_reloc_b): New function.
3036 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3037 (aarch64_ftrace_insn_reloc_cb): Likewise.
3038 (aarch64_ftrace_insn_reloc_tb): Likewise.
3039 (aarch64_ftrace_insn_reloc_adr): Likewise.
3040 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3041 (aarch64_ftrace_insn_reloc_others): Likewise.
3042 (visitor): New.
3043 (aarch64_relocate_instruction): Use visitor.
3044
3045 2015-10-12 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3048 int. Add argument buf.
3049 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3050 aarch64_relocate_instruction.
3051
3052 2015-10-12 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3055 argument insn. Remove local variable insn. Don't call
3056 target_read_uint32.
3057 (aarch64_install_fast_tracepoint_jump_pad): Call
3058 target_read_uint32.
3059
3060 2015-09-30 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3063 (emit_load_store_pair): Likewise.
3064
3065 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3066
3067 * dll.c (match_dll): Add cast(s).
3068 (unloaded_dll): Likewise.
3069 * linux-low.c (second_thread_of_pid_p): Likewise.
3070 (delete_lwp_callback): Likewise.
3071 (count_events_callback): Likewise.
3072 (select_event_lwp_callback): Likewise.
3073 (linux_set_resume_request): Likewise.
3074 * server.c (accumulate_file_name_length): Likewise.
3075 (emit_dll_description): Likewise.
3076 (handle_qxfer_threads_worker): Likewise.
3077 (visit_actioned_threads): Likewise.
3078 * thread-db.c (any_thread_of): Likewise.
3079 * tracepoint.c (same_process_p): Likewise.
3080 (match_blocktype): Likewise.
3081 (build_traceframe_info_xml): Likewise.
3082
3083 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3084
3085 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3086 assignment.
3087 (gdb_unparse_agent_expr): Likewise.
3088 * hostio.c (require_data): Likewise.
3089 (handle_pread): Likewise.
3090 * linux-low.c (disable_regset): Likewise.
3091 (fetch_register): Likewise.
3092 (store_register): Likewise.
3093 (get_dynamic): Likewise.
3094 (linux_qxfer_libraries_svr4): Likewise.
3095 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3096 (set_fast_tracepoint_jump): Likewise.
3097 (uninsert_fast_tracepoint_jumps_at): Likewise.
3098 (reinsert_fast_tracepoint_jumps_at): Likewise.
3099 (validate_inserted_breakpoint): Likewise.
3100 (clone_agent_expr): Likewise.
3101 * regcache.c (init_register_cache): Likewise.
3102 * remote-utils.c (putpkt_binary_1): Likewise.
3103 (decode_M_packet): Likewise.
3104 (decode_X_packet): Likewise.
3105 (look_up_one_symbol): Likewise.
3106 (relocate_instruction): Likewise.
3107 (monitor_output): Likewise.
3108 * server.c (handle_search_memory): Likewise.
3109 (handle_qxfer_exec_file): Likewise.
3110 (handle_qxfer_libraries): Likewise.
3111 (handle_qxfer): Likewise.
3112 (handle_query): Likewise.
3113 (handle_v_cont): Likewise.
3114 (handle_v_run): Likewise.
3115 (captured_main): Likewise.
3116 * target.c (write_inferior_memory): Likewise.
3117 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3118 * tracepoint.c (init_trace_buffer): Likewise.
3119 (add_tracepoint_action): Likewise.
3120 (add_traceframe): Likewise.
3121 (add_traceframe_block): Likewise.
3122 (cmd_qtdpsrc): Likewise.
3123 (cmd_qtdv): Likewise.
3124 (cmd_qtstatus): Likewise.
3125 (response_source): Likewise.
3126 (response_tsv): Likewise.
3127 (cmd_qtnotes): Likewise.
3128 (gdb_collect): Likewise.
3129 (initialize_tracepoint): Likewise.
3130
3131 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3132
3133 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3134 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3135 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3136 <NOP>: New.
3137 (enum aarch64_condition_codes): New enum.
3138 (w0): New static global.
3139 (fp): Likewise.
3140 (lr): Likewise.
3141 (struct aarch64_memory_operand) <type>: New
3142 MEMORY_OPERAND_POSTINDEX type.
3143 (postindex_memory_operand): New helper function.
3144 (emit_ret): New function.
3145 (emit_load_store_pair): New function, factored out of emit_stp
3146 with support for MEMORY_OPERAND_POSTINDEX.
3147 (emit_stp): Rewrite using emit_load_store_pair.
3148 (emit_ldp): New function.
3149 (emit_load_store): Likewise.
3150 (emit_ldr): Mention post-index instruction in comment.
3151 (emit_ldrh): New function.
3152 (emit_ldrb): New function.
3153 (emit_ldrsw): Mention post-index instruction in comment.
3154 (emit_str): Likewise.
3155 (emit_subs): New function.
3156 (emit_cmp): Likewise.
3157 (emit_and): Likewise.
3158 (emit_orr): Likewise.
3159 (emit_orn): Likewise.
3160 (emit_eor): Likewise.
3161 (emit_mvn): Likewise.
3162 (emit_lslv): Likewise.
3163 (emit_lsrv): Likewise.
3164 (emit_asrv): Likewise.
3165 (emit_mul): Likewise.
3166 (emit_sbfm): Likewise.
3167 (emit_sbfx): Likewise.
3168 (emit_ubfm): Likewise.
3169 (emit_ubfx): Likewise.
3170 (emit_csinc): Likewise.
3171 (emit_cset): Likewise.
3172 (emit_nop): Likewise.
3173 (emit_ops_insns): New helper function.
3174 (emit_pop): Likewise.
3175 (emit_push): Likewise.
3176 (aarch64_emit_prologue): New function.
3177 (aarch64_emit_epilogue): Likewise.
3178 (aarch64_emit_add): Likewise.
3179 (aarch64_emit_sub): Likewise.
3180 (aarch64_emit_mul): Likewise.
3181 (aarch64_emit_lsh): Likewise.
3182 (aarch64_emit_rsh_signed): Likewise.
3183 (aarch64_emit_rsh_unsigned): Likewise.
3184 (aarch64_emit_ext): Likewise.
3185 (aarch64_emit_log_not): Likewise.
3186 (aarch64_emit_bit_and): Likewise.
3187 (aarch64_emit_bit_or): Likewise.
3188 (aarch64_emit_bit_xor): Likewise.
3189 (aarch64_emit_bit_not): Likewise.
3190 (aarch64_emit_equal): Likewise.
3191 (aarch64_emit_less_signed): Likewise.
3192 (aarch64_emit_less_unsigned): Likewise.
3193 (aarch64_emit_ref): Likewise.
3194 (aarch64_emit_if_goto): Likewise.
3195 (aarch64_emit_goto): Likewise.
3196 (aarch64_write_goto_address): Likewise.
3197 (aarch64_emit_const): Likewise.
3198 (aarch64_emit_call): Likewise.
3199 (aarch64_emit_reg): Likewise.
3200 (aarch64_emit_pop): Likewise.
3201 (aarch64_emit_stack_flush): Likewise.
3202 (aarch64_emit_zero_ext): Likewise.
3203 (aarch64_emit_swap): Likewise.
3204 (aarch64_emit_stack_adjust): Likewise.
3205 (aarch64_emit_int_call_1): Likewise.
3206 (aarch64_emit_void_call_2): Likewise.
3207 (aarch64_emit_eq_goto): Likewise.
3208 (aarch64_emit_ne_goto): Likewise.
3209 (aarch64_emit_lt_goto): Likewise.
3210 (aarch64_emit_le_goto): Likewise.
3211 (aarch64_emit_gt_goto): Likewise.
3212 (aarch64_emit_ge_got): Likewise.
3213 (aarch64_emit_ops_impl): New static global variable.
3214 (aarch64_emit_ops): New target function, return
3215 &aarch64_emit_ops_impl.
3216 (struct linux_target_ops): Install it.
3217
3218 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3219
3220 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3221 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3222 aarch64-ipa.o.
3223 * linux-aarch64-ipa.c: New file.
3224 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3225 and endian.h.
3226 (aarch64_get_thread_area): New target method.
3227 (extract_signed_bitfield): New helper function.
3228 (aarch64_decode_ldr_literal): New function.
3229 (enum aarch64_opcodes): New enum.
3230 (struct aarch64_register): New struct.
3231 (struct aarch64_operand): New struct.
3232 (x0): New static global.
3233 (x1): Likewise.
3234 (x2): Likewise.
3235 (x3): Likewise.
3236 (x4): Likewise.
3237 (w2): Likewise.
3238 (ip0): Likewise.
3239 (sp): Likewise.
3240 (xzr): Likewise.
3241 (aarch64_register): New helper function.
3242 (register_operand): Likewise.
3243 (immediate_operand): Likewise.
3244 (struct aarch64_memory_operand): New struct.
3245 (offset_memory_operand): New helper function.
3246 (preindex_memory_operand): Likewise.
3247 (enum aarch64_system_control_registers): New enum.
3248 (ENCODE): New macro.
3249 (emit_insn): New helper function.
3250 (emit_b): New function.
3251 (emit_bcond): Likewise.
3252 (emit_cb): Likewise.
3253 (emit_tb): Likewise.
3254 (emit_blr): Likewise.
3255 (emit_stp): Likewise.
3256 (emit_ldp_q_offset): Likewise.
3257 (emit_stp_q_offset): Likewise.
3258 (emit_load_store): Likewise.
3259 (emit_ldr): Likewise.
3260 (emit_ldrsw): Likewise.
3261 (emit_str): Likewise.
3262 (emit_ldaxr): Likewise.
3263 (emit_stxr): Likewise.
3264 (emit_stlr): Likewise.
3265 (emit_data_processing_reg): Likewise.
3266 (emit_data_processing): Likewise.
3267 (emit_add): Likewise.
3268 (emit_sub): Likewise.
3269 (emit_mov): Likewise.
3270 (emit_movk): Likewise.
3271 (emit_mov_addr): Likewise.
3272 (emit_mrs): Likewise.
3273 (emit_msr): Likewise.
3274 (emit_sevl): Likewise.
3275 (emit_wfe): Likewise.
3276 (append_insns): Likewise.
3277 (can_encode_int32_in): New helper function.
3278 (aarch64_relocate_instruction): New function.
3279 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3280 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3281 (struct linux_target_ops): Install aarch64_get_thread_area,
3282 aarch64_install_fast_tracepoint_jump_pad and
3283 aarch64_get_min_fast_tracepoint_insn_len.
3284
3285 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3286
3287 * Makefile.in (aarch64-insn.o): New rule.
3288 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3289
3290 2015-09-21 Yao Qi <yao.qi@linaro.org>
3291
3292 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3293
3294 2015-09-21 Yao Qi <yao.qi@linaro.org>
3295
3296 * tracepoint.c (max_jump_pad_size): Remove.
3297
3298 2015-09-18 Yao Qi <yao.qi@linaro.org>
3299
3300 * linux-aarch64-low.c: Don't include sys/uio.h.
3301 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3302
3303 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3304
3305 * tracepoint.c (eval_result_type): Change prototype.
3306 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3307
3308 2015-09-15 Pedro Alves <palves@redhat.com>
3309
3310 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3311 Check whether to report exec events instead of checking whether
3312 multiprocess is enabled.
3313
3314 2015-09-15 Pedro Alves <palves@redhat.com>
3315
3316 PR remote/18965
3317 * remote-utils.c (prepare_resume_reply): Merge
3318 TARGET_WAITKIND_VFORK_DONE switch case with the
3319 TARGET_WAITKIND_FORKED case.
3320
3321 2015-09-15 Yao Qi <yao.qi@linaro.org>
3322
3323 * server.c (handle_query): Check string comparison using
3324 "else if" instead of "if".
3325
3326 2015-09-15 Yao Qi <yao.qi@linaro.org>
3327
3328 * server.c (vCont_supported): New global variable.
3329 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3330 matches. Append ";vContSupported+" to own_buf.
3331 (handle_v_requests): Append ";s;S" to own_buf if target supports
3332 hardware single step or vCont_supported is false.
3333 (capture_main): Set vCont_supported to zero.
3334
3335 2015-09-15 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3338 it to ...
3339 (linux_supports_hardware_single_step): ... New function.
3340 (linux_target_ops): Update.
3341 * lynx-low.c (lynx_target_ops): Set field
3342 supports_hardware_single_step to target_can_do_hardware_single_step.
3343 * nto-low.c (nto_target_ops): Likewise.
3344 * spu-low.c (spu_target_ops): Likewise.
3345 * win32-low.c (win32_target_ops): Likewise.
3346 * target.c (target_can_do_hardware_single_step): New function.
3347 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3348 Remove. <supports_hardware_single_step>: New field.
3349 (target_supports_conditional_breakpoints): Remove.
3350 (target_supports_hardware_single_step): New macro.
3351 (target_can_do_hardware_single_step): Declare.
3352 * server.c (handle_query): Use target_supports_hardware_single_step
3353 instead of target_supports_conditional_breakpoints.
3354
3355 2015-09-15 Yao Qi <yao.qi@linaro.org>
3356
3357 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3358 function.
3359 (struct linux_target_ops the_low_target): Install
3360 aarch64_linux_siginfo_fixup.
3361
3362 2015-09-11 Don Breazeal <donb@codesourcery.com>
3363 Luis Machado <lgustavo@codesourcery.com>
3364
3365 * linux-low.c (linux_mourn): Static declaration.
3366 (linux_arch_setup): Move in front of
3367 handle_extended_wait.
3368 (linux_arch_setup_thread): New function.
3369 (handle_extended_wait): Handle exec events. Call
3370 linux_arch_setup_thread. Make event_lwp argument a
3371 pointer-to-a-pointer.
3372 (check_zombie_leaders): Do not check stopped threads.
3373 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3374 (linux_low_filter_event): Add lwp and thread for exec'ing
3375 non-leader thread if leader thread has been deleted.
3376 Refactor code into linux_arch_setup_thread and call it.
3377 Pass child lwp pointer by reference to handle_extended_wait.
3378 (linux_wait_for_event_filtered): Update comment.
3379 (linux_wait_1): Prevent clobbering exec event status.
3380 (linux_supports_exec_events): New function.
3381 (linux_target_ops) <supports_exec_events>: Initialize new member.
3382 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3383 new member.
3384 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3385 * server.c (report_exec_events): New global variable.
3386 (handle_query): Handle qSupported query for exec-events feature.
3387 (captured_main): Initialize report_exec_events.
3388 * server.h (report_exec_events): Declare new global variable.
3389 * target.h (struct target_ops) <supports_exec_events>: New
3390 member.
3391 (target_supports_exec_events): New macro.
3392 * win32-low.c (win32_target_ops) <supports_exec_events>:
3393 Initialize new member.
3394
3395 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3396
3397 * linux-low.c (linux_low_enable_btrace): Remove.
3398 (linux_target_ops): Replace linux_low_enable_btrace with
3399 linux_enable_btrace.
3400
3401 2015-09-03 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-aarch64-low.c (aarch64_insert_point): Call
3404 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3405 returns true.
3406
3407 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3408
3409 * linux-low.c (check_stopped_by_breakpoint): Use
3410 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3411
3412 2015-08-27 Pedro Alves <palves@redhat.com>
3413
3414 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3415
3416 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3417
3418 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3419 the XNEW-family equivalent.
3420 (compile_bytecodes): Likewise.
3421 * dll.c (loaded_dll): Likewise.
3422 * event-loop.c (append_callback_event): Likewise.
3423 (create_file_handler): Likewise.
3424 (create_file_event): Likewise.
3425 * hostio.c (handle_open): Likewise.
3426 * inferiors.c (add_thread): Likewise.
3427 (add_process): Likewise.
3428 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3429 * linux-arm-low.c (arm_new_process): Likewise.
3430 (arm_new_thread): Likewise.
3431 * linux-low.c (add_to_pid_list): Likewise.
3432 (linux_add_process): Likewise.
3433 (handle_extended_wait): Likewise.
3434 (add_lwp): Likewise.
3435 (enqueue_one_deferred_signal): Likewise.
3436 (enqueue_pending_signal): Likewise.
3437 (linux_resume_one_lwp_throw): Likewise.
3438 (linux_resume_one_thread): Likewise.
3439 (linux_read_memory): Likewise.
3440 (linux_write_memory): Likewise.
3441 * linux-mips-low.c (mips_linux_new_process): Likewise.
3442 (mips_linux_new_thread): Likewise.
3443 (mips_add_watchpoint): Likewise.
3444 * linux-x86-low.c (initialize_low_arch): Likewise.
3445 * lynx-low.c (lynx_add_process): Likewise.
3446 * mem-break.c (set_raw_breakpoint_at): Likewise.
3447 (set_breakpoint): Likewise.
3448 (add_condition_to_breakpoint): Likewise.
3449 (add_commands_to_breakpoint): Likewise.
3450 (clone_agent_expr): Likewise.
3451 (clone_one_breakpoint): Likewise.
3452 * regcache.c (new_register_cache): Likewise.
3453 * remote-utils.c (look_up_one_symbol): Likewise.
3454 * server.c (queue_stop_reply): Likewise.
3455 (start_inferior): Likewise.
3456 (queue_stop_reply_callback): Likewise.
3457 (handle_target_event): Likewise.
3458 * spu-low.c (fetch_ppc_memory): Likewise.
3459 (store_ppc_memory): Likewise.
3460 * target.c (set_target_ops): Likewise.
3461 * thread-db.c (thread_db_load_search): Likewise.
3462 (try_thread_db_load_1): Likewise.
3463 * tracepoint.c (add_tracepoint): Likewise.
3464 (add_tracepoint_action): Likewise.
3465 (create_trace_state_variable): Likewise.
3466 (cmd_qtdpsrc): Likewise.
3467 (cmd_qtro): Likewise.
3468 (add_while_stepping_state): Likewise.
3469 * win32-low.c (child_add_thread): Likewise.
3470 (get_image_name): Likewise.
3471
3472 2015-08-25 Yao Qi <yao.qi@linaro.org>
3473
3474 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3475
3476 2015-08-25 Yao Qi <yao.qi@linaro.org>
3477
3478 * Makefile.in (aarch64-linux.o): New rule.
3479 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3480 srv_tgtobj.
3481 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3482 (aarch64_init_debug_reg_state): Make it extern.
3483 (aarch64_linux_prepare_to_resume): Remove.
3484
3485 2015-08-25 Yao Qi <yao.qi@linaro.org>
3486
3487 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3488 lwp_arch_private_info and ptid_of_lwp.
3489
3490 2015-08-25 Yao Qi <yao.qi@linaro.org>
3491
3492 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3493 Find proc_info by find_process_pid. All callers updated.
3494
3495 2015-08-25 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3498 Remove.
3499 (debug_reg_change_callback): Remove.
3500 (aarch64_notify_debug_reg_change): Remove.
3501
3502 2015-08-25 Yao Qi <yao.qi@linaro.org>
3503
3504 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3505 Call current_lwp_ptid.
3506
3507 2015-08-25 Yao Qi <yao.qi@linaro.org>
3508
3509 * linux-aarch64-low.c (debug_reg_change_callback): Use
3510 debug_printf.
3511
3512 2015-08-25 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3515
3516 2015-08-25 Yao Qi <yao.qi@linaro.org>
3517
3518 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3519
3520 2015-08-25 Yao Qi <yao.qi@linaro.org>
3521
3522 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3523 the code.
3524
3525 2015-08-25 Yao Qi <yao.qi@linaro.org>
3526
3527 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3528 Remove.
3529 (debug_reg_change_callback): Remove argument entry and add argument
3530 lwp. Remove local variable thread. Don't print thread id in the
3531 debugging output. Don't check whether pid of thread equals to pid.
3532 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3533 iterate_over_lwps instead find_inferior.
3534
3535 2015-08-24 Pedro Alves <palves@redhat.com>
3536
3537 * inferiors.c (get_first_process): New function.
3538 * inferiors.h (get_first_process): New declaration.
3539 * remote-utils.c (read_ptid): Default to the first process in the
3540 list, instead of to the current thread's process.
3541
3542 2015-08-24 Pedro Alves <palves@redhat.com>
3543
3544 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3545 * event-loop.c: Likewise.
3546 * remote-utils.c: Likewise.
3547 * tracepoint.c: Likewise.
3548
3549 2015-08-24 Pedro Alves <palves@redhat.com>
3550
3551 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3552 ptid_get_lwp.
3553
3554 2015-08-21 Pedro Alves <palves@redhat.com>
3555
3556 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3557 instead of literal 1.
3558
3559 2015-08-21 Pedro Alves <palves@redhat.com>
3560
3561 * tdesc.c (default_description): Explicitly zero-initialize.
3562
3563 2015-08-21 Pedro Alves <palves@redhat.com>
3564
3565 PR gdb/18749
3566 * inferiors.c (remove_thread): Discard any pending stop reply for
3567 this thread.
3568 * server.c (remove_all_on_match_pid): Rename to ...
3569 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3570 instead of a pid.
3571 (discard_queued_stop_replies): Change parameter to a ptid. Now
3572 extern.
3573 (handle_v_kill, kill_inferior_callback, captured_main)
3574 (process_serial_event): Adjust.
3575 * server.h (discard_queued_stop_replies): Declare.
3576
3577 2015-08-21 Pedro Alves <palves@redhat.com>
3578
3579 * linux-low.c (wait_for_sigstop): Always switch to no thread
3580 selected if the previously current thread dies.
3581 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3582 process instead of the current thread's.
3583 * remote-utils.c (input_interrupt): Don't check if there's no
3584 current thread.
3585 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3586 current thread to the general thread fails, error out.
3587 (handle_qxfer_auxv, handle_qxfer_libraries)
3588 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3589 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3590 (handle_query): Check if there's a thread selected instead of
3591 checking whether there's any thread in the thread list.
3592 (handle_qxfer_threads, handle_qxfer_btrace)
3593 (handle_qxfer_btrace_conf): Don't error out early if there's no
3594 thread in the thread list.
3595 (handle_v_cont, myresume): Don't set the current thread to the
3596 continue thread.
3597 (process_serial_event) <Hg handling>: Also set thread_id if the
3598 previous general thread is still alive.
3599 (process_serial_event) <g/G handling>: If setting the current
3600 thread to the general thread fails, error out.
3601 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3602 thread's lwp instead of the current thread's.
3603 * target.c (set_desired_thread): If the desired thread was not
3604 found, leave the current thread pointing to NULL. Return an int
3605 (boolean) indicating success.
3606 * target.h (set_desired_thread): Change return type to int.
3607
3608 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3609
3610 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3611 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3612 #includes.
3613 (ps_get_thread_area): New function.
3614
3615 2015-08-19 Gary Benson <gbenson@redhat.com>
3616
3617 * hostio.c (handle_pread): Do not attempt to read more data
3618 than hostio_reply_with_data can fit in a packet.
3619
3620 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3621
3622 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3623
3624 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3625
3626 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3627
3628 2015-08-06 Pedro Alves <palves@redhat.com>
3629
3630 * tracepoint.c (expr_eval_result): Now an int.
3631
3632 2015-08-06 Pedro Alves <palves@redhat.com>
3633
3634 * gdbthread.h (struct regcache): Forward declare.
3635 (struct thread_info) <regcache_data>: Now a struct regcache
3636 pointer.
3637 * inferiors.c (inferior_regcache_data)
3638 (set_inferior_regcache_data): Now work with struct regcache
3639 pointers.
3640 * inferiors.h (struct regcache): Forward declare.
3641 (inferior_regcache_data, set_inferior_regcache_data): Now work
3642 with struct regcache pointers.
3643 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3644 (free_register_cache_thread): Remove struct regcache pointer
3645 casts.
3646
3647 2015-08-06 Pedro Alves <palves@redhat.com>
3648
3649 * server.c (captured_main): On error, print the exception message
3650 to stderr, and if run_once is set, throw a quit.
3651
3652 2015-08-06 Pedro Alves <palves@redhat.com>
3653
3654 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3655 the current thread.
3656
3657 2015-08-06 Pedro Alves <palves@redhat.com>
3658
3659 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3660 reading beyond the passed in buffer length.
3661
3662 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3663
3664 * tracepoint.c (symbol_list) <required>: Remove.
3665
3666 2015-08-06 Pedro Alves <palves@redhat.com>
3667
3668 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3669 count if stopping and suspending threads.
3670 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3671 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3672 (linux_detach): Complete an ongoing step-over.
3673 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3674 throughout.
3675 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3676 (linux_wait_1): If passing a signal to the inferior after
3677 finishing a step-over, unsuspend and re-resume all lwps. If we
3678 see a single-step event but the thread should be continuing, don't
3679 pass the trap to gdb.
3680 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3681 internal_error instead of gdb_assert.
3682 (enqueue_pending_signal): New function.
3683 (check_ptrace_stopped_lwp_gone): Add debug output.
3684 (start_step_over): Use internal_error instead of gdb_assert.
3685 (complete_ongoing_step_over): New function.
3686 (linux_resume_one_thread): Don't resume a suspended thread.
3687 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3688 it stepping.
3689
3690 2015-08-06 Pedro Alves <palves@redhat.com>
3691
3692 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3693 (linux_thread_alive): Use lwp_is_marked_dead.
3694 (extended_event_reported): Delete.
3695 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3696 instead of extended_event_reported.
3697 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3698 as well.
3699 (lwp_is_marked_dead): New function.
3700 (lwp_running): Use lwp_is_marked_dead.
3701 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3702 comment.
3703
3704 2015-08-06 Pedro Alves <palves@redhat.com>
3705
3706 * linux-low.c (linux_wait_1): Move fork event output out of the
3707 !report_to_gdb check. Pass event_child->waitstatus to
3708 target_waitstatus_to_string instead of ourstatus.
3709
3710 2015-08-04 Yao Qi <yao.qi@linaro.org>
3711
3712 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3713 if current_thread is 32 bit.
3714
3715 2015-08-04 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3718 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3719 * server.c (extended_protocol): Remove "static".
3720 * server.h (extended_protocol): Declare it.
3721
3722 2015-08-04 Yao Qi <yao.qi@linaro.org>
3723
3724 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3725 both aarch64 and aarch32.
3726 (aarch64_set_pc): Likewise.
3727
3728 2015-08-04 Yao Qi <yao.qi@linaro.org>
3729
3730 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3731 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3732 arm-with-neon.xml to srv_xmlfiles.
3733 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3734 (is_64bit_tdesc): New function.
3735 (aarch64_linux_read_description): New function.
3736 (aarch64_arch_setup): Call aarch64_linux_read_description.
3737 (regs_info): Rename to regs_info_aarch64.
3738 (aarch64_regs_info): Return right regs_info.
3739 (initialize_low_arch): Call initialize_low_arch_aarch32.
3740
3741 2015-08-04 Yao Qi <yao.qi@linaro.org>
3742
3743 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3744 * linux-aarch32-low.c: New file.
3745 * linux-aarch32-low.h: New file.
3746 * linux-arm-low.c (arm_fill_gregset): Move it to
3747 linux-aarch32-low.c.
3748 (arm_store_gregset): Likewise.
3749 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3750 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3751 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3752 (regs_info): Rename to regs_info_arm.
3753 (arm_regs_info): Return regs_info_aarch32 if
3754 have_ptrace_getregset is 1 and target description is
3755 arm_with_neon or arm_with_vfpv3.
3756 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3757 Call initialize_low_arch_aarch32 instead.
3758
3759 2015-08-04 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3762 * linux-low.c: ... here.
3763 * linux-low.h (have_ptrace_getregset): Declare it.
3764
3765 2015-08-04 Pedro Alves <palves@redhat.com>
3766
3767 * thread-db.c (struct thread_db): Use new typedefs.
3768 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3769 CHK calls.
3770 (disable_thread_event_reporting): Cast result of dlsym to
3771 destination function pointer type.
3772 (thread_db_mourn): Use td_ta_delete_ftype.
3773
3774 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3775
3776 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3777 arch variant.
3778 (CDX_BREAKPOINT): Define for R2.
3779 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3780 (the_low_target): Add comments.
3781
3782 2015-07-30 Yao Qi <yao.qi@linaro.org>
3783
3784 * linux-arm-low.c (arm_hwcap): Remove it.
3785 (arm_read_description): New local variable arm_hwcap. Don't
3786 set arm_hwcap to zero.
3787
3788 2015-07-30 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3791 Use regcache->tdesc instead.
3792 (arm_store_wmmxregset): Likewise.
3793 (arm_fill_vfpregset): Likewise.
3794 (arm_store_vfpregset): Likewise.
3795
3796 2015-07-30 Yao Qi <yao.qi@linaro.org>
3797
3798 * linux-arm-low.c: Include arch/arm.h.
3799 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3800 (arm_store_gregset): Likewise.
3801
3802 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3803
3804 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3805 ptrace's 4th parameter.
3806
3807 2015-07-27 Yao Qi <yao.qi@linaro.org>
3808
3809 * configure.srv (case aarch64*-*-linux*): Don't set
3810 srv_linux_usrregs.
3811
3812 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3813
3814 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3815 sys/ptrace.h.
3816 * linux-arm-low.c: Likewise.
3817 * linux-cris-low.c: Likewise.
3818 * linux-crisv32-low.c: Likewise.
3819 * linux-low.c: Likewise.
3820 * linux-m68k-low.c: Likewise.
3821 * linux-mips-low.c: Likewise.
3822 * linux-nios2-low.c: Likewise.
3823 * linux-s390-low.c: Likewise.
3824 * linux-sparc-low.c: Likewise.
3825 * linux-tic6x-low.c: Likewise.
3826 * linux-tile-low.c: Likewise.
3827 * linux-x86-low.c: Likewise.
3828
3829 2015-07-24 Pedro Alves <palves@redhat.com>
3830
3831 * config.in: Regenerate.
3832 * configure: Regenerate.
3833
3834 2015-07-24 Pedro Alves <palves@redhat.com>
3835
3836 * acinclude.m4: Include ../ptrace.m4.
3837 * configure.ac: Call GDB_AC_PTRACE.
3838 * config.in, configure: Regenerate.
3839
3840 2015-07-24 Yao Qi <yao.qi@linaro.org>
3841
3842 * linux-low.c (linux_create_inferior): Remove setting to
3843 proc->priv->new_inferior.
3844 (linux_attach): Likewise.
3845 (linux_low_filter_event): Likewise.
3846 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3847
3848 2015-07-24 Yao Qi <yao.qi@linaro.org>
3849
3850 * linux-low.c (linux_arch_setup): New function.
3851 (linux_low_filter_event): If proc->tdesc is NULL and
3852 proc->attached is true, call the_low_target.arch_setup.
3853 Otherwise, keep status pending, and return.
3854 (linux_resume_one_lwp_throw): Don't call get_pc if
3855 thread->while_stepping isn't NULL. Don't call
3856 get_thread_regcache if proc->tdesc is NULL.
3857 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3858 (linux_target_ops): Install arch_setup.
3859 * server.c (start_inferior): Call the_target->arch_setup.
3860 * target.h (struct target_ops) <arch_setup>: New field.
3861 (target_arch_setup): New marco.
3862 * lynx-low.c (lynx_target_ops): Update.
3863 * nto-low.c (nto_target_ops): Update.
3864 * spu-low.c (spu_target_ops): Update.
3865 * win32-low.c (win32_target_ops): Update.
3866
3867 2015-07-24 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-low.c (linux_add_process): Don't set
3870 proc->priv->new_inferior.
3871 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3872 (linux_attach): Likewise.
3873
3874 2015-07-24 Yao Qi <yao.qi@linaro.org>
3875
3876 * server.c (start_inferior): Code refactor.
3877
3878 2015-07-24 Yao Qi <yao.qi@linaro.org>
3879
3880 * server.c (process_serial_event): Set general_thread.
3881
3882 2015-07-21 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3885 aarch64_linux_get_debug_reg_capacity.
3886
3887 2015-07-17 Yao Qi <yao.qi@linaro.org>
3888
3889 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3890 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3891 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3892 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3893 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3894 (AARCH64_HWP_ALIGNMENT): Likewise.
3895 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3896 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3897 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3898 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3899 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3900 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3901 (struct aarch64_debug_reg_state): Likewise.
3902 (struct arch_lwp_info): Likewise.
3903 (aarch64_align_watchpoint): Likewise.
3904 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3905 (aarch64_watchpoint_length): Likewise.
3906 (aarch64_point_encode_ctrl_reg): Likewise
3907 (aarch64_point_is_aligned): Likewise.
3908 (aarch64_align_watchpoint): Likewise.
3909 (aarch64_linux_set_debug_regs):
3910 (aarch64_dr_state_insert_one_point): Likewise.
3911 (aarch64_dr_state_remove_one_point): Likewise.
3912 (aarch64_handle_breakpoint): Likewise.
3913 (aarch64_handle_aligned_watchpoint): Likewise.
3914 (aarch64_handle_unaligned_watchpoint): Likewise.
3915 (aarch64_handle_watchpoint): Likewise.
3916
3917 2015-07-17 Yao Qi <yao.qi@linaro.org>
3918
3919 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3920 and don't aarch64_get_debug_reg_state. All callers update.
3921 (aarch64_handle_aligned_watchpoint): Likewise.
3922 (aarch64_handle_unaligned_watchpoint): Likewise.
3923 (aarch64_handle_watchpoint): Likewise.
3924 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3925 (aarch64_remove_point): Likewise.
3926
3927 2015-07-17 Yao Qi <yao.qi@linaro.org>
3928
3929 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3930 debug_printf.
3931 (aarch64_handle_unaligned_watchpoint): Likewise.
3932
3933 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3934
3935 Revert the previous 3 commits:
3936 Move gdb_regex* to common/
3937 Move linux_find_memory_regions_full & co.
3938 gdbserver build-id attribute generator
3939
3940 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3941 Jan Kratochvil <jan.kratochvil@redhat.com>
3942
3943 gdbserver build-id attribute generator.
3944 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3945 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3946 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3947 (find_phdr): New.
3948 (get_dynamic): Use find_pdhr to traverse program headers.
3949 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3950 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3951 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3952 (get_hex_build_id): New.
3953 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3954 to reply XML document.
3955
3956 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3957 Jan Kratochvil <jan.kratochvil@redhat.com>
3958
3959 * target.c: Include target/target-utils.h and fcntl.h.
3960 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3961 (target_fileio_read_stralloc): New functions.
3962
3963 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3964
3965 * Makefile.in (OBS): Add gdb_regex.o.
3966 (gdb_regex.o): New.
3967 * config.in: Rebuilt.
3968 * configure: Rebuilt.
3969
3970 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3971 Jan Kratochvil <jan.kratochvil@redhat.com>
3972
3973 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3974 * Makefile.in (OBS): Add target-utils.o.
3975 (linux-maps.o, target-utils.o): New.
3976 * configure.srv (srv_linux_obj): Add linux-maps.o.
3977
3978 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3979
3980 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3981 function, return 1.
3982 (the_low_target): Install it.
3983
3984 2015-07-14 Pedro Alves <palves@redhat.com>
3985
3986 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3987 Instead, ignore ECHILD, and throw an error for other errnos.
3988
3989 2015-07-10 Pedro Alves <palves@redhat.com>
3990
3991 * event-loop.c (struct callback_event) <data>: Change type to
3992 gdb_client_data instance instead of gdb_client_data pointer.
3993 (append_callback_event): Adjust.
3994
3995 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3996
3997 * linux-aarch64-low.c: Add comments for each linux_target_ops
3998 method. Remove comments already covered in target_ops and
3999 linux_target_ops definitions.
4000 (the_low_target): Add comments for each unimplemented method.
4001
4002 2015-07-09 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (aarch64_regmap): Remove.
4005 (aarch64_usrregs_info): Remove.
4006 (regs_info): Set field usrregs to NULL.
4007
4008 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4009
4010 * linux-low.c: Include "rsp-low.h"
4011 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4012 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4013 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4014 (handle_btrace_enable_pt): New.
4015 (handle_btrace_general_set): Support "pt".
4016 (handle_btrace_conf_general_set): Support "pt:size".
4017
4018 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4019
4020 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4021 Z_PACKET_SW_BP.
4022
4023 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4024
4025 * linux-aarch64-low.c: Remove comment about endianness.
4026 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4027 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4028 memcmp.
4029
4030 2015-06-24 Gary Benson <gbenson@redhat.com>
4031
4032 * linux-i386-ipa.c (stdint.h): Do not include.
4033 * lynx-i386-low.c (stdint.h): Likewise.
4034 * lynx-ppc-low.c (stdint.h): Likewise.
4035 * mem-break.c (stdint.h): Likewise.
4036 * thread-db.c (stdint.h): Likewise.
4037 * tracepoint.c (stdint.h): Likewise.
4038 * win32-low.c (stdint.h): Likewise.
4039
4040 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4041
4042 * server.c (write_qxfer_response): Update call to
4043 remote_escape_output.
4044
4045 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4046 Jan Kratochvil <jan.kratochvil@redhat.com>
4047
4048 Merge multiple hex conversions.
4049 * gdbreplay.c (tohex): Rename to 'fromhex'.
4050 (logchar): Use fromhex.
4051
4052 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4053
4054 * server.c (handle_qxfer_libraries): Set `version' attribute for
4055 <library-list>.
4056
4057 2015-06-10 Gary Benson <gbenson@redhat.com>
4058
4059 * target.h (struct target_ops) <multifs_open>: New field.
4060 <multifs_unlink>: Likewise.
4061 <multifs_readlink>: Likewise.
4062 * linux-low.c (nat/linux-namespaces.h): New include.
4063 (linux_target_ops): Initialize the_target->multifs_open,
4064 the_target->multifs_unlink and the_target->multifs_readlink.
4065 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4066 * hostio.c (hostio_fs_pid): New static variable.
4067 (hostio_handle_new_gdb_connection): New function.
4068 (handle_setfs): Likewise.
4069 (handle_open): Use the_target->multifs_open as appropriate.
4070 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4071 (handle_readlink): Use the_target->multifs_readlink as
4072 appropriate.
4073 (handle_vFile): Handle vFile:setfs packets.
4074 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4075 after target_handle_new_gdb_connection.
4076
4077 2015-06-10 Gary Benson <gbenson@redhat.com>
4078
4079 * configure.ac (AC_CHECK_FUNCS): Add setns.
4080 * config.in: Regenerate.
4081 * configure: Likewise.
4082 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4083 (linux-namespaces.o): New rule.
4084 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4085
4086 2015-06-09 Gary Benson <gbenson@redhat.com>
4087
4088 * hostio.c (handle_open): Process mode argument with
4089 fileio_to_host_mode.
4090
4091 2015-06-01 Yao Qi <yao.qi@linaro.org>
4092
4093 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4094 * linux-x86-low.c: Likewise.
4095
4096 2015-05-28 Don Breazeal <donb@codesourcery.com>
4097
4098 * linux-low.c (handle_extended_wait): Initialize
4099 thread_info.last_resume_kind for new fork children.
4100
4101 2015-05-15 Pedro Alves <palves@redhat.com>
4102
4103 * target.h (target_handle_new_gdb_connection): Rewrite using if
4104 wrapped in do/while.
4105
4106 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4107
4108 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4109 * configure, config.in: Regenerate.
4110 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4111 Declare typedef.
4112
4113 2015-05-12 Don Breazeal <donb@codesourcery.com>
4114
4115 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4116 PTRACE_EVENT_VFORK_DONE.
4117 (linux_low_ptrace_options, extended_event_reported): Add vfork
4118 events.
4119 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4120 and "vforkdone" for RSP 'T' Stop Reply Packet.
4121 * server.h (report_vfork_events): Declare
4122 global variable.
4123
4124 2015-05-12 Don Breazeal <donb@codesourcery.com>
4125
4126 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4127 (the_low_target) <new_fork>: Initialize new member.
4128 * linux-arm-low.c (arm_new_fork): New function.
4129 (the_low_target) <new_fork>: Initialize new member.
4130 * linux-low.c (handle_extended_wait): Call new target function
4131 new_fork.
4132 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4133 * linux-mips-low.c (mips_add_watchpoint): New function
4134 extracted from mips_insert_point.
4135 (the_low_target) <new_fork>: Initialize new member.
4136 (mips_linux_new_fork): New function.
4137 (mips_insert_point): Call mips_add_watchpoint.
4138 * linux-x86-low.c (x86_linux_new_fork): New function.
4139 (the_low_target) <new_fork>: Initialize new member.
4140
4141 2015-05-12 Don Breazeal <donb@codesourcery.com>
4142
4143 * linux-low.c (handle_extended_wait): Implement return value,
4144 rename argument 'event_child' to 'event_lwp', handle
4145 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4146 (linux_low_ptrace_options): New function.
4147 (linux_low_filter_event): Call linux_low_ptrace_options,
4148 use different argument fo linux_enable_event_reporting,
4149 use return value from handle_extended_wait.
4150 (extended_event_reported): New function.
4151 (linux_wait_1): Call extended_event_reported and set
4152 status to report fork events.
4153 (linux_write_memory): Add pid to debug message.
4154 (reset_lwp_ptrace_options_callback): New function.
4155 (linux_handle_new_gdb_connection): New function.
4156 (linux_target_ops): Initialize new structure member.
4157 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4158 * lynx-low.c: Initialize new structure member.
4159 * remote-utils.c (prepare_resume_reply): Implement stop reason
4160 "fork" for "T" stop message.
4161 * server.c (handle_query): Call handle_new_gdb_connection.
4162 * server.h (report_fork_events): Declare global flag.
4163 * target.h (struct target_ops) <handle_new_gdb_connection>:
4164 New member.
4165 (target_handle_new_gdb_connection): New macro.
4166 * win32-low.c: Initialize new structure member.
4167
4168 2015-05-12 Don Breazeal <donb@codesourcery.com>
4169
4170 * mem-break.c (APPEND_TO_LIST): Define macro.
4171 (clone_agent_expr): New function.
4172 (clone_one_breakpoint): New function.
4173 (clone_all_breakpoints): New function.
4174 * mem-break.h: Declare new functions.
4175
4176 2015-05-12 Don Breazeal <donb@codesourcery.com>
4177
4178 * linux-low.c (linux_supports_fork_events): New function.
4179 (linux_supports_vfork_events): New function.
4180 (linux_target_ops): Initialize new structure members.
4181 (initialize_low): Call linux_check_ptrace_features.
4182 * lynx-low.c (lynx_target_ops): Initialize new structure
4183 members.
4184 * server.c (report_fork_events, report_vfork_events):
4185 New global flags.
4186 (handle_query): Add new features to qSupported packet and
4187 response.
4188 (captured_main): Initialize new global variables.
4189 * target.h (struct target_ops) <supports_fork_events>:
4190 New member.
4191 <supports_vfork_events>: New member.
4192 (target_supports_fork_events): New macro.
4193 (target_supports_vfork_events): New macro.
4194 * win32-low.c (win32_target_ops): Initialize new structure
4195 members.
4196
4197 2015-05-12 Gary Benson <gbenson@redhat.com>
4198
4199 * server.c (handle_qxfer_exec_file): Use current process
4200 if annex is empty.
4201
4202 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4203
4204 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4205 Remove HAVE_PTRACE_GETREGS conditionals.
4206 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4207 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4208
4209 2015-05-08 Yao Qi <yao.qi@linaro.org>
4210
4211 * linux-low.c (linux_supports_conditional_breakpoints): New
4212 function.
4213 (linux_target_ops): Install new target method.
4214 * lynx-low.c (lynx_target_ops): Install NULL hook for
4215 supports_conditional_breakpoints.
4216 * nto-low.c (nto_target_ops): Likewise.
4217 * spu-low.c (spu_target_ops): Likewise.
4218 * win32-low.c (win32_target_ops): Likewise.
4219 * server.c (handle_query): Check
4220 target_supports_conditional_breakpoints.
4221 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4222 New field.
4223 (target_supports_conditional_breakpoints): New macro.
4224
4225 2015-05-06 Pedro Alves <palves@redhat.com>
4226
4227 PR server/18081
4228 * server.c (start_inferior): If the process exits, mourn it.
4229
4230 2015-04-21 Gary Benson <gbenson@redhat.com>
4231
4232 * hostio.c (fileio_open_flags_to_host): Factored out to
4233 fileio_to_host_openflags in common/fileio.c. Single use
4234 updated.
4235
4236 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4237
4238 * linux-xtensa-low.c (xtensa_fill_gregset)
4239 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4240 XCHAL_HAVE_LOOP.
4241
4242 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4243
4244 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4245 (regs_info): Replace usrregs pointer with NULL.
4246
4247 2015-04-17 Gary Benson <gbenson@redhat.com>
4248
4249 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4250 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4251 * server.c (handle_qxfer_exec_file): New function.
4252 (qxfer_packets): Add exec-file entry.
4253 (handle_query): Report qXfer:exec-file:read as supported packet.
4254
4255 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4256
4257 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4258
4259 2015-04-09 Gary Benson <gbenson@redhat.com>
4260
4261 * hostio-errno.c (errno_to_fileio_error): Remove function.
4262 Update caller to use remote_fileio_to_fio_error.
4263
4264 2015-04-09 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-low.c (linux_insert_point): Call
4267 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4268 (linux_remove_point): Call remove_memory_breakpoint if type is
4269 raw_bkpt_type_sw.
4270 * linux-x86-low.c (x86_insert_point): Don't call
4271 insert_memory_breakpoint.
4272 (x86_remove_point): Don't call remove_memory_breakpoint.
4273
4274 2015-04-01 Pedro Alves <palves@redhat.com>
4275 Cleber Rosa <crosa@redhat.com>
4276
4277 * server.c (gdbserver_usage): Reorganize and extend the usage
4278 message.
4279
4280 2015-03-24 Pedro Alves <palves@redhat.com>
4281
4282 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4283 output. Also dump TRAP_TRACE.
4284 (linux_low_filter_event): In debug output, distinguish a
4285 resume_stop SIGSTOP from a delayed SIGSTOP.
4286
4287 2015-03-24 Gary Benson <gbenson@redhat.com>
4288
4289 * linux-x86-low.c (x86_linux_new_thread): Moved to
4290 nat/x86-linux.c.
4291 (x86_linux_prepare_to_resume): Likewise.
4292
4293 2015-03-24 Gary Benson <gbenson@redhat.com>
4294
4295 * Makefile.in (x86-linux-dregs.o): New rule.
4296 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4297 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4298 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4299 (x86_linux_dr_get): Likewise.
4300 (x86_linux_dr_set): Likewise.
4301 (update_debug_registers_callback): Likewise.
4302 (x86_linux_dr_set_addr): Likewise.
4303 (x86_linux_dr_get_addr): Likewise.
4304 (x86_linux_dr_set_control): Likewise.
4305 (x86_linux_dr_get_control): Likewise.
4306 (x86_linux_dr_get_status): Likewise.
4307 (x86_linux_update_debug_registers): Likewise.
4308
4309 2015-03-24 Gary Benson <gbenson@redhat.com>
4310
4311 * linux-x86-low.c (x86_linux_update_debug_registers):
4312 New function, factored out from...
4313 (x86_linux_prepare_to_resume): ...this.
4314
4315 2015-03-24 Gary Benson <gbenson@redhat.com>
4316
4317 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4318 (x86_linux_dr_set): Likewise.
4319 (update_debug_registers_callback): Likewise.
4320 (x86_linux_dr_set_addr): Likewise.
4321 (x86_linux_dr_get_addr): Likewise.
4322 (x86_linux_dr_set_control): Likewise.
4323 (x86_linux_dr_get_control): Likewise.
4324 (x86_linux_dr_get_status): Likewise.
4325 (x86_linux_prepare_to_resume): Likewise.
4326
4327 2015-03-24 Gary Benson <gbenson@redhat.com>
4328
4329 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4330 Use perror_with_name. Pass string through gettext.
4331 (x86_linux_dr_set): Likewise.
4332
4333 2015-03-24 Gary Benson <gbenson@redhat.com>
4334
4335 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4336 (x86_linux_dr_set_addr): ...this.
4337 (x86_dr_low_get_addr): Rename to...
4338 (x86_linux_dr_get_addr): ...this.
4339 (x86_dr_low_set_control): Rename to...
4340 (x86_linux_dr_set_control): ...this.
4341 (x86_dr_low_get_control): Rename to...
4342 (x86_linux_dr_get_control): ...this.
4343 (x86_dr_low_get_status): Rename to...
4344 (x86_linux_dr_get_status): ...this.
4345 (x86_dr_low): Update with new function names.
4346
4347 2015-03-24 Gary Benson <gbenson@redhat.com>
4348
4349 * Makefile.in (x86-linux.o): New rule.
4350 * configure.srv: Add x86-linux.o to relevant targets.
4351 * linux-low.c (lwp_set_arch_private_info): New function.
4352 (lwp_arch_private_info): Likewise.
4353 * linux-x86-low.c: Include nat/x86-linux.h.
4354 (arch_lwp_info): Removed structure.
4355 (update_debug_registers_callback):
4356 Use lwp_set_debug_registers_changed.
4357 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4358 and lwp_set_debug_registers_changed.
4359 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4360
4361 2015-03-24 Gary Benson <gbenson@redhat.com>
4362
4363 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4364 * linux-arm-low.c (arm_new_thread): Likewise.
4365 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4366 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4367 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4368 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4369
4370 2015-03-24 Gary Benson <gbenson@redhat.com>
4371
4372 * linux-low.c (ptid_of_lwp): New function.
4373 (lwp_is_stopped): Likewise.
4374 (lwp_stop_reason): Likewise.
4375 * linux-x86-low.c (update_debug_registers_callback):
4376 Use lwp_is_stopped.
4377 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4378 lwp_stop_reason.
4379
4380 2015-03-24 Gary Benson <gbenson@redhat.com>
4381
4382 * linux-low.h (linux_stop_lwp): Remove declaration.
4383
4384 2015-03-24 Gary Benson <gbenson@redhat.com>
4385
4386 * linux-low.h: Include nat/linux-nat.h.
4387 * linux-low.c (iterate_over_lwps_args): New structure.
4388 (iterate_over_lwps_filter): New function.
4389 (iterate_over_lwps): Likewise.
4390 * linux-x86-low.c (update_debug_registers_callback):
4391 Update signature to what iterate_over_lwps expects.
4392 Remove PID check that iterate_over_lwps now performs.
4393 (x86_dr_low_set_addr): Use iterate_over_lwps.
4394 (x86_dr_low_set_control): Likewise.
4395
4396 2015-03-24 Gary Benson <gbenson@redhat.com>
4397
4398 * linux-x86-low.c (x86_debug_reg_state): New function.
4399 (x86_linux_prepare_to_resume): Use the above.
4400
4401 2015-03-24 Gary Benson <gbenson@redhat.com>
4402
4403 * linux-low.c (current_lwp_ptid): New function.
4404 * linux-x86-low.c: Include nat/linux-nat.h.
4405 (x86_dr_low_get_addr): Use current_lwp_ptid.
4406 (x86_dr_low_get_control): Likewise.
4407 (x86_dr_low_get_status): Likewise.
4408
4409 2015-03-20 Pedro Alves <palves@redhat.com>
4410
4411 * tracepoint.c (cmd_qtstatus): Make "str" const.
4412
4413 2015-03-20 Pedro Alves <palves@redhat.com>
4414
4415 * server.c (handle_general_set): Make "req_str" const.
4416
4417 2015-03-19 Pedro Alves <palves@redhat.com>
4418
4419 * linux-low.c (linux_resume_one_lwp): Rename to ...
4420 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4421 instead call perror_with_name.
4422 (check_ptrace_stopped_lwp_gone): New function.
4423 (linux_resume_one_lwp): Reimplement as wrapper around
4424 linux_resume_one_lwp_throw that swallows errors if the LWP is
4425 gone.
4426
4427 2015-03-19 Pedro Alves <palves@redhat.com>
4428
4429 * linux-low.c (count_events_callback, select_event_lwp_callback):
4430 No longer check whether the thread has resume_stop as last resume
4431 kind.
4432
4433 2015-03-19 Pedro Alves <palves@redhat.com>
4434
4435 * linux-low.c (count_events_callback, select_event_lwp_callback):
4436 Use the lwp's status_pending_p field, not the thread's.
4437
4438 2015-03-19 Pedro Alves <palves@redhat.com>
4439
4440 * linux-low.c (select_event_lwp_callback): Update comments to
4441 no longer mention SIGTRAP.
4442
4443 2015-03-18 Gary Benson <gbenson@redhat.com>
4444
4445 * server.c (handle_query): Do not report vFile:fstat as supported.
4446
4447 2015-03-11 Gary Benson <gbenson@redhat.com>
4448
4449 * hostio.c (sys/types.h): New include.
4450 (sys/stat.h): Likewise.
4451 (common-remote-fileio.h): Likewise.
4452 (handle_fstat): New function.
4453 (handle_vFile): Handle vFile:fstat packets.
4454
4455 2015-03-11 Gary Benson <gbenson@redhat.com>
4456
4457 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4458 struct stat.st_blocks and struct stat.st_blksize.
4459 * configure: Regenerate.
4460 * config.in: Likewise.
4461 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4462 (OBS): Add common-remote-fileio.o.
4463 (common-remote-fileio.o): New rule.
4464
4465 2015-03-09 Pedro Alves <palves@redhat.com>
4466
4467 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4468 'struct sockaddr' pointer in 'accept' call.
4469
4470 2015-03-09 Pedro Alves <palves@redhat.com>
4471
4472 Revert:
4473 2015-03-07 Pedro Alves <palves@redhat.com>
4474 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4475 or <winsock2.h> here. Instead include "gdb_socket.h".
4476 (remote_open): Use union gdb_sockaddr_u.
4477 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4478 or <winsock2.h> here. Instead include "gdb_socket.h".
4479 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4480 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4481 or <sys/un.h>.
4482 (init_named_socket, gdb_agent_helper_thread): Use union
4483 gdb_sockaddr_u.
4484
4485 2015-03-07 Pedro Alves <palves@redhat.com>
4486
4487 * configure.ac (build_warnings): Move
4488 -Wdeclaration-after-statement to the C-specific set.
4489 * configure: Regenerate.
4490
4491 2015-03-07 Pedro Alves <palves@redhat.com>
4492
4493 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4494 or <winsock2.h> here. Instead include "gdb_socket.h".
4495 (remote_open): Use union gdb_sockaddr_u.
4496 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4497 or <winsock2.h> here. Instead include "gdb_socket.h".
4498 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4499 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4500 or <sys/un.h>.
4501 (init_named_socket, gdb_agent_helper_thread): Use union
4502 gdb_sockaddr_u.
4503
4504 2015-03-07 Pedro Alves <palves@redhat.com>
4505
4506 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4507 instead.
4508
4509 2015-03-06 Yao Qi <yao.qi@linaro.org>
4510
4511 * linux-aarch64-low.c (aarch64_insert_point): Use
4512 show_debug_regs as a boolean.
4513 (aarch64_remove_point): Likewise.
4514
4515 2015-03-05 Pedro Alves <palves@redhat.com>
4516
4517 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4518 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4519 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4520 * nto-low.c (nto_target_ops): Likewise.
4521 * spu-low.c (spu_target_ops): Likewise.
4522 * win32-low.c (win32_target_ops): Likewise.
4523
4524 2015-03-04 Pedro Alves <palves@redhat.com>
4525
4526 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4527 Decide whether a breakpoint triggered based on the SIGTRAP's
4528 siginfo.si_code.
4529 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4530 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4531 (linux_low_filter_event): Check for breakpoints before checking
4532 watchpoints.
4533 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4534 siginfo.si_code.
4535 (linux_stopped_by_sw_breakpoint)
4536 (linux_supports_stopped_by_sw_breakpoint)
4537 (linux_stopped_by_hw_breakpoint)
4538 (linux_supports_stopped_by_hw_breakpoint): New functions.
4539 (linux_target_ops): Install new target methods.
4540
4541 2015-03-04 Pedro Alves <palves@redhat.com>
4542
4543 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4544 * server.c (swbreak_feature, hwbreak_feature): New globals.
4545 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4546 (captured_main): Clear swbreak_feature and hwbreak_feature.
4547 * server.h (swbreak_feature, hwbreak_feature): Declare.
4548 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4549 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4550 supports_stopped_by_hw_breakpoint>: New fields.
4551 (target_supports_stopped_by_sw_breakpoint)
4552 (target_stopped_by_sw_breakpoint)
4553 (target_supports_stopped_by_hw_breakpoint)
4554 (target_stopped_by_hw_breakpoint): Declare.
4555
4556 2015-03-04 Pedro Alves <palves@redhat.com>
4557
4558 enum lwp_stop_reason -> enum target_stop_reason
4559 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4560 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4561 (linux_wait_1, stuck_in_jump_pad_callback)
4562 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4563 (linux_stopped_by_watchpoint):
4564 * linux-low.h (enum lwp_stop_reason): Delete.
4565 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4566 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4567
4568 2015-03-04 Yao Qi <yao.qi@linaro.org>
4569
4570 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4571
4572 2015-03-03 Gary Benson <gbenson@redhat.com>
4573
4574 * hostio.c (handle_vFile): Fix prefix lengths.
4575
4576 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4577
4578 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4579 ptr_bits.
4580
4581 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4582
4583 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4584 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4585 (clean): Add "rm -f" for above C files.
4586 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4587 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4588 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4589 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4590 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4591 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4592 (init_registers_s390x_vx_linux64)
4593 (init_registers_s390x_tevx_linux64)
4594 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4595 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4596 declarations.
4597 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4598 (s390_store_vxrs_high): New functions.
4599 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4600 NT_S390_VXRS_HIGH.
4601 (s390_arch_setup): Add logic for selecting one of the new target
4602 descriptions. Activate the new vector regsets if applicable.
4603 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4604 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4605 and init_registers_s390x_tevx_linux64.
4606
4607 2015-03-01 Pedro Alves <palves@redhat.com>
4608
4609 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4610 parameter.
4611
4612 2015-02-27 Pedro Alves <palves@redhat.com>
4613
4614 * linux-x86-low.c (u_debugreg_offset): New function.
4615 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4616
4617 2015-02-27 Pedro Alves <palves@redhat.com>
4618
4619 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4620 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4621 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4622 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4623 (ps_lsetfpregs, ps_getpid)
4624 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4625 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4626 (ps_lsetxregs, ps_plog): Declare.
4627
4628 2015-02-27 Pedro Alves <palves@redhat.com>
4629
4630 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4631 IP_AGENT_EXPORT_FUNC.
4632 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4633 IP_AGENT_EXPORT_FUNC.
4634 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4635 (IP_AGENT_EXPORT): Delete.
4636 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4637 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4638 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4639 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4640 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4641 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4642 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4643 (traceframe_read_count, traceframe_write_count)
4644 (traceframes_created, trace_state_variables, get_raw_reg)
4645 (get_trace_state_variable_value, set_trace_state_variable_value)
4646 (ust_loaded, helper_thread_id, cmd_buf): Use
4647 IPA_SYM_EXPORTED_NAME.
4648 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4649 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4650 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4651 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4652 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4653 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4654 EXTERN_C_PUSH/EXTERN_C_POP.
4655 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4656 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4657 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4658 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4659 (traceframe_write_count, traceframe_read_count)
4660 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4661 (about_to_request_buffer_space, get_trace_state_variable_value)
4662 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4663 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4664 EXTERN_C_PUSH/EXTERN_C_POP.
4665 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4666 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4667 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4668 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4669 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4670 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4671 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4672 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4673 Define.
4674 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4675 (IP_AGENT_EXPORT_VAR_DECL): Define.
4676 (tracing): Declare.
4677 (gdb_agent_get_raw_reg): Declare.
4678
4679 2015-02-27 Tom Tromey <tromey@redhat.com>
4680 Pedro Alves <palves@redhat.com>
4681
4682 Rename symbols whose names are reserved C++ keywords throughout.
4683
4684 2015-02-27 Pedro Alves <palves@redhat.com>
4685
4686 * Makefile.in (COMPILER): New, get it from autoconf.
4687 (CXX): Get from autoconf instead.
4688 (COMPILE.pre): Use COMPILER.
4689 (CC-LD): Rename to ...
4690 (CC_LD): ... this. Use COMPILER.
4691 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4692 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4693 * acinclude.m4: Include build-with-cxx.m4.
4694 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4695 Disable -Werror by default if building in C++ mode.
4696 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4697 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4698 the C++ compiler. Save/restore CXXFLAGS too.
4699 * configure: Regenerate.
4700
4701 2015-02-27 Pedro Alves <palves@redhat.com>
4702
4703 * acinclude.m4: Include libiberty.m4.
4704 * configure.ac: Call libiberty_INIT.
4705 * config.in, configure: Regenerate.
4706
4707 2015-02-26 Pedro Alves <palves@redhat.com>
4708
4709 * linux-low.c (linux_wait_1): When incrementing the PC past a
4710 program breakpoint always use the_low_target.breakpoint_len as
4711 increment, rather than the maximum between that and
4712 the_low_target.decr_pc_after_break.
4713
4714 2015-02-23 Pedro Alves <palves@redhat.com>
4715
4716 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4717 thread was doing a step-over; always adjust the PC if
4718 we stepped over a permanent breakpoint.
4719 (linux_wait_1): If we stepped over breakpoint that was on top of a
4720 permanent breakpoint, manually advance the PC past it.
4721
4722 2015-02-23 Pedro Alves <palves@redhat.com>
4723
4724 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4725 modes.
4726 (x86_fill_gregset, x86_store_gregset): Use it when handling
4727 $orig_eax.
4728
4729 2015-02-20 Pedro Alves <palves@redhat.com>
4730
4731 * thread-db.c: Include "nat/linux-procfs.h".
4732 (thread_db_init): Skip listing new threads if the kernel supports
4733 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4734
4735 2015-02-20 Pedro Alves <palves@redhat.com>
4736
4737 * linux-low.c (status_pending_p_callback): Use ptid_match.
4738
4739 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4740
4741 PR breakpoints/16812
4742 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4743 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4744 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4745
4746 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4747
4748 PR breakpoints/15956
4749 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4750
4751 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4752
4753 * linux-low.c (linux_low_btrace_conf): Print size.
4754 * server.c (handle_btrace_conf_general_set): New.
4755 (hanle_general_set): Call handle_btrace_conf_general_set.
4756 (handle_query): Report Qbtrace-conf:bts:size as supported.
4757
4758 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4759
4760 * linux-low.c (linux_low_enable_btrace): Update parameters.
4761 (linux_low_btrace_conf): New.
4762 (linux_target_ops)<to_btrace_conf>: Initialize.
4763 * server.c (current_btrace_conf): New.
4764 (handle_btrace_enable): Rename to ...
4765 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4766 to target_enable_btrace. Update comment. Update users.
4767 (handle_qxfer_btrace_conf): New.
4768 (qxfer_packets): Add btrace-conf entry.
4769 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4770 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4771 (target_ops)<read_btrace_conf>: New.
4772 (target_enable_btrace): Update parameters.
4773 (target_read_btrace_conf): New.
4774
4775 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4776
4777 * server.c (handle_btrace_general_set): Remove call to
4778 target_supports_btrace.
4779 (supported_btrace_packets): New.
4780 (handle_query): Call supported_btrace_packets.
4781 * target.h: include btrace-common.h.
4782 (btrace_target_info): Removed.
4783 (supports_btrace, target_supports_btrace): Update parameters.
4784
4785 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4786
4787 * Makefile.in (SFILES): Add common/btrace-common.c.
4788 (OBS): Add common/btrace-common.o.
4789 (btrace-common.o): Add build rules.
4790 * linux-low: Include btrace-common.h.
4791 (linux_low_read_btrace): Use struct btrace_data. Call
4792 btrace_data_init and btrace_data_fini.
4793
4794 2015-02-06 Pedro Alves <palves@redhat.com>
4795
4796 * thread-db.c (find_new_threads_callback): Add debug output.
4797
4798 2015-02-04 Pedro Alves <palves@redhat.com>
4799
4800 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4801 (resume_stopped_resumed_lwps): New function.
4802 (linux_wait_for_event_filtered): Use it.
4803
4804 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4805
4806 * Makefile.in (SFILES): Add linux-personality.c.
4807 (linux-personality.o): New rule.
4808 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4809 list of objects to be built.
4810 * linux-low.c: Include nat/linux-personality.h.
4811 (linux_create_inferior): Remove code to disable address space
4812 randomization (moved to ../nat/linux-personality.c). Create
4813 cleanup to disable address space randomization.
4814
4815 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4816
4817 * Makefile.in (posix-strerror.o): New rule.
4818 (mingw-strerror.o): Likewise.
4819 * configure: Regenerated.
4820 * configure.ac: Source file ../common/common.host. Initialize new
4821 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4822
4823 2015-01-14 Yao Qi <yao@codesourcery.com>
4824
4825 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4826 (ppc-linux.o): New rule.
4827 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4828 * configure.ac: AC_CHECK_FUNCS(getauxval).
4829 * config.in: Re-generated.
4830 * configure: Re-generated.
4831 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4832 ppc64_64bit_inferior_p
4833
4834 2015-01-14 Yao Qi <yao@codesourcery.com>
4835
4836 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4837 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4838 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4839 (PT_ORIG_R3, PT_TRAP): Likewise.
4840 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4841 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4842 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4843
4844 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4845
4846 * i387-fp.c (i387_cache_to_xsave): In look over
4847 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4848 zmmh_low_space field by use of zmmh_high_space.
4849
4850 2015-01-09 Pedro Alves <palves@redhat.com>
4851
4852 * linux-low.c (step_over_bkpt): Move higher up in the file.
4853 (handle_extended_wait): Don't store the stop_pc here.
4854 (get_stop_pc): Adjust comments and rename to ...
4855 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4856 stopped for a software breakpoint or hardware breakpoint.
4857 (thread_still_has_status_pending_p): New function.
4858 (status_pending_p_callback): Use
4859 thread_still_has_status_pending_p. If the event is no longer
4860 interesting, resume the LWP.
4861 (handle_tracepoints): Add assert.
4862 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4863 (wstatus_maybe_breakpoint): New function.
4864 (cancel_breakpoint): Delete function.
4865 (check_stopped_by_watchpoint): New function, factored out from
4866 linux_low_filter_event.
4867 (lp_status_maybe_breakpoint): Delete function.
4868 (linux_low_filter_event): Remove filter_ptid argument.
4869 Leave thread group exits pending here. Store the LWP's stop PC.
4870 Always leave events pending.
4871 (linux_wait_for_event_filtered): Pull all events out of the
4872 kernel, and leave them all pending.
4873 (count_events_callback, select_event_lwp_callback): Consider all
4874 events.
4875 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4876 (select_event_lwp): Only give preference to the stepping LWP in
4877 all-stop mode. Adjust comments.
4878 (ignore_event): New function.
4879 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4880 references to cancel_breakpoints. Adjust to renames. Also give
4881 equal priority to all LWPs that have had events in non-stop mode.
4882 If reporting a software breakpoint event, unadjust the LWP's PC.
4883 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4884 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4885 Adjust.
4886 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4887 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4888 (linux_stopped_by_watchpoint): Adjust.
4889 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4890 * linux-low.h (enum lwp_stop_reason): New.
4891 (struct lwp_info) <stop_pc>: Adjust comment.
4892 <stopped_by_watchpoint>: Delete field.
4893 <stop_reason>: New field.
4894 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4895 * mem-break.c (software_breakpoint_inserted_here)
4896 (hardware_breakpoint_inserted_here): New function.
4897 * mem-break.h (software_breakpoint_inserted_here)
4898 (hardware_breakpoint_inserted_here): Declare.
4899 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4900 (cancel_breakpoints): Delete.
4901 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4902 (upload_fast_traceframes): Remove references to
4903 cancel_breakpoints.
4904
4905 2015-01-09 Pedro Alves <palves@redhat.com>
4906
4907 * thread-db.c (find_new_threads_callback): Ignore thread if the
4908 kernel thread ID is -1.
4909
4910 2015-01-09 Pedro Alves <palves@redhat.com>
4911
4912 * linux-low.c (linux_attach_fail_reason_string): Move to
4913 nat/linux-ptrace.c, and rename.
4914 (linux_attach_lwp): Update comment.
4915 (attach_proc_task_lwp_callback): New function.
4916 (linux_attach): Adjust to rename and use
4917 linux_proc_attach_tgid_threads.
4918 (linux_attach_fail_reason_string): Delete declaration.
4919
4920 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4921
4922 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4923 * server.c (gdbserver_version): Likewise.
4924
4925 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4926
4927 * remote-utils.c: Include ctype.h.
4928 (input_interrupt): Explicitly handle the case when the char
4929 received is the NUL byte. Improve the printing of non-ASCII
4930 characters.
4931
4932 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4933
4934 * linux-low.c (linux_low_filter_event): Update call to
4935 linux_enable_event_reporting following the addition of
4936 a new parameter to that function.
4937
4938 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4939
4940 PR server/17457
4941 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4942 (AARCH64_FPCR_REGNO): Likewise.
4943 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4944 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4945 (aarch64_store_fpregset): Likewise.
4946
4947 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4948
4949 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4950 Remove FIXME comment about assumption about N.
4951
4952 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4953
4954 * configure.ac: If large-file support is disabled in GDBserver,
4955 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4956 * configure: Regenerate.
4957
4958 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4959
4960 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4961 warning upon ENODATA from ptrace.
4962 * linux-s390-low.c (s390_store_tdb): New.
4963 (s390_regsets): Add regset for NT_S390_TDB.
4964
4965 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4966
4967 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4968 without a fill_function.
4969 * linux-s390-low.c (s390_fill_last_break): Remove.
4970 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4971 (s390_arch_setup): Use regset's size instead of fill_function for
4972 loop end condition.
4973
4974 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4975
4976 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4977 the regset's store function when ptrace returned an error.
4978 * regcache.c (get_thread_regcache): Invalidate register cache
4979 before fetching inferior's registers.
4980
4981 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4982
4983 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4984 while-loop as for-loop.
4985 (regsets_store_inferior_registers): Likewise.
4986
4987 2014-11-28 Yao Qi <yao@codesourcery.com>
4988
4989 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4990 * config.in, configure: Re-generate.
4991 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4992 is defined.
4993
4994 2014-11-21 Yao Qi <yao@codesourcery.com>
4995
4996 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4997 (AC_CHECK_HEADERS): Remove malloc.h.
4998 * configure: Re-generated.
4999 * config.in: Re-generated.
5000 * server.h: Don't include alloca.h and malloc.h.
5001 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5002 Don't include malloc.h.
5003
5004 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5005
5006 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5007 corresponding ERRNO check in same block.
5008
5009 2014-11-12 Pedro Alves <palves@redhat.com>
5010
5011 * server.c (cont_thread): Update comment.
5012 (start_inferior, attach_inferior): No longer clear cont_thread.
5013 (handle_v_cont): No longer set cont_thread.
5014 (captured_main): Clear cont_thread each time a GDB connects.
5015
5016 2014-11-12 Pedro Alves <palves@redhat.com>
5017
5018 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5019 thread, and don't resume all threads if the Hc thread has exited.
5020
5021 2014-11-12 Pedro Alves <palves@redhat.com>
5022
5023 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5024 the process group instead of to a specific LWP.
5025
5026 2014-10-15 Pedro Alves <palves@redhat.com>
5027
5028 PR server/17487
5029 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5030 parameter.
5031 (arm_set_thread_context): Delete.
5032 (the_low_target): Adjust.
5033 * win32-i386-low.c (debug_registers_changed)
5034 (debug_registers_used): Delete.
5035 (update_debug_registers_callback): New function.
5036 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5037 needing to update their debug registers.
5038 (win32_get_current_dr): New function.
5039 (x86_dr_low_get_addr, x86_dr_low_get_control)
5040 (x86_dr_low_get_status): Fetch the debug register from the thread
5041 record's context.
5042 (i386_initial_stuff): Adjust.
5043 (i386_get_thread_context): Remove current_event parameter. Don't
5044 clear debug_registers_changed nor copy DR values to
5045 debug_reg_state.
5046 (i386_set_thread_context): Delete.
5047 (i386_prepare_to_resume): New function.
5048 (i386_thread_added): Mark the thread as needing to update irs
5049 debug registers.
5050 (the_low_target): Remove i386_set_thread_context and install
5051 i386_prepare_to_resume.
5052 * win32-low.c (win32_get_thread_context): Adjust.
5053 (win32_set_thread_context): Use SetThreadContext
5054 directly.
5055 (win32_prepare_to_resume): New function.
5056 (win32_require_context): New function, factored out from ...
5057 (thread_rec): ... this.
5058 (continue_one_thread): Call win32_prepare_to_resume on each thread
5059 we're about to continue.
5060 (win32_resume): Call win32_prepare_to_resume on the event thread.
5061 * win32-low.h (struct win32_thread_info)
5062 <debug_registers_changed>: New field.
5063 (struct win32_target_ops): Change prototype of set_thread_context,
5064 delete set_thread_context and add prepare_to_resume.
5065 (win32_require_context): New declaration.
5066
5067 2014-10-08 Gary Benson <gbenson@redhat.com>
5068
5069 * server.h: Do not include common-exceptions.h.
5070
5071 2014-10-08 Gary Benson <gbenson@redhat.com>
5072
5073 * server.h: Do not include cleanups.h.
5074
5075 2014-09-30 James Hogan <james.hogan@imgtec.com>
5076
5077 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5078 mips64-dsp-linux.c.
5079
5080 2014-09-23 Yao Qi <yao@codesourcery.com>
5081
5082 * linux-low.c (lp_status_maybe_breakpoint): New function.
5083 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5084 (count_events_callback): Likewise.
5085 (select_event_lwp_callback): Likewise.
5086 (cancel_breakpoints_callback): Likewise.
5087
5088 2014-09-19 Don Breazeal <donb@codesourcery.com>
5089
5090 * linux-low.c (handle_extended_wait): Call
5091 linux_ptrace_get_extended_event.
5092 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5093 linux_is_extended_waitstatus.
5094
5095 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5096
5097 * Makefile.in (CPPFLAGS): Define.
5098 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5099 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5100
5101 2014-09-16 Gary Benson <gbenson@redhat.com>
5102
5103 * inferiors.h (current_inferior): Renamed as...
5104 (current_thread): New variable. All uses updated.
5105 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5106 (maybe_move_out_of_jump_pad): Likewise.
5107 (cancel_breakpoint): Likewise.
5108 (linux_low_filter_event): Likewise.
5109 (wait_for_sigstop): Likewise.
5110 (linux_resume_one_lwp): Likewise.
5111 (need_step_over_p): Likewise.
5112 (start_step_over): Likewise.
5113 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5114 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5115 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5116 and save_inferior as saved_thread.
5117 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5118 saved_thread.
5119 (regcache_invalidate_thread): Likewise.
5120 * remote-utils.c (prepare_resume_reply): Likewise.
5121 * thread-db.c (thread_db_get_tls_address): Likewise.
5122 (disable_thread_event_reporting): Likewise.
5123 (remove_thread_event_breakpoints): Likewise.
5124 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5125 as saved_thread.
5126 * target.h (set_desired_inferior): Renamed as...
5127 (set_desired_thread): New declaration. All uses updated.
5128 * server.c (myresume): Updated comment to reference thread instead
5129 of inferior.
5130 (handle_serial_event): Likewise.
5131 (handle_target_event): Likewise.
5132
5133 2014-09-12 Tom Tromey <tromey@redhat.com>
5134 Gary Benson <gbenson@redhat.com>
5135
5136 * regcache.h: Include common-regcache.h.
5137 (regcache_read_pc): Don't declare.
5138 * regcache.c (get_thread_regcache_for_ptid): New function.
5139
5140 2014-09-11 Tom Tromey <tromey@redhat.com>
5141 Gary Benson <gbenson@redhat.com>
5142
5143 * symbol.c: New file.
5144 * Makefile.in (SFILES): Add symbol.c.
5145 (OBS): Add symbol.o.
5146
5147 2014-09-11 Gary Benson <gbenson@redhat.com>
5148
5149 * target.c (target_stop_ptid, target_continue_ptid): New
5150 functions.
5151
5152 2014-09-11 Tom Tromey <tromey@redhat.com>
5153 Gary Benson <gbenson@redhat.com>
5154
5155 * target.h: Include target/target.h.
5156 * target.c (target_read_memory, target_read_uint32)
5157 (target_write_memory): New functions.
5158
5159 2014-09-11 Gary Benson <gbenson@redhat.com>
5160
5161 * server.h (debug_hw_points): Don't declare.
5162 * server.c (debug_hw_points): Don't define. Replace all uses
5163 with show_debug_regs.
5164 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5165 all uses with show_debug_regs.
5166
5167 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5168
5169 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5170 endianness into account.
5171 (ppc_supply_ptrace_register): Likewise.
5172
5173 2014-09-03 James Hogan <james.hogan@imgtec.com>
5174
5175 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5176 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5177
5178 2014-09-03 Gary Benson <gbenson@redhat.com>
5179
5180 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5181 ALL_DEBUG_ADDRESS_REGISTERS.
5182
5183 2014-09-02 Gary Benson <gbenson@redhat.com>
5184
5185 * i386-low.h: Renamed as...
5186 * x86-low.h: New file. All type, function and variable name
5187 prefixes changed from "i386_" to "x86_". All references updated.
5188 * i386-low.c: Renamed as...
5189 * x86-low.c: New file. All type, function and variable name
5190 prefixes changed from "i386_" to "x86_". All references updated.
5191
5192 2014-09-02 Gary Benson <gbenson@redhat.com>
5193
5194 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5195 (x86_linux_new_thread): Likewise.
5196
5197 2014-08-29 Gary Benson <gbenson@redhat.com>
5198
5199 * server.h (setjmp.h): Do not include.
5200 (toplevel): Do not declare.
5201 (common-exceptions.h): Include.
5202 (cleanups.h): Likewise.
5203 * server.c (toplevel): Do not define.
5204 (exit_code): New static global.
5205 (detach_or_kill_for_exit_cleanup): New function.
5206 (main): New function. Original main renamed to...
5207 (captured_main): New function.
5208 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5209
5210 2014-08-29 Gary Benson <gbenson@redhat.com>
5211
5212 * Makefile.in (SFILES): Add common/common-exceptions.c.
5213 (OBS): Add common-exceptions.o.
5214 (common-exceptions.o): New rule.
5215 * utils.c (prepare_to_throw_exception): New function.
5216
5217 2014-08-29 Gary Benson <gbenson@redhat.com>
5218
5219 * config.in: Regenerate.
5220 * configure: Likewise.
5221
5222 2014-08-29 Gary Benson <gbenson@redhat.com>
5223
5224 * Makefile.in (SFILES): Add common/cleanups.c.
5225 (OBS): cleanups.o.
5226 (cleanups.o): New rule.
5227
5228 2014-08-29 Gary Benson <gbenson@redhat.com>
5229
5230 * utils.c (internal_vwarning): New function.
5231
5232 2014-08-28 Gary Benson <gbenson@redhat.com>
5233
5234 * utils.h (fatal): Remove declaration.
5235 * utils.c (fatal): Remove function.
5236
5237 2014-08-28 Gary Benson <gbenson@redhat.com>
5238
5239 * tracepoint.c (gdb_agent_init): Replace fatal with
5240 perror_with_name.
5241 (initialize_tracepoint): Likewise.
5242
5243 2014-08-28 Gary Benson <gbenson@redhat.com>
5244
5245 * remote-utils.c (remote_prepare): Replace fatal with error.
5246
5247 2014-08-28 Gary Benson <gbenson@redhat.com>
5248
5249 * linux-low.c (linux_async): Replace fatal with warning.
5250 Tidy up and return.
5251 (linux_start_non_stop): Return -1 if linux_async failed.
5252
5253 2014-08-28 Gary Benson <gbenson@redhat.com>
5254
5255 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5256 gdb_assert.
5257 (i386_dr_low_get_addr): Remove vague comment.
5258 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5259 gdb_assert.
5260
5261 2014-08-28 Gary Benson <gbenson@redhat.com>
5262
5263 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5264 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5265 internal_error.
5266 (linux_resume_one_lwp): Likewise.
5267 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5268 gdb_assert.
5269 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5270 with internal_error.
5271 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5272 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5273 (find_register_by_name): Replace fatal with internal_error.
5274 (find_regno): Likewise.
5275 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5276 * thread-db.c (thread_db_create_event): Likewise.
5277 (thread_db_load_search): Likewise.
5278 (try_thread_db_load_1): Likewise.
5279 * tracepoint.c (get_jump_space_head): Replace fatal with
5280 internal_error.
5281 (claim_trampoline_space): Likewise.
5282 (have_fast_tracepoint_trampoline_buffer): Likewise.
5283 (cmd_qtstart): Likewise.
5284 (stop_tracing): Likewise.
5285 (fast_tracepoint_collecting): Likewise.
5286 (target_malloc): Likewise.
5287 (download_tracepoint): Likewise.
5288 (download_trace_state_variables): Replace check with gdb_assert.
5289 (upload_fast_traceframes): Replace fatal with internal_error.
5290
5291 2014-08-19 Tom Tromey <tromey@redhat.com>
5292 Gary Benson <gbenson@redhat.com>
5293
5294 * Makefile.in (SFILES): Add common/common-debug.c.
5295 (OBS): Add common-debug.o.
5296 (common-debug.o): New rule.
5297 * debug.h (debug_printf): Don't declare.
5298 * debug.c (debug_printf): Renamed and rewritten as...
5299 (debug_vprintf): New function.
5300
5301 2014-08-19 Gary Benson <gbenson@redhat.com>
5302
5303 * utils.h: Do not include print-utils.h.
5304
5305 2014-08-19 Tom Tromey <tromey@redhat.com>
5306 Gary Benson <gbenson@redhat.com>
5307
5308 * server.h: Add static assertion.
5309 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5310
5311 2014-08-19 Tom Tromey <tromey@redhat.com>
5312 Gary Benson <gbenson@redhat.com>
5313
5314 * Makefile.in (SFILES): Add common/errors.c.
5315 (OBS): Add errors.o.
5316 (IPA_OBS): Add errors-ipa.o.
5317 (errors.o): New rule.
5318 (errors-ipa.o): Likewise.
5319 * utils.h (perror_with_name, error, warning): Don't declare.
5320 * utils.c (warning): Renamed and rewritten as...
5321 (vwarning): New function.
5322 (error): Renamed and rewritten as...
5323 (verror): New function.
5324 (internal_error): Renamed and rewritten as...
5325 (internal_verror): New function.
5326
5327 2014-08-07 Gary Benson <gbenson@redhat.com>
5328
5329 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5330 * configure: Regenerate.
5331 * config.in: Likewise.
5332 * server.h: Do not include errno.h.
5333 * event-loop.c: Likewise.
5334 * hostio-errno.c: Likewise.
5335 * linux-low.c: Likewise.
5336 * remote-utils.c: Likewise.
5337 * spu-low.c: Likewise.
5338 * utils.c: Likewise.
5339 * gdbreplay.c: Unconditionally include errno.h.
5340
5341 2014-08-07 Gary Benson <gbenson@redhat.com>
5342
5343 * server.h: Do not include string.h.
5344 * event-loop.c: Likewise.
5345 * linux-low.c: Likewise.
5346 * regcache.c: Likewise.
5347 * remote-utils.c: Likewise.
5348 * spu-low.c: Likewise.
5349 * utils.c: Likewise.
5350
5351 2014-08-07 Gary Benson <gbenson@redhat.com>
5352
5353 * server.h: Do not include gdb_assert.h.
5354
5355 2014-08-07 Gary Benson <gbenson@redhat.com>
5356
5357 * server.h: Do not include common-utils.h.
5358
5359 2014-08-07 Gary Benson <gbenson@redhat.com>
5360
5361 * server.h: Do not include ptid.h.
5362 * notif.h: Likewise.
5363
5364 2014-08-07 Gary Benson <gbenson@redhat.com>
5365
5366 * server.h: Do not include gdb_locale.h.
5367
5368 2014-08-07 Gary Benson <gbenson@redhat.com>
5369
5370 * server.h: Do not include gdb/signals.h.
5371 * win32-low.c: Likewise.
5372
5373 2014-08-07 Gary Benson <gbenson@redhat.com>
5374
5375 * server.h: Do not include pathmax.h.
5376
5377 2014-08-07 Gary Benson <gbenson@redhat.com>
5378
5379 * server.h: Do not include libiberty.h.
5380 * linux-bfin-low.c: Likewise.
5381
5382 2014-08-07 Gary Benson <gbenson@redhat.com>
5383
5384 * server.h: Do not include ansidecl.h.
5385
5386 2014-08-07 Gary Benson <gbenson@redhat.com>
5387
5388 * linux-x86-low.c: Do not include stddef.h.
5389 * lynx-ppc-low.c: Likewise.
5390 * tracepoint.c: Likewise.
5391
5392 2014-08-07 Gary Benson <gbenson@redhat.com>
5393
5394 * server.h: Do not include stdarg.h.
5395 * nto-low.c: Likewise.
5396
5397 2014-08-07 Gary Benson <gbenson@redhat.com>
5398
5399 * server.h: Do not include stdlib.h.
5400 * inferiors.c: Likewise.
5401 * linux-low.c: Likewise.
5402 * regcache.c: Likewise.
5403 * spu-low.c: Likewise.
5404 * tracepoint.c: Likewise.
5405 * utils.c: Likewise.
5406
5407 2014-08-07 Gary Benson <gbenson@redhat.com>
5408
5409 * server.h: Do not include stdio.h.
5410 * linux-low.c: Likewise.
5411 * remote-utils.c: Likewise.
5412 * spu-low.c: Likewise.
5413 * utils.c: Likewise.
5414 * wincecompat.c: Likewise.
5415
5416 2014-08-06 Gary Benson <gbenson@redhat.com>
5417
5418 * regcache.c (init_register_cache): Move conditionals inside if.
5419
5420 2014-08-06 Gary Benson <gbenson@redhat.com>
5421
5422 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5423
5424 2014-07-31 Gary Benson <gbenson@redhat.com>
5425
5426 * ax.h: Do not include server.h.
5427 * gdbthread.h: Likewise.
5428 * lynx-low.h: Likewise.
5429 * notif.h: Likewise.
5430
5431 2014-07-30 Gary Benson <gbenson@redhat.com>
5432
5433 * server.h: Include common-defs.h.
5434 Do not include config.h or build-gnulib-gdbserver/config.h.
5435
5436 2014-07-30 Gary Benson <gbenson@redhat.com>
5437
5438 * hostio-errno.c: Move server.h to top of includes list.
5439 * inferiors.c: Likewise.
5440 * linux-x86-low.c: Likewise.
5441 * notif.c: Include server.h.
5442
5443 2014-07-24 Tom Tromey <tromey@redhat.com>
5444 Gary Benson <gbenson@redhat.com>
5445
5446 * server.h (CORE_ADDR): Now unsigned.
5447
5448 2014-07-16 Pedro Alves <palves@redhat.com>
5449
5450 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5451
5452 2014-07-15 Pedro Alves <palves@redhat.com>
5453
5454 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5455 copy.
5456
5457 2014-07-11 Pedro Alves <palves@redhat.com>
5458
5459 * linux-low.c (kill_wait_lwp): New function, based on
5460 kill_one_lwp_callback, but use my_waitpid directly.
5461 (kill_one_lwp_callback, linux_kill): Use it.
5462
5463 2014-06-23 Pedro Alves <palves@redhat.com>
5464
5465 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5466 before setting DR0..DR3.
5467
5468 2014-06-20 Gary Benson <gbenson@redhat.com>
5469
5470 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5471 * configure: Regenerated.
5472 * config.in: Likewise.
5473
5474 2014-06-20 Gary Benson <gbenson@redhat.com>
5475
5476 * Makefile.in (SFILES): Update locations for files moved
5477 from common to nat.
5478 (object file files): Reordered.
5479
5480 2014-06-20 Gary Benson <gbenson@redhat.com>
5481
5482 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5483 (i386_dr_low_set_addr): Likewise.
5484 (i386_dr_low_get_addr): Likewise.
5485 (i386_dr_low_can_set_control): Likewise.
5486 (i386_dr_low_set_control): Likewise.
5487 (i386_dr_low_get_control): Likewise.
5488 (i386_dr_low_get_status): Likewise.
5489 (i386_get_debug_register_length): Likewise.
5490 * linux-x86-low.c (i386_dr_low_set_addr):
5491 Changed signature. Made static.
5492 (i386_dr_low_get_addr): Likewise.
5493 (i386_dr_low_set_control): Likewise.
5494 (i386_dr_low_get_control): Likewise.
5495 (i386_dr_low_get_status): Likewise.
5496 (i386_dr_low): New global variable.
5497 * win32-i386-low.c (i386_dr_low_set_addr):
5498 Changed signature. Made static.
5499 (i386_dr_low_get_addr): Likewise.
5500 (i386_dr_low_set_control): Likewise.
5501 (i386_dr_low_get_control): Likewise.
5502 (i386_dr_low_get_status): Likewise.
5503 (i386_dr_low): New global variable.
5504
5505 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5506
5507 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5508 * Makefile.in (AR, AR_FLAGS): Define.
5509 * configure: Regenerate.
5510
5511 2014-06-19 Gary Benson <gbenson@redhat.com>
5512
5513 * Makefile.in (i386-dregs.o): New rule.
5514 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5515 * i386-low.c (target.h): Remove include.
5516 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5517 (DR_CONTROL_SHIFT): Likewise.
5518 (DR_CONTROL_SIZE): Likewise.
5519 (DR_RW_EXECUTE): Likewise.
5520 (DR_RW_WRITE): Likewise.
5521 (DR_RW_READ): Likewise.
5522 (DR_RW_IORW): Likewise.
5523 (DR_LEN_1): Likewise.
5524 (DR_LEN_2): Likewise.
5525 (DR_LEN_4): Likewise.
5526 (DR_LEN_8): Likewise.
5527 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5528 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5529 (DR_ENABLE_SIZE): Likewise.
5530 (DR_LOCAL_SLOWDOWN): Likewise.
5531 (DR_GLOBAL_SLOWDOWN): Likewise.
5532 (DR_CONTROL_RESERVED): Likewise.
5533 (I386_DR_CONTROL_MASK): Likewise.
5534 (I386_DR_VACANT): Likewise.
5535 (I386_DR_LOCAL_ENABLE): Likewise.
5536 (I386_DR_GLOBAL_ENABLE): Likewise.
5537 (I386_DR_DISABLE): Likewise.
5538 (I386_DR_SET_RW_LEN): Likewise.
5539 (I386_DR_GET_RW_LEN): Likewise.
5540 (I386_DR_WATCH_HIT): Likewise.
5541 (i386_wp_op_t): Likewise.
5542 (i386_show_dr): Likewise.
5543 (i386_length_and_rw_bits): Likewise.
5544 (i386_insert_aligned_watchpoint): Likewise.
5545 (i386_remove_aligned_watchpoint): Likewise.
5546 (i386_handle_nonaligned_watchpoint): Likewise.
5547 i386_update_inferior_debug_regs(): Likewise.
5548 (i386_dr_insert_watchpoint): Likewise.
5549 (i386_dr_remove_watchpoint): Likewise.
5550 (i386_dr_region_ok_for_watchpoint): Likewise.
5551 (i386_dr_stopped_data_address): Likewise.
5552 (i386_dr_stopped_by_watchpoint): Likewise.
5553
5554 2014-06-19 Gary Benson <gbenson@redhat.com>
5555
5556 * i386-low.c (i386_dr_show): Renamed to
5557 i386_show_dr and made static. All uses updated.
5558 (i386_dr_length_and_rw_bits): Renamed to
5559 i386_length_and_rw_bits and made static.
5560 All uses updated.
5561 (i386_dr_insert_aligned_watchpoint): Renamed to
5562 i386_insert_aligned_watchpoint and made static.
5563 All uses updated.
5564 (i386_dr_remove_aligned_watchpoint): Renamed to
5565 i386_remove_aligned_watchpoint and made static.
5566 All uses updated.
5567 (i386_dr_update_inferior_debug_regs): Renamed to
5568 i386_update_inferior_debug_regs and made static.
5569 All uses updated.
5570
5571 2014-06-18 Gary Benson <gbenson@redhat.com>
5572
5573 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5574 (i386_dr_low_can_set_control): Likewise.
5575 (i386_get_debug_register_length): Likewise.
5576 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5577 (i386_dr_low_can_set_control): Likewise.
5578 (i386_get_debug_register_length): Likewise.
5579
5580 2014-06-17 Gary Benson <gbenson@redhat.com>
5581
5582 * i386-low.h (i386-dregs.h): New include.
5583 (DR_FIRSTADDR): Now in i386-dregs.h.
5584 (DR_LASTADDR): Likewise.
5585 (DR_NADDR): Likewise.
5586 (DR_STATUS): Likewise.
5587 (DR_CONTROL): Likewise.
5588 (i386_debug_reg_state): Likewise.
5589 (i386_dr_insert_watchpoint): Likewise.
5590 (i386_dr_remove_watchpoint): Likewise.
5591 (i386_dr_region_ok_for_watchpoint): Likewise.
5592 (i386_dr_stopped_data_address): Likewise.
5593 (i386_dr_stopped_by_watchpoint): Likewise.
5594 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5595
5596 2014-06-18 Gary Benson <gbenson@redhat.com>
5597
5598 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5599 i386_dr_insert_watchpoint.
5600 (i386_low_remove_watchpoint): Renamed to
5601 i386_dr_remove_watchpoint.
5602 (i386_low_region_ok_for_watchpoint): Renamed to
5603 i386_dr_region_ok_for_watchpoint.
5604 (i386_low_stopped_data_address): Renamed to
5605 i386_dr_stopped_data_address.
5606 (i386_low_stopped_by_watchpoint): Renamed to
5607 i386_dr_stopped_by_watchpoint.
5608 * i386-low.c (i386_show_dr): Renamed to
5609 i386_dr_show and made nonstatic. All uses updated.
5610 (i386_length_and_rw_bits): Renamed to
5611 i386_dr_length_and_rw_bits and made nonstatic.
5612 All uses updated.
5613 (i386_insert_aligned_watchpoint): Renamed to
5614 i386_dr_insert_aligned_watchpoint and made nonstatic.
5615 All uses updated.
5616 (i386_remove_aligned_watchpoint): Renamed to
5617 i386_dr_remove_aligned_watchpoint and made nonstatic.
5618 All uses updated.
5619 (i386_update_inferior_debug_regs): Renamed to
5620 i386_dr_update_inferior_debug_regs and made nonstatic.
5621 All uses updated.
5622 (i386_low_insert_watchpoint): Renamed to
5623 i386_dr_insert_watchpoint. All uses updated.
5624 (i386_low_remove_watchpoint): Renamed to
5625 i386_dr_remove_watchpoint. All uses updated.
5626 (i386_low_region_ok_for_watchpoint): Renamed to
5627 i386_dr_region_ok_for_watchpoint. All uses updated.
5628 (i386_low_stopped_data_address): Renamed to
5629 i386_dr_stopped_data_address. All uses updated.
5630 (i386_low_stopped_by_watchpoint): Renamed to
5631 i386_dr_stopped_by_watchpoint. All uses updated.
5632
5633 2014-06-18 Gary Benson <gbenson@redhat.com>
5634
5635 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5636 (i386_dr_low_can_set_control): Likewise.
5637 (i386_insert_aligned_watchpoint): New check.
5638
5639 2014-06-18 Gary Benson <gbenson@redhat.com>
5640
5641 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5642 Renamed to state.
5643
5644 2014-06-18 Gary Benson <gbenson@redhat.com>
5645
5646 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5647 instead of fatal and error.
5648 (i386_handle_nonaligned_watchpoint): Likewise.
5649
5650 2014-06-18 Gary Benson <gbenson@redhat.com>
5651
5652 * i386-low.c (i386_get_debug_register_length): New macro.
5653 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5654 (i386_show_dr): Use debug_printf instead of fprintf. Use
5655 phex to format values.
5656
5657 2014-06-18 Gary Benson <gbenson@redhat.com>
5658
5659 * i386-low.h: Comment changes.
5660 * i386-low.c: Likewise.
5661
5662 2014-06-18 Gary Benson <gbenson@redhat.com>
5663
5664 * i386-low.c: Whitespace changes.
5665
5666 2014-06-12 Tom Tromey <tromey@redhat.com>
5667
5668 * utils.c (freeargv): Remove.
5669
5670 2014-06-12 Tom Tromey <tromey@redhat.com>
5671
5672 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5673 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5674 (parse_debug_format_options): Likewise.
5675 (gdbserver_usage): Likewise.
5676 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5677 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5678 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5679 against libiberty.
5680 ($(LIBGNU)): Depend on libiberty.
5681 (all-lib): Recurse into all subdirs.
5682 (install-only): Invoke "install" target in subdirs.
5683 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5684 targets.
5685 * configure: Rebuild.
5686 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5687 for vasprintf, vsnprintf, or gettimeofday.
5688 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5689 srv_tgtobj.
5690
5691 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5692
5693 * development.sh: Delete.
5694 * Makefile.in (config.status): Adjust dependency on development.sh.
5695 * configure.ac: Adjust development.sh source call.
5696 * configure: Regenerate.
5697
5698 2014-06-02 Pedro Alves <palves@redhat.com>
5699
5700 * ax.c (gdb_free_agent_expr): New function.
5701 * ax.h (gdb_free_agent_expr): New declaration.
5702 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5703 list.
5704 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5705 static.
5706 (clear_breakpoint_conditions_and_commands): New function.
5707 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5708 (clear_breakpoint_conditions_and_commands): New declaration.
5709
5710 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5711
5712 * linux-aarch64-low.c (asm/ptrace.h): Include.
5713
5714 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5715
5716 Fix TLS access for -static -pthread.
5717 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5718 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5719 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5720
5721 2014-05-20 Pedro Alves <palves@redhat.com>
5722
5723 * linux-aarch64-low.c (aarch64_insert_point)
5724 (aarch64_remove_point): No longer check whether the type is
5725 supported here. Adjust to new interface.
5726 (the_low_target): Install aarch64_supports_z_point_type as
5727 supports_z_point_type method.
5728 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5729 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5730 instead of a Z packet char. Adjust.
5731 (arm_supports_z_point_type): New function.
5732 (arm_insert_point, arm_remove_point): Adjust to new interface.
5733 (the_low_target): Install arm_supports_z_point_type.
5734 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5735 (cris_insert_point, cris_remove_point): Adjust to new interface.
5736 Don't check whether the type is supported here.
5737 (the_low_target): Install cris_supports_z_point_type.
5738 * linux-low.c (linux_supports_z_point_type): New function.
5739 (linux_insert_point, linux_remove_point): Adjust to new interface.
5740 * linux-low.h (struct linux_target_ops) <insert_point,
5741 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5742 raw_breakpoint pointer parameter.
5743 <supports_z_point_type>: New method.
5744 * linux-mips-low.c (mips_supports_z_point_type): New function.
5745 (mips_insert_point, mips_remove_point): Adjust to new interface.
5746 Use mips_supports_z_point_type.
5747 (the_low_target): Install mips_supports_z_point_type.
5748 * linux-ppc-low.c (the_low_target): Install NULL as
5749 supports_z_point_type method.
5750 * linux-s390-low.c (the_low_target): Install NULL as
5751 supports_z_point_type method.
5752 * linux-sparc-low.c (the_low_target): Install NULL as
5753 supports_z_point_type method.
5754 * linux-x86-low.c (x86_supports_z_point_type): New function.
5755 (x86_insert_point): Adjust to new insert_point interface. Use
5756 insert_memory_breakpoint. Adjust to new
5757 i386_low_insert_watchpoint interface.
5758 (x86_remove_point): Adjust to remove_point interface. Use
5759 remove_memory_breakpoint. Adjust to new
5760 i386_low_remove_watchpoint interface.
5761 (the_low_target): Install x86_supports_z_point_type.
5762 * lynx-low.c (lynx_target_ops): Install NULL as
5763 supports_z_point_type callback.
5764 * nto-low.c (nto_supports_z_point_type): New.
5765 (nto_insert_point, nto_remove_point): Adjust to new interface.
5766 (nto_target_ops): Install nto_supports_z_point_type.
5767 * mem-break.c: Adjust intro comment.
5768 (struct raw_breakpoint) <raw_type, size>: New fields.
5769 <inserted>: Update comment.
5770 <shlib_disabled>: Delete field.
5771 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5772 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5773 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5774 (raw_bkpt_type_to_target_hw_bp_type): New function.
5775 (find_enabled_raw_code_breakpoint_at): New function.
5776 (find_raw_breakpoint_at): New type and size parameters. Use them.
5777 (insert_memory_breakpoint): New function, based off
5778 set_raw_breakpoint_at.
5779 (remove_memory_breakpoint): New function.
5780 (set_raw_breakpoint_at): Reimplement.
5781 (set_breakpoint): New, based on set_breakpoint_at.
5782 (set_breakpoint_at): Reimplement.
5783 (delete_raw_breakpoint): Go through the_target->remove_point
5784 instead of assuming memory breakpoints.
5785 (find_gdb_breakpoint_at): Delete.
5786 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5787 (find_gdb_breakpoint): New function.
5788 (set_gdb_breakpoint_at): Delete.
5789 (z_type_supported): New function.
5790 (set_gdb_breakpoint_1): New function, loosely based off
5791 set_gdb_breakpoint_at.
5792 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5793 (delete_gdb_breakpoint_at): Delete.
5794 (delete_gdb_breakpoint_1): New function, loosely based off
5795 delete_gdb_breakpoint_at.
5796 (delete_gdb_breakpoint): New function.
5797 (clear_gdb_breakpoint_conditions): Rename to ...
5798 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5799 breakpoint.
5800 (add_condition_to_breakpoint): Make static.
5801 (add_breakpoint_condition): Take a struct breakpoint pointer
5802 instead of an address. Adjust.
5803 (gdb_condition_true_at_breakpoint): Rename to ...
5804 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5805 z_type parameter.
5806 (gdb_condition_true_at_breakpoint): Reimplement.
5807 (add_breakpoint_commands): Take a struct breakpoint pointer
5808 instead of an address. Adjust.
5809 (gdb_no_commands_at_breakpoint): Rename to ...
5810 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5811 parameter. Return true if no breakpoint was found. Change debug
5812 output.
5813 (gdb_no_commands_at_breakpoint): Reimplement.
5814 (run_breakpoint_commands): Rename to ...
5815 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5816 and change return type to boolean.
5817 (run_breakpoint_commands): New function.
5818 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5819 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5820 breakpoint. Go through the_target->remove_point instead of
5821 assuming memory breakpoint.
5822 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5823 software and hardware breakpoints.
5824 (reinsert_raw_breakpoint): Go through the_target->insert_point
5825 instead of assuming memory breakpoint.
5826 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5827 software and hardware breakpoints.
5828 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5829 Check both software and hardware breakpoints.
5830 (validate_inserted_breakpoint): Assert the breakpoint is a
5831 software breakpoint. Set the inserted flag to -1 instead of
5832 setting shlib_disabled.
5833 (delete_disabled_breakpoints): Adjust.
5834 (validate_breakpoints): Only validate software breakpoints.
5835 Adjust to inserted flag change.
5836 (check_mem_read, check_mem_write): Skip breakpoint types other
5837 than software breakpoints. Adjust to inserted flag change.
5838 * mem-break.h (enum raw_bkpt_type): New enum.
5839 (raw_breakpoint, struct process_info): Forward declare.
5840 (Z_packet_to_target_hw_bp_type): Delete declaration.
5841 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5842 (set_gdb_breakpoint, delete_gdb_breakpoint)
5843 (clear_breakpoint_conditions): New declarations.
5844 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5845 (breakpoint_inserted_here): Update comment.
5846 (add_breakpoint_condition, add_breakpoint_commands): Replace
5847 address parameter with a breakpoint pointer parameter.
5848 (gdb_breakpoint_here): Update comment.
5849 (delete_gdb_breakpoint_at): Delete.
5850 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5851 * server.c (process_point_options): Take a struct breakpoint
5852 pointer instead of an address. Adjust.
5853 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5854 delete_gdb_breakpoint.
5855 * spu-low.c (spu_target_ops): Install NULL as
5856 supports_z_point_type method.
5857 * target.h: Include mem-break.h.
5858 (struct target_ops) <prepare_to_access_memory>: Update comment.
5859 <supports_z_point_type>: New field.
5860 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5861 instead of a char. Also take a raw breakpoint pointer.
5862 * win32-arm-low.c (the_low_target): Install NULL as
5863 supports_z_point_type.
5864 * win32-i386-low.c (i386_supports_z_point_type): New function.
5865 (i386_insert_point, i386_remove_point): Adjust to new interface.
5866 (the_low_target): Install i386_supports_z_point_type.
5867 * win32-low.c (win32_supports_z_point_type): New function.
5868 (win32_insert_point, win32_remove_point): Adjust to new interface.
5869 (win32_target_ops): Install win32_supports_z_point_type.
5870 * win32-low.h (struct win32_target_ops):
5871 <supports_z_point_type>: New method.
5872 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5873 instead of a char. Also take a raw breakpoint pointer.
5874
5875 2014-05-20 Pedro Alves <palves@redhat.com>
5876
5877 * mem-break.h: Include break-common.h.
5878 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5879 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5880 (Z_packet_to_target_hw_bp_type): New declaration.
5881 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5882 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5883 (Z_PACKET_ACCESS_WP): Delete macros.
5884 (Z_packet_to_hw_type): Delete function.
5885 * i386-low.h: Don't include break-common.h here.
5886 (Z_packet_to_hw_type): Delete declaration.
5887 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5888 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5889 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5890 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5891 * linux-aarch64-low.c: Don't include break-common.h here.
5892 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5893 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5894 (Z_packet_to_target_hw_bp_type): Delete function.
5895 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5896 function.
5897 (mips_insert_point, mips_remove_point): Use
5898 Z_packet_to_target_hw_bp_type.
5899
5900 2014-05-20 Pedro Alves <palves@redhat.com>
5901
5902 * linux-aarch64-low.c: Include break-common.h.
5903 (enum target_point_type): Delete.
5904 (Z_packet_to_point_type): Rename to ...
5905 (Z_packet_to_target_hw_bp_type): ... this, and return a
5906 target_hw_bp_type instead.
5907 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5908 instead of an enum target_point_type.
5909 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5910 breakpoint type.
5911 (aarch64_dr_state_insert_one_point)
5912 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5913 (aarch64_handle_aligned_watchpoint)
5914 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5915 Take an enum target_hw_bp_type instead of an enum
5916 target_point_type.
5917 (aarch64_supports_z_point_type): New function.
5918 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5919 use Z_packet_to_target_hw_bp_type.
5920
5921 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5922
5923 * configure.ac: Only use -Werror by default when DEVELOPMENT
5924 is true.
5925 * configure: Regenerate.
5926
5927 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5928
5929 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5930 * linux-x86-low.c (X86_64_USER_REGS): New.
5931 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5932
5933 2014-04-28 Yao Qi <yao@codesourcery.com>
5934
5935 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5936 name.
5937
5938 2014-04-25 Pedro Alves <palves@redhat.com>
5939
5940 PR server/16255
5941 * linux-low.c (linux_attach_fail_reason_string): New function.
5942 (linux_attach_lwp): Delete.
5943 (linux_attach_lwp_1): Rename to ...
5944 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5945 argument. Remove "initial" parameter. Return int instead of
5946 void. Don't error or warn here.
5947 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5948 failure to attach to the tgid. Call warning when failing to
5949 attach to an lwp.
5950 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5951 argument. Remove "initial" parameter. Return int instead of
5952 void. Don't error or warn here.
5953 (linux_attach_fail_reason_string): New declaration.
5954 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5955 interface change. Use linux_attach_fail_reason_string.
5956
5957 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5958 Walfred Tedeschi <walfred.tedeschi@intel.com>
5959
5960 * Makefile.in: Added rules to handle new files
5961 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5962 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5963 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5964 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5965 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5966 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5967 x32-avx512-linux.o.
5968 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5969 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5970 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5971 i386/x32-avx512.xml.
5972 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5973 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5974 i386/x32-avx512-linux.xml.
5975 * i387-fp.c (num_avx512_k_registers): New constant for number
5976 of K registers.
5977 (num_avx512_zmmh_low_registers): New constant for number of
5978 lower ZMM registers (0-15).
5979 (num_avx512_zmmh_high_registers): New constant for number of
5980 higher ZMM registers (16-31).
5981 (num_avx512_ymmh_registers): New contant for number of higher
5982 YMM registers (ymm16-31 added by avx521 on x86_64).
5983 (num_avx512_xmm_registers): New constant for number of higher
5984 XMM registers (xmm16-31 added by AVX512 on x86_64).
5985 (struct i387_xsave): Add space for AVX512 registers.
5986 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5987 Add code to handle AVX512 registers.
5988 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5989 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5990 prototypei from generated file.
5991 (tdesc_amd64_avx512_linux): Likewise.
5992 (init_registers_x32_avx512_linux): Likewise.
5993 (tdesc_x32_avx512_linux): Likewise.
5994 (init_registers_i386_avx512_linux): Likewise.
5995 (tdesc_i386_avx512_linux): Likewise.
5996 (x86_64_regmap): Add AVX512 registers.
5997 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5998 mask.
5999 (initialize_low_arch): Add code to initialize AVX512 registers.
6000
6001 2014-04-23 Pedro Alves <palves@redhat.com>
6002
6003 * mem-break.c (find_gdb_breakpoint_at): Make static.
6004 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6005
6006 2014-04-23 Pedro Alves <palves@redhat.com>
6007
6008 * i386-low.c: Don't include break-common.h here.
6009 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6010 prototype to take target_hw_bp_type as argument instead of a Z
6011 packet char.
6012 * i386-low.h: Include break-common.h here.
6013 (Z_packet_to_hw_type): Declare.
6014 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6015 prototypes.
6016 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6017 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6018 (x86_remove_point): Convert the packet number to a
6019 target_hw_bp_type before calling i386_low_remove_watchpoint.
6020 * win32-i386-low.c (i386_insert_point): Convert the packet number
6021 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6022 (i386_remove_point): Convert the packet number to a
6023 target_hw_bp_type before calling i386_low_remove_watchpoint.
6024
6025 2014-04-23 Pedro Alves <palves@redhat.com>
6026
6027 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6028
6029 2014-04-10 Pedro Alves <palves@redhat.com>
6030
6031 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6032 Check if the condition or command is NULL before checking if the
6033 breakpoint is known. On success, return true.
6034 * mem-break.h (add_breakpoint_condition): Document return.
6035 (add_breakpoint_commands): Add describing comment.
6036 * server.c (skip_to_semicolon): New function.
6037 (process_point_options): Use it.
6038
6039 2014-04-09 Pedro Alves <palves@redhat.com>
6040
6041 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6042 to lwpid_of.
6043
6044 2014-02-27 Pedro Alves <palves@redhat.com>
6045
6046 PR 12702
6047 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6048 macros.
6049 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6050 output.
6051 (last_thread_of_process_p): Take a PID argument instead of a
6052 thread pointer.
6053 (linux_wait_for_lwp): Delete.
6054 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6055 functions.
6056 (linux_low_filter_event): New function, party factored out from
6057 linux_wait_for_event.
6058 (linux_wait_for_event): Rename to ...
6059 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6060 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6061 sigsuspend. Check for zombie leaders.
6062 (linux_wait_for_event): Reimplement as wrapper around
6063 linux_wait_for_event_filtered.
6064 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6065 a normal or signal exit is seen, it's the whole process exiting.
6066 (wait_for_sigstop): No longer a for_each_inferior callback.
6067 Rewrite on top of linux_wait_for_event_filtered.
6068 (stop_all_lwps): Call wait_for_sigstop directly.
6069 * server.c (resume, handle_target_event): Handle
6070 TARGET_WAITKIND_NO_RESUMED.
6071
6072 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6073
6074 * win32-low.c (psapi_get_dll_name,
6075 * win32_CreateToolhelp32Snapshot): Delete.
6076 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6077 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6078 Delete.
6079 (handle_load_dll): Add function description.
6080 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6081
6082 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6083
6084 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6085 Add comment.
6086 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6087 base address when calling win32_add_one_solib.
6088 (handle_load_dll): Delete local variable load_addr.
6089 Remove 0x1000 offset applied to DLL base address when calling
6090 win32_add_one_solib.
6091 (handle_unload_dll): Add comment.
6092
6093 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6094
6095 * win32-low.c (win32_add_all_dlls): Renames
6096 win32_ensure_ntdll_loaded. Rewrite function documentation.
6097 Adjust implementation to always load all DLLs.
6098 Add 0x1000 offset to DLL base address when calling
6099 win32_add_one_solib.
6100 (child_initialization_done): New static global.
6101 (do_initial_child_stuff): Set child_initialization_done to
6102 zero during child initialization, and 1 after. Replace call
6103 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6104 Add comment.
6105 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6106 (handle_unload_dll): Add function documentation.
6107 (get_child_debug_event): Ignore load and unload DLL events
6108 during child initialization.
6109
6110 2014-02-20 Doug Evans <dje@google.com>
6111
6112 Remove global all_lwps.
6113 * inferiors.h (ptid_of): Move here from linux-low.h.
6114 (pid_of, lwpid_of): Ditto.
6115 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6116 parameter is a struct thread_info * now.
6117 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6118 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6119 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6120 directly.
6121 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6122 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6123 * linux-arm-low.c (update_registers_callback): Update, "entry"
6124 parameter is a struct thread_info * now.
6125 Fetch lwpid from current_inferior directly.
6126 (arm_insert_point): Pass &all_threads to find_inferior instead of
6127 &all_lwps.
6128 (arm_remove_point): Ditto.
6129 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6130 (arm_prepare_to_resume): Fetch pid from thread.
6131 (arm_read_description): Fetch lwpid from current_inferior directly.
6132 * linux-low.c (all_lwps): Delete.
6133 (delete_lwp): Delete call to remove_inferior.
6134 (handle_extended_wait): Fetch lwpid from thread.
6135 (add_lwp): Don't set lwp->entry.id. Remove call to
6136 add_inferior_to_list.
6137 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6138 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6139 (kill_one_lwp_callback): Ditto.
6140 (linux_kill): Don't dereference NULL pointer.
6141 Fetch ptid,lwpid from thread.
6142 (get_detach_signal): Fetch ptid from thread.
6143 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6144 Simplify call to regcache_invalidate_thread.
6145 (delete_lwp_callback): Update, "entry" parameter is a
6146 struct thread_info * now. Fetch pid from thread.
6147 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6148 (status_pending_p_callback): Update, "entry" parameter is a
6149 struct thread_info * now. Fetch ptid from thread.
6150 (find_lwp_pid): Update, "entry" parameter is a
6151 struct thread_info * now.
6152 (linux_wait_for_lwp): Fetch pid from thread.
6153 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6154 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6155 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6156 (dequeue_one_deferred_signal): Ditto.
6157 (cancel_breakpoint): Fetch ptid from current_inferior.
6158 (linux_wait_for_event): Pass &all_threads to find_inferior,
6159 not &all_lwps. Fetch ptid, lwpid from thread.
6160 (count_events_callback): Update, "entry" parameter is a
6161 struct thread_info * now.
6162 (select_singlestep_lwp_callback): Ditto.
6163 (select_event_lwp_callback): Ditto.
6164 (cancel_breakpoints_callback): Ditto.
6165 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6166 not &all_lwps.
6167 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6168 (unsuspend_one_lwp): Update, "entry" parameter is a
6169 struct thread_info * now.
6170 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6171 not &all_lwps.
6172 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6173 Fetch lwpid from thread, not lwp.
6174 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6175 Pass &all_threads to find_inferior, not &all_lwps.
6176 (send_sigstop): Fetch lwpid from thread, not lwp.
6177 (send_sigstop_callback): Update, "entry" parameter is a
6178 struct thread_info * now.
6179 (suspend_and_send_sigstop_callback): Ditto.
6180 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6181 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6182 struct thread_info * now.
6183 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6184 from thread, lwp.
6185 (lwp_running): Update, "entry" parameter is a
6186 struct thread_info * now.
6187 (stop_all_lwps): Fetch ptid from thread.
6188 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6189 (linux_resume_one_lwp): Fetch lwpid from thread.
6190 (linux_set_resume_request): Update, "entry" parameter is a
6191 struct thread_info * now. Fetch pid, lwpid from thread.
6192 (resume_status_pending_p): Update, "entry" parameter is a
6193 struct thread_info * now.
6194 (need_step_over_p): Ditto. Fetch lwpid from thread.
6195 (start_step_over): Fetch lwpid from thread.
6196 (linux_resume_one_thread): Update, "entry" parameter is a
6197 struct thread_info * now. Fetch lwpid from thread.
6198 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6199 (proceed_one_lwp): Update, "entry" parameter is a
6200 struct thread_info * now. Fetch lwpid from thread.
6201 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6202 struct thread_info * now.
6203 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6204 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6205 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6206 directly.
6207 (regsets_store_inferior_registers): Ditto.
6208 (fetch_register, store_register): Ditto.
6209 (linux_read_memory, linux_write_memory): Ditto.
6210 (linux_request_interrupt): Ditto.
6211 (linux_read_auxv): Ditto.
6212 (linux_xfer_siginfo): Ditto.
6213 (linux_qxfer_spu): Ditto.
6214 (linux_qxfer_libraries_svr4): Ditto.
6215 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6216 moved to inferiors.h.
6217 (get_lwp): Delete.
6218 (get_thread_lwp): Update.
6219 (struct lwp_info): Delete member "entry". Simplify comment for
6220 member "thread".
6221 (all_lwps): Delete.
6222 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6223 current_inferior directly.
6224 (update_watch_registers_callback): Update, "entry" parameter is a
6225 struct thread_info * now. Fetch pid from thread.
6226 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6227 (mips_insert_point): Fetch lwpid from current_inferior.
6228 Pass &all_threads to find_inferior, not &all_lwps.
6229 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6230 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6231 directly.
6232 (mips_stopped_data_address): Ditto.
6233 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6234 directly.
6235 * linux-tile-low.c (tile_arch_setup): Ditto.
6236 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6237 (update_debug_registers_callback): Update, "entry" parameter is a
6238 struct thread_info * now. Fetch pid from thread.
6239 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6240 Pass &all_threads to find_inferior, not &all_lwps.
6241 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6242 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6243 Pass &all_threads to find_inferior, not &all_lwps.
6244 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6245 (i386_dr_low_get_status): Ditto.
6246 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6247 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6248 (x86_linux_read_description): Ditto.
6249 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6250
6251 2014-02-20 Doug Evans <dje@google.com>
6252
6253 * inferiors.c (get_first_inferior): Fix buglet.
6254
6255 2014-02-19 Doug Evans <dje@google.com>
6256
6257 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6258 * inferiors.c (add_thread): Change result type to struct thread_info *.
6259 All callers updated.
6260 (add_lwp): Call add_thread here instead of in callers.
6261 All callers updated.
6262 * linux-low.h (get_lwp_thread): Rewrite.
6263 (struct lwp_info): New member "thread".
6264
6265 2014-02-19 Doug Evans <dje@google.com>
6266
6267 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6268 All callers updated.
6269
6270 2014-02-19 Doug Evans <dje@google.com>
6271
6272 * inferiors.c (add_thread): Fix whitespace.
6273
6274 2014-02-19 Doug Evans <dje@google.com>
6275
6276 * dll.c (clear_dlls): Replace accessing list implemention details
6277 with API function.
6278 * gdbthread.h (get_first_thread): Declare.
6279 * inferiors.c (for_each_inferior_with_data): New function.
6280 (get_first_thread): New function.
6281 (find_thread_ptid): Simplify.
6282 (get_first_inferior): New function.
6283 (clear_list): Delete.
6284 (one_inferior_p): New function.
6285 (clear_inferior_list): New function.
6286 (clear_inferiors): Update.
6287 * inferiors.h (for_each_inferior_with_data): Declare.
6288 (clear_inferior_list): Declare.
6289 (one_inferior_p): Declare.
6290 (get_first_inferior): Declare.
6291 * linux-low.c (linux_wait_for_event): Replace accessing list
6292 implemention details with API function.
6293 * server.c (target_running): Ditto.
6294 (accumulate_file_name_length): New function.
6295 (emit_dll_description): New function.
6296 (handle_qxfer_libraries): Replace accessing list implemention
6297 details with API function.
6298 (handle_qxfer_threads_worker): New function.
6299 (handle_qxfer_threads_proper): Replace accessing list implemention
6300 details with API function.
6301 (handle_query): Ditto.
6302 (visit_actioned_threads_callback_ftype): New typedef.
6303 (visit_actioned_threads_data): New struct.
6304 (visit_actioned_threads): Rewrite to be find_inferior callback.
6305 (resume): Call find_inferior.
6306 (handle_status): Replace accessing list implemention
6307 details with API function.
6308 (process_serial_event): Replace accessing list implemention details
6309 with API function.
6310 * target.c (set_desired_inferior): Replace accessing list implemention
6311 details with API function.
6312 * tracepoint.c (same_process_p): New function.
6313 (gdb_agent_about_to_close): Replace accessing list implemention
6314 details with API function.
6315 * win32-low.c (child_delete_thread): Replace accessing list
6316 implemention details with API function.
6317 (match_dll_by_basename): New function.
6318 (dll_is_loaded_by_basename): New function.
6319 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6320 details call to dll_is_loaded_by_basename.
6321
6322 2014-02-19 Doug Evans <dje@google.com>
6323
6324 * dll.h (struct dll_info): Add comment.
6325 * gdbthread.h (struct thread_info): Add comment.
6326 (current_ptid): Simplify.
6327 * inferiors.c (add_process): Update.
6328 (remove_process): Update.
6329 * inferiors.h (struct process_info): Rename member "head" to "entry".
6330 * linux-low.c (delete_lwp): Update.
6331 (add_lwp): Update.
6332 (last_thread_of_process_p): Update.
6333 (kill_one_lwp_callback, linux_kill): Update.
6334 (status_pending_p_callback): Update.
6335 (wait_for_sigstop): Update. Simplify read of ptid.
6336 (start_step_over): Update.
6337 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6338 (get_lwp_thread): Update.
6339 (struct lwp_info): Rename member "head" to "entry".
6340 * regcache.h (inferior_list_entry): Delete.
6341 * server.c (kill_inferior_callback): Update.
6342 (detach_or_kill_inferior_callback): Update.
6343 (print_started_pid): Update.
6344 (print_attached_pid): Update.
6345 (process_serial_event): Simplify read of ptid.
6346 * thread-db.c (thread_db_create_event): Update.
6347 (thread_db_get_tls_address): Update.
6348 * win32-low.c (current_inferior_ptid): Simplify.
6349
6350 2014-02-19 Tom Tromey <tromey@redhat.com>
6351
6352 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6353 argument.
6354 (target_supports_btrace): Update.
6355
6356 2014-02-14 Yao Qi <yao@codesourcery.com>
6357
6358 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6359 (rsp-low-ipa.o): New target.
6360
6361 2014-02-12 Tom Tromey <tromey@redhat.com>
6362
6363 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6364 convert_ascii_to_int.
6365 * regcache.c (registers_to_string): Likewise.
6366 * remote-utils.c (decode_M_packet): Likewise.
6367 * server.c (process_serial_event): Likewise.
6368
6369 2014-02-12 Tom Tromey <tromey@redhat.com>
6370
6371 * server.c (handle_query, handle_v_run): Use hex2bin, not
6372 unhexify.
6373 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6374
6375 2014-02-12 Tom Tromey <tromey@redhat.com>
6376
6377 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6378 convert_int_to_ascii.
6379 * regcache.c (registers_to_string, collect_register_as_string):
6380 Likewise.
6381 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6382 Likewise.
6383 * server.c (process_serial_event): Likewise.
6384 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6385 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6386
6387 2014-02-12 Tom Tromey <tromey@redhat.com>
6388
6389 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6390 bin2hex, not hexify.
6391 * tracepoint.c (cmd_qtstatus): Likewise.
6392
6393 2014-02-12 Tom Tromey <tromey@redhat.com>
6394
6395 * remote-utils.c (monitor_output): Pass explicit length to
6396 hexify.
6397
6398 2014-02-12 Tom Tromey <tromey@redhat.com>
6399
6400 * tracepoint.c: Include rsp-low.h.
6401 * server.c: Include rsp-low.h.
6402 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6403 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6404 declare.
6405 * remote-utils.c: Include rsp-low.h.
6406 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6407 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6408 (convert_int_to_ascii, convert_ascii_to_int): Move to
6409 common/rsp-low.c.
6410 * regcache.c: Include rsp-low.h.
6411 * ax.c: Include rsp-low.h.
6412 * Makefile.in (SFILES): Add common/rsp-low.c.
6413 (OBS): Add rsp-low.o.
6414 (rsp-low.o): New target.
6415
6416 2014-02-12 Tom Tromey <tromey@redhat.com>
6417
6418 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6419 Include print-utils.h.
6420 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6421 (plongest, thirty_two, phex_nz): Remove.
6422 * Makefile.in (SFILES): Add common/print-utils.c.
6423 (OBS): Add print-utils.o.
6424 (print-utils-ipa.o): New target.
6425 (print-utils.o): New target.
6426 (IPA_OBJS): Add print-utils-ipa.o.
6427
6428 2014-02-06 Tom Tromey <tromey@redhat.com>
6429
6430 * Makefile.in (SFILES): Fix indentation.
6431
6432 2014-02-05 Doug Evans <dje@google.com>
6433
6434 * linux-low.c (linux_wait_for_event): Improve comment.
6435 (linux_wait_1): Keep current_inferior in sync with event_child.
6436
6437 2014-01-22 Doug Evans <dje@google.com>
6438
6439 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6440
6441 2014-01-22 Doug Evans <dje@google.com>
6442
6443 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6444 * configure: Regenerate.
6445 * config.in: Regenerate.
6446 * Makefile.in (SFILES): Add debug.c.
6447 (OBS): Add debug.o.
6448 * debug.c: New file.
6449 * debug.h: New file.
6450 * linux-aarch64-low.c (*): Update all debugging printfs to use
6451 debug_printf instead of fprintf.
6452 * linux-arm-low.c (*): Ditto.
6453 * linux-cris-low.c (*): Ditto.
6454 * linux-crisv32-low.c (*): Ditto.
6455 * linux-m32r-low.c (*): Ditto.
6456 * linux-sparc-low.c (*): Ditto.
6457 * linux-x86.c (*): Ditto.
6458 * linux-low.c (*): Ditto.
6459 (linux_wait_1): Add calls to debug_enter, debug_exit.
6460 (linux_wait): Remove redundant debugging printf.
6461 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6462 (linux_resume, unstop_all_lwps): Ditto.
6463 * mem-break.c (*): Update all debugging printfs to use
6464 debug_printf instead of fprintf.
6465 * remote-utils.c (*): Ditto.
6466 * thread-db.c (*): Ditto.
6467 * server.c #include <ctype.h>, "gdb_vecs.h".
6468 (debug_threads): Moved to debug.c.
6469 (*): Update all debugging printfs to use debug_printf instead of
6470 fprintf.
6471 (start_inferior): Replace call to fflush with call to debug_flush.
6472 (monitor_show_help): Mention set debug-format.
6473 (parse_debug_format_options): New function.
6474 (handle_monitor_command): Handle "monitor set debug-format".
6475 (gdbserver_usage): Mention --debug-format.
6476 (main): Parse --debug-format.
6477 * server.h (debug_threads): Declaration moved to debug.h.
6478 #include "debug.h".
6479 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6480 trace_debug_1 that uses debug_printf.
6481 (tracepoint_look_up_symbols): Update all debugging printfs to use
6482 debug_printf instead of fprintf.
6483
6484 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6485
6486 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6487 sys/ptrace.h.
6488
6489 2014-01-17 Pedro Alves <palves@redhat.com>
6490
6491 PR build/16445
6492 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6493 defined after including gdb_proc_service.h.
6494
6495 2014-01-16 Doug Evans <dje@google.com>
6496
6497 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6498 (match_dll): Use it.
6499
6500 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6501
6502 * target.h (target_ops) <read_btrace>: Change parameters and
6503 return type to allow error reporting.
6504 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6505 trace reading errors on.
6506 * linux-low.c (linux_low_read_btrace): Pass trace reading
6507 errors on.
6508 (linux_low_disable_btrace): New.
6509
6510 2014-01-15 Doug Evans <dje@google.com>
6511
6512 * inferiors.c (thread_id_to_gdb_id): Delete.
6513 * inferiors.h (thread_id_to_gdb_id): Delete.
6514
6515 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6516
6517 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6518 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6519 versions.
6520
6521 2014-01-08 Pedro Alves <palves@redhat.com>
6522
6523 * server.c (handle_status): Don't discard previous queued stop
6524 replies or thread's pending status here.
6525 (main) <disconnection>: Do it here instead.
6526
6527 2014-01-08 Pedro Alves <palves@redhat.com>
6528
6529 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6530 * server.c (visit_actioned_threads, handle_pending_status): New
6531 function.
6532 (handle_v_cont): Factor out parts to ...
6533 (resume): ... this new function. If in all-stop, and a thread
6534 being resumed has a pending status, report it without actually
6535 resuming.
6536 (myresume): Adjust to use the new 'resume' function.
6537 (clear_pending_status_callback, set_pending_status_callback)
6538 (find_status_pending_thread_callback): New functions.
6539 (handle_status): Handle the case of multiple threads having
6540 interesting statuses to report. Report threads' real last signal
6541 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6542 with an interesting thread to report the status for, instead of
6543 always reporting the status of the first thread.
6544
6545 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6546
6547 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6548 * gdbreplay.c (gdbreplay_version): Likewise.
6549
6550 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6551
6552 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6553 iov.iov_len with the real length in use.
6554
6555 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6556
6557 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6558 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6559 for all targets that use win32-low.c.
6560 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6561 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6562
6563 2013-12-13 Pedro Alves <palves@redhat.com>
6564
6565 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6566 if equal to TARGET_WAITKIND_LOADED.
6567 * win32-low.c (cached_status): New static global.
6568 (win32_wait): Add declaration.
6569 (do_initial_child_stuff): Flush all initial pending debug events
6570 up to the initial breakpoint.
6571 (win32_wait): If CACHED_STATUS was set, return that instead
6572 of doing a real wait. Remove the code resuming the execution
6573 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6574 during the initial phase. Also remove the code changing
6575 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6576 TARGET_WAITKIND_STOPPED.
6577
6578 2013-12-11 Yao Qi <yao@codesourcery.com>
6579
6580 * notif.c (handle_notif_ack): Return 0 if no notification
6581 matches.
6582
6583 2013-11-20 Doug Evans <dje@google.com>
6584
6585 * linux-low.c (linux_set_resume_request): Fix comment.
6586
6587 2013-11-20 Doug Evans <dje@google.com>
6588
6589 * linux-low.c (resume_status_pending_p): Tweak comment.
6590
6591 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6592
6593 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6594 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6595 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6596 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6597 (srv_amd64_regobj): Add amd64-mpx.o.
6598 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6599 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6600 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6601 * i387-fp.c (num_pl_bnd_register) Added constant.
6602 (num_pl_bnd_cfg_registers) Added constant.
6603 (struct i387_xsave) Added reserved area and MPX fields.
6604 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6605 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6606 function.
6607 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6608 (init_registers_amd64_mpx_linux): Declare new function.
6609 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6610 (x86_64_regmap): Add MPX registers.
6611 (x86_linux_read_description): Add MPX case.
6612 (initialize_low_arch): Initialize MPX targets.
6613
6614 2013-11-18 Tom Tromey <tromey@redhat.com>
6615
6616 * configure: Rebuild.
6617 * configure.ac: Don't check for stdlib.h.
6618 * gdbreplay.c: Unconditionally include stdlib.h.
6619
6620 2013-11-18 Tom Tromey <tromey@redhat.com>
6621
6622 * config.in: Rebuild.
6623 * configure: Rebuild.
6624 * configure.ac: Don't use AC_HEADER_DIRENT.
6625
6626 2013-11-18 Tom Tromey <tromey@redhat.com>
6627
6628 * server.h: Don't check HAVE_STRING_H.
6629 * gdbreplay.c: Don't check HAVE_STRING_H.
6630 * configure: Rebuild.
6631
6632 2013-11-18 Tom Tromey <tromey@redhat.com>
6633
6634 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6635 LIBGNU.
6636
6637 2013-11-08 Tom Tromey <tromey@redhat.com>
6638
6639 * configure, config.in: Rebuild.
6640 * configure.ac: Remove unused configury.
6641
6642 2013-11-08 Tom Tromey <tromey@redhat.com>
6643
6644 * acinclude.m4: Include common.m4, codeset.m4.
6645 * configure, config.in: Rebuild.
6646 * configure.ac: Use GDB_AC_COMMON.
6647
6648 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6649
6650 * linux-s390-low.c (HWCAP_S390_TE): New define.
6651 (s390_arch_setup): Consider the TE field in the HWCAP for
6652 determining 'have_regset_tdb'.
6653
6654 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6655
6656 PR gdb/16014
6657 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6658 call to sizeof.
6659
6660 2013-10-02 Pedro Alves <palves@redhat.com>
6661
6662 * server.c (process_serial_event): Don't output "GDBserver
6663 exiting" if GDB is connected through stdio.
6664 * target.c (mywait): Likewise, be silent if GDB is connected
6665 through stdio.
6666
6667 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6668
6669 * lynx-low.c (lynx_add_threads_after_attach): New function.
6670 (lynx_attach): Remove call to add_thread. Add call to
6671 lynx_add_threads_after_attach instead.
6672
6673 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6674
6675 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6676 * config.in, configure: Regenerated.
6677
6678 2013-09-18 Yao Qi <yao@codesourcery.com>
6679
6680 PR server/15959
6681 * server.c (start_inferior): Clear 'resume_info'.
6682
6683 2013-09-16 Jiong Wang <jiwang@tilera.com>
6684
6685 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6686 for each register.
6687
6688 2013-09-16 Jiong Wang <jiwang@tilera.com>
6689
6690 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6691 linux-tile-low.o to srv_tgtobj.
6692
6693 2013-09-16 Will Newton <will.newton@linaro.org>
6694
6695 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6696 out regs.
6697
6698 2013-09-06 Pedro Alves <palves@redhat.com>
6699
6700 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6701 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6702 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6703 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6704 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6705 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6706
6707 2013-09-06 Pedro Alves <palves@redhat.com>
6708
6709 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6710 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6711
6712 2013-09-06 Pedro Alves <palves@redhat.com>
6713
6714 * linux-amd64-ipa.c: Include tracepoint.h.
6715 * linux-i386-ipa.c: Include tracepoint.h.
6716
6717 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6718
6719 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6720 (ps_get_thread_area): New function.
6721
6722 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6723
6724 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6725 (initialize_low_arch): Call init_registers_crisv32 rather than
6726 init_register_crisv32.
6727
6728 2013-09-05 Pedro Alves <palves@redhat.com>
6729
6730 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6731 to ...
6732 * hostio.h: ... this new file.
6733 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6734 win32-low.c: Include hostio.h.
6735
6736 2013-09-05 Pedro Alves <palves@redhat.com>
6737
6738 * server.h (gdb_client_data, handler_func, callback_handler_func)
6739 (delete_file_handler, add_file_handler, append_callback_event)
6740 (delete_callback_event, start_event_loop, initialize_event_loop):
6741 Move to event-loop.h and include it.
6742 * event-loop.h: New file.
6743
6744 2013-09-05 Pedro Alves <palves@redhat.com>
6745
6746 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6747 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6748 (loaded_dll, unloaded_dll): Move to ...
6749 * dll.h: ... this new file.
6750 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6751
6752 2013-09-05 Pedro Alves <palves@redhat.com>
6753
6754 * server.h (current_process, get_thread_process, all_processes)
6755 (add_inferior_to_list, for_each_inferior, current_inferior)
6756 (remove_inferior, add_process, remove_process, find_process_pid)
6757 (have_started_inferiors_p, have_attached_inferiors_p)
6758 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6759 (clear_inferiors, find_inferior, find_inferior_id)
6760 (inferior_target_data, set_inferior_target_data)
6761 (inferior_regcache_data, set_inferior_regcache_data): Move to
6762 inferiors.h, and include it.
6763 * inferiors.h: New file.
6764
6765 2013-09-05 Pedro Alves <palves@redhat.com>
6766
6767 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6768 Move ...
6769 * ax.h: ... here.
6770
6771 2013-09-05 Pedro Alves <palves@redhat.com>
6772
6773 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6774 tracepoint.h.
6775 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6776 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6777 (handle_tracepoint_general_set, handle_tracepoint_query)
6778 (tracepoint_finished_step, tracepoint_was_hit)
6779 (release_while_stepping_state_list, current_traceframe)
6780 (in_readonly_region, traceframe_read_mem)
6781 (fetch_traceframe_registers, traceframe_read_sdata)
6782 (traceframe_read_info, struct fast_tpoint_collect_status)
6783 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6784 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6785 (supply_fast_tracepoint_registers)
6786 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6787 (ipa_tdesc, claim_trampoline_space)
6788 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6789 (agent_mem_read, agent_get_trace_state_variable_value)
6790 (agent_set_trace_state_variable_value, agent_tsv_read)
6791 (agent_mem_read_string, get_raw_reg_func_addr)
6792 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6793 * tracepoint.h: ... this new file.
6794
6795 2013-09-05 Pedro Alves <palves@redhat.com>
6796
6797 * server.h (perror_with_name, error, fatal, warning, paddress)
6798 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6799 include it.
6800 * utils.h: New file.
6801
6802 2013-09-05 Pedro Alves <palves@redhat.com>
6803
6804 * server.h (remote_debug, noack_mode, transport_is_reliable)
6805 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6806 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6807 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6808 (write_enn, initialize_async_io, enable_async_io)
6809 (disable_async_io, check_remote_input_interrupt_request)
6810 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6811 (dead_thread_notify, prepare_resume_reply)
6812 (decode_address_to_semicolon, decode_address, decode_m_packet)
6813 (decode_M_packet, decode_X_packet, decode_xfer_write)
6814 (decode_search_memory_packet, unhexify, hexify)
6815 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6816 (look_up_one_symbol, relocate_instruction)
6817 (monitor_output): Move to remote-utils.h, and include it.
6818 * remote-utils.h: New file.
6819
6820 2013-09-05 Pedro Alves <palves@redhat.com>
6821
6822 * server.h (_): Delete.
6823
6824 2013-09-02 Pedro Alves <palves@redhat.com>
6825
6826 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6827 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6828 allocated.
6829 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6830
6831 2013-09-02 Pierre Muller <muller@sourceware.org>
6832
6833 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6834 or WriteProcessMemory complete successfully and handle
6835 ERROR_PARTIAL_COPY error.
6836
6837 2013-09-02 Pedro Alves <palves@redhat.com>
6838
6839 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6840 error instead of EIO.
6841
6842 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6843
6844 PR server/15604
6845 * linux-low.c: Include filestuff.h.
6846 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6847 * lynx-low.c: Include filestuff.h.
6848 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6849 * server.c: Include filestuff.h.
6850 (main): Call notice_open_fds.
6851 * spu-low.c: Include filestuff.h.
6852 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6853
6854 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6855
6856 * Makefile.in: Explain why ../target and ../nat are not
6857 listed as include file search paths.
6858 (linux-waitpid.o): New object file rule.
6859 * configure.srv (srv_native_linux_obj): New variable.
6860 Replace all occurrences of linux native object files with
6861 $srv_native_linux_obj.
6862 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6863 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6864 (linux_enable_event_reporting): Remove declaration.
6865 (my_waitpid): Moved to common/linux-waitpid.c.
6866 (linux_wait_for_event): Pass ptid when calling
6867 linux_enable_event_reporting.
6868 (linux_supports_tracefork_flag): Remove.
6869 (linux_enable_event_reporting): Likewise.
6870 (linux_tracefork_grandchild): Remove.
6871 (STACK_SIZE): Moved to common/linux-ptrace.c.
6872 (linux_tracefork_child): Remove.
6873 (linux_test_for_tracefork): Remove.
6874 (linux_look_up_symbols): Call linux_supports_traceclone.
6875 (initialize_low): Remove call to linux_test_for_tracefork.
6876 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6877 common/linux-ptrace.h.
6878 (PTRACE_TYPE_ARG4): Likewise.
6879 Include linux-ptrace.h.
6880
6881 2013-08-21 Pedro Alves <palves@redhat.com>
6882
6883 * config.in: Renegerate.
6884
6885 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6886
6887 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6888 (SFILES): Remove $(srcdir)/common/target-common.c and
6889 add $(srcdir)/target/waitstatus.c.
6890 (OBS): Remove target-common.o and add waitstatus.o.
6891 (server_h): Remove $(srcdir)/../common/target-common.h and
6892 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6893 and $(srcdir)/../target/waitstatus.h.
6894 (target-common.o): Remove.
6895 (waitstatus.o): New target object file.
6896 * target.h: Do not include target-common.h and
6897 include target/resume.h, target/wait.h and
6898 target/waitstatus.h.
6899
6900 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6901
6902 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6903 to PTRACE_TYPE_ARG3.
6904 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6905 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6906 PTRACE_TYPE_ARG4.
6907 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6908 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6909
6910 2013-07-27 Jie Zhang <jie@codesourcery.com>
6911 Daniel Jacobowitz <dan@codesourcery.com>
6912 Yao Qi <yao@codesourcery.com>
6913
6914 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6915 (mips-linux-watch.o): New rule.
6916 (mips_linux_watch_h): New variable.
6917 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6918 srv_tgtobj.
6919 * linux-mips-low.c: Include mips-linux-watch.h.
6920 (struct arch_process_info, struct arch_lwp_info): New.
6921 (update_watch_registers_callback): New function.
6922 (mips_linux_new_process, mips_linux_new_thread) New functions.
6923 (mips_linux_prepare_to_resume, mips_insert_point): New
6924 functions.
6925 (mips_remove_point, mips_stopped_by_watchpoint): New
6926 functions.
6927 (rsp_bp_type_to_target_hw_bp_type): New function.
6928 (mips_stopped_data_address): New function.
6929 (the_low_target): Add watchpoint support functions.
6930
6931 2013-07-27 Yao Qi <yao@codesourcery.com>
6932
6933 * i386-low.c: Include break-common.h.
6934 (enum target_hw_bp_type): Remove.
6935
6936 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6937
6938 * Makefile.in (SFILES): /common/target-common.c.
6939 (OBS): Add target-common.o.
6940 (server_h): Add $(srcdir)/../common/target-common.h.
6941 (target-common.o): New target.
6942 * server.c (queue_stop_reply_callback): Free
6943 status string after use.
6944 * target.c (target_waitstatus_to_string): Remove.
6945 * target.h: Include target-common.h.
6946 (resume_kind): Likewise.
6947 (target_waitkind): Likewise.
6948 (target_waitstatus): Likewise.
6949 (TARGET_WNOHANG): Likewise.
6950
6951 2013-07-04 Yao Qi <yao@codesourcery.com>
6952
6953 * Makefile.in (host_alias): Use @host_noncanonical@.
6954 (target_alias): Use @target_noncanonical@.
6955 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6956 ACX_NONCANONICAL_HOST.
6957 * configure: Regenerated.
6958
6959 Revert:
6960 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6961
6962 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6963 * configure: Rebuild.
6964 * Makefile.in (version_host, version_target): Get from configure.
6965 (version.c): Use $(version_host) and $(version_target).
6966
6967 2013-07-03 Pedro Alves <palves@redhat.com>
6968
6969 * Makefile.in (config.status): Depend on development.sh.
6970 * acinclude.m4: Include libmcheck.m4.
6971 * configure: Regenerate.
6972
6973 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6974
6975 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6976 attribute inside the parentheses.
6977 (winapi_DebugSetProcessKillOnExit): Ditto.
6978 (winapi_DebugBreakProcess): Ditto.
6979 (winapi_GenerateConsoleCtrlEvent): Ditto.
6980
6981 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6982
6983 * notif.h (notif_event): Add a dummy member to avoid compiler
6984 errors.
6985
6986 2013-07-01 Pedro Alves <palves@redhat.com>
6987
6988 * hostio.c (HOSTIO_PATH_MAX): Define.
6989 (require_filename, handle_open, handle_unlink, handle_readlink):
6990 Use it.
6991
6992 2013-07-01 Pedro Alves <palves@redhat.com>
6993
6994 * server.h: Include "pathmax.h".
6995 * linux-low.c: Don't include sys/param.h.
6996 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6997 MAXPATHLEN.
6998 * win32-low.c: Don't include sys/param.h.
6999 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7000
7001 2013-07-01 Pedro Alves <palves@redhat.com>
7002
7003 * event-loop.c: Don't check HAVE_UNISTD_H before including
7004 <unistd.h>.
7005 * gdbreplay.c: Likewise.
7006 * remote-utils.c: Likewise.
7007 * server.c: Likewise.
7008 * configure.ac: Don't check for unistd.h.
7009 * configure: Regenerate.
7010
7011 2013-06-28 Tom Tromey <tromey@redhat.com>
7012
7013 * Makefile.in (version.c): Use version.in, not
7014 common/version.in.
7015
7016 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7017
7018 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7019 * configure: Rebuild.
7020 * Makefile.in (version_host, version_target): Get from configure.
7021 (version.c): Use $(version_host) and $(version_target).
7022
7023 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7024
7025 Fix trace-status to output user name without trailing colon.
7026 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7027
7028 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7029
7030 Fix trace-status to output proper start-time and stop-time.
7031 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7032 output start time and stop time in hex as gdb expects.
7033
7034 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7035
7036 * tracepoint.c (build_traceframe_info_xml): Output trace state
7037 variables present in the trace buffer.
7038
7039 2013-06-24 Tom Tromey <tromey@redhat.com>
7040
7041 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7042 create-version.sh.
7043 (version.o): Remove.
7044 * gdbreplay.c: Include version.h.
7045 (version, host_name): Don't declare.
7046 * server.h: Include version.h.
7047 (version, host_name): Don't declare.
7048
7049 2013-06-12 Pedro Alves <palves@redhat.com>
7050
7051 * linux-x86-low.c (linux_is_elf64): Delete global.
7052 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7053 with local linux_pid_exe_is_elf_64_file use.
7054
7055 2013-06-11 Pedro Alves <palves@redhat.com>
7056
7057 * linux-low.c (regset_disabled, disable_regset): New functions.
7058 (regsets_fetch_inferior_registers)
7059 (regsets_store_inferior_registers): Use them.
7060 (initialize_regsets_info); Don't allocate the disabled_regsets
7061 array here.
7062 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7063 comment.
7064
7065 2013-06-11 Pedro Alves <palves@redhat.com>
7066
7067 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7068 xmalloc.
7069
7070 2013-06-11 Pedro Alves <palves@redhat.com>
7071
7072 * linux-x86-low.c (initialize_low_arch): Call
7073 init_registers_x32_avx_linux.
7074
7075 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7076
7077 Fix compatibility with Android Bionic.
7078 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7079 it is not empty.
7080
7081 2013-06-07 Pedro Alves <palves@redhat.com>
7082
7083 PR server/14823
7084 * Makefile.in (OBS): Add tdesc.o.
7085 (IPA_OBJS): Add tdesc-ipa.o.
7086 (tdesc-ipa.o): New rule.
7087 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7088 interface.
7089 * linux-low.c (new_inferior): Delete.
7090 (disabled_regsets, num_regsets): Delete.
7091 (linux_add_process): Adjust to set the new per-process
7092 new_inferior flag.
7093 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7094 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7095 was a stop. When calling arch_setup, switch the current inferior
7096 to the thread that got an event.
7097 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7098 (regsets_fetch_inferior_registers)
7099 (regsets_store_inferior_registers): New regsets_info parameter.
7100 Adjust to use it.
7101 (linux_register_in_regsets): New regs_info parameter. Adjust to
7102 use it.
7103 (register_addr, fetch_register, store_register): New usrregs_info
7104 parameter. Adjust to use it.
7105 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7106 parameter regs_info. Adjust to use it.
7107 (linux_fetch_registers): Get the current inferior's regs_info, and
7108 adjust to use it.
7109 (linux_store_registers): Ditto.
7110 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7111 (initialize_low): Don't initialize the target_regsets here. Call
7112 initialize_low_arch.
7113 * linux-low.h (target_regsets): Delete declaration.
7114 (struct regsets_info): New.
7115 (struct usrregs_info): New.
7116 (struct regs_info): New.
7117 (struct process_info_private) <new_inferior>: New field.
7118 (struct linux_target_ops): Delete the num_regs, regmap, and
7119 regset_bitmap fields. New field regs_info.
7120 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7121 * i387-fp.c (num_xmm_registers): Delete.
7122 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7123 calls to new interface.
7124 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7125 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7126 Infer the number of xmm registers from the regcache's target
7127 description.
7128 * i387-fp.h (num_xmm_registers): Delete.
7129 * inferiors.c (add_thread): Don't install the thread's regcache
7130 here.
7131 * proc-service.c (gregset_info): Fetch the current inferior's
7132 regs_info. Adjust to use it.
7133 * regcache.c: Include tdesc.h.
7134 (register_bytes, reg_defs, num_registers)
7135 (gdbserver_expedite_regs): Delete.
7136 (get_thread_regcache): If the thread doesn't have a regcache yet,
7137 create one, instead of aborting gdbserver.
7138 (regcache_invalidate_one): Rename to ...
7139 (regcache_invalidate_thread): ... this.
7140 (regcache_invalidate_one): New.
7141 (regcache_invalidate): Only invalidate registers of the current
7142 process.
7143 (init_register_cache): Add target_desc parameter, and use it.
7144 (new_register_cache): Ditto. Assert the target description has a
7145 non zero registers_size.
7146 (regcache_cpy): Add assertions. Adjust.
7147 (realloc_register_cache, set_register_cache): Delete.
7148 (registers_to_string, registers_from_string): Adjust.
7149 (find_register_by_name, find_regno, find_register_by_number)
7150 (register_cache_size): Add target_desc parameter, and use it.
7151 (free_register_cache_thread, free_register_cache_thread_one)
7152 (regcache_release, register_cache_size): New.
7153 (register_size): Add target_desc parameter, and use it.
7154 (register_data, supply_register, supply_register_zeroed)
7155 (supply_regblock, supply_register_by_name, collect_register)
7156 (collect_register_as_string, collect_register_by_name): Adjust.
7157 * regcache.h (struct target_desc): Forward declare.
7158 (struct regcache) <tdesc>: New field.
7159 (init_register_cache, new_register_cache): Add target_desc
7160 parameter.
7161 (regcache_invalidate_thread): Declare.
7162 (regcache_invalidate_one): Delete declaration.
7163 (regcache_release): Declare.
7164 (find_register_by_number, register_cache_size, register_size)
7165 (find_regno): Add target_desc parameter.
7166 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7167 declarations.
7168 * remote-utils.c: Include tdesc.h.
7169 (outreg, prepare_resume_reply): Adjust.
7170 * server.c: Include tdesc.h.
7171 (gdbserver_xmltarget): Delete declaration.
7172 (get_features_xml, process_serial_event): Adjust.
7173 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7174 declare.
7175 (struct process_info) <tdesc>: New field.
7176 (ipa_tdesc): Declare.
7177 * tdesc.c: New file.
7178 * tdesc.h: New file.
7179 * tracepoint.c: Include tdesc.h.
7180 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7181 (get_context_regcache): Adjust to pass ipa_tdesc down.
7182 (do_action_at_tracepoint): Adjust to get the register cache size
7183 from the context regcache's description.
7184 (traceframe_walk_blocks): Adjust to get the register cache size
7185 from the current trace frame's description.
7186 (traceframe_get_pc): Adjust to get current trace frame's
7187 description and pass it down.
7188 (gdb_collect): Adjust to get the register cache size from the
7189 IPA's description.
7190 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7191 (gdbserver_xmltarget): Delete.
7192 (initialize_low_tracepoint): Set the ipa's target description.
7193 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7194 (initialize_low_tracepoint): Set the ipa's target description.
7195 * linux-x86-low.c: Include tdesc.h.
7196 [__x86_64__] (is_64bit_tdesc): New.
7197 (ps_get_thread_area, x86_get_thread_area): Use it.
7198 (i386_cannot_store_register): Rename to ...
7199 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7200 (i386_cannot_fetch_register): Rename to ...
7201 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7202 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7203 to new interface.
7204 (target_regsets): Rename to ...
7205 (x86_regsets): ... this.
7206 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7207 interface.
7208 (x86_siginfo_fixup): Use is_64bit_tdesc.
7209 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7210 (tdesc_x32_avx_linux, tdesc_x32_linux)
7211 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7212 Declare.
7213 (x86_linux_update_xmltarget): Delete.
7214 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7215 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7216 (AMD64_LINUX_USER64_CS): New.
7217 (x86_linux_read_description): New, based on
7218 x86_linux_update_xmltarget.
7219 (same_process_callback): New.
7220 (x86_arch_setup_process_callback): New.
7221 (x86_linux_update_xmltarget): New.
7222 (x86_regsets_info): New.
7223 (amd64_linux_regs_info): New.
7224 (i386_linux_usrregs_info): New.
7225 (i386_linux_regs_info): New.
7226 (x86_linux_regs_info): New.
7227 (x86_arch_setup): Reimplement.
7228 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7229 (x86_emit_ops): Ditto.
7230 (the_low_target): Adjust. Install x86_linux_regs_info,
7231 x86_cannot_fetch_register, and x86_cannot_store_register.
7232 (initialize_low_arch): New.
7233 * linux-ia64-low.c (tdesc_ia64): Declare.
7234 (ia64_fetch_register): Adjust.
7235 (ia64_usrregs_info, regs_info): New globals.
7236 (ia64_regs_info): New function.
7237 (the_low_target): Adjust.
7238 (initialize_low_arch): New function.
7239 * linux-sparc-low.c (tdesc_sparc64): Declare.
7240 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7241 Adjust.
7242 (sparc_arch_setup): New function.
7243 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7244 (the_low_target): Adjust.
7245 (initialize_low_arch): New function.
7246 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7247 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7248 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7249 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7250 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7251 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7252 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7253 (tdesc_powerpc_isa205_vsx64l): Declare.
7254 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7255 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7256 (ppc_set_pc, ppc_get_hwcap): Adjust.
7257 (ppc_usrregs_info): Forward declare.
7258 (!__powerpc64__) ppc_regmap_adjusted: New global.
7259 (ppc_arch_setup): Adjust to the current process'es target
7260 description.
7261 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7262 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7263 (ppc_store_evrregset): Adjust.
7264 (target_regsets): Rename to ...
7265 (ppc_regsets): ... this, and make static.
7266 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7267 (ppc_regs_info): New function.
7268 (the_low_target): Adjust.
7269 (initialize_low_arch): New function.
7270 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7271 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7272 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7273 (tdesc_s390x_linux64v2): Declare.
7274 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7275 (s390_fill_gregset, s390_store_last_break): Adjust.
7276 (target_regsets): Rename to ...
7277 (s390_regsets): ... this, and make static.
7278 (s390_get_pc, s390_set_pc): Adjust.
7279 (s390_get_hwcap): New target_desc parameter, and use it.
7280 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7281 (s390_arch_setup): Adjust to set the current process'es target
7282 description. Don't adjust the regmap.
7283 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7284 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7285 (regs_info_3264): New globals.
7286 (s390_regs_info): New function.
7287 (the_low_target): Adjust.
7288 (initialize_low_arch): New function.
7289 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7290 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7291 [__mips64] (init_registers_mips_linux)
7292 (init_registers_mips_dsp_linux): Delete defines.
7293 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7294 (have_dsp): New global.
7295 (mips_read_description): New, based on mips_arch_setup.
7296 (mips_arch_setup): Reimplement.
7297 (get_usrregs_info): New function.
7298 (mips_cannot_fetch_register, mips_cannot_store_register)
7299 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7300 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7301 (target_regsets): Rename to ...
7302 (mips_regsets): ... this, and make static.
7303 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7304 (dsp_regs_info, regs_info): New globals.
7305 (mips_regs_info): New function.
7306 (the_low_target): Adjust.
7307 (initialize_low_arch): New function.
7308 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7309 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7310 Declare.
7311 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7312 (arm_read_description): New, with bits factored from
7313 arm_arch_setup.
7314 (arm_arch_setup): Reimplement.
7315 (target_regsets): Rename to ...
7316 (arm_regsets): ... this, and make static.
7317 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7318 (arm_regs_info): New function.
7319 (the_low_target): Adjust.
7320 (initialize_low_arch): New function.
7321 * linux-m68k-low.c (tdesc_m68k): Declare.
7322 (target_regsets): Rename to ...
7323 (m68k_regsets): ... this, and make static.
7324 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7325 (m68k_regs_info): New function.
7326 (m68k_arch_setup): New function.
7327 (the_low_target): Adjust.
7328 (initialize_low_arch): New function.
7329 * linux-sh-low.c (tdesc_sharch): Declare.
7330 (target_regsets): Rename to ...
7331 (sh_regsets): ... this, and make static.
7332 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7333 (sh_regs_info, sh_arch_setup): New functions.
7334 (the_low_target): Adjust.
7335 (initialize_low_arch): New function.
7336 * linux-bfin-low.c (tdesc_bfin): Declare.
7337 (bfin_arch_setup): New function.
7338 (bfin_usrregs_info, regs_info): New globals.
7339 (bfin_regs_info): New function.
7340 (the_low_target): Adjust.
7341 (initialize_low_arch): New function.
7342 * linux-cris-low.c (tdesc_cris): Declare.
7343 (cris_arch_setup): New function.
7344 (cris_usrregs_info, regs_info): New globals.
7345 (cris_regs_info): New function.
7346 (the_low_target): Adjust.
7347 (initialize_low_arch): New function.
7348 * linux-cris-low.c (tdesc_crisv32): Declare.
7349 (cris_arch_setup): New function.
7350 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7351 (cris_regs_info): New function.
7352 (the_low_target): Adjust.
7353 (initialize_low_arch): New function.
7354 * linux-m32r-low.c (tdesc_m32r): Declare.
7355 (m32r_arch_setup): New function.
7356 (m32r_usrregs_info, regs_info): New globals.
7357 (m32r_regs_info): Adjust.
7358 (initialize_low_arch): New function.
7359 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7360 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7361 (tic6x_usrregs_info): Forward declare.
7362 (tic6x_read_description): New function, based on ...
7363 (tic6x_arch_setup): ... this. Reimplement.
7364 (target_regsets): Rename to ...
7365 (tic6x_regsets): ... this, and make static.
7366 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7367 (tic6x_regs_info): New function.
7368 (the_low_target): Adjust.
7369 (initialize_low_arch): New function.
7370 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7371 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7372 (target_regsets): Rename to ...
7373 (xtensa_regsets): ... this, and make static.
7374 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7375 globals.
7376 (xtensa_arch_setup, xtensa_regs_info): New functions.
7377 (the_low_target): Adjust.
7378 (initialize_low_arch): New function.
7379 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7380 (nios2_arch_setup): Set the current process'es tdesc.
7381 (target_regsets): Rename to ...
7382 (nios2_regsets): ... this.
7383 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7384 (nios2_regs_info): New function.
7385 (the_low_target): Adjust.
7386 (initialize_low_arch): New function.
7387 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7388 (aarch64_arch_setup): Set the current process'es tdesc.
7389 (target_regsets): Rename to ...
7390 (aarch64_regsets): ... this.
7391 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7392 (aarch64_regs_info): New function.
7393 (the_low_target): Adjust.
7394 (initialize_low_arch): New function.
7395 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7396 globals.
7397 (target_regsets): Rename to ...
7398 (tile_regsets): ... this.
7399 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7400 (tile_regs_info): New function.
7401 (tile_arch_setup): Set the current process'es tdesc.
7402 (the_low_target): Adjust.
7403 (initialize_low_arch): New function.
7404 * spu-low.c (tdesc_spu): Declare.
7405 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7406 * win32-arm-low.c (tdesc_arm): Declare.
7407 (arm_arch_setup): New function.
7408 (the_low_target): Install arm_arch_setup instead of
7409 init_registers_arm.
7410 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7411 (init_windows_x86): Rename to ...
7412 (i386_arch_setup): ... this. Set `win32_tdesc'.
7413 (the_low_target): Adjust.
7414 * win32-low.c (win32_tdesc): New global.
7415 (child_add_thread): Don't create the thread cache here.
7416 (do_initial_child_stuff): Set the new process'es tdesc.
7417 * win32-low.h (struct target_desc): Forward declare.
7418 (win32_tdesc): Declare.
7419 * lynx-i386-low.c (tdesc_i386): Declare global.
7420 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7421 * lynx-low.c (lynx_tdesc): New global.
7422 (lynx_add_process): Set the new process'es tdesc.
7423 * lynx-low.h (struct target_desc): Forward declare.
7424 (lynx_tdesc): Declare global.
7425 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7426 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7427 * nto-low.c (nto_tdesc): New global.
7428 (do_attach): Set the new process'es tdesc.
7429 * nto-low.h (struct target_desc): Forward declare.
7430 (nto_tdesc): Declare.
7431 * nto-x86-low.c (tdesc_i386): Declare.
7432 (nto_x86_arch_setup): Set `nto_tdesc'.
7433
7434 2013-06-04 Gary Benson <gbenson@redhat.com>
7435
7436 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7437 to qSupported response when appropriate.
7438 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7439 with nonzero-length annex.
7440 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7441 arguments supplied in annex.
7442
7443 2013-05-31 Doug Evans <dje@google.com>
7444
7445 PR server/15594
7446 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7447 64 bits in 64-cross-32 environment.
7448
7449 2013-05-28 Pedro Alves <palves@redhat.com>
7450
7451 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7452 (aarch64-without-fpu.c): Delete rule.
7453 * configure.srv (aarch64*-*-linux*): Remove references to
7454 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7455 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7456 declaration.
7457
7458 2013-05-24 Pedro Alves <palves@redhat.com>
7459
7460 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7461 instead of strchr/decode_address. Error if the range isn't split
7462 with a ','. Don't assume there's be a ':' in the action.
7463
7464 2013-05-23 Yao Qi <yao@codesourcery.com>
7465 Pedro Alves <palves@redhat.com>
7466
7467 * linux-low.c (lwp_in_step_range): New function.
7468 (linux_wait_1): If the thread was range stepping and stopped
7469 outside the stepping range, report the stop to GDB. Otherwise,
7470 continue stepping. Add range stepping debug output.
7471 (linux_set_resume_request): Copy the step range from the resume
7472 request to the lwp.
7473 (linux_supports_range_stepping): New.
7474 (linux_target_ops) <supports_range_stepping>: Set to
7475 linux_supports_range_stepping.
7476 * linux-low.h (struct linux_target_ops)
7477 <supports_range_stepping>: New field.
7478 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7479 * linux-x86-low.c (x86_supports_range_stepping): New.
7480 (the_low_target) <supports_range_stepping>: Set to
7481 x86_supports_range_stepping.
7482 * server.c (handle_v_cont): Handle 'r' action.
7483 (handle_v_requests): Append ";r" if the target supports range
7484 stepping.
7485 * target.h (struct thread_resume) <step_range_start,
7486 step_range_end>: New fields.
7487 (struct target_ops) <supports_range_stepping>:
7488 New field.
7489 (target_supports_range_stepping): New macro.
7490
7491 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7492
7493 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7494 confusion in comment.
7495
7496 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7497
7498 * lynx-low.c (struct process_info_private): New type.
7499 (lynx_add_process): New function.
7500 (lynx_create_inferior, lynx_attach): Replace calls to
7501 add_process by calls to lynx_add_process.
7502 (lynx_resume): If PTID is null, then try using
7503 current_process()->private->last_wait_event_ptid.
7504 Add comments.
7505 (lynx_clear_inferiors): Delete. The contents of that function
7506 has been inlined in lynx_mourn;
7507 (lynx_wait_1): Save the ptid in the process's private data.
7508 (lynx_mourn): Free the process' private data. Replace call
7509 to lynx_clear_inferiors by call to clear_inferiors.
7510
7511 2013-05-17 Yao Qi <yao@codesourcery.com>
7512
7513 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7514 the right place.
7515
7516 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7517
7518 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7519 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7520 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7521 PT_TEXT_END_ADDR guards. Update comments.
7522 (linux_target_op) <read_offsets>: Conditionally define to
7523 linux_read_offsets if the target is UCLIBC and if it defines
7524 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7525
7526 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7527 Andrew Jenner <andrew@codesourcery.com>
7528
7529 * Makefile.in (SFILES): Add linux-nios2-low.c.
7530 (clean): Add action to delete nios2-linux.c.
7531 (nios2-linux.c): New rule.
7532 * configure.srv: Add nios2*-*-linux*.
7533 * linux-nios2-low.c: New.
7534
7535 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7536
7537 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7538
7539 2013-04-25 Hui Zhu <hui@codesourcery.com>
7540
7541 PR gdb/15186
7542 * ax.c (ax_printf): Add fflush.
7543
7544 2013-04-22 Tom Tromey <tromey@redhat.com>
7545
7546 * Makefile.in (SFILES): Add filestuff.c.
7547 (OBS): Add filestuff.o.
7548 (filestuff.o): New target.
7549 * config.in, configure: Rebuild.
7550 * configure.ac: Check for fdwalk, pipe2.
7551
7552 2013-04-17 Pedro Alves <palves@redhat.com>
7553
7554 * configure.ac (USE_THREAD_DB): Delete variable.
7555 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7556 Don't AC_SUBST USE_THREAD_DB.
7557 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7558 * config.in, configure: Regenerate.
7559
7560 2013-04-16 Pedro Alves <palves@redhat.com>
7561
7562 * linux-low.h (struct lwp_info) <thread_known>: Move under
7563 the USE_THREAD_DB #ifdef.
7564
7565 2013-04-16 Pedro Alves <palves@redhat.com>
7566
7567 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7568 (linux-low.o): Delete rule.
7569 * linux-low.h: Always include "gdb_thread_db.h" instead of
7570 conditionally including thread_db.h.
7571 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7572 HAVE_THREAD_DB_H.
7573
7574 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7575
7576 * Makefile.in (install-only): Fix make install regression.
7577
7578 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7579
7580 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7581 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7582 installation.
7583 * gdbserver.1: Remove.
7584
7585 2013-03-22 Pedro Alves <palves@redhat.com>
7586
7587 * linux-low.c (handle_extended_wait): Don't call
7588 linux_enable_event_reporting.
7589
7590 2013-03-15 Tony Theodore <tonyt@logyst.com>
7591
7592 PR build/9098:
7593 * Makefile.in (SHELL): Use @SHELL@.
7594
7595 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7596
7597 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7598 compiler warning.
7599
7600 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7601
7602 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7603 Remove extraneous NULL element.
7604
7605 2013-03-13 Yao Qi <yao@codesourcery.com>
7606
7607 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7608 'V' block in trace frame.
7609
7610 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7611
7612 * target.h (struct target_ops): Add btrace ops.
7613 (target_supports_btrace): New macro.
7614 (target_enable_btrace): New macro.
7615 (target_disable_btrace): New macro.
7616 (target_read_btrace): New macro.
7617 * gdbthread.h (struct thread_info): Add btrace field.
7618 * server.c: Include btrace-common.h.
7619 (handle_btrace_general_set): New function.
7620 (handle_btrace_enable): New function.
7621 (handle_btrace_disable): New function.
7622 (handle_general_set): Call handle_btrace_general_set.
7623 (handle_qxfer_btrace): New function.
7624 (struct qxfer qxfer_packets[]): Add btrace entry.
7625 * inferiors.c (remove_thread): Disable btrace.
7626 * linux-low: Include linux-btrace.h.
7627 (linux_low_enable_btrace): New function.
7628 (linux_low_read_btrace): New function.
7629 (linux_target_ops): Add btrace ops.
7630 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7631 Add srv_linux_btrace=yes.
7632 (x86_64-*-linux*): Add linux-btrace.o.
7633 Add srv_linux_btrace=yes.
7634 * configure.ac: Define HAVE_LINUX_BTRACE.
7635 * config.in: Regenerated.
7636 * configure: Regenerated.
7637
7638 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7639
7640 * server.c (handle_qxfer): Preserve error message if -3 is
7641 returned.
7642 (qxfer): Document the -3 return value.
7643
7644 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7645
7646 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7647 (linux_btrace_h): New variable.
7648 (linux-btrace.o): New rule.
7649
7650 2013-03-08 Stan Shebs <stan@codesourcery.com>
7651 Hafiz Abid Qadeer <abidh@codesourcery.com>
7652
7653 * tracepoint.c (trace_buffer_size): New global.
7654 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7655 (init_trace_buffer): Change to one-argument function. Allocate
7656 trace buffer memory.
7657 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7658 handle QTBuffer:size packet.
7659 (cmd_bigqtbuffer_size): New function.
7660 (initialize_tracepoint): Call init_trace_buffer with
7661 DEFAULT_TRACE_BUFFER_SIZE.
7662 * server.c (handle_query): Add QTBuffer:size in the
7663 supported packets.
7664
7665 2013-03-07 Yao Qi <yao@codesourcery.com>
7666
7667 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7668 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7669 of -1.
7670 (cmd_qtsp): Adjust condition. Do post increment.
7671 Set cur_action and cur_step_action back to 0.
7672
7673 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7674
7675 PR server/15236
7676 * linux-low.c (linux_write_memory): Return early success if LEN is
7677 zero.
7678
7679 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7680
7681 * configure.srv: Add x86_64-*-cygwin* as target.
7682
7683 2013-02-28 Tom Tromey <tromey@redhat.com>
7684
7685 * configure.ac: Invoke AC_SYS_LARGEFILE.
7686 * configure, config.in: Rebuild.
7687
7688 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7689
7690 * win32-low.c: Throughout, fix format strings and casts of
7691 printf-like functions to avoid type related warnings on all
7692 platforms.
7693 (get_child_debug_event): Print dwDebugEventCode as hex since
7694 that's how it's usually documented.
7695
7696 2013-02-28 Yao Qi <yao@codesourcery.com>
7697
7698 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7699 pulongest.
7700
7701 2013-02-27 Jiong Wang <jiwang@tilera.com>
7702
7703 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7704 (reg-tilegx32.c): New rule.
7705 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7706 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7707 different register info initializer according to elf class.
7708 (init_registers_tilgx32): New function. The tilegx32 register info
7709 initializer.
7710 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7711 (tile_store_gregset): Likewise.
7712
7713 2013-02-27 Yao Qi <yao@codesourcery.com>
7714
7715 * server.c (process_point_options): Print debug message when
7716 debug_threads is true.
7717
7718 2013-02-26 Yao Qi <yao@codesourcery.com>
7719
7720 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7721
7722 2013-02-19 Pedro Alves <palves@redhat.com>
7723 Kai Tietz <ktietz@redhat.com>
7724
7725 PR gdb/15161
7726
7727 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7728 instead of strtoul to extract address from packet.
7729 (process_serial_event) <'z'>: Likewise.
7730
7731 2013-02-18 Yao Qi <yao@codesourcery.com>
7732
7733 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7734
7735 2013-02-14 Pedro Alves <palves@redhat.com>
7736
7737 Plug memory leak.
7738
7739 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7740 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7741
7742 2013-02-14 Pedro Alves <palves@redhat.com>
7743
7744 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7745
7746 2013-02-14 Pedro Alves <palves@redhat.com>
7747
7748 * tracepoint.c (save_string): Delete.
7749 (add_tracepoint_action): Use savestring instead of save_string.
7750
7751 2013-02-12 Pedro Alves <palves@redhat.com>
7752
7753 * linux-xtensa-low.c: Ditto.
7754 * xtensa-xtregs.c: Ditto.
7755
7756 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7757
7758 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7759 thread_db.
7760
7761 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7762
7763 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7764 aarch64_num_wp_regs and aarch64_num_bp_regs to
7765 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7766
7767 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7768
7769 * linux-aarch64-low.c (ps_get_thread_area): Replace
7770 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7771
7772 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7773 Marcus Shawcroft <marcus.shawcroft@arm.com>
7774 Nigel Stephens <nigel.stephens@arm.com>
7775 Yufeng Zhang <yufeng.zhang@arm.com>
7776
7777 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7778 (aarch64.c, aarch64-without-fpu.c): New targets.
7779 * configure.srv (aarch64*-*-linux*): New.
7780 * linux-aarch64-low.c: New file.
7781
7782 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7783
7784 * linux-low.c (handle_extended_wait, linux_create_inferior)
7785 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7786 (dequeue_one_deferred_signal, linux_resume_one_thread)
7787 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7788 (linux_tracefork_grandchild, linux_test_for_tracefork)
7789 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7790 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7791 where the argument is 0.
7792
7793 2013-01-25 Yao Qi <yao@codesourcery.com>
7794
7795 * event-loop.c: Include "queue.h".
7796 (gdb_event_p): New typedef.
7797 (struct gdb_event) <next_event>: Remove.
7798 (event_queue): Change to QUEUE(gdb_event_p).
7799 (async_queue_event): Remove.
7800 (gdb_event_xfree): New.
7801 (initialize_event_loop): New.
7802 (process_event): Use API from QUEUE.
7803 (wait_for_event): Likewise.
7804 * server.c (main): Call initialize_event_loop.
7805 * server.h (initialize_event_loop): Declare.
7806
7807 2013-01-18 Yao Qi <yao@codesourcery.com>
7808
7809 * ax.h (struct eval_agent_expr_context): New.
7810 (gdb_eval_agent_expr): Update declaration.
7811 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7812 TFRAME. Add new argument CTX.
7813 * server.h (struct eval_agent_expr_context): Declare.
7814 (agent_mem_read, agent_tsv_read): Update declaration.
7815 (agent_mem_read_string): Likewise.
7816 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7817 (add_traceframe_block): Add new argument TPOINT.
7818 Increase TPOINT->traceframe_usage.
7819 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7820 eval_tracepoint_agent_expr.
7821 (condition_true_at_tracepoint): Likewise.
7822 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7823 (agent_mem_read_string, agent_tsv_read): Likewise.
7824
7825 2013-01-16 Yao Qi <yao@codesourcery.com>
7826
7827 * linux-low.c (linux_resume_one_lwp): Don't check
7828 'lwp->bp_reinsert != 0'.
7829
7830 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7831 Pedro Alves <palves@redhat.com>
7832
7833 * lynx-low.c (ptrace_request_to_str): Define a temporary
7834 macro and use it to simplify this function's implementation.
7835
7836 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7837
7838 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7839 sets errno.
7840
7841 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7842
7843 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7844
7845 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7846
7847 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7848
7849 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7850
7851 * lynx-low.c (lynx_resume): Use the resume_info parameter
7852 to determine the ptid for the lynx_ptrace call, unless
7853 it is equal to minus_one_ptid, in which case we use the
7854 ptid of the current_inferior.
7855 (lynx_wait_1): After having received a thread create/exit
7856 event, resume the inferior's execution using the signaling
7857 thread's ptid, rather than the old ptid.
7858
7859 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7860
7861 * lynx-low.c (lynx_resume): Delete variable ret.
7862
7863 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7864
7865 * gdbreplay.c (gdbreplay_version): Update copyright year.
7866 * server.c (gdbserver_version): Likewise.
7867
7868 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7869
7870 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7871 new thread.
7872
7873 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7874
7875 * lynx-low.c (ptrace_request_to_str): Add handling for
7876 PTRACE_GETTRACESIG.
7877
7878 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7879
7880 * lynx-low.c (lynx_attach): Delete variable new_process.
7881
7882 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7883
7884 * lynx-low.c (lynx_create_inferior): Delete variable
7885 new_process.
7886
7887 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7888
7889 * lynx-low.c (ptrace_request_to_str): Do not handle
7890 PTRACE_GETTHREADLIST if this macro does not exist.
7891
7892 2012-12-15 Yao Qi <yao@codesourcery.com>
7893
7894 * Makefile.in (OBS): Add notif.o.
7895 * notif.c, notif.h: New.
7896 * server.c: Include "notif.h".
7897 (struct vstop_notif) <next>: Remove.
7898 <base>: New field.
7899 (queue_stop_reply): Update.
7900 (push_event, send_next_stop_reply): Remove.
7901 (discard_queued_stop_replies): Update.
7902 (notif_stop): New variable.
7903 (handle_v_stopped): Remove.
7904 (handle_v_requests): Don't call handle_v_stopped. Call
7905 handle_ack_notif instead.
7906 (queue_stop_reply_callback): Call notif_event_enque instead
7907 of queue_stop_reply.
7908 (handle_status): Don't call send_next_stop_reply, call
7909 notif_write_event instead.
7910 (kill_inferior_callback): Likewise.
7911 (detach_or_kill_inferior_callback): Likewise.
7912 (main): Call initialize_notif.
7913 (process_serial_event): Call QUEUE_is_empty.
7914 (handle_target_event): Call notif_push instead of push event.
7915 * server.h (push_event): Remove declaration.
7916
7917 2012-12-10 Tom Tromey <tromey@redhat.com>
7918
7919 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7920 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7921 macros.
7922 (.c.o): Rewrite.
7923 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7924 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7925 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7926 (amd64-linux-ipa.o, ax.o): Rewrite.
7927 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7928 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7929 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7930 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7931 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7932 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7933 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7934 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7935 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7936 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7937 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7938 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7939 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7940 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7941 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7942 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7943 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7944 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7945 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7946 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7947 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7948 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7949 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7950 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7951 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7952 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7953 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7954 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7955 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7956 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7957 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7958 (reg-tilegx.o): Remove.
7959 (all_object_files): New macro.
7960 Include .deps files.
7961 * aclocal.m4, configure: Rebuild.
7962 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7963 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7964 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7965
7966 2012-12-05 Tom Tromey <tromey@redhat.com>
7967
7968 PR gdb/14917:
7969 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7970
7971 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7972
7973 * configure.ac: Check for linux/perf_event.h.
7974 * config.in: Regenerated.
7975 * configure: Regenerated.
7976
7977 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7978
7979 * hostio.c (handle_readlink): Decrease buffer size
7980 parameter passed to readlink by one byte.
7981
7982 2012-11-26 Yao Qi <yao@codesourcery.com>
7983
7984 * configure.ac (build_warnings): Append '-Wempty-body'.
7985 * configure: Regenerated.
7986 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7987 body.
7988
7989 2012-11-15 Pierre Muller <muller@sourceware.org>
7990
7991 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7992 * config.in: Regenerate.
7993 * configure: Regenerate.
7994 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7995 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7996 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7997 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7998 header.
7999 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8000 instead of <sys/wait.h> header.
8001 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8002
8003 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8004
8005 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8006 (various make rules): Remove -DGDBSERVER
8007
8008 2012-11-09 Yao Qi <yao@codesourcery.com>
8009
8010 * spu-low.c (current_ptid): Move it to ..
8011 * gdbthread.h: ... here. New.
8012 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8013 * server.c (myresume, process_serial_event): Likewise.
8014 * thread-db.c (thread_db_find_new_threads): Likewise.
8015 * tracepoint.c (run_inferior_command): Likewise.
8016
8017 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8018
8019 * server.c (handle_search_memory_1): Include access length in
8020 warning message.
8021
8022 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8023
8024 * linux-crisv32-low.c: Fix compile errors.
8025
8026 2012-09-04 Yao Qi <yao@codesourcery.com>
8027
8028 * tracepoint.c (cmd_qtsv): Adjust debug message.
8029 Don't check CUR_TPOINT.
8030
8031 2012-08-28 Yao Qi <yao@codesourcery.com>
8032
8033 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8034 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8035 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8036 Remove declarations of xmalloc, xreallloc, xstrdup and
8037 freeargv.
8038 * Makefile.in (libiberty_h): New.
8039 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8040 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8041
8042 2012-08-23 Yao Qi <yao@codesourcery.com>
8043
8044 * server.h: Remove declaration of 'xsnprintf'.
8045
8046 2012-08-22 Keith Seitz <keiths@redhat.com>
8047
8048 * server.h: Include build-gnulib-gbserver/config.h.
8049 * gdbreplay.c: Likewise.
8050
8051 2012-08-08 Doug Evans <dje@google.com>
8052
8053 * Makefile.in (SFILES): Add gdb_vecs.c.
8054 (OBS): Add gdb_vecs.o.
8055 (gdb_vecs_h, host_defs_h): New variables.
8056 (thread-db.o): Add $(gdb_vecs_h) dependency.
8057 (gdb_vecs.o): New rule.
8058 * thread-db.c: #include "gdb_vecs.h".
8059 (thread_db_load_search): Use a vector to iterate over path elements.
8060 Handle text appearing after "$pdir".
8061
8062 * configure.ac: Add check for strstr.
8063 * config.in: Regenerate.
8064 * configure: Regenerate.
8065
8066 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8067
8068 * hostio.c (handle_pread): If pread fails, fall back to attempting
8069 lseek/read.
8070 (handle_pwrite): Likewise for pwrite.
8071
8072 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8073
8074 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8075 between unsupported TYPE and unimplementable ADDR/LEN combination.
8076 (arm_insert_point): Act on new return value.
8077
8078 2012-07-31 Pedro Alves <palves@redhat.com>
8079
8080 * server.c (process_point_options): Only skip tokens if we find
8081 one that is unrecognized. Don't treat 'X' specially while
8082 skipping unrecognized tokens.
8083
8084 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8085
8086 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8087 to 4-byte-align HW breakpoint addresses for Thumb.
8088
8089 2012-07-27 Yao Qi <yao@codesourcery.com>
8090
8091 PR remote/14161.
8092
8093 * server.h: Declare gdb_agent_about_to_close.
8094 * target.c (kill_inferior): Include "agent.h".
8095 New. Send command 'kill'.
8096 * target.h (kill_inferior): Removed macro.
8097 * tracepoint.c (gdb_agent_about_to_close): New.
8098 (gdb_agent_helper_thread): Handle command 'close'.
8099 Wait endlessly until the inferior stops.
8100 Install gdb_agent_remove_socket to atexit hook.
8101 (agent_socket_name): New static variable.
8102 (gdb_agent_socket_init): Replace local variable 'name' with
8103 'agent_socket_name'.
8104 (gdb_agent_remove_socket): New.
8105
8106 2012-07-27 Yao Qi <yao@codesourcery.com>
8107
8108 * server.c (process_point_options): Stop at 'X' when parsing.
8109
8110 2012-07-19 Michael Eager <eager@eagercon.com>
8111
8112 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8113 to hw_execute.
8114 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8115 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8116 hardware breakpoint.
8117
8118 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8119
8120 * gdbserver/linux-low.c (initialize_low): Call
8121 linux_ptrace_init_warnings.
8122
8123 2012-07-02 Doug Evans <dje@google.com>
8124
8125 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8126 pointer to int.
8127
8128 2012-07-02 Stan Shebs <stan@codesourcery.com>
8129
8130 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8131 (ax.o): Add it to build rule.
8132 (ax-ipa.o): Ditto.
8133 (OBS): Add format.o.
8134 (IPA_OBS): Add format.o.
8135 * server.c (handle_query): Claim support for breakpoint commands.
8136 (process_point_options): Add command case.
8137 (process_serial_event): Leave running if there are printfs in
8138 effect.
8139 * mem-break.h (any_persistent_commands): Declare.
8140 (add_breakpoint_commands): Declare.
8141 (gdb_no_commands_at_breakpoint): Declare.
8142 (run_breakpoint_commands): Declare.
8143 * mem-break.c (struct point_command_list): New struct.
8144 (struct breakpoint): New field command_list.
8145 (any_persistent_commands): New function.
8146 (add_commands_to_breakpoint): New function.
8147 (add_breakpoint_commands): New function.
8148 (gdb_no_commands_at_breakpoint): New function.
8149 (run_breakpoint_commands): New function.
8150 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8151 locally.
8152 * ax.c: Include format.h.
8153 (ax_printf): New function.
8154 (gdb_eval_agent_expr): Add printf opcode.
8155
8156 2012-06-13 Yao Qi <yao@codesourcery.com>
8157
8158 * server.c (start_inferior): Remove duplicated writes to fields
8159 'last_resume_kind' and 'last_status' of 'current_inferior'.
8160
8161 2012-06-12 Yao Qi <yao@codesourcery.com>
8162 Pedro Alves <palves@redhat.com>
8163
8164 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8165 comment.
8166 * server.c (handle_v_cont): Extend comment.
8167
8168 2012-06-11 Yao Qi <yao@codesourcery.com>
8169
8170 * linux-low.c (linux_attach): Add 'static'.
8171
8172 2012-06-06 Yao Qi <yao@codesourcery.com>
8173
8174 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8175
8176 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8177
8178 Fix gcc -flto compilation warning.
8179 * server.c (main): Make variable multi_mode and attach volatile.
8180
8181 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8182
8183 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8184 if the platform doesn't know about it.
8185
8186 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8187
8188 * Makefile.in (SFILES): Add linux-tile-low.c.
8189 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8190 * configure.srv: Handle tilegx-*-linux*.
8191 * linux-tile-low.c: New file.
8192
8193 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8194
8195 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8196
8197 2012-05-24 Pedro Alves <palves@redhat.com>
8198
8199 PR gdb/7205
8200
8201 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8202
8203 2012-05-24 Pedro Alves <palves@redhat.com>
8204
8205 PR gdb/7205
8206
8207 Replace target_signal with gdb_signal throughout.
8208
8209 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8210
8211 * linux-low.c (linux_store_registers): Avoid the copying sequence
8212 when no data has been retrieved by ptrace.
8213
8214 2012-05-22 Will Deacon <will.deacon@arm.com>
8215
8216 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8217 Include asm/ptrace.h.
8218 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8219 already defined.
8220
8221 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8222
8223 * linux-low.c (linux_store_registers): Don't re-retrieve data
8224 with ptrace that has already been obtained from /proc. Always
8225 copy any data retrieved with ptrace to the buffer supplied.
8226
8227 2012-05-11 Yao Qi <yao@codesourcery.com>
8228 Pedro Alves <palves@redhat.com>
8229
8230 * linux-low.c (enum stopping_threads_kind): New.
8231 (stopping_threads): Change type to `enum stopping_threads_kind'.
8232 (handle_extended_wait): If stopping and suspending threads, leave
8233 the new_lwp suspended too.
8234 (linux_wait_for_event): Adjust.
8235 (stop_all_lwps): Set `stopping_threads' to
8236 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8237 whether we're suspending threads or just stopping them. Assert no
8238 recursion happens.
8239
8240 2012-04-29 Yao Qi <yao@codesourcery.com>
8241
8242 * server.h: Move some code to ...
8243 * gdbthread.h: ... here. New.
8244 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8245 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8246 (nto-low.o, win32-low.o): Likewise.
8247 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8248 * regcache.c, remote-utils.c, server.c: Likewise.
8249 * target.c, tracepoint.c, win32-low.c: Likewise.
8250
8251 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8252
8253 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8254 (PTRACE_ARG4_TYPE): Likewise.
8255 (PTRACE_XFER_TYPE): Likewise.
8256 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8257 ptrace to PTRACE_ARG3_TYPE.
8258 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8259 (PTRACE_ARG4_TYPE): Likewise.
8260 (PTRACE_XFER_TYPE): Likewise.
8261 (linux_detach_one_lwp): Cast fourth argument of
8262 ptrace to long then PTRACE_ARG4_TYPE.
8263 (regsets_fetch_inferior_registers): Cast third argument of
8264 ptrace to long then PTRACE_ARG3_TYPE.
8265 (regsets_store_inferior_registers): Likewise.
8266
8267 2012-04-20 Pedro Alves <palves@redhat.com>
8268
8269 * configure: Regenerate.
8270
8271 2012-04-19 Pedro Alves <palves@redhat.com>
8272
8273 * Makefile.in (GNULIB_BUILDDIR): New.
8274 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8275 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8276 (all, install-only, uninstall, clean-info, all-lib, clean): No
8277 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8278 (maintainer-clean realclean distclean): Use subdir_do.
8279 (subdir_do): New.
8280 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8281 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8282 * acinclude.m4: Include acx_configure_dir.m4.
8283 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8284 calls. Call AC_PROG_RANLIB. Configure gnulib using
8285 ACX_CONFIGURE_DIR.
8286 (GNULIB): New.
8287 (GNULIB_STDINT_H): Adjust.
8288 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8289 * gdbreplay.c: Include build-gnulib/config.h.
8290 * server.h: Likewise.
8291 * aclocal.m4: Regenerate.
8292 * config.in: Regenerate.
8293 * configure: Regenerate.
8294
8295 2012-04-19 Pedro Alves <palves@redhat.com>
8296
8297 * Makefile.in (LIBGNU, INCGNU): Adjust.
8298 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8299 (all, install-only, uninstall, clean-info, all-lib, clean)
8300 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8301 * configure.ac: Adjust AC_OUTPUT output.
8302 * aclocal.m4: Regenerate.
8303 * configure: Regenerate.
8304
8305 2012-04-19 Pedro Alves <palves@redhat.com>
8306
8307 * Makefile.in (generated_files): New.
8308 (server_h): Remove the explicit dependency on config.h, and depend
8309 on $generated_files.
8310
8311 2012-04-19 Pedro Alves <palves@redhat.com>
8312
8313 * Makefile.in (INCGNU): Add -Ignulib.
8314
8315 2012-04-19 Pedro Alves <palves@redhat.com>
8316
8317 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8318 (INCGNU): ... this, and spell out -I here.
8319 (GNULIB_LIB): Rename to ...
8320 (LIBGNU): ... this.
8321 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8322
8323 2012-04-19 Pedro Alves <palves@redhat.com>
8324
8325 * config.in: Regenerate.
8326
8327 2012-04-19 Pedro Alves <palves@redhat.com>
8328
8329 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8330 * server.h (memmem): Remove declaration.
8331 * config.in: Regenerate.
8332 * configure: Regenerate.
8333
8334 2012-04-19 Yao Qi <yao@codesourcery.com>
8335
8336 * Makefile.in (SFILES): Add common/vec.c.
8337 (OBS): Add vec.o.
8338 (vec.o): New rule.
8339
8340 2012-04-19 Yao Qi <yao@codesourcery.com>
8341
8342 * remote-utils.c (prepare_resume_reply): Replace with macro
8343 target_core_of_thread.
8344 * server.c (handle_qxfer_threads_proper): Likewise.
8345 * target.h (traget_core_of_thread): New macro.
8346
8347 2012-04-18 Pedro Alves <palves@redhat.com>
8348
8349 * aclocal.m4: Regenerate.
8350 * configure: Regenerate.
8351
8352 2012-04-16 Yao Qi <yao@codesourcery.com>
8353
8354 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8355 duplicated on address.
8356
8357 2012-04-16 Yao Qi <yao@codesourcery.com>
8358
8359 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8360 (struct tracepoint_action_ops) <send>: New field.
8361 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8362 (agent_expr_send, x_tracepoint_action_send): New.
8363 (l_tracepoint_action_send): New.
8364 (cmd_qtdp): Download and install tracepoint
8365 according to `use_agent'.
8366 (run_inferior_command): Add one more parameter `len'.
8367 Update callers.
8368 (tracepoint_send_agent): New.
8369 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8370
8371 2012-04-16 Yao Qi <yao@codesourcery.com>
8372
8373 * tracepoint.c (download_tracepoints): Moved to ...
8374 (cmd_qtstart): ... here.
8375
8376 2012-04-14 Yao Qi <yao@codesourcery.com>
8377
8378 * tracepoint.c: Include inttypes.h.
8379 (struct collect_memory_action): Use sized types.
8380 (struct tracepoint): Likewise.
8381 (cmd_qtdp, stop_tracing): Update print specifiers.
8382 (cmd_qtp, response_tracepoint): Likewise.
8383 (collect_data_at_tracepoint): Likewise.
8384 (collect_data_at_step): Likewise.
8385
8386 2012-04-14 Yao Qi <yao@codesourcery.com>
8387
8388 Import gnulib module inttypes.
8389 * aclocal.m4, config.in, configure: Regenerated.
8390
8391 2012-04-14 Yao Qi <yao@codesourcery.com>
8392
8393 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8394 Makefile and config.status at last.
8395
8396 2012-04-13 Yao Qi <yao@codesourcery.com>
8397
8398 * tracepoint.c: Include stdint.h unconditionally.
8399
8400 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8401
8402 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8403 on BFD_HAVE_SYS_PROCFS_TYPE.
8404 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8405 * configure: Regenerate.
8406 * config.in: Likewise.
8407
8408 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8409
8410 * Makefile.in (clean): Also remove x32.c x32-linux.c
8411 x32-avx.c x32-avx-linux.c.
8412 (x32.o): New target.
8413 (x32.c): Likewise.
8414 (x32-linux.o): Likewise.
8415 (x32-linux.c): Likewise.
8416 (x32-avx.o): Likewise.
8417 (x32-avx.c): Likewise.
8418 (x32-avx-linux.o): Likewise.
8419 (x32-avx-linux.c): Likewise.
8420
8421 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8422 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8423 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8424 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8425 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8426 i386/x32-avx-linux.xml.
8427
8428 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8429 (init_registers_x32_avx_linux): Likwise.
8430 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8431 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8432
8433 2012-04-13 Pedro Alves <palves@redhat.com>
8434
8435 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8436 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8437 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8438 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8439 the sub-make.
8440
8441 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8442
8443 * linux-x86-low.c (compat_x32_clock_t): New.
8444 (compat_x32_siginfo_t): Likewise.
8445 (compat_x32_siginfo_from_siginfo): Likewise.
8446 (siginfo_from_compat_x32_siginfo): Likewise.
8447 (linux_is_elf64): Likewise.
8448 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8449 and siginfo_from_compat_x32_siginfo for x32.
8450 (x86_arch_setup): Set linux_is_elf64.
8451
8452 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8453
8454 PR gdb/13969
8455 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8456 e_machine field.
8457 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8458 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8459 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8460 compatible with process.
8461
8462 2012-04-12 Yao Qi <yao@codesourcery.com>
8463
8464 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8465 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8466 (install-only, install-info, clean): Handle sub dir gnulib.
8467 (all-lib, am--refresh): New targets.
8468 (memmem.o): Remove target.
8469 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8470 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8471 (AC_REPLACE_FUNCS): Remove memmem.
8472 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8473 (AC_OUTPUT): Generate Makefile in gnulib/.
8474 * aclocal.m4, config.in, configure: Regenerated.
8475
8476 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8477
8478 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8479
8480 2012-04-05 Pedro Alves <palves@redhat.com>
8481
8482 -Werror=strict-aliasing
8483
8484 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8485 pointer.
8486
8487 2012-04-04 Pedro Alves <palves@redhat.com>
8488
8489 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8490 (sparc_store_gregset_from_stack, sparc_store_gregset)
8491 (sparc_breakpoint_at): Fix formatting.
8492
8493 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8494
8495 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8496 are available.
8497 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8498 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8499 * config.in: Regenerate.
8500 * configure: Likewise.
8501
8502 2012-03-29 Pedro Alves <palves@redhat.com>
8503
8504 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8505 Correct ptrace arguments.
8506
8507 2012-03-28 Pedro Alves <palves@redhat.com>
8508
8509 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8510 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8511 (IA64_FR1_REGNUM): New defines.
8512 (ia64_fetch_register): New.
8513 (the_low_target): Install it.
8514 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8515 field.
8516 * linux-low.c (linux_fetch_registers): Try the
8517 the_low_target.fetch_register hook first.
8518
8519 * linux-arm-low.c (the_low_target): Adjust.
8520 * linux-bfin-low.c (the_low_target): Adjust.
8521 * linux-cris-low.c (the_low_target): Adjust.
8522 * linux-crisv32-low.c (the_low_target): Adjust.
8523 * linux-m32r-low.c (the_low_target): Adjust.
8524 * linux-m68k-low.c (the_low_target): Adjust.
8525 * linux-mips-low.c (the_low_target): Adjust.
8526 * linux-ppc-low.c (the_low_target): Adjust.
8527 * linux-s390-low.c (the_low_target): Adjust.
8528 * linux-sh-low.c (the_low_target): Adjust.
8529 * linux-sparc-low.c (the_low_target): Adjust.
8530 * linux-tic6x-low.c (the_low_target): Adjust.
8531 * linux-x86-low.c (the_low_target): Adjust.
8532 * linux-xtensa-low.c (the_low_target): Adjust.
8533
8534 2012-03-26 Pedro Alves <palves@redhat.com>
8535
8536 * server.c (handle_qxfer_libraries): Don't bail early if
8537 the_target->qxfer_libraries_svr4 is not NULL.
8538
8539 2012-03-26 Pedro Alves <palves@redhat.com>
8540
8541 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8542
8543 2012-03-23 Pedro Alves <palves@redhat.com>
8544
8545 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8546 "library-list-svr4" element's start tag when the the DSO list is
8547 empty.
8548
8549 2012-03-23 Pedro Alves <palves@redhat.com>
8550
8551 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8552 a variable whose type size is the same as the inferior's pointer
8553 size.
8554
8555 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8556
8557 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8558 struct siginfo.
8559 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8560 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8561 * linux-low.h: Include <signal.h>.
8562 (struct siginfo): Remove forward declaration.
8563 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8564 struct siginfo.
8565
8566 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8567
8568 * .gitignore: Ignore more files.
8569
8570 2012-03-19 Pedro Alves <palves@redhat.com>
8571 Jan Kratochvil <jan.kratochvil@redhat.com>
8572
8573 * server.c (cont_thread, general_thread): Add describing comments.
8574 (start_inferior): Clear `cont_thread'.
8575 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8576 of a process.
8577
8578 2012-03-15 Yao Qi <yao@codesourcery.com>
8579
8580 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8581 handling to ...
8582 (cmd_qtdp): ... here.
8583
8584 2012-03-15 Yao Qi <yao@codesourcery.com>
8585
8586 * tracepoint.c (struct tracepoint_action_ops): New.
8587 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8588 (m_tracepoint_action_download): New.
8589 (r_tracepoint_action_download): New.
8590 (x_tracepoint_action_download): New.
8591 (l_tracepoint_action_download): New.
8592 (add_tracepoint_action): Install `action->ops' according type.
8593 (download_tracepoint_1): Move code `download' function pointer
8594 of various tracepoint_action_ops.
8595
8596 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8597
8598 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8599 linux_ptrace_attach_warnings.
8600
8601 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8602
8603 * Makefile.in (linux-ptrace.o): New.
8604 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8605 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8606 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8607 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8608 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8609 of these targets.
8610 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8611
8612 2012-03-08 Yao Qi <yao@codesourcery.com>
8613 Pedro Alves <palves@redhat.com>
8614
8615 Fix PR server/13392.
8616 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8617 offset of JMP insn.
8618 * tracepoint.c (remove_tracepoint): New.
8619 (cmd_qtdp): Call remove_tracepoint when failed to install.
8620
8621 2012-03-07 Pedro Alves <palves@redhat.com>
8622
8623 * linux-low.c (get_detach_signal): New.
8624 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8625 Pass on pending signals to PTRACE_DETACH. Check the result of the
8626 ptrace call.
8627 * server.c (program_signals, program_signals_p): New.
8628 (handle_general_set): Handle QProgramSignals.
8629 * server.h (program_signals, program_signals_p): Declare.
8630
8631 2012-03-05 Pedro Alves <palves@redhat.com>
8632 Jan Kratochvil <jan.kratochvil@redhat.com>
8633
8634 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8635 New comment why.
8636
8637 2012-03-03 Yao Qi <yao@codesourcery.com>
8638
8639 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8640 agent_look_up_symbols.
8641
8642 2012-03-03 Yao Qi <yao@codesourcery.com>
8643
8644 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8645 (linux-x86-low.o): Likewise.
8646 * server.h: Remove in_process_agent_loaded.
8647 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8648 common/agent.c.
8649 Update callers.
8650
8651 2012-03-03 Yao Qi <yao@codesourcery.com>
8652
8653 * tracepoint.c (gdb_agent_capability): New global.
8654 (in_process_agent_loaded_ust): Renamed to
8655 `in_process_agent_supports_ust'.
8656 Update callers.
8657 (in_process_agent_supports_ust): Call agent_capability_check.
8658 (clear_installed_tracepoints): Assert that agent supports
8659 agent.
8660
8661 2012-03-03 Yao Qi <yao@codesourcery.com>
8662
8663 * linux-low.c (linux_supports_agent): New.
8664 (linux_target_ops): Initialize field `supports_agent' with
8665 linux_supports_agent.
8666 * target.h (struct target_ops) <supports_agent>: New.
8667 (target_supports_agent): New macro.
8668 * server.c (handle_general_set): Handle packet 'QAgent'.
8669 (handle_query): Send `QAgent+'.
8670 * Makefile.in (server.o): Depends on agent.h.
8671
8672 2012-03-03 Yao Qi <yao@codesourcery.com>
8673
8674 * Makefile.in (OBS): Add agent.o.
8675 Add new rule for agent.o.
8676 Track dependence of tracepoint.c on agent.h.
8677 * tracepoint.c (run_inferior_command_1):
8678 (run_inferior_command): Call agent_run_command.
8679 (gdb_ust_connect_sync_socket): Deleted. Move it to
8680 common/agent.c.
8681 (resume_thread, stop_thread): Likewise.
8682 (gdb_ust_socket_init): Renamed to ...
8683 (gdb_agent_socket_init): ... New.
8684 (gdb_ust_thread): Renamed to ...
8685 (gdb_agent_helper_thread): ... New.
8686 (gdb_ust_init): Move some code to ...
8687 (gdb_agent_init): ... here. New.
8688 [HAVE_UST]: Call gdb_ust_init.
8689 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8690 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8691 * config.in, configure: Regenerated.
8692
8693 2012-03-02 Pedro Alves <palves@redhat.com>
8694
8695 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8696 * linux-low.c (struct simple_pid_list): New.
8697 (stopped_pids): New a struct simple_pid_list pointer.
8698 (add_to_pid_list, pull_pid_from_list): New.
8699 (handle_extended_wait): Don't assume the first signal new children
8700 report is SIGSTOP. Adjust call to pull_pid_from_list.
8701 (linux_wait_for_lwp): Adjust.
8702
8703 2012-03-02 Yao Qi <yao@codesourcery.com>
8704
8705 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8706 debug log.
8707
8708 2012-03-02 Yao Qi <yao@codesourcery.com>
8709
8710 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8711 `stop_pc' and `tpoint'. Update caller.
8712
8713 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8714
8715 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8716 * linux-low.c (use_linux_regsets): New macro.
8717 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8718 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8719 (linux_register_in_regsets): New function.
8720 (usr_fetch_inferior_registers): Skip registers covered by
8721 regsets.
8722 (usr_store_inferior_registers): Likewise.
8723 (usr_fetch_inferior_registers): New macro.
8724 (usr_store_inferior_registers): Likewise.
8725 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8726 (linux_store_registers): Likewise.
8727 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8728 prototype.
8729 (init_registers_mips64_dsp_linux): Likewise.
8730 (init_registers_mips_linux): New macro.
8731 (init_registers_mips_dsp_linux): Likewise.
8732 (mips_dsp_num_regs): Likewise.
8733 (DSP_BASE, DSP_CONTROL): New fallback macros.
8734 (mips_base_regs): New macro.
8735 (mips_regmap): Use it. Fix the size.
8736 (mips_dsp_regmap): New variable.
8737 (mips_dsp_regset_bitmap): Likewise.
8738 (mips_arch_setup): New function.
8739 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8740 than mips_regmap.
8741 (mips_cannot_store_register): Likewise.
8742 (the_low_target): Update .arch_setup, .num_regs and .regmap
8743 initializers. Add .regset_bitmap initializer.
8744 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8745 initializer.
8746 * linux-bfin-low.c (the_low_target): Likewise.
8747 * linux-cris-low.c (the_low_target): Likewise.
8748 * linux-crisv32-low.c (the_low_target): Likewise.
8749 * linux-ia64-low.c (the_low_target): Likewise.
8750 * linux-m32r-low.c (the_low_target): Likewise.
8751 * linux-m68k-low.c (the_low_target): Likewise.
8752 * linux-ppc-low.c (the_low_target): Likewise.
8753 * linux-s390-low.c (the_low_target): Likewise.
8754 * linux-sh-low.c (the_low_target): Likewise.
8755 * linux-sparc-low.c (the_low_target): Likewise.
8756 * linux-tic6x-low.c (the_low_target): Likewise.
8757 * linux-x86-low.c (the_low_target): Likewise.
8758 * linux-xtensa-low.c (the_low_target): Likewise.
8759 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8760 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8761 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8762 srv_xmlfiles.
8763 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8764 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8765
8766 2012-02-29 Yao Qi <yao@codesourcery.com>
8767 Pedro Alves <palves@redhat.com>
8768
8769 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8770 `step_over_finished' is true.
8771
8772 2012-02-27 Pedro Alves <palves@redhat.com>
8773
8774 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8775 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8776
8777 2012-02-27 Pedro Alves <palves@redhat.com>
8778
8779 PR server/9684
8780 * linux-low.c (pid_is_stopped): New.
8781 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8782
8783 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8784
8785 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8786 of conditions.
8787
8788 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8789
8790 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8791
8792 2012-02-24 Luis Machado <lgustavo@codesourcery>
8793
8794 * server.c (handle_query): Advertise support for target-side
8795 breakpoint condition evaluation.
8796 (process_point_options): New function.
8797 (process_serial_event): When inserting a breakpoint, check for
8798 a target-side condition that should be evaluated.
8799
8800 * mem-break.c: Include regcache.h and ax.h.
8801 (point_cond_list_t): New data structure.
8802 (breakpoint) <cond_list>: New field.
8803 (find_gdb_breakpoint_at): Make non-static.
8804 (delete_gdb_breakpoint_at): Clear any target-side
8805 conditions.
8806 (clear_gdb_breakpoint_conditions): New function.
8807 (add_condition_to_breakpoint): Likewise.
8808 (add_breakpoint_condition): Likewise.
8809 (gdb_condition_true_at_breakpoint): Likewise.
8810 (gdb_breakpoint_here): Return result directly instead
8811 of going through a local variable.
8812
8813 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8814 (clear_gdb_breakpoint_conditions): Likewise.
8815 (add_breakpoint_condition): Likewise.
8816 (gdb_condition_true_at_breakpoint): Likewise.
8817
8818 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8819 (need_step_over_p): Take target-side breakpoint condition into
8820 consideration.
8821
8822 2012-02-24 Luis Machado <lgustavo@codesourcery>
8823
8824 * server.h: Include tracepoint.h.
8825 (agent_mem_read, agent_get_trace_state_variable_value,
8826 agent_set_trace_state_variable_value,
8827 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8828 get_set_tsv_func_addr): New prototypes.
8829
8830 * ax.h: New include file.
8831 * ax.c: New source file.
8832
8833 * tracepoint.c: Include ax.h.
8834 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8835 agent_expr, eval_result_type): Move to ax.h.
8836 (parse_agent_expr): Rename to ...
8837 (gdb_parse_agent_expr): ... this, make it non-static and move
8838 to ax.h.
8839 (unparse_agent_expr) Rename to ...
8840 (gdb_unparse_agent_expr): ... this, make it non-static and move
8841 to ax.h.
8842 (eval_agent_expr): Rename to ...
8843 (eval_tracepoint_agent_expr): ... this.
8844 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8845 forward declarations.
8846 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8847 (agent_get_trace_state_variable_value): New function.
8848 (agent_set_trace_state_variable_value): New function.
8849 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8850 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8851 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8852 (condition_true_at_tracepoint): Likewise.
8853 (parse_agent_expr): Rename to ...
8854 (gdb_parse_agent_expr): ... this and move to ax.c.
8855 (unparse_agent_expr): Rename to ...
8856 (gdb_unparse_agent_expr): ... this and move to ax.c.
8857 (gdb_agent_op_name): Move to ax.c.
8858 (eval_agent_expr): Rename to ...
8859 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8860 and move to ax.c.
8861 (eval_tracepoint_agent_expr): New function.
8862 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8863 non-static.
8864 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8865 ax.c.
8866 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8867 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8868 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8869 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8870 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8871 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8872 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8873 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8874 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8875 (compile_bytecodes): Remove forward declaration.
8876 (is_goto_target): Move to ax.c.
8877 (compile_bytecodes): Move to ax.c and call
8878 agent_get_trace_state_variable_value (...) and
8879 agent_set_trace_state_variable_value (...).
8880
8881 * Makefile.in: Update ax.c and IPA dependencies.
8882
8883 2012-02-24 Pedro Alves <palves@redhat.com>
8884
8885 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8886 (cmd_bigqtbuffer_circular): ... this. Only handle
8887 'QTBuffer:circular:'.
8888 (handle_tracepoint_general_set): Adjust.
8889
8890 2012-02-16 Yao Qi <yao@codesourcery.com>
8891
8892 * inferiors.c: Move code to ...
8893 * dll.c: .... here. New.
8894 * server.h: Declare clear_dlls.
8895 * Makefile.in (SFILES): Add dll.c.
8896 (OBS): Add dll.o
8897 (dll.o): New rule.
8898
8899 2012-02-11 Yao Qi <yao@codesourcery.com>
8900
8901 * server.c: (handle_monitor_command): Add a new parameter
8902 `own_buf'.
8903 (handle_query): Update caller.
8904
8905 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8906
8907 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8908 * configure, config.in: Regenerate.
8909 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8910 is not defined.
8911
8912 2012-02-02 Pedro Alves <palves@redhat.com>
8913
8914 Try SIGKILL first, then PTRACE_KILL.
8915 * linux-low.c (linux_kill_one_lwp): New.
8916 (linux_kill_one_lwp): Rename to ...
8917 (kill_one_lwp_callback): ... this. Use the new
8918 linux_kill_one_lwp.
8919
8920 2012-02-02 Pedro Alves <palves@redhat.com>
8921
8922 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8923 inferior.
8924
8925 2012-01-27 Pedro Alves <palves@redhat.com>
8926
8927 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8928 (elf_64_file_p): Make static.
8929 (linux_pid_exe_is_elf_64_file): New.
8930 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8931 Delete declarations.
8932 (linux_pid_exe_is_elf_64_file): Declare.
8933 * linux-x86-low.c (x86_arch_setup): Use
8934 linux_pid_exe_is_elf_64_file.
8935
8936 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8937
8938 * linux-low.c (linux_wait_for_event_1): Rename to ...
8939 (linux_wait_for_event): ... here and merge it with former
8940 linux_wait_for_event - new variable wait_ptid, use it.
8941 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8942
8943 2012-01-23 Pedro Alves <palves@redhat.com>
8944
8945 * server.c (main): Avoid yet another case of infinite loop while
8946 detaching/killing after a longjmp.
8947
8948 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8949
8950 Code cleanup.
8951 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8952
8953 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8954
8955 * hostio.c (handle_readlink): New function.
8956 (handle_vFile): Call it to handle "vFile:readlink" packets.
8957
8958 2012-01-20 Pedro Alves <palves@redhat.com>
8959 Ulrich Weigand <ulrich.weigand@linaro.org>
8960
8961 * server.c (handle_v_requests): Only support vAttach and vRun to
8962 start multiple processes when in extended protocol mode.
8963
8964 2012-01-17 Pedro Alves <palves@redhat.com>
8965
8966 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8967 memalign plus mprotect to allocate the scratch buffer.
8968
8969 2012-01-13 Pedro Alves <palves@redhat.com>
8970
8971 * server.c (attach_inferior): Clear `cont_thread'.
8972
8973 2012-01-13 Pedro Alves <palves@redhat.com>
8974
8975 * server.c (main): Avoid infinite loop while detaching/killing
8976 after a longjmp.
8977
8978 2012-01-09 Doug Evans <dje@google.com>
8979
8980 * server.c (start_inferior): Set last_ptid in --wrapper case.
8981
8982 2012-01-06 Yao Qi <yao@codesourcery.com>
8983
8984 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8985 defined.
8986 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8987
8988 2012-01-04 Yao Qi <yao@codesourcery.com>
8989
8990 * tracepoint.c (cmd_qtdp): Print debug message
8991 for static tracepoint.
8992
8993 2012-01-04 Yao Qi <yao@codesourcery.com>
8994
8995 * tracepoint.c (trace_vdebug): Differentiate debug message
8996 between gdbserver and IPA.
8997
8998 2012-01-03 Yao Qi <yao@codesourcery.com>
8999
9000 * tracepoint.c (tracepoint_was_hit): Don't collect for
9001 static tracepoint.
9002
9003 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9004
9005 * terminal.h: Reformat copyright header.
9006
9007 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9008
9009 * server.c (gdbserver_version): Update copyright year.
9010 * gdbreplay.c (gdbreplay_version): Likewise.
9011
9012 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9013
9014 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9015
9016 Revert:
9017 2011-12-18 Hui Zhu <teawater@gmail.com>
9018 * linux-low.c (linux_create_inferior): Save return value to ret.
9019
9020 2011-12-18 Hui Zhu <teawater@gmail.com>
9021
9022 * linux-low.c (linux_create_inferior): Save return value to ret.
9023
9024 2011-12-16 Doug Evans <dje@google.com>
9025
9026 * linux-low.c (linux_create_inferior): If stdio connection,
9027 redirect stdin from /dev/null, stdout to stderr.
9028 * remote-utils.c (remote_is_stdio): New static global.
9029 (remote_connection_is_stdio): New function.
9030 (remote_prepare): Handle stdio connection.
9031 (remote_open): Ditto.
9032 (remote_close): Don't close stdin for stdio connections.
9033 (read_prim,write_prim): New functions. Replace all calls to
9034 read/write to these.
9035 * server.c (main): Watch for "-" argument. Move call to
9036 remote_prepare before start_inferior.
9037 * server.h (STDIO_CONNECTION_NAME): New macro.
9038 (remote_connection_is_stdio): Declare.
9039
9040 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9041 in debugging output.
9042
9043 2011-12-15 Yao Qi <yao@codesourcery.com>
9044
9045 * tracepoint.c: Include sys/syscall.h.
9046 (gdb_ust_thread): Remove preprocessor conditional.
9047
9048 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9049
9050 * linux-low.c (linux_detach_one_lwp): Call
9051 the_low_target.prepare_to_resume before detaching.
9052
9053 2011-12-14 Yao Qi <yao@codesourcery.com>
9054
9055 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9056 of write.
9057
9058 2011-12-14 Yao Qi <yao@codesourcery.com>
9059
9060 * i386-low.c (i386_low_stopped_data_address): Initialize local
9061 variable `control'.
9062
9063 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9064
9065 PR remote/13492
9066
9067 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9068 DR_CONTROL unless necessary. Extend comments.
9069 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9070 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9071
9072 2011-12-13 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9075 macros.
9076 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9077
9078 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9079
9080 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9081 Print new debug message for such case.
9082
9083 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9084
9085 Fix overlapping memcpy.
9086 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9087 the read_inferior_memory transfer.
9088 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9089 write_inferior_memory transfer.
9090 (set_fast_tracepoint_jump): New variable buf. Use it for the
9091 read_inferior_memory and write_inferior_memory transfers.
9092 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9093 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9094 Use it for the write_inferior_memory transfer.
9095 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9096 buffers.
9097
9098 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9099
9100 * linux-low.c (fetch_register, store_register): Make code
9101 consistent, fix formatting.
9102
9103 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9104
9105 * linux-low.c (usr_store_inferior_registers): Factor out code
9106 to handle individual registers into...
9107 (store_register): ... this new function.
9108
9109 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9110
9111 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9112 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9113 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9114 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9115 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9116 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9117 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9118 (srv_xmlfiles): Add new XML files.
9119
9120 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9121 and <sys/uio.h>.
9122 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9123 (init_registers_s390_linux32v1): Add prototype.
9124 (init_registers_s390_linux32v2): Likewise.
9125 (init_registers_s390_linux64v1): Likewise.
9126 (init_registers_s390_linux64v2): Likewise.
9127 (init_registers_s390x_linux64v1): Likewise.
9128 (init_registers_s390x_linux64v2): Likewise.
9129 (s390_num_regs): Increment to 52.
9130 (s390_regmap): Add orig_r2 register.
9131 (s390_num_regs_3264): Increment to 68.
9132 (s390_regmap_3264): Add orig_r2 register.
9133 (s390_collect_ptrace_register): Handle orig_r2 register.
9134 (s390_supply_ptrace_register): Likewise.
9135 (s390_fill_last_break): New function.
9136 (s390_store_last_break): Likewise.
9137 (s390_fill_system_call): New function.
9138 (s390_store_system_call): Likewise.
9139 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9140 register sets.
9141 (s390_check_regset): New function.
9142 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9143 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9144 Update target_regsets for available register sets.
9145
9146 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9147 Jan Kratochvil <jan.kratochvil@redhat.com>
9148
9149 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9150 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9151 New.
9152 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9153 * linux-low.h (struct process_info_private): New member r_debug.
9154 * server.c (handle_qxfer_libraries): Call
9155 the_target->qxfer_libraries_svr4.
9156 (handle_qxfer_libraries_svr4): New function.
9157 (qxfer_packets): New entry "libraries-svr4".
9158 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9159 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9160 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9161 PACKET_qXfer_libraries_svr4.
9162
9163 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9164
9165 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9166 PSW address/mask between 8-byte and 16-byte formats.
9167 (s390_supply_ptrace_register): Likewise.
9168 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9169 basic addressing mode bit.
9170
9171 2011-11-24 Stan Shebs <stan@codesourcery.com>
9172
9173 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9174
9175 2011-11-17 Stan Shebs <stan@codesourcery.com>
9176
9177 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9178 (tracing_start_time): New global.
9179 (tracing_stop_time): New global.
9180 (tracing_user_name): New global.
9181 (tracing_notes): New global.
9182 (tracing_stop_note): New global.
9183 (cmd_qtstart): Set traceframe_usage, start_time.
9184 (stop_tracing): Set stop_time.
9185 (cmd_qtstatus): Report additional status.
9186 (cmd_qtp): New function.
9187 (handle_tracepoint_query): Call it.
9188 (cmd_qtnotes): New function.
9189 (handle_tracepoint_general_set): Call it.
9190 (get_timestamp): Rename from tsv_get_timestamp.
9191
9192 2011-11-14 Stan Shebs <stan@codesourcery.com>
9193 Kwok Cheung Yeung <kcy@codesourcery.com>
9194
9195 * linux-x86-low.c (small_jump_insn): New.
9196 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9197 trampoline and error message, build a trampoline and issue a small
9198 jump instruction to it.
9199 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9200 trampoline and error message.
9201 (x86_get_min_fast_tracepoint_insn_len): New.
9202 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9203 * linux-low.h (struct linux_target_ops): Add arguments to
9204 install_fast_tracepoint_jump_pad operation, add new operation.
9205 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9206 arguments.
9207 (linux_get_min_fast_tracepoint_insn_len): New function.
9208 (linux_target_op): Add new operation.
9209 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9210 (gdb_trampoline_buffer_end): Ditto.
9211 (gdb_trampoline_buffer_error): Ditto.
9212 (struct ipa_sym_addresses): Add fields for new IPA variables.
9213 (symbol_list): Add entries for new IPA variables.
9214 (struct tracepoint): Add fields to hold the address range of the
9215 trampoline used by the tracepoint.
9216 (trampoline_buffer_head): New static variable.
9217 (trampoline_buffer_tail): Ditto.
9218 (claim_trampoline_space): New function.
9219 (have_fast_tracepoint_trampoline_buffer): New function.
9220 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9221 structure.
9222 (install_fast_tracepoint): Ditto, also add error buffer argument.
9223 (cmd_qtminftpilen): New function.
9224 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9225 (fast_tracepoint_from_trampoline_address): New function.
9226 (fast_tracepoint_collecting): Handle trampoline as part of jump
9227 pad space.
9228 (set_trampoline_buffer_space): New function.
9229 (initialize_tracepoint): Initialize new IPA variables.
9230 * target.h (struct target_ops): Add arguments to
9231 install_fast_tracepoint_jump_pad operation, add new
9232 get_min_fast_tracepoint_insn_len operation.
9233 (target_get_min_fast_tracepoint_insn_len): New.
9234 (install_fast_tracepoint_jump_pad): Add arguments.
9235 * server.h (IPA_BUFSIZ): Define.
9236 * linux-i386-ipa.c: Include extra header files.
9237 (initialize_fast_tracepoint_trampoline_buffer): New function.
9238 (initialize_low_tracepoint): Call it.
9239 * server.h (set_trampoline_buffer_space): Declare.
9240 (claim_trampoline_space): Ditto.
9241 (have_fast_tracepoint_trampoline_buffer): Ditto.
9242
9243 2011-11-14 Yao Qi <yao@codesourcery.com>
9244
9245 * server.c (handle_query): Handle InstallInTrace for qSupported.
9246 * tracepoint.c (add_tracepoint): Sort list.
9247 (install_tracepoint, download_tracepoint): New.
9248 (cmd_qtdp): Call them to install and download tracepoints.
9249 (sort_tracepoints): Removed.
9250 (cmd_qtstart): Update.
9251
9252 2011-11-14 Yao Qi <yao@codesourcery.com>
9253
9254 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9255 * mem-break.h: Declare.
9256 * tracepoint.c (cmd_qtstart): Move some code to ...
9257 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9258 New.
9259 (download_tracepoints): Move some code to ...
9260 (download_tracepoint_1): ... here. New.
9261
9262 2011-11-08 Yao Qi <yao@codesourcery.com>
9263
9264 * remote-utils.c (relocate_instruction): A comment fix.
9265
9266 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9267
9268 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9269 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9270 dr_status_mirror and dr_control_mirror from debug_reg_state.
9271 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9272 (i386_initial_stuff): Remove use of deleted globals.
9273 (i386_get_thread_context, i386_set_thread_context,
9274 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9275 from debug_reg_state.
9276
9277 2011-11-05 Yao Qi <yao@codesourcery.com>
9278
9279 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9280 address as TPOINT's.
9281
9282 2011-11-02 Stan Shebs <stan@codesourcery.com>
9283
9284 * tracepoint.c (agent_mem_read_string): New function.
9285 (eval_agent_expr): Call it for tracenz.
9286 * server.c (handle_query): Report support for tracenz.
9287
9288 2011-11-02 Yao Qi <yao@codesourcery.com>
9289
9290 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9291
9292 2011-11-02 Yao Qi <yao@codesourcery.com>
9293
9294 * target.h: Fix a typo in comment.
9295
9296 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9297
9298 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9299 clobber the breakpoints' shadows with fast tracepoint jumps.
9300 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9301 * target.c (write_inferior_memory): Also pass MYADDR down to
9302 check_mem_write.
9303
9304 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9305
9306 * configure.ac: Check support for personality routine.
9307 * configure: Regenerate.
9308 * config.in: Likewise.
9309 * linux-low.c: Include <sys/personality.h>.
9310 Define ADDR_NO_RANDOMIZE if necessary.
9311 (linux_create_inferior): Disable address space randomization when
9312 forking inferior, if requested.
9313 (linux_supports_disable_randomization): New function.
9314 (linux_target_ops): Install it.
9315 * server.h (disable_randomization): Declare.
9316 * server.c (disable_randomization): New global variable.
9317 (handle_general_set): Handle QDisableRandomization.
9318 (handle_query): Likewise for qSupported.
9319 (main): Support --disable-randomization and --no-disable-randomization
9320 command line arguments.
9321 * target.h (struct target_ops): Add supports_disable_randomization.
9322 (target_supports_disable_randomization): New macro.
9323
9324 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9325
9326 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9327 ifdef check.
9328 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9329 [!PT_GETDSBT] (target_loadmap): New definition.
9330 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9331 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9332 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9333 and PT_GETDSBT to LINUX_LOADMAP.
9334 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9335 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9336
9337 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9338
9339 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9340 (arm_linux_hwbp_cap): New static variable.
9341 (arm_linux_get_hwbp_cap): Replace by ...
9342 (arm_linux_init_hwbp_cap): ... this new function.
9343 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9344 (arm_linux_get_hw_watchpoint_count): Likewise.
9345 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9346 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9347 (arm_prepare_to_resume): Use perror_with_name instead of error.
9348
9349 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9350
9351 * linux-arm-low.c: Include <signal.h>.
9352 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9353 (struct arm_linux_hwbp_cap): New data type.
9354 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9355 (struct arm_linux_hw_breakpoint): New data type.
9356 (MAX_BPTS, MAX_WPTS): Define.
9357 (struct arch_process_info, struct arch_lwp_info): New data types.
9358 (arm_linux_get_hwbp_cap): New function.
9359 (arm_linux_get_hw_breakpoint_count): Likewise.
9360 (arm_linux_get_hw_watchpoint_count): Likewise.
9361 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9362 (arm_hwbp_control_initialize): Likewise.
9363 (arm_hwbp_control_is_enabled): Likewise.
9364 (arm_hwbp_control_is_initialized): Likewise.
9365 (arm_hwbp_control_disable): Likewise.
9366 (arm_linux_hw_breakpoint_equal): Likewise.
9367 (arm_linux_hw_point_initialize): Likewise.
9368 (struct update_registers_data): New data structure.
9369 (update_registers_callback: New function.
9370 (arm_insert_point): Likewise.
9371 (arm_remove_point): Likewise.
9372 (arm_stopped_by_watchpoint): Likewise.
9373 (arm_stopped_data_address): Likewise.
9374 (arm_new_process): Likewise.
9375 (arm_new_thread): Likewise.
9376 (arm_prepare_to_resume): Likewise.
9377 (the_low_target): Register arm_insert_point, arm_remove_point,
9378 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9379 arm_new_thread, and arm_prepare_to_resume.
9380
9381 2011-09-15 Stan Shebs <stan@codesourcery.com>
9382
9383 * server.h (struct emit_ops): Add compare-goto fields.
9384 * tracepoint.c (gdb_agent_op_sizes): New table.
9385 (emit_eq_goto): New function.
9386 (emit_ne_goto): New function.
9387 (emit_lt_goto): New function.
9388 (emit_le_goto): New function.
9389 (emit_gt_goto): New function.
9390 (emit_ge_goto): New function.
9391 (is_goto_target): New function.
9392 (compile_bytecodes): Recognize special cases of compare-goto
9393 combinations and call specialized emitters for them.
9394 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9395 (amd64_emit_ne_goto): New function.
9396 (amd64_emit_lt_goto): New function.
9397 (amd64_emit_le_goto): New function.
9398 (amd64_emit_gt_goto): New function.
9399 (amd64_emit_ge_goto): New function.
9400 (amd64_emit_ops): Add the new functions.
9401 (i386_emit_eq_goto): New function.
9402 (i386_emit_ne_goto): New function.
9403 (i386_emit_lt_goto): New function.
9404 (i386_emit_le_goto): New function.
9405 (i386_emit_gt_goto): New function.
9406 (i386_emit_ge_goto): New function.
9407 (i386_emit_ops): Add the new functions.
9408
9409 2011-09-08 Stan Shebs <stan@codesourcery.com>
9410
9411 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9412 (i386_emit_epilogue): Restore %ebx.
9413
9414 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9415
9416 * server.c (step_thread): Remove definition.
9417 (process_serial_event): Don't handle Hs.
9418 * server.h (step_thread): Remove declaration.
9419 * target.c (set_desired_inferior): Remove use of step_thread.
9420
9421 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9422
9423 * linux-low.c: Include linux-procfs.h.
9424 (linux_attach_lwp_1): Update comments.
9425 (linux_attach): Scan for existing threads when attaching to a
9426 process that is the tgid.
9427 * Makefile.in: Update dependencies.
9428
9429 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9430
9431 * configure.srv: Add linux-procfs.o dependencies.
9432
9433 2011-08-14 Yao Qi <yao@codesourcery.com>
9434
9435 * target.h (struct target_ops): Fix indent.
9436 * win32-low.c (win32_target_ops): Fix comment.
9437
9438 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9439 Yao Qi <yao@codesourcery.com>
9440
9441 * Makefile.in (clean): Remove tic6x-*.c files.
9442 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9443 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9444 (tic6x-c64xp-linux.c): Likewise.
9445 * configure.srv: Add support for tic6x-*-uclinux.
9446 * linux-tic6x-low.c: New.
9447 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9448
9449 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9450 Yao Qi <yao@codesourcery.com>
9451
9452 * target.h (struct target_ops): Add read_loadmap.
9453 * linux-low.c (struct target_loadseg): New type.
9454 (struct target_loadmap): New type.
9455 (linux_read_loadmap): New function.
9456 (linux_target_ops): Add linux_read_loadmap.
9457 * server.c (handle_query): Support qXfer:fdpic:read packet.
9458 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9459 to NULL.
9460
9461 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9462
9463 * win32-low.c: Include <stdint.h>.
9464
9465 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9466
9467 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9468 to the inferior here.
9469 (i386_remove_aligned_watchpoint): Ditto.
9470 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9471 fit part of the watchpoint in the debug registers.
9472 (i386_update_inferior_debug_regs): New.
9473 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9474 registers, and only update the inferior on success.
9475 (i386_low_remove_watchpoint): Ditto.
9476
9477 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9478
9479 * linux-low.c (compare_ints, unique, list_threads, show_process,
9480 linux_core_of_thread): Delete.
9481 (linux_target_ops): Change linux_core_of_thread to
9482 linux_common_core_of_thread.
9483 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9484 * utils.c (malloc_failure): Change type of argument.
9485 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9486 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9487 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9488 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9489 (IPA_OBJS): Add common-utils-ipa.o.
9490 (ptid_h, linux_osdata_h): New macros.
9491 (server_h): Add common/common-utils.h, common/xml-utils.h,
9492 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9493 common/ptid.h.
9494 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9495 ptid.o, buffer.o): New rules.
9496 (linux-low.o): Add common/linux-osdata.h as a dependency.
9497 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9498 * configure.ac: Add AC_HEADER_DIRENT check.
9499 * config.in: Regenerate.
9500 * configure: Regenerate.
9501 * remote-utils.c (xml_escape_text): Delete.
9502 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9503 buffer_xml_printf): Move to common/buffer.c.
9504 * server.c (main): Remove call to initialize_inferiors.
9505 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9506 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9507 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9508 internal_error, gdb_assert, gdb_assert_fail): Delete.
9509 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9510 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9511 common/buffer.h.
9512 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9513 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9514 initialize_inferiors): Delete.
9515
9516 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9517
9518 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9519 symbol error.
9520
9521 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9522
9523 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9524 assertion.
9525 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9526
9527 2011-05-26 Yao Qi <yao@codesourcery.com>
9528
9529 * Makefile.in (thread-db.o): Track dependence to
9530 common/gdb_thread_db.h.
9531 * thread-db.c: include gdb_thread_db.h from right place.
9532
9533 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9534
9535 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9536 __FILE__ and __LINE__ to internal_error.
9537
9538 2011-05-13 Doug Evans <dje@google.com>
9539
9540 * thread-db.c (try_thread_db_load_from_sdir): New function.
9541 (try_thread_db_load_from_dir): New function.
9542 (thread_db_load_search): Handle $sdir, ignore $pdir.
9543 Remove trying of system directories if search of
9544 libthread-db-search-path fails, that is now done via $sdir.
9545
9546 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9547
9548 * server.c (handle_query): Add EnableDisableTracepoints to the list
9549 of supported features.
9550 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9551 tracepoints.
9552 (cmd_qtenable_disable): New.
9553 (cmd_qtstart): Install tracepoints even if disabled.
9554 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9555 receiving a QTEnable or QTDisable packet.
9556 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9557 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9558 tracepoints.
9559 (gdb_probe): Skip data collection if static tracepoint is disabled.
9560
9561 2011-05-10 Doug Evans <dje@google.com>
9562
9563 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9564
9565 2011-05-04 Doug Evans <dje@google.com>
9566
9567 * linux-low.c (linux_join): Skip process lookup.
9568 * spu-low.c (spu_join): Ditto.
9569 * server.c (join_inferiors_callback): Delete.
9570 (process_serial_event): For 'D' packet (detach) call join_inferior
9571 directly.
9572
9573 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9574
9575 * README: Don't mention xscale*-*-linux*.
9576 * configure.srv (xscale*-*-linux*): Don't handle target.
9577
9578 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9579
9580 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9581 casting pointers.
9582 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9583 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9584 (i386_emit_void_call_2): Likewise.
9585
9586 2011-04-26 Yao Qi <yao@codesourcery.com>
9587
9588 * linux-low.c: Move common macros to linux-ptrace.h.
9589 Include linux-ptrace.h.
9590 * Makefile.in (linux_ptrace_h): New.
9591 (linux-low.o): Depends on linux-ptrace.h.
9592
9593 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9594
9595 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9596 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9597 (remote_prepare): New function with most of the TCP code from ...
9598 (remote_open): ... here. Detect PORT here unconditionally. Move also
9599 setting transport_is_reliable.
9600 * server.c (run_once): New variable.
9601 (gdbserver_usage): Document it.
9602 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9603 the first run if RUN_ONCE.
9604 * server.h (run_once, remote_prepare): New declarations.
9605
9606 2011-04-19 Tom Tromey <tromey@redhat.com>
9607
9608 * win32-low.c (handle_load_dll): Remove duplicate "the".
9609
9610 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9611
9612 Remove support for old Cygwin 1.5 versions.
9613 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9614 function to avoid warning.
9615 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9616 warning.
9617
9618 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9619
9620 * gdbserver/server.h (Macro _): Define it if not available.
9621
9622 2011-03-14 Michael Snyder <msnyder@vmware.com>
9623
9624 * hostio.c (handle_close): Remove unnecessary null test.
9625
9626 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9627
9628 * Makefile.in (maintainer-clean realclean distclean): Remove
9629 "make ... subdir_do" command.
9630
9631 2011-03-10 Michael Snyder <msnyder@vmware.com>
9632
9633 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9634
9635 * server.c (handle_v_run): Free alloced buffer on early return.
9636
9637 2011-03-09 Yao Qi <yao@codesourcery.com>
9638
9639 Revert:
9640 2011-03-04 Yao Qi <yao@codesourcery.com>
9641
9642 * Makefile.in: Remove GNU make feature --directory.
9643
9644 2011-03-05 Yao Qi <yao@codesourcery.com>
9645
9646 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9647 (subdir_do): New make target. Copied from gdb/Makefile.
9648 (maintainer-clean, realclean, distclean, clean): Call corresponding
9649 make targets in common/Makefile.
9650
9651 2011-02-11 Yao Qi <yao@codesourcery.com>
9652
9653 * configure.ac: Call AC_PROG_RANLIB.
9654 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9655 * configure: Regenerate.
9656
9657 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9658
9659 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9660
9661 2011-03-06 Yao Qi <yao@codesourcery.com>
9662
9663 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9664
9665 2011-03-05 Yao Qi <yao@codesourcery.com>
9666
9667 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9668 (subdir_do): New make target. Copied from gdb/Makefile.
9669 (maintainer-clean, realclean, distclean, clean): Call corresponding
9670 make targets in common/Makefile.
9671
9672 2011-03-04 Yao Qi <yao@codesourcery.com>
9673
9674 * Makefile.in: Remove GNU make feature --directory.
9675
9676 2011-03-04 Michael Snyder <msnyder@vmware.com>
9677
9678 * server.c (queue_stop_reply): Call xmalloc not malloc.
9679
9680 2011-03-02 Michael Snyder <msnyder@vmware.com>
9681
9682 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9683
9684 2011-02-28 Michael Snyder <msnyder@vmware.com>
9685
9686 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9687 (cmd_qtframe): Ditto.
9688 (cmd_qtbuffer): Ditto.
9689 (cmd_bigqtbuffer): Ditto.
9690
9691 * utils.c (decimal2str): Initialize 'width' to nine, then
9692 don't mess with it.
9693
9694 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9695
9696 * hostio.c (require_data): Free *data, not data.
9697
9698 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9699
9700 * hostio.c (require_data): Use free, not xfree.
9701
9702 2011-02-27 Michael Snyder <msnyder@vmware.com>
9703
9704 * server.c (handle_query): Discard unused value.
9705
9706 * hostio.c (require_data): Free malloc memory before returning
9707 error.
9708
9709 2011-02-26 Michael Snyder <msnyder@vmware.com>
9710
9711 * linux-low.c (list_threads): Call closedir for dirent.
9712
9713 2011-02-27 Michael Snyder <msnyder@vmware.com>
9714
9715 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9716 a case statement falls through.
9717
9718 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9719
9720 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9721 in comparison.
9722
9723 2011-02-26 Michael Snyder <msnyder@vmware.com>
9724
9725 * utils.c (decimal2str): Eliminate dead code and dead param.
9726 (pulongest): Drop dead param from call to decimal2str.
9727 (plongest): Ditto.
9728
9729 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9730
9731 Revert the following patch (not approved yet):
9732 2011-02-21 Hui Zhu <teawater@gmail.com>
9733 * tracepoint.c (tp_printf): New function.
9734 (eval_agent_expr): Handle gdb_agent_op_printf.
9735
9736 2011-02-21 Hui Zhu <teawater@gmail.com>
9737
9738 * tracepoint.c (tp_printf): New function.
9739 (eval_agent_expr): Handle gdb_agent_op_printf.
9740
9741 2011-02-18 Tom Tromey <tromey@redhat.com>
9742
9743 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9744 (tracepoint.o): Likewise.
9745 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9746 (gdb_agent_op_names): Likewise.
9747
9748 2011-02-18 Tom Tromey <tromey@redhat.com>
9749
9750 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9751 gdb_agent_op_rot>: New constants.
9752 (gdb_agent_op_names): Add pick and roll.
9753 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9754 cases.
9755
9756 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9757
9758 * aclocal.m4: Regenerated with aclocal-1.11.1.
9759
9760 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9761
9762 * server.c (handle_qxfer_traceframe_info): New.
9763 (qxfer_packets): Register "traceframe-info".
9764 (handle_query): Report support for qXfer:traceframe-info:read+.
9765 * tracepoint.c (match_blocktype): New.
9766 (traceframe_find_block_type): Rename to ...
9767 (traceframe_walk_blocks): ... this. Add callback filter argument,
9768 and use it.
9769 (traceframe_find_block_type): New, reimplemented on top of
9770 traceframe_walk_blocks.
9771 (build_traceframe_info_xml): New.
9772 (traceframe_read_info): New.
9773 * server.h (traceframe_read_info): Declare.
9774
9775 2011-02-11 Yao Qi <yao@codesourcery.com>
9776
9777 * configure.ac: Call AC_PROG_RANLIB.
9778 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9779 * configure: Regenerate.
9780
9781 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9782
9783 * server.c (gdb_read_memory): Change return semantics to allow
9784 partial transfers.
9785 (handle_search_memory_1): Adjust.
9786 (process_serial_event) <'m' packet>: Handle partial transfers.
9787 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9788
9789 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9790
9791 * regcache.c (init_register_cache): Initialize
9792 regcache->register_status.
9793 (free_register_cache): Release regcache->register_status.
9794 (regcache_cpy): Copy register_status.
9795 (registers_to_string): Print 'x's for unavailable registers.
9796 (supply_register): Mark the register's status valid or
9797 unavailable, depending on whether a buffer was passed in or not.
9798 (supply_register_zeroed): New.
9799 (supply_regblock): Mark the registers' status valid or
9800 unavailable, depending on whether a buffer was passed in or not.
9801 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9802 (struct regcache): New `register_status' field.
9803 (supply_register_zeroed): Declare.
9804 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9805 supply_register_zeroed, rather than passing a NULL buffer to
9806 supply_register.
9807 * tracepoint.c (fetch_traceframe_registers): Update comment.
9808
9809 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9810
9811 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9812 buffer explicit.
9813
9814 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9815
9816 * server.h (decode_xfer_write): Change prototype.
9817 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9818 and don't extract the annex here.
9819 * server.c (decode_xfer_read): Remove `annex' parameter,
9820 and don't extract the annex here.
9821 (decode_xfer): New.
9822 (struct qxfer): New.
9823 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9824 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9825 (handle_qxfer_statictrace): New functions, abstracted out from
9826 handle_query, and made to use the struct qxfer interface.
9827 (handle_threads_qxfer_proper): Rename to ...
9828 (handle_qxfer_threads_proper): ... this.
9829 (handle_threads_qxfer): Rename to ...
9830 (handle_qxfer_threads): ... this. Adjust.
9831 (qxfer_packets): New array.
9832 (handle_qxfer): New function.
9833 (handle_query): Use handle_qxfer.
9834
9835 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9836
9837 * gdbreplay.c: Shorten lines of >= 80 columns.
9838 * linux-low.c: Ditto.
9839 * linux-ppc-low.c: Ditto.
9840 * linux-s390-low.c: Ditto.
9841 * linux-sparc-low.c: Ditto.
9842 * linux-x86-low.c: Ditto.
9843 * linux-xtensa-low.c: Ditto.
9844 * mem-break.c: Ditto.
9845 * nto-low.c: Ditto.
9846 * regcache.h: Ditto.
9847 * remote-utils.c: Ditto.
9848 * server.c: Ditto.
9849 * server.h: Ditto.
9850 * thread-db.c: Ditto.
9851 * tracepoint.c: Ditto.
9852 * utils.c: Ditto.
9853 * win32-low.h: Ditto.
9854
9855 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9856
9857 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9858 update.
9859
9860 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9861
9862 * server.c (gdbserver_version): Update copyright year in version
9863 output.
9864 * gdbreplay.c (gdbreplay_version): Ditto.
9865
9866 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9867
9868 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9869 * linux-bfin-low.c: New file.
9870 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9871 PT_DATA_ADDR for BFIN targets.
9872 * Makefile.in (SFILES): Add linux-bfin-low.c.
9873 (clean): Remove reg-bfin.c.
9874 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9875 * README: Mention supported Blackfin targets.
9876
9877 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9878
9879 * .gitignore: New file.
9880
9881 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9882
9883 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9884
9885 2010-10-22 Jie Zhang <jie@codesourcery.com>
9886
9887 * Makefile.in: Add FLAGS_TO_PASS variable.
9888 (install): Remove dependency of install-only and recursively
9889 invoke make for install-only.
9890
9891 2010-10-04 Doug Evans <dje@google.com>
9892
9893 * Makefile.in (uninstall): Use $(DESTDIR).
9894
9895 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9896
9897 PR gdb/11842
9898
9899 * linux-x86-low.c (compat_siginfo_from_siginfo)
9900 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9901 si_code is < 0. Check for si_code == SI_TIMER before checking for
9902 si_code < 0.
9903
9904 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9905
9906 * lynx-i386-low.c: New file.
9907 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9908
9909 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9910
9911 * lynx-low.c (ptrace_request_to_str): Remove handling for
9912 request values that have been removed in LynxOS 5.x.
9913
9914 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9915
9916 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9917 <ptrace.h>
9918
9919 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9920
9921 * configure.ac: Add --enable-inprocess-agent option.
9922 * configure: Rebuilt.
9923
9924 2010-09-06 Yao Qi <yao@codesourcery.com>
9925
9926 * linux-low.c (linux_kill): Remove unused variable.
9927 (linux_stabilize_threads): Likewise.
9928 * server.c (start_inferior): Likewise.
9929 (queue_stop_reply_callback): Likewise.
9930 * tracepoint.c (do_action_at_tracepoint): Likewise.
9931
9932 2010-09-06 Yao Qi <yao@codesourcery.com>
9933
9934 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9935 on return.
9936
9937 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9938
9939 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9940
9941 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9942
9943 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9944 "$(IPA_DEPFILES)".
9945
9946 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9947
9948 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9949 gdbserver/lynx-ppc-low.c: New files.
9950 * Makefile.in (lynx_low_h): New variable.
9951 (lynx-low.o, lynx-ppc-low.o): New rules.
9952 * configure.ac: On LynxOS, link with -lnetinet.
9953 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9954 * configure: regenerate.
9955
9956 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9957
9958 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9959 * configure.ac: Add check for vasprintf and vsnprintf.
9960 * configure, config.in: Regenerate.
9961 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9962
9963 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9964
9965 * gdbreplay.c: Move include of alloca.h up, next to include of
9966 malloc.h.
9967 * server.h: Add include of malloc.h.
9968 * mem-break.c: Remove include of malloc.h.
9969 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9970
9971 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9972
9973 * Makefile.in (memmem.o): Build with -Wno-error.
9974
9975 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9976
9977 * utils.c (xsnprintf): Make non-static.
9978 * server.h: Add xsnprintf declaration.
9979 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9980 replace calls to snprintf by calls to xsnprintf throughout.
9981
9982 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9983
9984 * configure.ac: Add configure check for alloca.
9985 * configure, config.in: Regenerate.
9986 * server.h: Include alloca.h if it exists.
9987 * gdbreplay.c: Include alloca.h if it exists.
9988
9989 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9990
9991 * linux-low.c (__SIGRTMIN): Define if not already defined.
9992 (linux_create_inferior): Check for __ANDROID__ rather than
9993 __SIGRTMIN.
9994 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9995 are already deferred.
9996 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9997 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9998 stopped and already has a pending signal to report.
9999 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10000 a pending signal to report or is moving out of a jump pad.
10001 (linux_init_signals): Check for __ANDROID__ rather than
10002 __SIGRTMIN.
10003
10004 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10005
10006 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10007 debug_threads check. Avoid a linear search when not doing debug
10008 output.
10009
10010 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10011
10012 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10013 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10014 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10015 (process_event): Change local fd's type to gdb_fildes_t.
10016 (create_file_handler): Adjust prototype.
10017 (delete_file_handler): Adjust prototype.
10018 (handle_file_event): Adjust prototype. Use pfildes.
10019 (create_file_event): Adjsut prototype.
10020 * remote-utils.c (remote_desc, listen_desc): Change type to
10021 gdb_fildes_t.
10022 * server.h: New gdb_fildes_t typedef.
10023 [USE_WIN32API]: Include winsock2.h.
10024 (delete_file_handler, add_file_handler): Adjust prototypes.
10025 (pfildes): Declare.
10026 * utils.c (pfildes): New.
10027
10028 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10029
10030 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10031 * configure: Regenerate.
10032
10033 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10034
10035 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10036 (linux_done_accessing_memory): ... this.
10037 (linux_target_ops): Adjust.
10038 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10039 * nto-low.c (nto_target_ops): Adjust comment.
10040 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10041 * spu-low.c (spu_target_ops): Adjust comment.
10042 * target.h (target_ops): Rename unprepare_to_access_memory field
10043 to done_accessing_memory.
10044 (unprepare_to_access_memory): Rename to ...
10045 (done_accessing_memory): ... this.
10046
10047 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10048
10049 * linux-low.c (linux_prepare_to_access_memory): New.
10050 (linux_unprepare_to_access_memory): New.
10051 (linux_target_ops): Install them.
10052 * server.c (read_memory): Rename to ...
10053 (gdb_read_memory): ... this. Use
10054 prepare_to_access_memory/prepare_to_access_memory.
10055 (write_memory): Rename to ...
10056 (gdb_write_memory): ... this. Use
10057 prepare_to_access_memory/prepare_to_access_memory.
10058 (handle_search_memory_1): Adjust.
10059 (process_serial_event): Adjust.
10060 * target.h (struct target_ops): New fields
10061 prepare_to_access_memory and unprepare_to_access_memory.
10062 (prepare_to_access_memory, unprepare_to_access_memory): New.
10063 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10064 prepare_to_access_memory/prepare_to_access_memory.
10065 * nto-low.c (nto_target_ops): Adjust.
10066 * spu-low.c (spu_target_ops): Adjust.
10067 * win32-low.c (win32_target_ops): Adjust.
10068
10069 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10070
10071 * Makefile.in (WARN_CFLAGS): Get it from configure.
10072 (WERROR_CFLAGS): New.
10073 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10074 * configure.ac: Introduce --enable-werror, which adds -Werror to
10075 the compiler command line. Enabled by default. Disable with
10076 --disable-werror. Add -Wdeclaration-after-statement
10077 Wpointer-arith and -Wformat-nonliteral to warning flags.
10078 * configure: Regenerate.
10079
10080 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10081
10082 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10083
10084 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10085
10086 * gdbreplay.c (remote_error): New.
10087 (gdbchar): New.
10088 (expect): Use gdbchar. Check for error reading from GDB.
10089 Clarify sync error output.
10090 (play): Check for errors writing to GDB.
10091 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10092 * remote-utils.c (getpkt): Check for errors writing to the remote
10093 descriptor.
10094
10095 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10096
10097 * linux-low.c (linux_wait_1): Move non-debugging code out of
10098 `debug_threads' control.
10099
10100 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10101
10102 * linux-low.c (linux_wait_1): Don't set last_status here.
10103 * server.c (push_event, queue_stop_reply_callback): Assert we're
10104 not pushing a TARGET_WAITKIND_IGNORE event.
10105 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10106 (myresume, handle_target_event): Set the thread's last_resume_kind
10107 and last_status from the target returned status.
10108
10109 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10110
10111 PR threads/10729
10112
10113 * linux-x86-low.c (update_debug_registers_callback): New.
10114 (i386_dr_low_set_addr): Use it.
10115 (i386_dr_low_get_addr): New.
10116 (i386_dr_low_set_control): Use update_debug_registers_callback.
10117 (i386_dr_low_get_control): New.
10118 (i386_dr_low_get_status): Adjust.
10119 * linux-low.c (linux_stop_lwp): New.
10120 * linux-low.h (linux_stop_lwp): Declare.
10121
10122 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10123 argument instead of a i386_debug_reg_state.
10124 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10125 a i386_debug_reg_state.
10126 (i386_insert_aligned_watchpoint): Adjust.
10127 (i386_remove_aligned_watchpoint): Adjust.
10128 (i386_low_stopped_data_address): Read the debug registers from the
10129 inferior instead of from the mirrors.
10130 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10131 (i386_dr_low_get_addr): Declare.
10132 (i386_dr_low_get_control): Declare.
10133 (i386_dr_low_get_status): Change prototype.
10134
10135 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10136 (i386_dr_low_get_addr): New.
10137 (i386_dr_low_get_control): New.
10138 (i386_dr_low_get_status): Adjust prototype. Return
10139 dr_status_mirror.
10140 (i386_initial_stuff): Clear dr_status_mirror and
10141 dr_control_mirror.
10142 (i386_get_thread_context): Adjust.
10143 (i386_set_thread_context): Adjust.
10144 (i386_thread_added): Adjust.
10145
10146 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10147
10148 * linux-low.h (linux_thread_area): Delete declaration.
10149
10150 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10151
10152 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10153 after its termination.
10154
10155 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10156
10157 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10158 (gdb_wants_all_stopped): Delete.
10159 (linux_wait_1): Don't call them.
10160 * server.c (handle_v_cont): Tag all threads as want-stopped.
10161 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10162 stopped as "client-wants-stopped".
10163
10164 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10165
10166 * Makefile.in (signals_h): New.
10167 (server_h): Depend on it.
10168 (server.o): Don't depend on $(signals_def).
10169 (signals.o): Depend on $(signals_def).
10170
10171 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10172
10173 * Makefile.in (signals_def): New.
10174 (server_h): Append include/gdb/signals.h and signals_def.
10175 (server.o): Append signals_def.
10176
10177 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10178
10179 * server.c (handle_target_event): Use target_signal_to_host for
10180 resume_info.sig initialization.
10181 * target.h (struct thread_resume) <sig>: New comment.
10182
10183 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10184
10185 * server.c (handle_query): strcpy() the returned string from paddress()
10186 instead of sprintf().
10187 * utils.c (paddress): Return phex_nz().
10188
10189 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10190
10191 * server.c (handle_v_cont): Call mourn_inferior if process
10192 just exited.
10193 (myresume): Likewise.
10194
10195 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10196
10197 Static tracepoints, and integration with UST.
10198
10199 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10200 * mem-break.c (uninsert_all_breakpoints)
10201 (reinsert_all_breakpoints): New.
10202 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10203 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10204 (gdb_agent_ust_loaded, helper_thread_id)
10205 (gdb_agent_helper_thread_id): New macros.
10206 (struct ipa_sym_addresses): Add addr_ust_loaded,
10207 addr_helper_thread_id, addr_cmd_buf.
10208 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10209 (in_process_agent_loaded_ust): New.
10210 (write_e_ust_not_loaded): New.
10211 (maybe_write_ipa_ust_not_loaded): New.
10212 (struct collect_static_trace_data_action): New.
10213 (enum tracepoint_type) <static_tracepoint>: New.
10214 (struct tracepoint) <handle>: Mention static tracepoints.
10215 (struct static_tracepoint_ctx): New.
10216 (CMD_BUF_SIZE): New.
10217 (add_tracepoint_action): Handle static tracepoint actions.
10218 (unprobe_marker_at): New.
10219 (clear_installed_tracepoints): Handle static tracepoints.
10220 (cmd_qtdp): Handle static tracepoints.
10221 (probe_marker_at): New.
10222 (cmd_qtstart): Handle static tracepoints.
10223 (response_tracepoint): Handle static tracepoints.
10224 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10225 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10226 (get_context_regcache): Handle static tracepoints.
10227 (do_action_at_tracepoint): Handle static tracepoint actions.
10228 (traceframe_find_block_type): Handle static trace data blocks.
10229 (traceframe_read_sdata): New.
10230 (download_tracepoints): Download static tracepoint actions.
10231 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10232 (GDB_PROBE_NAME): New.
10233 (ust_ops): New.
10234 (GET_UST_SYM): New.
10235 (USTF): New.
10236 (dlsym_ust): New.
10237 (ust_marker_to_static_tracepoint): New.
10238 (gdb_probe): New.
10239 (collect_ust_data_at_tracepoint): New.
10240 (gdb_ust_probe): New.
10241 (UNIX_PATH_MAX, SOCK_DIR): New.
10242 (gdb_ust_connect_sync_socket): New.
10243 (resume_thread, stop_thread): New.
10244 (run_inferior_command): New.
10245 (init_named_socket): New.
10246 (gdb_ust_socket_init): New.
10247 (cstr_to_hexstr): New.
10248 (next_st): New.
10249 (first_marker, next_marker): New.
10250 (response_ust_marker): New.
10251 (cmd_qtfstm, cmd_qtsstm): New.
10252 (unprobe_marker_at, probe_marker_at): New.
10253 (cmd_qtstmat, gdb_ust_thread): New.
10254 (gdb_ust_init): New.
10255 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10256 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10257 (ST_REGENTRY): New.
10258 (x86_64_st_collect_regmap): New.
10259 (X86_64_NUM_ST_COLLECT_GREGS): New.
10260 (AMD64_RIP_REGNUM): New.
10261 (supply_static_tracepoint_registers): New.
10262 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10263 (ST_REGENTRY): New.
10264 (i386_st_collect_regmap): New.
10265 (i386_NUM_ST_COLLECT_GREGS): New.
10266 (supply_static_tracepoint_registers): New.
10267 * server.c (handle_query): Handle qXfer:statictrace:read.
10268 <qSupported>: Report support for StaticTracepoints, and
10269 qXfer:statictrace:read features.
10270 * server.h (traceframe_read_sdata)
10271 (supply_static_tracepoint_registers): Declare.
10272 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10273 (unpack_varlen_hex): Include in IPA build.
10274 * Makefile.in (ustlibs, ustinc): New.
10275 (IPA_OBJS): Add remote-utils-ipa.o.
10276 ($(IPA_LIB)): Link -ldl and -lpthread.
10277 (UST_CFLAGS): New.
10278 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10279 * config.in, configure: Regenerate.
10280
10281 2010-06-20 Ian Lance Taylor <iant@google.com>
10282 Pedro Alves <pedro@codesourcery.com>
10283
10284 * linux-x86-low.c (always_true): Delete.
10285 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10286 trying to fool the compiler with always_true.
10287
10288 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10289
10290 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10291 conditions in gdbserver.
10292
10293 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10294
10295 * spu-low.c (spu_read_memory): Wrap around local store limit.
10296 (spu_write_memory): Likewise.
10297
10298 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10299
10300 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10301 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10302 LONGEST uses.
10303 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10304 uses.
10305 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10306 uses with LONGEST uses.
10307
10308 2010-06-14 Stan Shebs <stan@codesourcery.com>
10309 Pedro Alves <pedro@codesourcery.com>
10310
10311 Bytecode compiler.
10312
10313 * linux-x86-low.c: Include limits.h.
10314 (add_insns): New.
10315 (always_true): New.
10316 (EMIT_ASM): New.
10317 (EMIT_ASM32): New.
10318 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10319 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10320 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10321 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10322 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10323 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10324 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10325 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10326 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10327 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10328 (amd64_emit_void_call_2): New.
10329 (amd64_emit_ops): New.
10330 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10331 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10332 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10333 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10334 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10335 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10336 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10337 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10338 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10339 (i386_emit_stack_adjust, i386_emit_int_call_1)
10340 (i386_emit_void_call_2): New.
10341 (i386_emit_ops): New.
10342 (x86_emit_ops): New.
10343 (the_low_target): Install x86_emit_ops.
10344 * server.h (struct emit_ops): New.
10345 (get_raw_reg_func_addr): Declare.
10346 (current_insn_ptr, emit_error): Declare.
10347 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10348 (set_trace_state_variable_value): New defines.
10349 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10350 addr_get_trace_state_variable_value and
10351 addr_set_trace_state_variable_value.
10352 (symbol_list): New fields for get_raw_reg,
10353 get_trace_state_variable_value and set_trace_state_variable_value.
10354 (condfn): New typedef.
10355 (struct tracepoint): New field `compiled_cond'.
10356 (do_action_at_tracepoint): Clear compiled_cond.
10357 (get_trace_state_variable_value, set_trace_state_variable_value):
10358 Export in the IPA.
10359 (condition_true_at_tracepoint): If there's a compiled condition,
10360 run that.
10361 (current_insn_ptr, emit_error): New globals.
10362 (struct bytecode_address): New.
10363 (get_raw_reg_func_addr): New.
10364 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10365 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10366 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10367 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10368 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10369 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10370 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10371 (compile_tracepoint_condition, compile_bytecodes): New.
10372 * target.h (emit_ops): Forward declare.
10373 (struct target_ops): New field emit_ops.
10374 (target_emit_ops): New.
10375 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10376 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10377 * linux-low.c (linux_emit_ops): New.
10378 (linux_target_ops): Install it.
10379 * linux-low.h (struct linux_target_ops): New field emit_ops.
10380
10381 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10382
10383 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10384 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10385
10386 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10387 Stan Shebs <stan@codesourcery.com>
10388
10389 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10390 (all): Depend on $(extra_libraries).
10391 (install-only): Install the IPA.
10392 (IPA_OBJS, IPA_LIB): New.
10393 (clean): Remove the IPA lib.
10394 (IPAGENT_CFLAGS): New.
10395 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10396 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10397 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10398 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10399 * configure.ac: Check for atomic builtins support in the compiler.
10400 (IPA_DEPFILES, extra_libraries): Define.
10401 * configure.srv (ipa_obj): Add description.
10402 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10403 (i[34567]86-*-linux*): Set ipa_obj.
10404 (x86_64-*-linux*): Set ipa_obj.
10405 * linux-low.c (stabilizing_threads): New.
10406 (supports_fast_tracepoints): New.
10407 (linux_detach): Stabilize threads before detaching.
10408 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10409 the lwp is either not stabilizing, or is moving out of a jump pad.
10410 (linux_fast_tracepoint_collecting): New.
10411 (maybe_move_out_of_jump_pad): New.
10412 (enqueue_one_deferred_signal): New.
10413 (dequeue_one_deferred_signal): New.
10414 (linux_wait_for_event_1): If moving out of a jump pad, defer
10415 pending signals to later.
10416 (linux_stabilize_threads): New.
10417 (linux_wait_1): Check if threads need moving out of jump pads, and
10418 do it if so.
10419 (stuck_in_jump_pad_callback): New.
10420 (move_out_of_jump_pad_callback): New.
10421 (lwp_running): New.
10422 (linux_resume_one_lwp): Handle moving out of jump pads.
10423 (linux_set_resume_request): Dequeue deferred signals.
10424 (need_step_over_p): Also step over fast tracepoint jumps.
10425 (start_step_over): Also uninsert fast tracepoint jumps.
10426 (finish_step_over): Also reinsert fast tracepoint jumps.
10427 (linux_install_fast_tracepoint_jump): New.
10428 (linux_target_ops): Install linux_stabilize_threads and
10429 linux_install_fast_tracepoint_jump_pad.
10430 * linux-low.h (linux_target_ops) <get_thread_area,
10431 install_fast_tracepoint_jump_pad>: New fields.
10432 (struct lwp_info) <collecting_fast_tracepoint,
10433 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10434 (linux_get_thread_area): Declare.
10435 * linux-x86-low.c (jump_insn): New.
10436 (x86_get_thread_area): New.
10437 (append_insns): New.
10438 (push_opcode): New.
10439 (amd64_install_fast_tracepoint_jump_pad): New.
10440 (i386_install_fast_tracepoint_jump_pad): New.
10441 (x86_install_fast_tracepoint_jump_pad): New.
10442 (the_low_target): Install x86_get_thread_area and
10443 x86_install_fast_tracepoint_jump_pad.
10444 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10445 (struct fast_tracepoint_jump): New.
10446 (fast_tracepoint_jump_insn): New.
10447 (fast_tracepoint_jump_shadow): New.
10448 (find_fast_tracepoint_jump_at): New.
10449 (fast_tracepoint_jump_here): New.
10450 (delete_fast_tracepoint_jump): New.
10451 (set_fast_tracepoint_jump): New.
10452 (uninsert_fast_tracepoint_jumps_at): New.
10453 (reinsert_fast_tracepoint_jumps_at): New.
10454 (set_breakpoint_at): Use write_inferior_memory.
10455 (uninsert_raw_breakpoint): Use write_inferior_memory.
10456 (check_mem_read): Mask out fast tracepoint jumps.
10457 (check_mem_write): Mask out fast tracepoint jumps.
10458 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10459 (set_fast_tracepoint_jump): Declare.
10460 (delete_fast_tracepoint_jump)
10461 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10462 (reinsert_fast_tracepoint_jumps_at): Declare.
10463 * regcache.c: Don't compile many functions when building the
10464 in-process agent library.
10465 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10466 the register buffer in the heap.
10467 (free_register_cache): If the register buffer isn't owned by the
10468 regcache, don't free it.
10469 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10470 pre-existing register caches.
10471 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10472 type.
10473 (convert_ascii_to_int): : Constify `from' parameter type.
10474 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10475 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10476 the needed buffer in-place.
10477 (relocate_instruction): New.
10478 * server.c (handle_query) <qSymbols>: If the target supports
10479 tracepoints, give it a chance of looking up symbols. Report
10480 support for fast tracepoints.
10481 (handle_status): Stabilize threads.
10482 (process_serial_event): Adjust.
10483 * server.h (struct fast_tracepoint_jump): Forward declare.
10484 (struct process_info) <fast_tracepoint_jumps>: New field.
10485 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10486 (decode_X_packet, decode_M_packet): Adjust.
10487 (relocate_instruction): Declare.
10488 (in_process_agent_loaded): Declare.
10489 (tracepoint_look_up_symbols): Declare.
10490 (struct fast_tpoint_collect_status): Declare.
10491 (fast_tracepoint_collecting): Declare.
10492 (force_unlock_trace_buffer): Declare.
10493 (handle_tracepoint_bkpts): Declare.
10494 (initialize_low_tracepoint)
10495 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10496 * target.h (struct target_ops) <stabilize_threads,
10497 install_fast_tracepoint_jump_pad>: New fields.
10498 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10499 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10500 [HAVE_STDINT_H]: Include stdint.h.
10501 (trace_debug_1): Rename to ...
10502 (trace_vdebug): ... this.
10503 (trace_debug): Rename to ...
10504 (trace_debug_1): ... this. Add `level' parameter.
10505 (trace_debug): New.
10506 (ATTR_USED, ATTR_NOINLINE): New.
10507 (IP_AGENT_EXPORT): New.
10508 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10509 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10510 (about_to_request_buffer_space, trace_buffer_is_full)
10511 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10512 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10513 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10514 (traceframe_write_count, traceframes_created)
10515 (trace_state_variables)
10516 New renaming defines.
10517 (struct ipa_sym_addresses): New.
10518 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10519 (symbol_list): New.
10520 (ipa_sym_addrs): New.
10521 (all_tracepoint_symbols_looked_up): New.
10522 (in_process_agent_loaded): New.
10523 (write_e_ipa_not_loaded): New.
10524 (maybe_write_ipa_not_loaded): New.
10525 (tracepoint_look_up_symbols): New.
10526 (debug_threads) [IN_PROCESS_AGENT]: New.
10527 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10528 (UNKNOWN_SIDE_EFFECTS): New.
10529 (stop_tracing): New.
10530 (flush_trace_buffer): New.
10531 (stop_tracing_bkpt): New.
10532 (flush_trace_buffer_bkpt): New.
10533 (read_inferior_integer): New.
10534 (read_inferior_uinteger): New.
10535 (read_inferior_data_pointer): New.
10536 (write_inferior_data_pointer): New.
10537 (write_inferior_integer): New.
10538 (write_inferior_uinteger): New.
10539 (struct collect_static_trace_data_action): Delete.
10540 (enum tracepoint_type): New.
10541 (struct tracepoint) <type>: New field `type'.
10542 <actions_str, step_actions, step_actions_str>: Only include in
10543 GDBserver.
10544 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10545 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10546 (tracepoints): Use IP_AGENT_EXPORT.
10547 (last_tracepoint): Don't include in the IPA.
10548 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10549 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10550 (alloced_trace_state_variables): New.
10551 (trace_state_variables): Use IP_AGENT_EXPORT.
10552 (traceframe_t): Delete unused variable.
10553 (circular_trace_buffer): Don't include in the IPA.
10554 (trace_buffer_start): Delete.
10555 (struct trace_buffer_control): New.
10556 (trace_buffer_free): Delete.
10557 (struct ipa_trace_buffer_control): New.
10558 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10559 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10560 New.
10561 (trace_buffer_ctrl): New.
10562 (TRACE_BUFFER_CTRL_CURR): New.
10563 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10564 Reimplement as macros.
10565 (trace_buffer_wrap): Delete.
10566 (traceframe_write_count, traceframe_read_count)
10567 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10568 (struct tracepoint_hit_ctx) <type>: New field.
10569 (struct fast_tracepoint_ctx): New.
10570 (memory_barrier): New.
10571 (cmpxchg): New.
10572 (record_tracepoint_error): Update atomically in the IPA.
10573 (clear_inferior_trace_buffer): New.
10574 (about_to_request_buffer_space): New.
10575 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10576 updating the same buffer.
10577 (add_tracepoint): Default the tracepoint's type to trap
10578 tracepoint, and orig_size to -1.
10579 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10580 internal variables.
10581 (create_trace_state_variable): New parameter `gdb'. Handle it.
10582 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10583 (cmd_qtdp): Handle fast tracepoints.
10584 (cmd_qtdv): Adjust.
10585 (max_jump_pad_size): New.
10586 (gdb_jump_pad_head): New.
10587 (get_jump_space_head): New.
10588 (claim_jump_space): New.
10589 (sort_tracepoints): New.
10590 (MAX_JUMP_SIZE): New.
10591 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10592 IPA.
10593 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10594 support. Upload fast traceframes, and delete internal IPA
10595 breakpoints.
10596 (stop_tracing_handler): New.
10597 (flush_trace_buffer_handler): New.
10598 (cmd_qtstop): Upload fast tracepoints.
10599 (response_tracepoint): Handle fast tracepoints.
10600 (tracepoint_finished_step): Upload fast traceframes. Set the
10601 tracepoint hit context's tracepoint type.
10602 (handle_tracepoint_bkpts): New.
10603 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10604 type. Add comment about fast tracepoints.
10605 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10606 non-existing action_str field.
10607 (get_context_regcache): Handle fast tracepoints.
10608 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10609 to the regcache.
10610 (fast_tracepoint_from_jump_pad_address): New.
10611 (fast_tracepoint_from_ipa_tpoint_address): New.
10612 (collecting_t): New.
10613 (force_unlock_trace_buffer): New.
10614 (fast_tracepoint_collecting): New.
10615 (collecting): New.
10616 (gdb_collect): New.
10617 (write_inferior_data_ptr): New.
10618 (target_tp_heap): New.
10619 (target_malloc): New.
10620 (download_agent_expr): New.
10621 (UALIGN): New.
10622 (download_tracepoints): New.
10623 (download_trace_state_variables): New.
10624 (upload_fast_traceframes): New.
10625 (IPA_FIRST_TRACEFRAME): New.
10626 (IPA_NEXT_TRACEFRAME_1): New.
10627 (IPA_NEXT_TRACEFRAME): New.
10628 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10629 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10630 (gdb_jump_pad_buffer_end): New.
10631 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10632 (initialize_tracepoint): Adjust.
10633 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10634 buffer. Initialize the low module.
10635 * utils.c (PREFIX, TOOLNAME): New.
10636 (malloc_failure): Use PREFIX.
10637 (error): In the IPA, an error causes an exit.
10638 (fatal, warning): Use PREFIX.
10639 (internal_error): Use TOOLNAME.
10640 (NUMCELLS): Increase to 10.
10641 * configure, config.in: Regenerate.
10642
10643 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10644
10645 * server.c (handle_query) <qSupported>: Do two passes over the
10646 qSupported string to avoid nesting strtok.
10647
10648 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10649
10650 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10651 (CDEPS): New.
10652 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10653 -Wl,--dynamic-list.
10654 * configure: Regenerate.
10655 * proc-service.list: New.
10656
10657 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10658
10659 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10660 New comment.
10661
10662 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10663
10664 * gdbreplay.c (remote_open): Check error return from socket() call by
10665 its equality to -1 not by it being negative.
10666 * remote-utils.c (remote_open): Likewise.
10667
10668 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10669
10670 * config.h: Regenerate.
10671
10672 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10673
10674 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10675 doesn't provide PTRACE_GET_THREAD_AREA.
10676
10677 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10678
10679 * linux-m68k-low.c: Include <asm/ptrace.h>
10680 (ps_get_thread_area): Implement.
10681
10682 2010-05-03 Doug Evans <dje@google.com>
10683
10684 * event-loop.c (struct callback_event): New struct.
10685 (callback_list): New global.
10686 (append_callback_event, delete_callback_event): New functions.
10687 (process_callback): New function.
10688 (start_event_loop): Call it.
10689 * remote-utils.c (NOT_SCHEDULED): Define.
10690 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10691 moved out of readchar.
10692 (readchar): Rewrite. Call reschedule before returning.
10693 (reset_readchar): New function.
10694 (remote_close): Call it.
10695 (process_remaining, reschedule): New functions.
10696 * server.h (callback_handler_func): New typedef.
10697 (append_callback_event, delete_callback_event): Declare.
10698
10699 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10700
10701 * proc-service.c (ps_pglobal_lookup): Use
10702 thread_db_look_up_one_symbol.
10703 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10704 parameter. Use it instead of all_symbols_looked_up.
10705 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10706 field.
10707 (all_symbols_looked_up): Don't declare.
10708 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10709 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10710 field.
10711 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10712 Set all_symbols_looked_up here.
10713 (thread_db_look_up_one_symbol): New.
10714 (thread_db_get_tls_address): Adjust.
10715 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10716 thread_db object on the heap, and tentatively set it in the
10717 process structure.
10718 (thread_db_init): Don't set all_symbols_looked_up here.
10719 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10720
10721 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10722
10723 * linux-low.c (linux_kill, linux_detach): Adjust.
10724 (status_pending_p_callback): Remove redundant statement. Check
10725 for !TARGET_WAITIKIND_IGNORE, instead of
10726 TARGET_WAITKIND_STOPPED.
10727 (handle_tracepoints): Make sure LWP is locked. Adjust.
10728 (linux_wait_for_event_1): Adjust.
10729 (linux_cancel_breakpoints): New.
10730 (unsuspend_one_lwp): New.
10731 (unsuspend_all_lwps): New.
10732 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10733 (send_sigstop_callback): Change return type to int, add new
10734 `except' parameter and handle it.
10735 (suspend_and_send_sigstop_callback): New.
10736 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10737 pass them down. If SUSPEND, also increment the lwp's suspend
10738 count.
10739 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10740 (need_step_over_p): Don't consider suspended LWPs.
10741 (start_step_over): Adjust.
10742 (proceed_one_lwp): Change return type to int, add new `except'
10743 parameter and handle it.
10744 (unsuspend_and_proceed_one_lwp): New.
10745 (proceed_all_lwps): Use find_inferior instead of
10746 for_each_inferior.
10747 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10748 also decrement the suspend count of LWPs. Pass `except' down,
10749 instead of hacking its suspend count.
10750 (linux_pause_all): Add `freeze' parameter. Adjust.
10751 (linux_unpause_all): New.
10752 (linux_target_ops): Install linux_unpause_all.
10753 * server.c (handle_status): Adjust.
10754 * target.h (struct target_ops): New fields `unpause_all' and
10755 `cancel_breakpoints'. Add new parameter to `pause_all'.
10756 (pause_all): Add new `freeze' parameter.
10757 (unpause_all): New.
10758 (cancel_breakpoints): New.
10759 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10760 cancel breakpoints.
10761 (cmd_qtstart): Pause threads.
10762 (stop_tracing): Pause threads, and cancel breakpoints.
10763 * win32-low.c (win32_target_ops): Adjust.
10764
10765 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10766
10767 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10768 the inferior right away from here...
10769 (linux_wait_1): ... to here, and adjust to check the thread's
10770 last_resume_kind instead of the lwp's step or stop_expected flags.
10771
10772 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10773
10774 * README: Use consistent `GDB' and `GDBserver' spellings.
10775
10776 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10777
10778 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10779 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10780 (linux_detach_one_lwp): Assume the lwp is stopped.
10781 (any_thread_of): Delete.
10782 (linux_detach): Stop all lwps here. Don't blindly delete all
10783 breakpoints.
10784 (delete_lwp_callback): New.
10785 (linux_mourn): Delete all lwps of the process that is gone.
10786 (linux_wait_1): Don't delete the last lwp of the process here.
10787 * mem-break.h (mark_breakpoints_out): Declare.
10788 * mem-break.c (mark_breakpoints_out): New.
10789 (free_all_breakpoints): Use it.
10790 * server.c (handle_target_event): If the process is gone, mark
10791 breakpoints out.
10792 * thread-db.c (struct thread_db) <create_bp>: New field.
10793 (thread_db_enable_reporting): Fix prototype. Store a thread event
10794 breakpoint reference in the thread_db struct.
10795 (thread_db_load_search): Clear the thread_db object.
10796 (try_thread_db_load_1): Ditto.
10797 (switch_to_process): New.
10798 (disable_thread_event_reporting): Use it.
10799 (remove_thread_event_breakpoints): New.
10800 (thread_db_detach, thread_db_mourn): Use it.
10801
10802 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10803
10804 * linux-low.c (linux_enable_event_reporting): New.
10805 (linux_wait_for_event_1, handle_extended_wait): Use it.
10806
10807 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10808
10809 * linux-low.c (linux_kill_one_lwp, linux_kill)
10810 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10811 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10812 SIGSTOP even if the LWP is stopped.
10813 (send_sigstop_callback): New.
10814 (stop_all_lwps): Use send_sigstop_callback instead.
10815 (linux_resume_one_thread): Adjust.
10816 (proceed_one_lwp): Still proceed an LWP that the client has
10817 requested to stop, if we haven't reported it as stopped yet. Make
10818 sure that LWPs the client want stopped, have a pending SIGSTOP.
10819
10820 2010-04-26 Doug Evans <dje@google.com>
10821
10822 * server.c (handle_general_set): Make static.
10823
10824 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10825 Print received char after testing for error/eof instead of before.
10826 (input_interrupt): Tweak comment.
10827
10828 2010-04-23 Doug Evans <dje@google.com>
10829
10830 * server.c (start_inferior): Print inferior argv if --debug.
10831
10832 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10833
10834 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10835 * nto-x86-low.c: Include server.h
10836
10837 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10838
10839 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10840 be consistent with other sources of this directory.
10841 (init_registers_amd64): Correct name of source file of this function
10842 in the comment.
10843
10844 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10845
10846 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10847 64-bit executables.
10848
10849 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10850
10851 * win32-i386-low.c: Add 64-bit support.
10852 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10853 (init_registers_amd64): Declare.
10854 (mappings): Add 64-bit version of array.
10855 (init_windows_x86): New function.
10856 (the_low_target): Change init_arch field to init_windows_x86.
10857
10858 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10859
10860 * win32-low.c: Adapt to support also 64-bit architecture.
10861 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10862 (get_image_name): Use SIZE_T type for local variable `done'.
10863 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10864 (toolhelp_get_dll_name): Idem.
10865 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10866 Use uintptr_t typecast to avoid warning.
10867 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10868 (handle_exception): Use phex_nz to avoid warning.
10869 (win32_wait): Remove unused local variable `process'.
10870
10871 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10872
10873 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10874 `amd64-avx.o'.
10875
10876 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10877
10878 * configure.ac: Use `ws2_32' library for srv_mingw.
10879 * configure: Regenerate.
10880 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10881 * remote-utils.c: Likewise.
10882
10883 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10884
10885 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10886 if __x86_64__ is defined.
10887
10888 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10889
10890 * configure: Regenerate.
10891
10892 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10893
10894 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10895 * target.h (target_ops): New get_tib_address field.
10896 * win32-low.h (win32_thread_info): Add thread_local_base field.
10897 * win32-low.c (child_add_thread): Add tlb argument.
10898 Set thread_local_base field to TLB.
10899 (get_child_debug_event): Adapt to child_add_thread change.
10900 (win32_get_tib_address): New function.
10901 (win32_target_ops): Set get_tib_address field to
10902 win32_get_tib_address.
10903 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10904
10905 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10906
10907 * linux-low.c (linux_mourn): Also remove the process.
10908 * server.c (handle_target_event): Don't remove the process here.
10909 * nto-low.c (nto_mourn): New.
10910 (nto_target_ops): Install it.
10911 * spu-low.c (spu_mourn): New.
10912 (spu_target_ops): Install it.
10913 * win32-low.c (win32_mourn): New.
10914 (win32_target_ops): Install it.
10915
10916 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10917
10918 * server.h (buffer_xml_printf): Remove redundant `;'.
10919
10920 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10921
10922 * regcache.c (set_register_cache): Invalidate regcaches before
10923 changing the register cache layout.
10924 (regcache_invalidate_one): Allow a NULL regcache.
10925 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10926 regcaches before changing the register cache layout or the target
10927 regsets.
10928
10929 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10930
10931 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10932 variable warning on Linux/x86-64.
10933
10934 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10935
10936 GDBserver disconnected tracing support.
10937
10938 * linux-low.c (linux_remove_process): Delete.
10939 (add_lwp): Don't set last_resume_kind here.
10940 (linux_kill): Use `mourn'.
10941 (linux_detach): Use `thread_db_detach', and `mourn'.
10942 (linux_mourn): New.
10943 (linux_attach_lwp_1): Adjust comment.
10944 (linux_attach): last_resume_kind moved the thread_info; adjust.
10945 (status_pending_p_callback): Adjust.
10946 (linux_wait_for_event_1): Adjust.
10947 (count_events_callback, select_singlestep_lwp_callback)
10948 (select_event_lwp_callback, cancel_breakpoints_callback)
10949 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10950 (proceed_one_lwp): Adjust.
10951 (linux_async): Add debug output.
10952 (linux_thread_stopped): New.
10953 (linux_pause_all): New.
10954 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10955 linux_pause_all.
10956 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10957 (thread_db_free): Delete declaration.
10958 (thread_db_detach, thread_db_mourn): Declare.
10959 * thread-db.c (thread_db_init): Use thread_db_mourn.
10960 (thread_db_free): Delete, split in two.
10961 (disable_thread_event_reporting): New.
10962 (thread_db_detach): New.
10963 (thread_db_mourn): New.
10964
10965 * server.h (struct thread_info) <last_resume_kind>: New field.
10966 <attached>: Add comment.
10967 <gdb_detached>: New field.
10968 (handler_func): Change return type to int.
10969 (handle_serial_event, handle_target_event): Ditto.
10970 (gdb_connected): Declare.
10971 (tracing): Delete.
10972 (disconnected_tracing): Declare.
10973 (stop_tracing): Declare.
10974
10975 * server.c (handle_query) <qSupported>: Report support for
10976 disconnected tracing.
10977 (queue_stop_reply_callback): Account for running threads.
10978 (gdb_wants_thread_stopped): New.
10979 (gdb_wants_all_threads_stopped): New.
10980 (gdb_reattached_process): New.
10981 (handle_status): Clear the `gdb_detached' flag of all processes.
10982 In all-stop, stop all threads.
10983 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10984 (process_serial_event): If the remote connection breaks, or if an
10985 exit was forced with "monitor exit", force an event loop exit.
10986 Handle disconnected tracing on detach.
10987 (handle_serial_event): Adjust.
10988 (handle_target_event): If GDB isn't connected, forward events back
10989 to the inferior, unless the last process exited, in which case,
10990 exit gdbserver. Adjust interface.
10991
10992 * remote-utils.c (remote_open): Don't block in accept. Instead
10993 register an event loop source on the listen socket file
10994 descriptor. Refactor bits into ...
10995 (listen_desc): ... this new global.
10996 (gdb_connected): ... this new function.
10997 (enable_async_notification): ... this new function.
10998 (handle_accept_event): ... this new function.
10999 (remote_close): Clear remote_desc.
11000
11001 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11002
11003 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11004 New fields.
11005 (mourn_inferior): Define.
11006 (target_process_qsupported): Avoid the dangling else problem.
11007 (thread_stopped): Define.
11008 (pause_all): Define.
11009 (target_waitstatus_to_string): Declare.
11010 * target.c (target_waitstatus_to_string): New.
11011
11012 * tracepoint.c (tracing): Make extern.
11013 (disconnected_tracing): New.
11014 (stop_tracing): Make extern. Handle tracing stops due to GDB
11015 disconnecting.
11016 (cmd_qtdisconnected): New.
11017 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11018 (handle_tracepoint_general_set): Handle QTDisconnected.
11019
11020 * event-loop.c (event_handler_func): Change return type to int.
11021 (process_event): Bail out if the event handler wants the event
11022 loop to stop.
11023 (handle_file_event): Ditto.
11024 (start_event_loop): Bail out if the event handler wants the event
11025 loop to stop.
11026
11027 * nto-low.c (nto_target_ops): Adjust.
11028 * spu-low.c (spu_wait): Don't remove the process here.
11029 (spu_target_ops): Adjust.
11030 * win32-low.c (win32_wait): Don't remove the process here.
11031 (win32_target_ops): Adjust.
11032
11033 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11034
11035 * regcache.c (realloc_register_cache): Invalidate inferior's
11036 regcache before recreating it.
11037
11038 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11039
11040 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11041
11042 2010-04-09 Stan Shebs <stan@codesourcery.com>
11043 Pedro Alves <pedro@codesourcery.com>
11044
11045 * server.h (LONGEST): New.
11046 (struct thread_info) <while_stepping>: New field.
11047 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11048 Declare.
11049 (initialize_tracepoint, handle_tracepoint_general_set)
11050 (handle_tracepoint_query, tracepoint_finished_step)
11051 (tracepoint_was_hit, release_while_stepping_state_list):
11052 (current_traceframe): Declare.
11053 * server.c (handle_general_set): Handle tracepoint packets.
11054 (read_memory): New.
11055 (write_memory): New.
11056 (handle_search_memory_1): Use read_memory.
11057 (handle_query): Report support for conditional tracepoints, trace
11058 state variables, and tracepoint sources. Handle tracepoint
11059 queries.
11060 (main): Initialize the tracepoints module.
11061 (process_serial_event): Handle traceframe reads/writes.
11062
11063 * linux-low.c (handle_tracepoints): New.
11064 (linux_wait_1): Call it.
11065 (linux_resume_one_lwp): Handle while-stepping.
11066 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11067 (linux_target_ops): Install them.
11068 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11069 New field.
11070 * linux-x86-low.c (x86_supports_tracepoints): New.
11071 (the_low_target). Install it.
11072
11073 * mem-break.h (delete_breakpoint): Declare.
11074 * mem-break.c (delete_breakpoint): Make external.
11075
11076 * target.h (struct target_ops): Add `supports_tracepoints',
11077 `read_pc', and `write_pc' fields.
11078 (target_supports_tracepoints): Define.
11079 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11080 (phex_nz): New.
11081
11082 * regcache.h (struct regcache) <registers_owned>: New field.
11083 (init_register_cache, regcache_cpy): Declare.
11084 (regcache_read_pc, regcache_write_pc): Declare.
11085 (register_cache_size): Declare.
11086 (supply_regblock): Declare.
11087 * regcache.c (init_register_cache): New.
11088 (new_register_cache): Use it.
11089 (regcache_cpy): New.
11090 (register_cache_size): New.
11091 (supply_regblock): New.
11092 (regcache_read_pc, regcache_write_pc): New.
11093
11094 * tracepoint.c: New.
11095
11096 * Makefile.in (OBS): Add tracepoint.o.
11097 (tracepoint.o): New rule.
11098
11099 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11100
11101 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11102 (i386-mmx.o): New.
11103 (i386-mmx.c): Likewise.
11104 (i386-mmx-linux.o): Likewise.
11105 (i386-mmx-linux.c): Likewise.
11106
11107 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11108 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11109 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11110 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11111
11112 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11113 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11114 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11115
11116 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11117
11118 * Makefile.in (clean): Updated.
11119 (i386-avx.o): New.
11120 (i386-avx.c): Likewise.
11121 (i386-avx-linux.o): Likewise.
11122 (i386-avx-linux.c): Likewise.
11123 (amd64-avx.o): Likewise.
11124 (amd64-avx.c): Likewise.
11125 (amd64-avx-linux.o): Likewise.
11126 (amd64-avx-linux.c): Likewise.
11127
11128 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11129 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11130 (srv_amd64_regobj): Add amd64-avx.o.
11131 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11132 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11133 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11134 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11135 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11136 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11137 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11138
11139 * i387-fp.c: Include "i386-xstate.h".
11140 (i387_xsave): New.
11141 (i387_cache_to_xsave): Likewise.
11142 (i387_xsave_to_cache): Likewise.
11143 (x86_xcr0): Likewise.
11144
11145 * i387-fp.h (i387_cache_to_xsave): Likewise.
11146 (i387_xsave_to_cache): Likewise.
11147 (x86_xcr0): Likewise.
11148
11149 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11150 * linux-crisv32-low.c (target_regsets): Likewise.
11151 * linux-m68k-low.c (target_regsets): Likewise.
11152 * linux-mips-low.c (target_regsets): Likewise.
11153 * linux-ppc-low.c (target_regsets): Likewise.
11154 * linux-s390-low.c (target_regsets): Likewise.
11155 * linux-sh-low.c (target_regsets): Likewise.
11156 * linux-sparc-low.c (target_regsets): Likewise.
11157 * linux-xtensa-low.c (target_regsets): Likewise.
11158
11159 * linux-low.c: Include <sys/uio.h>.
11160 (regsets_fetch_inferior_registers): Support nt_type.
11161 (regsets_store_inferior_registers): Likewise.
11162 (linux_process_qsupported): New.
11163 (linux_target_ops): Add linux_process_qsupported.
11164
11165 * linux-low.h (regset_info): Add nt_type.
11166 (linux_target_ops): Add process_qsupported.
11167
11168 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11169 and <sys/uio.h>.
11170 (init_registers_i386_avx_linux): New.
11171 (init_registers_amd64_avx_linux): Likewise.
11172 (xmltarget_i386_linux_no_xml): Likewise.
11173 (xmltarget_amd64_linux_no_xml): Likewise.
11174 (PTRACE_GETREGSET): Likewise.
11175 (PTRACE_SETREGSET): Likewise.
11176 (x86_fill_xstateregset): Likewise.
11177 (x86_store_xstateregset): Likewise.
11178 (use_xml): Likewise.
11179 (x86_linux_update_xmltarget): Likewise.
11180 (x86_linux_process_qsupported): Likewise.
11181 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11182 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11183 init_registers_i386_linux here. Call
11184 x86_linux_update_xmltarget.
11185 (the_low_target): Add x86_linux_process_qsupported.
11186
11187 * server.c (handle_query): Call target_process_qsupported.
11188
11189 * target.h (target_ops): Add process_qsupported.
11190 (target_process_qsupported): New.
11191
11192 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11193
11194 * inferiors.c (add_thread): Set last_status kind to
11195 TARGET_WAITKIND_IGNORE.
11196 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11197 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11198 (linux_wait_1): Move `thread' local definition to block that uses
11199 it. Don't NULL initialize `event_child'.
11200 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11201 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11202 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11203
11204 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11205
11206 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11207 an extended waitstatus, or by a watchpoint.
11208 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11209 thread was stepping or has been stopped by a watchpoint.
11210
11211 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11212
11213 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11214 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11215 of another, then delete the previous, and validate all
11216 breakpoints.
11217 (validate_inserted_breakpoint): New.
11218 (delete_disabled_breakpoints): New.
11219 (validate_breakpoints): New.
11220 (check_mem_read): Validate breakpoints before trusting their
11221 shadow. Delete disabled breakpoints.
11222 (check_mem_write): Validate breakpoints before trusting they
11223 should be inserted. Delete disabled breakpoints.
11224 * mem-break.h (validate_breakpoints):
11225 * server.c (handle_query): Validate breakpoints when we see a
11226 qSymbol query.
11227
11228 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11229
11230 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11231 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11232 if we could tell there's a GDB breakpoint at stop_pc.
11233 (need_step_over_p): Don't do a step over if we find a GDB
11234 breakpoint at the resume PC.
11235
11236 * mem-break.c (struct raw_breakpoint): New.
11237 (enum bkpt_type): New type `gdb_breakpoint'.
11238 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11239 fields. New field `raw'.
11240 (find_raw_breakpoint_at): New.
11241 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11242 breakpoint instead.
11243 (set_breakpoint_at): Adjust.
11244 (delete_raw_breakpoint): New.
11245 (release_breakpoint): New.
11246 (delete_breakpoint): Rename to...
11247 (delete_breakpoint_1): ... this. Add proc parameter. Use
11248 release_breakpoint. Return ENOENT.
11249 (delete_breakpoint): Reimplement.
11250 (find_breakpoint_at): Delete.
11251 (find_gdb_breakpoint_at): New.
11252 (delete_breakpoint_at): Delete.
11253 (set_gdb_breakpoint_at): New.
11254 (delete_gdb_breakpoint_at): New.
11255 (gdb_breakpoint_here): New.
11256 (set_reinsert_breakpoint): Use release_breakpoint.
11257 (uninsert_breakpoint): Rename to ...
11258 (uninsert_raw_breakpoint): ... this.
11259 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11260 (reinsert_raw_breakpoint): Change parameter type to
11261 raw_breakpoint.
11262 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11263 instead.
11264 (check_breakpoints): Adjust. Use release_breakpoint.
11265 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11266 (breakpoint_inserted_here): Ditto.
11267 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11268 Don't trust the breakpoint's shadow if it is not inserted.
11269 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11270 (delete_all_breakpoints): Adjust.
11271 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11272 use delete_breakpoint_1.
11273
11274 * mem-break.h (breakpoints_supported): Delete declaration.
11275 (set_gdb_breakpoint_at): Declare.
11276 (gdb_breakpoint_here): Declare.
11277 (delete_breakpoint_at): Delete.
11278 (delete_gdb_breakpoint_at): Declare.
11279
11280 * server.h (struct raw_breakpoint): Forward declare.
11281 (struct process_info): New field `raw_breakpoints'.
11282
11283 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11284 breakpoints.
11285
11286 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11287
11288 * linux-low.c (status_pending_p_callback): Fix comment.
11289 (linux_wait_for_event_1): Move most of the internal breakpoint
11290 handling from here...
11291 (linux_wait_1): ... to here.
11292 (count_events_callback): New.
11293 (select_singlestep_lwp_callback): New.
11294 (select_event_lwp_callback): New.
11295 (cancel_breakpoints_callback): New.
11296 (select_event_lwp): New.
11297 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11298 priority to all LWPs that have had events that should be reported
11299 to the client. Cancel breakpoints when about to reporting the
11300 event to the client, not while stopping lwps. No longer cancel
11301 finished single-steps here.
11302 (cancel_finished_single_step): Delete.
11303 (cancel_finished_single_steps): Delete.
11304
11305 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11306
11307 * mem-break.c (enum bkpt_type): New.
11308 (struct breakpoint): New field `type'.
11309 (set_breakpoint_at): Change return type to struct breakpoint
11310 pointer. Set type to `other_breakpoint' by default.
11311 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11312 in the breakpoint list.
11313 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11314 (reinsert_breakpoint): Rename to ...
11315 (reinsert_raw_breakpoint): ... this.
11316 (reinsert_breakpoints_at): Adjust.
11317 * mem-break.h (struct breakpoint): Declare.
11318 (set_breakpoint_at): Change return type to struct breakpoint
11319 pointer.
11320
11321 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11322
11323 * server.c (handle_query): Assign, not compare.
11324
11325 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11326
11327 Teach linux gdbserver to step-over-breakpoints.
11328
11329 * linux-low.c (can_hardware_single_step): New.
11330 (supports_breakpoints): New.
11331 (handle_extended_wait): If stopping threads, read the stop pc of
11332 the new cloned LWP.
11333 (get_pc): New.
11334 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11335 low target doesn't support retrieving the PC.
11336 (add_lwp): Set last_resume_kind to resume_continue.
11337 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11338 (linux_attach): Don't clear stop_expected. Set the lwp's
11339 last_resume_kind to resume_stop.
11340 (linux_detach_one_lwp): Don't check for removed breakpoints.
11341 (check_removed_breakpoint): Delete.
11342 (status_pending_p): Rename to ...
11343 (status_pending_p_callback): ... this. Don't check for removed
11344 breakpoints. Don't consider threads that are stopped from GDB's
11345 perspective.
11346 (linux_wait_for_lwp): Always read the stop_pc here.
11347 (cancel_breakpoint): New.
11348 (step_over_bkpt): New global.
11349 (linux_wait_for_event_1): Implement stepping over breakpoints.
11350 (gdb_wants_lwp_stopped): New.
11351 (gdb_wants_all_stopped): New.
11352 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11353 single-step traps here. Store the thread's last reported target
11354 wait status.
11355 (send_sigstop): Don't clear stop_expected. Always set it,
11356 instead.
11357 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11358 (cancel_finished_single_step): New.
11359 (cancel_finished_single_steps): New.
11360 (wait_for_sigstop): Don't cancel finished single-step traps here.
11361 (linux_resume_one_lwp): Don't check for removed breakpoints.
11362 Don't set `step' on non-hardware step archs.
11363 (linux_set_resume_request): Ignore resume_stop requests if already
11364 stopping or stopped. Set the lwp's last_resume_kind.
11365 (resume_status_pending_p): Don't check for removed breakpoints.
11366 (need_step_over_p): New.
11367 (start_step_over): New.
11368 (finish_step_over): New.
11369 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11370 requests. Clear the thread's last reported target waitstatus.
11371 Don't use the `suspended' flag. Don't consider pending breakpoints.
11372 (linux_resume): Start a step-over if necessary.
11373 (proceed_one_lwp): New.
11374 (proceed_all_lwps): New.
11375 (unstop_all_lwps): New.
11376 * linux-low.h (struct lwp_info): Rewrite comment for the
11377 `suspended' flag. Add the `stop_pc' field. Delete the
11378 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11379 Add `'last_resume_kind' and `need_step_over' fields.
11380 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11381 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11382 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11383 (set_raw_breakpoint_at): New.
11384 (set_breakpoint_at): Rewrite to use it.
11385 (reinsert_breakpoint_handler): Delete.
11386 (set_reinsert_breakpoint): New.
11387 (reinsert_breakpoint_by_bp): Delete.
11388 (delete_reinsert_breakpoints): New.
11389 (uninsert_breakpoint): Rewrite.
11390 (uninsert_breakpoints_at): New.
11391 (reinsert_breakpoint): Rewrite.
11392 (reinsert_breakpoints_at): New.
11393 (check_breakpoints): Rewrite.
11394 (breakpoint_here): New.
11395 (breakpoint_inserted_here): New.
11396 (check_mem_read): Adjust.
11397 * mem-break.h (breakpoints_supported, breakpoint_here)
11398 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11399 (reinsert_breakpoint_by_bp): Delete declaration.
11400 (delete_reinsert_breakpoints): Declare.
11401 (reinsert_breakpoint): Delete declaration.
11402 (reinsert_breakpoints_at): Declare.
11403 (uninsert_breakpoint): Delete declaration.
11404 (uninsert_breakpoints_at): Declare.
11405 (check_breakpoints): Adjust prototype.
11406 * server.h: Adjust include order.
11407 (struct thread_info): Declare here. Add a `last_status' field.
11408
11409 2010-03-23 Michael Snyder <msnyder@vmware.com>
11410
11411 * server.c (crc32): New function.
11412 (handle_query): Add handling for 'qCRC:' request.
11413
11414 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11415
11416 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11417 lwp had been stopped by a watchpoint.
11418
11419 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11420
11421 * server.h (internal_error): Declare.
11422 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11423 * utils.c (internal_error): New function.
11424
11425 2010-03-15 Andreas Schwab <schwab@redhat.com>
11426
11427 * configure.srv: Fix typo setting srv_regobj.
11428
11429 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11430
11431 * linux-low.c (fetch_register): Avoid passing a non string literal
11432 format to `error'.
11433 (usr_store_inferior_registers): Ditto.
11434
11435 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11436
11437 * linux-low.c (linux_write_memory): Bail out early if peeking
11438 memory failed.
11439
11440 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11441
11442 * linux-low.h (struct lwp_info): New fields
11443 `stopped_by_watchpoint' and `stopped_data_address'.
11444 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11445 here, and cache them in the lwp object.
11446 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11447 directly.
11448 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11449 field.
11450 (linux_stopped_by_watchpoint): Rewrite.
11451 (linux_stopped_data_address): Rewrite.
11452
11453 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11454
11455 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11456 switching the current inferior, not before.
11457
11458 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11459
11460 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11461 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11462 i386-linux.c and amd64-linux.c.
11463 (reg-i386.o): Removed.
11464 (reg-i386.c): Likewise.
11465 (reg-i386-linux.o): Likewise.
11466 (reg-i386-linux.c): Likewise.
11467 (reg-x86-64.o): Likewise.
11468 (reg-x86-64.c): Likewise.
11469 (reg-x86-64-linux.o): Likewise.
11470 (reg-x86-64-linux.c): Likewise.
11471 (i386.o): New.
11472 (i386.c): Likewise.
11473 (i386-linux.o): Likewise.
11474 (i386-linux.c): Likewise.
11475 (amd64.o): Likewise.
11476 (amd64.c): Likewise.
11477 (amd64-linux.o): Likewise.
11478 (amd64-linux.c): Likewise.
11479
11480 * configure.srv (srv_i386_regobj): New.
11481 (srv_i386_linux_regobj): Likewise.
11482 (srv_amd64_regobj): Likewise.
11483 (srv_amd64_linux_regobj): Likewise.
11484 (srv_i386_32bit_xmlfiles): Likewise.
11485 (srv_i386_64bit_xmlfiles): Likewise.
11486 (srv_i386_xmlfiles): Likewise.
11487 (srv_amd64_xmlfiles): Likewise.
11488 (srv_i386_linux_xmlfiles): Likewise.
11489 (srv_amd64_linux_xmlfiles): Likewise.
11490 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11491 srv_xmlfiles to $srv_i386_xmlfiles.
11492 (i[34567]86-*-mingw32ce*): Likewise.
11493 (i[34567]86-*-mingw*): Likewise.
11494 (i[34567]86-*-nto*): Likewise.
11495 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11496 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11497 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11498 (x86_64-*-linux*): Likewise.
11499
11500 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11501 (init_registers_amd64_linux): New.
11502 (x86_arch_setup): Replace init_registers_x86_64_linux with
11503 init_registers_amd64_linux.
11504
11505 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11506
11507 * configure.ac: Check for libdl. If it is not available link against
11508 static libthread_db.
11509 * configure: Regenerate.
11510
11511 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11512
11513 PR9605
11514
11515 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11516 handing a read watchpoint.
11517 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11518
11519 2010-02-12 Doug Evans <dje@google.com>
11520
11521 * linux-low.c (linux_supports_tracefork_flag): Document.
11522 (linux_look_up_symbols): Add comment.
11523
11524 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11525
11526 * regcache.c (supply_register): Clear regcache if buf is NULL.
11527
11528 2010-02-02 Nicolas Roche <roche@sourceware.org>
11529 Joel Brobecker <brobecker@adacore.com>
11530
11531 * inferiors.c (find_inferior): Add function documentation.
11532 (unloaded_dll): Handle the case where the unloaded dll has not
11533 been previously registered in the dll list.
11534
11535 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11536
11537 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11538 (thumb2_breakpoint): New.
11539 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11540
11541 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11542
11543 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11544 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11545 breakpoints.
11546
11547 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11548
11549 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11550
11551 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11552
11553 * linux-s390-low.c (s390_collect_ptrace_register)
11554 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11555
11556 2010-01-21 Doug Evans <dje@google.com>
11557
11558 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11559 (PTRACE_ARG4_TYPE): New macro.
11560 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11561 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11562 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11563 (usr_store_inferior_registers): Ditto.
11564 (linux_read_memory, linux_write_memory): Ditto.
11565 (linux_test_for_tracefork): Ditto.
11566
11567 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11568 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11569
11570 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11571
11572 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11573 target.
11574
11575 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11576
11577 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11578 prototype to take a regcache. Adjust.
11579
11580 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11581
11582 * regcache.h (struct thread_info): Forward declare.
11583 (struct regcache): New.
11584 (new_register_cache): Adjust prototype.
11585 (get_thread_regcache): Declare.
11586 (free_register_cache): Adjust prototype.
11587 (registers_to_string, registers_from_string): Ditto.
11588 (supply_register, supply_register_by_name, collect_register)
11589 (collect_register_as_string, collect_register_by_name): Ditto.
11590 * regcache.c (struct inferior_regcache_data): Delete.
11591 (get_regcache): Rename to ...
11592 (get_thread_regcache): ... this. Adjust. Switch inferior before
11593 fetching registers.
11594 (regcache_invalidate_one): Adjust.
11595 (regcache_invalidate): Fix prototype.
11596 (new_register_cache): Return the new register cache.
11597 (free_register_cache): Change prototype.
11598 (realloc_register_cache): Adjust.
11599 (registers_to_string): Change prototype to take a regcache. Adjust.
11600 (registers_from_string): Ditto.
11601 (register_data): Ditto.
11602 (supply_register): Ditto.
11603 (supply_register_by_name): Ditto.
11604 (collect_register): Ditto.
11605 (collect_register_as_string): Ditto.
11606 (collect_register_by_name): Ditto.
11607 * server.c (process_serial_event): Adjust.
11608 * linux-low.h (regset_fill_func, regset_store_func): Change
11609 prototype.
11610 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11611 Change prototype.
11612 * linux-low.c (get_stop_pc): Adjust.
11613 (check_removed_breakpoint): Adjust.
11614 (linux_wait_for_event): Adjust.
11615 (linux_resume_one_lwp): Adjust.
11616 (fetch_register): Add regcache parameter. Adjust.
11617 (usr_store_inferior_registers): Ditto.
11618 (regsets_fetch_inferior_registers): Ditto.
11619 (regsets_store_inferior_registers): Ditto.
11620 (linux_fetch_registers, linux_store_registers): Ditto.
11621 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11622 regcache. Adjust.
11623 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11624 Ditto.
11625 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11626 prototype to take a regcache.
11627 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11628 * remote-utils.c (convert_ascii_to_int, outreg)
11629 (prepare_resume_reply): Change prototype to take a regcache.
11630 Adjust.
11631 * target.h (struct target_ops) <fetch_registers, store_registers>:
11632 Change prototype to take a regcache.
11633 (fetch_inferior_registers, store_inferior_registers): Change
11634 prototype to take a regcache. Adjust.
11635 * proc-service.c (ps_lgetregs): Adjust.
11636 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11637 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11638 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11639 take a regcache. Adjust.
11640 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11641 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11642 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11643 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11644 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11645 (cris_cannot_fetch_register):
11646 (cris_breakpoint_at): Change prototype to take a regcache.
11647 Adjust.
11648 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11649 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11650 to take a regcache. Adjust.
11651 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11652 Adjust.
11653 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11654 take a regcache. Adjust.
11655 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11656 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11657 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11658 * linux-mips-low.c (mips_get_pc):
11659 (mips_set_pc): Change prototype to take a regcache. Adjust.
11660 (mips_reinsert_addr): Adjust.
11661 (mips_collect_register): Change prototype to take a regcache.
11662 Adjust.
11663 (mips_supply_register):
11664 (mips_collect_register_32bit, mips_supply_register_32bit)
11665 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11666 (mips_store_fpregset): Ditto.
11667 * linux-ppc-low.c (ppc_supply_ptrace_register)
11668 (ppc_supply_ptrace_register): Ditto.
11669 (parse_spufs_run): Adjust.
11670 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11671 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11672 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11673 take a regcache. Adjust.
11674 * linux-s390-low.c (s390_collect_ptrace_register)
11675 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11676 (s390_set_pc): Change prototype to take a regcache. Adjust.
11677 (s390_arch_setup): Adjust.
11678 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11679 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11680 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11681 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11682 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11683 regcache. Adjust.
11684 (sparc_breakpoint_at): Adjust.
11685 * linux-xtensa-low.c (xtensa_fill_gregset):
11686 (xtensa_store_gregset):
11687 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11688 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11689 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11690 prototype to take a regcache. Adjust.
11691 * win32-arm-low.c (arm_fetch_inferior_register)
11692 (arm_store_inferior_register): Change prototype to take a
11693 regcache. Adjust.
11694 * win32-i386-low.c (i386_fetch_inferior_register)
11695 (i386_store_inferior_register): Change prototype to take a
11696 regcache. Adjust.
11697 * win32-low.c (child_fetch_inferior_registers)
11698 (child_store_inferior_registers): Change prototype to take a
11699 regcache. Adjust.
11700 (win32_wait): Adjust.
11701 (win32_fetch_inferior_registers): Change prototype to take a
11702 regcache. Adjust.
11703 (win32_store_inferior_registers): Adjust.
11704 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11705 store_inferior_register>: Change prototype to take a regcache.
11706
11707 2010-01-20 Doug Evans <dje@google.com>
11708
11709 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11710 #ifdef.
11711 (linux_wait_for_event1, linux_init_signals): Ditto.
11712 (W_STOPCODE): Provide definition if missing.
11713
11714 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11715
11716 * linux-low.c (linux_core_of_thread): New.
11717 (compare_ints, show_process, list_threads): New.
11718 (linux_qxfer_osdata): Report threads and cores.
11719 (linux_target_op): Register linux_core_of_thread.
11720 * remote-utils.c (prepare_resume_reply): Report the core.
11721 (buffer_xml_printf): Support %d specifier.
11722 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11723 New.
11724 (handle_query): Handle qXfer:threads. Announce availability
11725 thereof.
11726 * target.h (struct target_ops): New field core_of_thread.
11727
11728 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11729
11730 * Makefile.in (clean): Remove new generated files.
11731 (reg-s390.o, reg-s390.c): Remove rules.
11732 (reg-s390x.o, reg-s390x.c): Likewise.
11733 (s390-linux32.o, s390-linux32.c): Add rules.
11734 (s390-linux64.o, s390-linux64.c): Likewise.
11735 (s390x-linux64.o, s390x-linux64.c): Likewise.
11736 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11737 * linux-s390-low.c: Include <elf.h>.
11738 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11739 (init_registers_s390): Remove prototype.
11740 (init_registers_s390x): Likewise.
11741 (init_registers_s390_linux32): Add prototype.
11742 (init_registers_s390_linux64): Likewise.
11743 (init_registers_s390x_linux64): Likewise.
11744 (s390_num_regs_3264): New define.
11745 (s390_regmap_3264): New global variable.
11746 (s390_cannot_fetch_register): Remove obsolete check.
11747 (s390_cannot_store_register): Likewise.
11748 (s390_collect_ptrace_register): Handle upper/lower register halves.
11749 (s390_supply_ptrace_register): Likewise.
11750 (s390_fill_gregset): Update to register number changes.
11751 (s390_get_hwcap): New routine.
11752 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11753 Install appropriate regmap and register set.
11754
11755 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11756
11757 * server.c (gdbserver_version): Update copyright year to 2010.
11758 * gdbreplay.c (gdbreplay_version): Likewise.
11759
11760 2009-12-28 Doug Evans <dje@google.com>
11761
11762 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11763 elf/external.h. Include <elf.h> instead but only if necessary.
11764
11765 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11766
11767 * linux-low.c (linux_remove_process): Remove `detaching'
11768 parameter. Don't release/detach from thread_db here.
11769 (linux_kill): Release/detach from thread_db here, ...
11770 (linux_detach): ... and here, before actually detaching.
11771 (linux_wait_1): ... and here, when a process exits.
11772 * thread-db.c (any_thread_of): New.
11773 (thread_db_free): Switch the current inferior to a thread of the
11774 passed in process.
11775
11776 2009-12-21 Doug Evans <dje@google.com>
11777
11778 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11779
11780 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11781 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11782 warning ifndef __NR_tkill. Move setting of errno there too.
11783 Delete unnecessary resetting of errno after syscall.
11784 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11785
11786 * configure.ac: Check for dladdr.
11787 * config.in: Regenerate.
11788 * configure: Regenerate.
11789 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11790 (try_thread_db_load): Update.
11791
11792 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11793
11794 2009-12-18 Doug Evans <dje@google.com>
11795
11796 * event-loop.c: Include unistd.h if it exists.
11797
11798 * linux-low.c (my_waitpid): Move definition away from being in
11799 between linux_tracefork_child/linux_test_for_tracefork.
11800
11801 * gdb_proc_service.h (psaddr_t): Fix type.
11802 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11803 signature to match glibc.
11804
11805 2009-12-16 Doug Evans <dje@google.com>
11806
11807 * linux-low.c (linux_read_memory): Fix argument to read.
11808
11809 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11810
11811 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11812 events, don't leave current_inferior pointing at null.
11813
11814 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11815
11816 * win32-low.c (LOG): Delete.
11817 (OUTMSG): Output to stderr.
11818 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11819 on compile time LOG macro.
11820 (win32_wait): Fix debug output.
11821
11822 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11823
11824 * win32-low.c (win32_add_one_solib): If the dll name is
11825 "ntdll.dll", prepend the system directory to the dll path.
11826
11827 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11828
11829 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11830
11831 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11832 Vladimir Prus <vladimir@codesourcery.com>
11833
11834 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11835 * configure.ac: Check for __mcoldfire__ and set
11836 gdb_cv_m68k_is_coldfire.
11837 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11838 reg-cf.o and reg-m68k.o.
11839 * configure: Regenerated.
11840
11841 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11842
11843 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11844 Pass it to thread_db_free.
11845 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11846 proper `detaching' argument to linux_remove_process.
11847 * linux-low.h (thread_db_free): Add `detaching' parameter.
11848 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11849 to thread_db_free.
11850 (thread_db_free): Add `detaching' parameter. Only
11851 call td_ta_clear_event if detaching from process.
11852
11853 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11854
11855 * thread-db.c (thread_db_free): Fix typo.
11856
11857 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11858
11859 PR gdb/10838
11860 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11861
11862 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11863
11864 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11865 with an i686 compiler.
11866 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11867 needed.
11868 * configure: Rebuilt.
11869
11870 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11871
11872 PR gdb/10783
11873
11874 * server.c (handle_search_memory_1): Correct read_addr initialization
11875 in loop for searching subsequent chunks.
11876
11877 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11878
11879 * configure.ac: New --with-libthread-db option.
11880 * thread-db.c: Allow direct dependence on libthread_db.
11881 (thread_db_free): Adjust.
11882 * config.in: Regenerate.
11883 * configure: Likewise.
11884
11885 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11886
11887 PR gdb/10757
11888 * thread-db.c (attach_thread): New function.
11889 (maybe_attach_thread): Return success/failure.
11890 (find_new_threads_callback): Adjust.
11891 (thread_db_find_new_threads): Loop until no new threads.
11892
11893 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11894
11895 * proc-service.c (ps_lgetregs): Formatting.
11896
11897 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11898
11899 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11900 * configure.ac: Adjust.
11901 * linux-low.h (struct process_info_private): Move members to struct
11902 thread_db.
11903 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11904 * linux-low.c (linux_remove_process): Adjust.
11905 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11906 * server.c (handle_query): Move code ...
11907 (handle_monitor_command): ... here. New function.
11908 * target.h (struct target_ops): New member.
11909 * thread-db.c (struct thread_db): New.
11910 (libthread_db_search_path): New variable.
11911 (thread_db_create_event, thread_db_enable_reporting)
11912 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11913 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11914 (try_thread_db_load_1, dladdr_to_soname): New functions.
11915 (try_thread_db_load, thread_db_load_search): New functions.
11916 (thread_db_init): Search for libthread_db.
11917 (thread_db_free): New function.
11918 (thread_db_handle_monitor_command): Likewise.
11919 * config.in: Regenerate.
11920 * configure: Regenerate.
11921
11922 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11923
11924 * spu-low.c (spu_kill): Wait for inferior to terminate.
11925 Call clear_inferiors.
11926 (spu_detach): Call clear_inferiors.
11927
11928 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11929
11930 * aclocal.m4: Regenerate.
11931 * config.in: Likewise.
11932 * configure: Likewise.
11933
11934 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11935
11936 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11937 (parse_spufs_run): New function.
11938 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11939 (ppc_breakpoint_at): Handle SPU breakpoints.
11940
11941 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11942
11943 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11944 (SPUFS_MAGIC): Define.
11945 (spu_enumerate_spu_ids): New function.
11946 (linux_qxfer_spu): New function.
11947 (linux_target_ops): Install linux_qxfer_spu.
11948
11949 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11950
11951 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11952 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11953 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11954 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11955 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11956 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11957 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11958 (init_registers_powerpc_cell32l): Add prototype.
11959 (init_registers_powerpc_cell64l): Likewise.
11960 (ppc_arch_setup): Detect Cell/B.E. architecture.
11961
11962 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11963
11964 * Makefile.in (datarootdir): New variable.
11965
11966 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11967
11968 * linux-low.c (linux_write_memory): Update debugging output.
11969 * Makefile.in (clean): Add new descriptions.
11970 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11971 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11972 * configure.srv: Add new files for arm*-*-linux*.
11973 * linux-arm-low.c: Add new declarations.
11974 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11975 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11976 (HWCAP_VFPv3D16): New.
11977 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11978 instead of __IWMMXT__.
11979 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11980 (arm_arch_setup): New.
11981 (target_regsets): Remove #ifdef. Add VFP regset.
11982 (the_low_target): Use arm_arch_setup.
11983
11984 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11987 the main thread again.
11988
11989 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11990
11991 Adding Neutrino gdbserver.
11992 * configure: Regenerated.
11993 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11994 * configure.srv (i[34567]86-*-nto*): New target.
11995 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11996 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11997 (nto_comctrl) [__QNX__]: New function.
11998 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11999
12000 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12001
12002 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12003 srv_tgtobj.
12004
12005 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12006 Pedro Alves <pedro@codesourcery.com>
12007
12008 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12009 don't support CONTEXT_EXTENDED_REGISTERS.
12010 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12011 (the_low_target): Install them.
12012 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12013 failing with ERROR_PIPE_NOT_CONNECTED.
12014
12015 2009-06-30 Doug Evans <dje@google.com>
12016 Pierre Muller <muller@ics.u-strasbg.fr>
12017
12018 Add h/w watchpoint support to x86-linux, win32-i386.
12019 * Makefile.in (SFILES): Add i386-low.c
12020 (i386_low_h): Define.
12021 (i386-low.o): Add dependencies.
12022 (linux-x86-low.o): Add i386-low.h dependency.
12023 (win32-i386-low.o): Ditto.
12024 * i386-low.c: New file.
12025 * i386-low.h: New file.
12026 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12027 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12028 * linux-low.c (linux_add_process): Initialize arch_private.
12029 (linux_remove_process): Free arch_private.
12030 (add_lwp): Initialize arch_private.
12031 (delete_lwp): Free arch_private.
12032 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12033 provided.
12034 * linux-low.h (process_info_private): New member arch_private.
12035 (lwp_info): New member arch_private.
12036 (linux_target_ops): New members new_process, new_thread,
12037 prepare_to_resume.
12038 (ptid_of): New macro.
12039 * linux-x86-low.c: Include stddef.h, i386-low.h.
12040 (arch_process_info): New struct.
12041 (arch_lwp_info): New struct.
12042 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12043 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12044 (i386_dr_low_get_status): New function.
12045 (x86_insert_point, x86_remove_point): New functions.
12046 (x86_stopped_by_watchpoint): New function.
12047 (x86_stopped_data_address): New function.
12048 (x86_linux_new_process, x86_linux_new_thread): New functions.
12049 (x86_linux_prepare_to_resume): New function.
12050 (the_low_target): Add entries for insert_point, remove_point,
12051 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12052 prepare_to_resume.
12053 * server.c (debug_hw_points): New global.
12054 (monitor_show_help): Document set debug-hw-points.
12055 (handle_query): Process "set debug-hw-points".
12056 * server.h (debug_hw_points): Declare.
12057 (paddress): Declare.
12058 * utils.c (NUMCELLS, CELLSIZE): New macros.
12059 (get_sell, xsnprintf, paddress): New functions.
12060 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12061 remove_point, stopped_by_watchpoint, stopped_data_address.
12062 * win32-i386-low.c: Include i386-low.h.
12063 (debug_reg_state): Replaces dr.
12064 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12065 (i386_dr_low_get_status): New function.
12066 (i386_insert_point, i386_remove_point): New functions.
12067 (i386_stopped_by_watchpoint): New function.
12068 (i386_stopped_data_address): New function.
12069 (i386_initial_stuff): Update.
12070 (get_thread_context,set_thread_context,i386_thread_added): Update.
12071 (the_low_target): Add entries for insert_point,
12072 remove_point, stopped_by_watchpoint, stopped_data_address.
12073 * win32-low.c (win32_insert_watchpoint): New function.
12074 (win32_remove_watchpoint): New function.
12075 (win32_stopped_by_watchpoint): New function.
12076 (win32_stopped_data_address): New function.
12077 (win32_target_ops): Add entries for insert_watchpoint,
12078 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12079 * win32-low.h (win32_target_ops): New members insert_point,
12080 remove_point, stopped_by_watchpoint, stopped_data_address.
12081
12082 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12083
12084 * server.c (process_serial_event): Re-return unsupported, not
12085 error, if the type isn't recognized. Re-allow supporting only
12086 insert or remove packets. Also call require_running for
12087 breakpoints. Add missing break statement to default case. Tidy.
12088 * target.h (struct target_ops): Rename insert_watchpoint to
12089 insert_point, and remove_watchpoint to remove_point.
12090
12091 * linux-low.h (struct linux_target_ops): Likewise.
12092 * linux-low.c (linux_insert_watchpoint): Rename to ...
12093 (linux_insert_point): ... this. Adjust.
12094 (linux_remove_watchpoint): Rename to ...
12095 (linux_remove_point): ... this. Adjust.
12096 (linux_target_ops): Adjust.
12097 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12098 (cris_insert_point): ... this.
12099 (cris_remove_watchpoint): Rename to ...
12100 (cris_remove_point): ... this.
12101 (the_low_target): Adjust.
12102
12103 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12104
12105 * server.c (handle_v_kill): Pass signal_pid to
12106 kill_inferior if multi_process is zero.
12107
12108 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12109
12110 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12111 * target.h (target_ops): Comment for *_watchpoint to make it clear
12112 the functions can get types '0' and '1'.
12113
12114 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12115
12116 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12117 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12118 * regcache.c (get_regcache): Likewise.
12119 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12120 * win32-low.c (child_fetch_inferior_registers): Remove check for
12121 regno 0.
12122
12123 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12124 Pedro Alves <pedro@codesourcery.com>
12125
12126 * target.h (struct target_ops) <supports_multi_process>: New
12127 callback.
12128 (target_supports_multi_process): New.
12129 * server.c (handle_query): Even if GDB reports support, only
12130 enable multi-process if the target also supports it. Report
12131 multi-process support only if the target backend supports it.
12132 * linux-low.c (linux_supports_multi_process): New function.
12133 (linux_target_ops): Install it as target_supports_multi_process
12134 callback.
12135
12136 2009-05-24 Doug Evans <dje@google.com>
12137
12138 Global renaming of find_thread_pid to find_thread_ptid.
12139 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12140 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12141 All callers updated.
12142
12143 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12144 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12145 directly.
12146
12147 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12148 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12149 (linux_resume_one_lwp): Ditto.
12150
12151 2009-05-23 Doug Evans <dje@google.com>
12152
12153 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12154 from struct inferior_list_entry * to struct lwp_info *.
12155 All callers updated.
12156
12157 2009-05-13 Doug Evans <dje@google.com>
12158
12159 * linux-x86-low.c: Don't include assert.h.
12160 (x86_siginfo_fixup): Use fatal, not assert.
12161 (x86_arch_setup): Fix comment.
12162
12163 2009-05-12 Doug Evans <dje@google.com>
12164
12165 Biarch support for i386/amd64 gdbserver.
12166 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12167 Add linux-x86-low.c.
12168 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12169 (linux-x86-low.o): Add.
12170 * linux-x86-64-low.c: Delete.
12171 * linux-i386-low.c: Delete.
12172 * linux-x86-low.c: New file.
12173 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12174 linux-x86-low.o.
12175 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12176 linux-x86-low.o.
12177 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12178 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12179 (linux_child_pid_to_exec_file): New function.
12180 (elf_64_header_p, elf_64_file_p): New functions.
12181 (siginfo_fixup): New function.
12182 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12183 give target a chance to convert layout.
12184 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12185 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12186
12187 2009-05-07 Doug Evans <dje@google.com>
12188
12189 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12190 (regsets_store_inferior_registers): Ditto.
12191
12192 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12193
12194 PR server/10048
12195
12196 * linux-low.c (must_set_ptrace_flags): Delete.
12197 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12198 of the global.
12199 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12200 `lwp->must_set_ptrace_flags' instead.
12201 (linux_wait_for_event_1): Set ptrace options here.
12202 (linux_wait_1): ... not here.
12203
12204 2009-04-30 Doug Evans <dje@google.com>
12205
12206 * inferiors.c (started_inferior_callback): New function.
12207 (attached_inferior_callback): New function.
12208 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12209 * server.c (print_started_pid, print_attached_pid): New functions.
12210 (detach_or_kill_for_exit): New function.
12211 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12212 * server.h (have_started_inferiors_p): Declare.
12213 (have_attached_inferiors_p): Declare.
12214
12215 * inferiors.c (remove_process): Fix memory leak, free process.
12216 * linux-low.c (linux_remove_process): New function.
12217 (linux_kill): Call it instead of remove_process.
12218 (linux_detach, linux_wait_1): Ditto.
12219
12220 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12221
12222 * configure.srv: Add x86 Windows CE target.
12223
12224 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12225
12226 * inferiors.c (get_thread_process): Make global.
12227 * server.h (get_thread_process): Add prototype.
12228 * thread-db.c (find_one_thread): Use get_thread_process
12229 instead of current_process.
12230 (thread_db_get_tls_address): Do not crash if called when
12231 thread layer is not yet initialized.
12232
12233 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12234
12235 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12236 * spu-low.c (current_tid): Rename to ...
12237 (current_ptid): ... this.
12238 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12239 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12240 ptid_get_lwp (current_ptid) instead of current_tid.
12241 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12242 instead of current_tid. Use find_process_pid to verify pid
12243 argument is valid. Pass proper argument to remove_process.
12244 (spu_thread_alive): Compare current_ptid instead of current_tid.
12245 (spu_resume): Likewise.
12246
12247 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12248
12249 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12250 variable.
12251
12252 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12253
12254 Implement the multiprocess extensions, and add linux multiprocess
12255 support.
12256
12257 * server.h (ULONGEST): Declare.
12258 (struct ptid, ptid_t): New.
12259 (minus_one_ptid, null_ptid): Declare.
12260 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12261 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12262 (struct inferior_list_entry): Change `id' type from unsigned from
12263 to ptid_t.
12264 (struct sym_cache, struct breakpoint, struct
12265 process_info_private): Forward declare.
12266 (struct process_info): Declare.
12267 (current_process): Declare.
12268 (all_processes): Declare.
12269 (initialize_inferiors): Declare.
12270 (add_thread): Adjust to use ptid_t.
12271 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12272 (add_process, remove_process, find_thread_pid): Declare.
12273 (find_inferior_id): Adjust to use ptid_t.
12274 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12275 (multi_process): Declare.
12276 (push_event): Adjust to use ptid_t.
12277 (read_ptid, write_ptid): Declare.
12278 (prepare_resume_reply): Adjust to use ptid_t.
12279 (clear_symbol_cache): Declare.
12280 * inferiors.c (all_processes): New.
12281 (null_ptid, minus_one_ptid): New.
12282 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12283 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12284 (add_thread): Change unsigned long to ptid. Remove gdb_id
12285 parameter. Adjust.
12286 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12287 (gdb_id_to_thread): Rename to ...
12288 (find_thread_pid): ... this. Change unsigned long to ptid.
12289 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12290 (loaded_dll, pull_pid_from_list): Adjust.
12291 (add_process, remove_process, find_process_pid)
12292 (get_thread_process, current_process, initialize_inferiors): New.
12293 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12294 (struct target_waitstatus) <related_pid>: Ditto.
12295 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12296 return type to int.
12297 (struct target_ops) <join>: Add `pid' argument.
12298 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12299 (struct target_ops) <wait>: Add `ptid' field. Change return type
12300 to ptid.
12301 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12302 (mywait): Add `ptid' argument. Change return type to ptid_t.
12303 (target_pid_to_str): Declare.
12304 * target.c (set_desired_inferior): Adjust to use ptids.
12305 (mywait): Add new `ptid' argument. Adjust.
12306 (target_pid_to_str): New.
12307 * mem-break.h (free_all_breakpoints): Declare.
12308 * mem-break.c (breakpoints): Delelete.
12309 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12310 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12311 to use per-process breakpoint list.
12312 (free_all_breakpoints): New.
12313 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12314 (symbol_cache, all_symbols_looked_up): Delete.
12315 (hexchars): New.
12316 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12317 read_ptid): New.
12318 (prepare_resume_reply): Change ptid argument's type from unsigned
12319 long to ptid_t. Adjust. Implement W;process and X;process.
12320 (free_sym_cache, clear_symbol_cache): New.
12321 (look_up_one_symbol): Adjust to per-process symbol cache. *
12322 * server.c (cont_thread, general_thread, step_thread): Change type
12323 to ptid_t.
12324 (attached): Delete.
12325 (multi_process): New.
12326 (last_ptid): Change type to ptid_t.
12327 (struct vstop_notif) <ptid>: Change type to ptid_t.
12328 (queue_stop_reply, push_event): Change `ptid' argument's type to
12329 ptid_t.
12330 (discard_queued_stop_replies): Add `pid' argument.
12331 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12332 changes. Don't reference the `attached' global.
12333 (attach_inferior): Adjust to mywait interface changes.
12334 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12335 features. Handle and report "multiprocess+". Handle
12336 "qAttached:PID".
12337 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12338 changes.
12339 (handle_v_kill): New.
12340 (handle_v_stopped): Adjust to use target_pid_to_str.
12341 (handle_v_requests): Allow multiple attaches and runs when
12342 multiprocess extensions are in effect. Handle "vKill".
12343 (myresume): Adjust to use ptids.
12344 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12345 (handle_status): Adjust to discard_queued_stop_replies interface
12346 change.
12347 (first_thread_of, kill_inferior_callback)
12348 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12349 (main): Call initialize_inferiors. Adjust to use ptids, killing
12350 and detaching from all inferiors. Handle multiprocess packet
12351 variants.
12352 * linux-low.h: Include gdb_proc_service.h.
12353 (struct process_info_private): New.
12354 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12355 <lwpid_of>: Use ptid_get_lwp.
12356 (get_lwp_thread): Adjust.
12357 (struct lwp_info): Add `dead' member.
12358 (find_lwp_pid): Declare.
12359 * linux-low.c (thread_db_active): Delete.
12360 (new_inferior): Adjust comment.
12361 (inferior_pid): Delete.
12362 (linux_add_process): New.
12363 (handle_extended_wait): Adjust.
12364 (add_lwp): Change unsigned long to ptid.
12365 (linux_create_inferior): Add process to processes table. Adjust
12366 to use ptids. Don't set new_inferior here.
12367 (linux_attach_lwp): Rename to ...
12368 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12369 it. Adjust to use ptids.
12370 (linux_attach_lwp): New.
12371 (linux_attach): Add process to processes table. Don't set
12372 new_inferior here.
12373 (struct counter): New.
12374 (second_thread_of_pid_p, last_thread_of_process_p): New.
12375 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12376 multiple processes.
12377 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12378 processes. Remove process from process table.
12379 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12380 to multiple processes.
12381 (any_thread_of): New.
12382 (linux_detach): Add `pid' argument, and handle it. Remove process
12383 from processes table.
12384 (linux_join): Add `pid' argument. Handle it.
12385 (linux_thread_alive): Change unsighed long argument to ptid_t.
12386 Consider dead lwps as not being alive.
12387 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12388 threads we're not interested in.
12389 (same_lwp, find_lwp_pid): New.
12390 (linux_wait_for_lwp): Change `pid' argument's type from int to
12391 ptid_t. Adjust.
12392 (linux_wait_for_event): Rename to ...
12393 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12394 from int to ptid_t. Adjust.
12395 (linux_wait_for_event): New.
12396 (linux_wait_1): Add `ptid' argument. Change return type to
12397 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12398 that exit from the process table.
12399 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12400 Adjust.
12401 (mark_lwp_dead): New.
12402 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12403 stopping all threads, mark its main lwp as dead.
12404 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12405 ptids.
12406 (fetch_register, usr_store_inferior_registers)
12407 (regsets_fetch_inferior_registers)
12408 (regsets_store_inferior_registers, linux_read_memory)
12409 (linux_write_memory): Inline `inferior_pid'.
12410 (linux_look_up_symbols): Adjust to use per-process
12411 `thread_db_active'.
12412 (linux_request_interrupt): Adjust to use ptids.
12413 (linux_read_auxv): Inline `inferior_pid'.
12414 (initialize_low): Don't reference thread_db_active.
12415 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12416 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12417 (ps_getpid): Return the pid of the current inferior.
12418 * thread-db.c (proc_handle, thread_agent): Delete.
12419 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12420 per-process data.
12421 (find_one_thread): Change argument type to ptid_t. Adjust to
12422 per-process data.
12423 (maybe_attach_thread): Adjust to per-process data and ptids.
12424 (thread_db_find_new_threads): Ditto.
12425 (thread_db_init): Ditto.
12426 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12427 processes table. Adjust to use ptids.
12428 (spu_kill, spu_detach): Adjust interface. Remove process from
12429 processes table.
12430 (spu_join, spu_thread_alive): Adjust interface.
12431 (spu_wait): Adjust interface. Remove process from processes
12432 table. Adjust to use ptids.
12433 * win32-low.c (current_inferior_tid): Delete.
12434 (current_inferior_ptid): New.
12435 (debug_event_ptid): New.
12436 (thread_rec): Take a ptid. Adjust.
12437 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12438 (child_delete_thread): Ditto.
12439 (do_initial_child_stuff): Add `attached' argument. Add process to
12440 processes table.
12441 (child_fetch_inferior_registers, child_store_inferior_registers):
12442 Adjust.
12443 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12444 (win32_attach): Pass 1 to do_initial_child_stuff.
12445 (win32_kill): Adjust interface. Remove process from processes
12446 table.
12447 (win32_detach): Ditto.
12448 (win32_join): Adjust interface.
12449 (win32_thread_alive): Take a ptid.
12450 (win32_resume): Adjust to use ptids.
12451 (get_child_debug_event): Ditto.
12452 (win32_wait): Adjust interface. Remove exiting process from
12453 processes table.
12454
12455 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12456
12457 Non-stop mode support.
12458
12459 * server.h (non_stop): Declare.
12460 (gdb_client_data, handler_func): Declare.
12461 (delete_file_handler, add_file_handler, start_event_loop):
12462 Declare.
12463 (handle_serial_event, handle_target_event, push_event)
12464 (putpkt_notif): Declare.
12465 * target.h (enum resume_kind): New.
12466 (struct thread_resume): Replace `step' field by `kind' field.
12467 (TARGET_WNOHANG): Define.
12468 (struct target_ops) <wait>: Add `options' argument.
12469 <supports_non_stop, async, start_non_stop>: New fields.
12470 (target_supports_non_stop, target_async): New.
12471 (start_non_stop): Declare.
12472 (mywait): Add `options' argument.
12473 * target.c (mywait): Add `options' argument. Print child exit
12474 notifications here.
12475 (start_non_stop): New.
12476 * server.c (non_stop, own_buf, mem_buf): New globals.
12477 (struct vstop_notif): New.
12478 (notif_queue): New global.
12479 (queue_stop_reply, push_event, discard_queued_stop_replies)
12480 (send_next_stop_reply): New.
12481 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12482 interface changes.
12483 (attach_inferior): In non-stop mode, don't wait for the target
12484 here.
12485 (handle_general_set): Handle QNonStop.
12486 (handle_query): When handling qC, return the current general
12487 thread, instead of the first thread of the list.
12488 (handle_query): If the backend supports non-stop mode, include
12489 QNonStop+ in the qSupported query response.
12490 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12491 and non-stop mode.
12492 (handle_v_attach, handle_v_run): Handle non-stop mode.
12493 (handle_v_stopped): New.
12494 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12495 (myresume): Adjust to use resume_kind. Handle non-stop.
12496 (queue_stop_reply_callback): New.
12497 (handle_status): Handle non-stop mode.
12498 (main): Clear non_stop flag on reconnection. Use the event-loop.
12499 Refactor serial protocol handling from here ...
12500 (process_serial_event): ... to this new function. When GDB
12501 selects any thread, select one here. In non-stop mode, wait until
12502 GDB acks all pending events before exiting.
12503 (handle_serial_event, handle_target_event): New.
12504 * remote-utils.c (remote_open): Install remote_desc in the event
12505 loop.
12506 (remote_close): Remove remote_desc from the event loop.
12507 (putpkt_binary): Rename to...
12508 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12509 (putpkt_binary): New as wrapper around putpkt_binary_1.
12510 (putpkt_notif): New.
12511 (prepare_resume_reply): In non-stop mode, don't change the
12512 general_thread.
12513 * event-loop.c: New.
12514 * Makefile.in (OBJ): Add event-loop.o.
12515 (event-loop.o): New rule.
12516
12517 * linux-low.h (pid_of): Moved here.
12518 (lwpid_of): New.
12519 (get_lwp_thread): Use lwpid_of.
12520 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12521 * linux-low.c (pid_of): Delete.
12522 (inferior_pid): Use lwpid_of.
12523 (linux_event_pipe): New.
12524 (target_is_async_p): New.
12525 (delete_lwp): New.
12526 (handle_extended_wait): Use lwpid_of.
12527 (add_lwp): Don't set lwpid field.
12528 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12529 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12530 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12531 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12532 first. Adjust to linux_wait_for_event interface changes. Use
12533 lwpid_of.
12534 (linux_detach): Don't delete the main lwp here.
12535 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12536 (status_pending_p): Don't consider explicitly suspended lwps.
12537 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12538 pointer. Add OPTIONS argument. Change return type to int. Use
12539 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12540 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12541 pointer. Add status pointer argument. Return a pid instead of a
12542 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12543 changes. In non-stop mode, don't switch to a random thread.
12544 (linux_wait): Rename to...
12545 (linux_wait_1): ... this. Add target_options argument, and handle
12546 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12547 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12548 clean exit and signal exit code. Don't stop all threads in
12549 non-stop mode. In all-stop mode, only stop all threads when
12550 reporting a stop to GDB. Handle explicit thread stop requests.
12551 (async_file_flush, async_file_mark): New.
12552 (linux_wait): New.
12553 (send_sigstop): Use lwpid_of.
12554 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12555 interface changes. In non-stop mode, don't switch to a random
12556 thread.
12557 (linux_resume_one_lwp): Use lwpid_of.
12558 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12559 (linux_resume_one_thread): ... this. Handle resume_stop. In
12560 non-stop mode, don't look for pending flag in all threads.
12561 (resume_status_pending_p): Don't consider explicitly suspended
12562 threads.
12563 (my_waitpid): Reimplement. Emulate __WALL.
12564 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12565 Use lwpid_of.
12566 (sigchld_handler, linux_supports_non_stop, linux_async)
12567 (linux_start_non_stop): New.
12568 (linux_target_ops): Register linux_supports_non_stop, linux_async
12569 and linux_start_non_stop.
12570 (initialize_low): Install SIGCHLD handler.
12571 * thread-db.c (thread_db_create_event, find_one_thread)
12572 (thread_db_get_tls_address): Use lwpid_of.
12573 * win32-low.c (win32_detach): Adjust to use resume_kind.
12574 (win32_wait): Add `options' argument.
12575 * spu-low.c (spu_resume): Adjust to use resume_kind.
12576 (spu_wait): Add `options' argument.
12577
12578 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12579
12580 Decouple target code from remote protocol.
12581
12582 * target.h (enum target_waitkind): New.
12583 (struct target_waitstatus): New.
12584 (struct target_ops) <wait>: Return an unsigned long. Take a
12585 target_waitstatus pointer instead of a char pointer.
12586 (mywait): Likewise.
12587 * target.c (mywait): Change prototype to return an unsigned long.
12588 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12589 * server.h (thread_from_wait, old_thread_from_wait): Delete
12590 declarations.
12591 (prepare_resume_reply): Change prototype to take a
12592 target_waitstatus.
12593 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12594 (last_status, last_ptid): New.
12595 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12596 pid instead of a signal.
12597 (attach_inferior): Remove "status" and "signal" parameters.
12598 Adjust.
12599 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12600 not as an address.
12601 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12602 (handle_v_requests, myresume): Remove "status" and "signal"
12603 parameters. Adjust.
12604 (handle_status): New.
12605 (main): Delete local `status'. Adjust.
12606 * remote-utils.c: Include target.h.
12607 (prepare_resume_reply): Change prototype to take a
12608 target_waitstatus. Adjust.
12609
12610 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12611 interface.
12612 * spu-low.c (spu_wait): Adjust.
12613 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12614 Delete.
12615 (win32_wait): Adjust.
12616
12617 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12618
12619 * target.h (struct thread_resume): Delete leave_stopped member.
12620 (struct target_ops): Add a `n' argument to the `resume' callback.
12621 * server.c (start_inferior): Adjust.
12622 (handle_v_cont, myresume): Adjust.
12623 * linux-low.c (check_removed_breakpoint): Adjust to resume
12624 interface change, and to removed leave_stopped field.
12625 (resume_ptr): Delete.
12626 (struct thread_resume_array): New.
12627 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12628 resume interface change.
12629 (linux_continue_one_thread, linux_queue_one_thread)
12630 (resume_status_pending_p): Check if the resume field is NULL
12631 instead of checking the leave_stopped member.
12632 (linux_resume): Adjust to the target resume interface change.
12633 * spu-low.c (spu_resume): Adjust to the target resume interface
12634 change.
12635 * win32-low.c (win32_detach, win32_resume): Ditto.
12636
12637 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12638
12639 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12640 flag.
12641 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12642 pending.
12643 (linux_continue_one_thread): Only preserve the stepping flag if
12644 there's a pending breakpoint.
12645
12646 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12647
12648 * server.c (main): After the inferior having exited, call
12649 remote_close before exiting gdbserver.
12650
12651 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12652
12653 Fix size of FPSCR in Power 7 processors.
12654 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12655 (PPC_FEATURE_HAS_DFP): New #define.
12656 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12657 size of the FPSCR.
12658
12659 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12660
12661 * server.c (handle_query) Whitespace and formatting.
12662
12663 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12664
12665 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12666 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12667 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12668 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12669 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12670 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12671 Makefile.in, configure.ac: Fix whitespace throughout.
12672 * configure: Regenerate.
12673
12674 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12675
12676 * inferiors.c (find_inferior): Make it safe for the callback
12677 function to delete the currently iterated inferior.
12678
12679 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12680
12681 * Makefile.in (linuw_low_h): Move higher.
12682 (thread-db.o): Depend on $(linux_low_h).
12683
12684 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12685
12686 Rename "process" to "lwp" throughout.
12687
12688 * linux-low.c (all_processes): Rename to...
12689 (all_lwps): ... this.
12690 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12691 (add_process): Rename to ...
12692 (add_lwp): ... this. Adjust.
12693 (linux_create_inferior): Adjust.
12694 (linux_attach_lwp): Adjust.
12695 (linux_attach): Adjust.
12696 (linux_kill_one_process): Rename to ...
12697 (linux_kill_one_lwp): ... this. Adjust.
12698 (linux_kill): Adjust.
12699 (linux_detach_one_process): Rename to ...
12700 (linux_detach_one_lwp): ... this. Adjust.
12701 (linux_detach): Adjust.
12702 (check_removed_breakpoint): Adjust.
12703 (status_pending_p): Adjust.
12704 (linux_wait_for_process): Rename to ...
12705 (linux_wait_for_lwp): ... this. Adjust.
12706 (linux_wait_for_event): Adjust.
12707 (send_sigstop): Adjust.
12708 (wait_for_sigstop): Adjust.
12709 (stop_all_processes): Rename to ...
12710 (stop_all_lwps): ... this.
12711 (linux_resume_one_process): Rename to ...
12712 (linux_resume_one_lwp): ... this. Adjust.
12713 (linux_set_resume_request, linux_continue_one_thread)
12714 (linux_queue_one_thread, resume_status_pending_p)
12715 (usr_store_inferior_registers, regsets_store_inferior_registers)
12716 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12717 Adjust.
12718 * linux-low.h (get_process): Rename to ...
12719 (get_lwp): ... this. Adjust.
12720 (get_thread_process): Rename to ...
12721 (get_thread_lwp): ... this. Adjust.
12722 (get_process_thread): Rename to ...
12723 (get_lwp_thread): ... this. Adjust.
12724 (struct process_info): Rename to ...
12725 (struct lwp_info): ... this.
12726 (all_processes): Rename to ...
12727 (all_lwps): ... this.
12728 * proc-service.c (ps_lgetregs): Adjust.
12729 * thread-db.c (thread_db_create_event, find_one_thread)
12730 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12731
12732 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12733
12734 * server.c (handle_query): Handle "qAttached".
12735
12736 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12737
12738 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12739 GPLv3, update license URL.
12740
12741 2009-03-01 Doug Evans <dje@google.com>
12742
12743 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12744 (server_h): Add gdb_signals.h.
12745 (signals.o): Update.
12746 * server.h (target_signal_from_host,target_signal_to_host_p)
12747 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12748
12749 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12750
12751 * remote-utils.c (getpkt): Also generate remote-debug
12752 information if noack_mode is set.
12753
12754 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12755
12756 * server.c (handle_query): Report qXfer:siginfo:read and
12757 qXfer:siginfo:write as supported and handle them.
12758 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12759 * linux-low.c (linux_xfer_siginfo): New.
12760 (linux_target_ops): Set it.
12761
12762 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12763
12764 * server.c (gdbserver_usage): Mention --remote-debug.
12765 (main): Accept '--remote-debug' switch.
12766
12767 2009-01-18 Doug Evans <dje@google.com>
12768
12769 * regcache.c (new_register_cache): No need to check result of xcalloc.
12770 * server.c (handle_search_memory): Back out calls to xmalloc,
12771 result is checked and error is returned to user upon failure.
12772 (handle_query): Ditto. Add more checks for result of malloc.
12773 (handle_v_cont): Check result of malloc, report error back to
12774 user upon failure.
12775 (handle_v_run): Ditto. Call freeargv.
12776 * server.h (freeargv): Declare.
12777 * utils.c (freeargv): New fn.
12778
12779 2009-01-15 Doug Evans <dje@google.com>
12780
12781 * gdbreplay.c (perror_with_name): Make arg const char *.
12782 * server.h (target_signal_to_name): Make return type const char *.
12783 * thread-db.c (thread_db_err_str): Make return type const char *.
12784 * utils.c (perror_with_name): Make arg const char *.
12785
12786 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12787
12788 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12789 when handling a EXIT_PROCESS_DEBUG_EVENT.
12790
12791 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12792
12793 * gdbreplay.c (gdbreplay_version): Update copyright year.
12794 * server.c (gdbserver_version): Likewise.
12795
12796 2009-01-05 Doug Evans <dje@google.com>
12797
12798 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12799 (handle_extended_wait): Improve comment.
12800
12801 2008-12-13 Doug Evans <dje@google.com>
12802
12803 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12804 * server.h (ATTR_MALLOC): New macro.
12805 (xmalloc,xcalloc,xstrdup): Declare.
12806 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12807 * inferiors.c: Ditto.
12808 * linux-low.c: Ditto.
12809 * mem-break.c: Ditto.
12810 * regcache.c: Ditto.
12811 * remote-utils.c: Ditto.
12812 * server.c: Ditto.
12813 * target.c: Ditto.
12814 * win32-low.c: Ditto.
12815
12816 2008-12-12 Doug Evans <dje@google.com>
12817
12818 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12819 in debugging printf.
12820
12821 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12822
12823 2008-12-09 Doug Evans <dje@google.com>
12824
12825 * linux-low.h (struct process_info): Delete member tid, unused.
12826 * thread-db.c (find_one_thread): Update.
12827 (maybe_attach_thread): Update.
12828
12829 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12830
12831 * target.h (struct target_ops): Add qxfer_osdata member.
12832 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12833 and dirent.h.
12834 (linux_qxfer_osdata): New functions.
12835 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12836 callback.
12837 * server.c (handle_query): Handle "qXfer:osdata:read:".
12838 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12839 (buffer_xml_printf): New functions.
12840 * server.h (struct buffer): New.
12841 (buffer_grow_str, buffer_grow_str0): New macros.
12842 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12843 (buffer_xml_printf): Declare.
12844
12845 2008-11-24 Doug Evans <dje@google.com>
12846
12847 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12848
12849 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12850
12851 * server.c (handle_v_run): Always use the supplied argument list.
12852
12853 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12854
12855 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12856 (xtensa_regmap_table): Add entry for scompare1.
12857
12858 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12859
12860 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12861 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12862 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12863 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12864 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12865 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12866 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12867 XML target descriptions.
12868 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12869 when inferior is running on an ISA 2.05 or later processor. Add
12870 special case to return offset for full 64-bit slot of FPSCR when
12871 in 32-bits.
12872
12873 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12874
12875 * Makefile.in (SFILES, clean): Added sparc64 files.
12876 (reg-sparc64.o, reg-sparc64.c): New.
12877 * configure.srv (sparc*-*-linux*): New configuration.
12878 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12879 syscall arguments for SPARC.
12880 (regsets_store_inferior_registers): Likewise.
12881 * linux-sparc-low.c: New file.
12882
12883 2008-10-21 Doug Evans <dje@google.com>
12884
12885 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12886 (READLINE_DIR,READLINE_DEP): Delete.
12887 (INTERNAL_CFLAGS): Update.
12888 (LINTFLAGS): Update.
12889
12890 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12891
12892 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12893 whole argv from the last run, not just argv[0].
12894
12895 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12896
12897 * regcache.c (new_register_cache): Return NULL if the register
12898 cache size isn't known yet.
12899 (free_register_cache): Avoid dereferencing a NULL regcache.
12900
12901 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12902
12903 * configure.srv: Merge MIPS and MIPS64.
12904
12905 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12906
12907 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12908
12909 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12910
12911 * Makefile.in: Add required vsx dependencies.
12912
12913 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12914 Declare init_registers_powerpc_vsx32l.
12915 Declare init_registers_powerpc_vsx64l.
12916 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12917 (ppc_arch_setup): Check for VSX in hwcap.
12918 (ppc_fill_vsxregset): New function.
12919 (ppc_store_vsxregset): New function.
12920 Add new VSX entry in regset_info target_regsets.
12921
12922 * configure.srv: Add new VSX dependencies.
12923
12924 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12925
12926 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12927 (remote_open): Set or clear transport_is_reliable.
12928 (putpkt_binary): Don't expect acks in noack mode.
12929 (getpkt): Don't send ack/nac in noack mode.
12930 * server.c (handle_general_set): Handle QStartNoAckMode.
12931 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12932 qSupported.
12933 (main): Reset noack_mode on every connection.
12934 * server.h (noack_mode): Declare.
12935
12936 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12937
12938 * Makefile.in (GDBREPLAY_OBS): New variable.
12939 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12940
12941 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12942 Daniel Jacobowitz <dan@codesourcery.com>
12943
12944 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12945 (usr_store_inferior_registers): Likewise.
12946 (regsets_store_inferior_registers): Likewise.
12947
12948 2008-07-31 Rolf Jansen <rj@surtec.com>
12949 Pedro Alves <pedro@codesourcery.com>
12950
12951 * configure.ac: Check for memmem declaration.
12952 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12953 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12954 (disable_packet_qfThreadInfo): Unconditionally compile.
12955 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12956 * configure, config.in: Regenerate.
12957
12958 2008-07-28 Doug Kwan <dougkwan@google.com>
12959
12960 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12961 (linux_write_memory): Remove declaration of errno.
12962
12963 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12964
12965 * linux-low.c (handle_extended_wait): Do not use "status"
12966 variable uninitialized.
12967
12968 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12969
12970 * server.c (handle_v_attach): Inhibit reporting dll changes.
12971
12972 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12973
12974 * remote-utils.c (prepare_resume_reply): If requested, don't
12975 output "thread:TID" in the T stop reply.
12976
12977 * server.c (disable_packet_vCont, disable_packet_Tthread)
12978 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12979 (handle_query): If requested, disable support for qC, qfThreadInfo
12980 and qsThreadInfo.
12981 (handle_v_requests): If requested, disable support for vCont.
12982 (gdbserver_show_disableable): New.
12983 (main): Handle --disable-packet and --disable-packet=LIST.
12984
12985 * server.h (disable_packet_vCont, disable_packet_Tthread)
12986 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12987
12988 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12989
12990 * server.c (gdbserver_usage): Mention --version.
12991
12992 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12993
12994 * Makefile.in (gdbreplay.o): New rule.
12995
12996 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12997
12998 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12999 message, not gdbserver.
13000
13001 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13002 Nathan Sidwell <nathan@codesourcery.com>
13003 Joseph Myers <joseph@codesourcery.com>
13004
13005 * acinclude.m4: Include ../../config/acx.m4.
13006 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13007 * configure, config.in: Regenerate.
13008 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13009 * server.c (gdbserver_version): Print PKGVERSION.
13010 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13011 (main): Adjust gdbserver_usage calls.
13012 * gdbreplay.c (version, host_name): Add declarations.
13013 (gdbreplay_version, gdbreplay_usage): New.
13014 (main): Accept --version and --help options.
13015
13016 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13017
13018 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13019 (arm_breakpoint_at): Handle Thumb.
13020 (the_low_target): Add comment.
13021
13022 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13023
13024 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13025
13026 2008-05-09 Doug Evans <dje@google.com>
13027
13028 * server.h (decode_search_memory_packet): Declare.
13029 * remote-utils.c (decode_search_memory_packet): New fn.
13030 * server.c (handle_search_memory_1): New fn.
13031 (handle_search_memory): New fn.
13032 (handle_query): Process qSearch:memory packets.
13033
13034 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13035
13036 * regcache.c (registers_length): Remove.
13037 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13038 full register packet.
13039 * regcache.h (registers_length): Remove prototype.
13040 * server.h (PBUFSIZ): Define to 16384.
13041
13042 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13043
13044 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13045 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13046 powerpc-64l.o, and powerpc-altivec64l.o.
13047 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13048 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13049 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13050 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13051 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13052 to srv_xmlfiles.
13053
13054 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13055 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13056 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13057 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13058 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13059 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13060 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13061 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13062 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13063 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13064 (clean): Update.
13065
13066 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13067 (init_registers_powerpc_32l): ... this new prototype.
13068 (init_registers_powerpc_32): Remove, replace by ...
13069 (init_registers_powerpc_altivec32l): ... this new prototype.
13070 (init_registers_powerpc_e500): Remove, replace by ...
13071 (init_registers_powerpc_e500l): ... this new prototype.
13072 (init_registers_ppc64): Remove, replace by ...
13073 (init_registers_powerpc_64l): ... this new prototype.
13074 (init_registers_powerpc_64): Remove, replace by ...
13075 (init_registers_powerpc_altivec64l): ... this new prototype.
13076 (ppc_num_regs): Set to 73.
13077 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13078 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13079 (ppc_cannot_store_register): Handle orig_r3 and trap.
13080 (ppc_arch_setup): Update init_registers_... calls.
13081 (ppc_fill_gregset): Handle orig_r3 and trap.
13082
13083 * inferiors.c (clear_inferiors): Reset current_inferior.
13084
13085 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13086
13087 * acinclude.m4: Add override.m4.
13088 * configure: Regenerate.
13089
13090 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13091
13092 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13093 initial call to init_register_ppc64.
13094
13095 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13096
13097 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13098 single powerpc*-*-linux* case.
13099 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13100
13101 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13102
13103 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13104 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13105 from reg_xmlfiles.
13106 * linux-ppc-low.c: Include <elf.h>.
13107 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13108 (ppc_hwcap): New global variable.
13109 (ppc_regmap): Remove __SPE__ #ifdef sections.
13110 (ppc_regmap_e500): New global variable.
13111 (ppc_cannot_store_register): Update __SPE__ special case.
13112 (ppc_get_hwcap): New function.
13113 (ppc_arch_setup): Use it to determine whether inferior supports
13114 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13115 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13116 Do not access registers if target does not support AltiVec.
13117 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13118 Do not access registers if target does not support SPE.
13119 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13120
13121 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * linux-low.c (disabled_regsets, num_regsets): New.
13124 (use_regsets_p): Delete.
13125 (linux_wait_for_process): Clear disabled_regsets.
13126 (regsets_fetch_inferior_registers): Check and set it.
13127 (regsets_store_inferior_registers): Likewise.
13128 (linux_fetch_registers, linux_store_registers): Do not use
13129 use_regsets_p.
13130 (initialize_low): Allocate disabled_regsets.
13131
13132 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13133
13134 * Makefile.in (LIBOBJS): New.
13135 (OBS): Use LIBOBJS.
13136 (memmem.o): New rule.
13137 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13138 * configure: Regenerated.
13139
13140 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13141
13142 * server.c (handle_query): Never return "unsupported" for
13143 qXfer:features:read queries.
13144
13145 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13146
13147 * server.c (get_features_xml): Fix inverted condition.
13148 (handle_query): Always support qXfer:feature:read.
13149
13150 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13151
13152 * server.c (wrapper_argv): New.
13153 (start_inferior): Handle wrapper_argv. If set, expect an extra
13154 trap.
13155 (gdbserver_usage): Document --wrapper.
13156 (main): Parse --wrapper.
13157
13158 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13159
13160 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13161 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13162 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13163 (ppc_set_pc): Likewise.
13164 (ppc_arch_setup): New function.
13165 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13166 of collect_register.
13167 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13168
13169 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13170
13171 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13172 instead of linux-ppc64-low.o.
13173 * linux-ppc64-low.c: Remove file.
13174 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13175 (linux-ppc64-low.o): Remove rule.
13176
13177 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13178 (init_registers_powerpc_64): Likewise.
13179 (ppc_regmap): Conditionally define depending on __powerpc64__.
13180 (ppc_cannot_store_register): Do not special-case "fpscr" when
13181 compiled on __powerpc64__.
13182 (ppc_collect_ptrace_register): New function.
13183 (ppc_supply_ptrace_register): New function.
13184 (ppc_breakpoint): Change type to "unsigned int".
13185 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13186 (the_low_target): Conditionally provide initializers for the
13187 arch_setup member depending on __powerpc64__. Install
13188 collect_ptrace_register and supply_ptrace_register members.
13189
13190 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13191
13192 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13193 * server.c (gdbserver_xmltarget): Define.
13194 (get_features_xml): Use it to replace "target.xml" and arch_string.
13195
13196 * configure.srv: Remove srv_xmltarget. Add XML files that were
13197 mentioned there to srv_xmlfiles instead. Remove conditional tests
13198 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13199 srv_xmlfiles and srv_regobj to include all possible choices.
13200 * configure.ac (srv_xmltarget): Remove.
13201 (srv_xmlfiles): Do not add "target.xml".
13202 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13203 checks for supplementary target information.
13204 * configure: Regenerate.
13205 * Makefile.in (XML_TARGET): Remove.
13206 (target.xml): Remove rule.
13207 (clean): Do not clean up target.xml.
13208 (.PRECIOUS): Do not mention target.xml.
13209
13210 * target.h (struct target_ops): Remove arch_string member.
13211 * linux-low.c (linux_arch_string): Remove.
13212 (linux_target_ops): Remove arch_string initializer.
13213 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13214 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13215 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13216 * spu-low.c (spu_arch_string): Remove.
13217 (spu_target_ops): Remove arch_string initializer.
13218 * win32-low.c (win32_arch_string): Remove.
13219 (win32_target_ops): Remove arch_string initializer.
13220 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13221 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13222 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13223
13224 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13225
13226 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13227 by collect_ptrace_register and supply_ptrace_register hooks.
13228 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13229 instead of checking for the_low_target.left_pad_xfer.
13230 (usr_store_inferior_registers): Use collect_ptrace_register callback
13231 instead of checking for the_low_target.left_pad_xfer.
13232
13233 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13234 (s390_supply_ptrace_register): Likewise.
13235 (s390_fill_gregset): Call s390_collect_ptrace_register.
13236 (the_low_target): Update.
13237
13238 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13239 (ppc_supply_ptrace_register): Likewise.
13240 (the_low_target): Update.
13241
13242 * linux-i386-low.c (the_low_target): Update.
13243 * linux-x86-64-low.c (the_low_target): Update.
13244
13245 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13246
13247 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13248 reg-s390.o and reg-s390x.o.
13249
13250 * linux-low.c (new_inferior): New global variable.
13251 (linux_create_inferior, linux_attach): Set it.
13252 (linux_wait_for_process): Call the_low_target.arch_setup after the
13253 target has stopped for the first time.
13254 (initialize_low): Do not call the_low_target.arch_setup.
13255
13256 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13257 (s390_set_pc): Likewise.
13258 (s390_arch_setup): New function.
13259 (the_low_target): Use s390_arch_setup as arch_setup routine.
13260
13261 * regcache.c (realloc_register_cache): New function.
13262 (set_register_cache): Call it for each existing regcache.
13263
13264 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13265
13266 * server.h (init_registers): Remove prototype.
13267
13268 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13269 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13270 instead of init_registers ().
13271 * linux-arm-low.c (init_registers_arm): Add prototype.
13272 (init_registers_arm_with_iwmmxt): Likewise.
13273 (the_low_target): Add initializer for arch_setup field.
13274 * linux-cris-low.c (init_registers_cris): Add prototype.
13275 (the_low_target): Add initializer for arch_setup field.
13276 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13277 (the_low_target): Add initializer for arch_setup field.
13278 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13279 (the_low_target): Add initializer for arch_setup field.
13280 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13281 (the_low_target): Add initializer for arch_setup field.
13282 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13283 (the_low_target): Add initializer for arch_setup field.
13284 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13285 (the_low_target): Add initializer for arch_setup field.
13286 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13287 (init_registers_mips64_linux): Likewise.
13288 (the_low_target): Add initializer for arch_setup field.
13289 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13290 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13291 (the_low_target): Add initializer for arch_setup field.
13292 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13293 (init_registers_powerpc_64): Likewise.
13294 (the_low_target): Add initializer for arch_setup field.
13295 * linux-s390-low.c (init_registers_s390): Add prototype.
13296 (init_registers_s390x): Likewise.
13297 (the_low_target): Add initializer for arch_setup field.
13298 * linux-sh-low.c (init_registers_sh): Add prototype.
13299 (the_low_target): Add initializer for arch_setup field.
13300 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13301 (the_low_target): Add initializer for arch_setup field.
13302 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13303 (the_low_target): Add initializer for arch_setup field.
13304
13305 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13306 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13307 instead of init_registers ().
13308 * win32-arm-low.c (init_registers_arm): Add prototype.
13309 (the_low_target): Add initializer for arch_setup field.
13310 * win32-i386-low.c (init_registers_i386): Add prototype.
13311 (the_low_target): Add initializer for arch_setup field.
13312
13313 * spu-low.c (init_registers_spu): Add prototype.
13314 (initialize_low): Call initialie_registers_spu () instead of
13315 initialize_registers ().
13316
13317 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13318
13319 * server.c (handle_v_requests): When handling the vRun and vAttach
13320 packets, if already debugging a process, don't kill it. Return an
13321 error instead.
13322
13323 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13324
13325 * server.c (handle_query): Correct length check.
13326
13327 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13328
13329 * win32-low.c (do_initial_child_stuff): Add process handle
13330 parameter. Set current_process_handle and current_process_id from the
13331 parameters. Clear globals.
13332 (win32_create_inferior): Don't set current_process_handle and
13333 current_process_id here. Instead pass them on the call to
13334 do_initial_child_stuff.
13335 (win32_attach): Likewise.
13336 (win32_clear_inferiors): New.
13337 (win32_kill): Don't close the current process handle or the
13338 current thread handle here. Instead call win32_clear_inferiors.
13339 (win32_detach): Don't open a new handle to the process. Call
13340 win32_clear_inferiors.
13341 (win32_join): Don't rely on current_process_handle; open a new
13342 handle using the process id.
13343 (win32_wait): Call win32_clear_inferiors when the inferior process
13344 has exited.
13345
13346 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13347
13348 * server.c (monitor_show_help): Add "exit".
13349
13350 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13351
13352 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13353 (clean): Add reg-xtensa.c.
13354 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13355 * configure.srv (xtensa*-*-linux*) New target.
13356 * linux-xtensa-low.c: New.
13357 * xtensa-xtregs.c: New.
13358
13359 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13360
13361 * hostio.c: Don't include errno.h.
13362 (errno_to_fileio_errno): Move to hostio-errno.
13363 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13364 error number outputting to the target->hostio_last_error callback.
13365 (hostio_packet_error): Use FILEIO_EINVAL directly.
13366 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13367 calls to hostio_error.
13368 * hostio-errno.c: New.
13369 * server.h (hostio_last_error_from_errno): Declare.
13370 * target.h (target_ops): Add hostio_last_error member.
13371 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13372 as hostio_last_error handler.
13373 * spu-low.c (spu_target_ops): Likewise.
13374 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13375 (wince_hostio_last_error): New functions.
13376 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13377 as hostio_last_error handler.
13378 (win32_target_ops) [!_WIN32_WCE]: Register
13379 hostio_last_error_from_errno as hostio_last_error handler.
13380 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13381 (hostio-errno.o): New rule.
13382 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13383 * configure.srv (srv_hostio_err_objs): New variable. Default to
13384 hostio-errno.o.
13385 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13386 * configure: Regenerate.
13387
13388 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13389
13390 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13391 (linux_kill, linux_detach): Clean up the process list.
13392 * remote-utils.c (remote_open): Improve port number parsing.
13393 (putpkt_binary, input_interrupt): Only send interrupts if the target
13394 is running.
13395 * server.c (extended_protocol): Make static.
13396 (attached): Define earlier.
13397 (exit_requested, response_needed, program_argv): New variables.
13398 (target_running): New.
13399 (start_inferior): Clear attached here.
13400 (attach_inferior): Set attached here.
13401 (require_running): Define.
13402 (handle_query): Use require_running and target_running. Implement
13403 "monitor exit".
13404 (handle_v_attach, handle_v_run): New.
13405 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13406 (gdbserver_usage): Update.
13407 (main): Redo argument parsing. Handle --debug and --multi. Handle
13408 --attach along with other options or after the port. Save
13409 program_argv. Support no initial program. Resynchronize
13410 communication with GDB after an error. Handle "monitor exit".
13411 Use require_running and target_running. Always allow the extended
13412 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13413 restart in extended mode.
13414 * README: Refer to the GDB manual. Update --attach usage.
13415
13416 2007-12-20 Andreas Schwab <schwab@suse.de>
13417
13418 * linux-low.c (STACK_SIZE): Define.
13419 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13420 (linux_test_for_tracefork): Likewise.
13421
13422 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13423
13424 * linux-low.c (linux_wait_for_event): Update messages. Do not
13425 reinsert auto-delete breakpoints.
13426 * mem-break.c (struct breakpoint): Change return type of handler to
13427 int.
13428 (set_breakpoint_at): Update handler type.
13429 (reinsert_breakpoint_handler): Return 1 instead of calling
13430 delete_breakpoint.
13431 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13432 setting a new one.
13433 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13434 * mem-break.h (set_breakpoint_at): Update handler type.
13435 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13436 * win32-low.c (auto_delete_breakpoint): New.
13437 (get_child_debug_event): Use it.
13438
13439 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13440
13441 * configure.ac: Check for pread and pwrite.
13442 * hostio.c (handle_pread): Fall back to lseek and read.
13443 (handle_pwrite): Fall back to lseek and write.
13444 * config.in, configure: Regenerated.
13445
13446 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13447
13448 * server.c (myresume): Add own_buf argument.
13449 (main): Update calls.
13450
13451 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13452
13453 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13454 * remote-utils.c (remote_open): Do not call disable_async_io.
13455 (block_async_io): Delete.
13456 (unblock_async_io): Make static.
13457 (initialize_async_io): New.
13458 * server.c (handle_v_cont): Handle async I/O here.
13459 (myresume): Likewise. Move other common resume tasks here...
13460 (main): ... from here. Call initialize_async_io. Disable async
13461 I/O before the main loop.
13462 * server.h (initialize_async_io): Declare.
13463 (block_async_io, unblock_async_io): Delete prototypes.
13464 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13465
13466 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13467
13468 * remote-utils.c (readchar): Allow binary data in received messages.
13469
13470 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13471
13472 * win32-low.c (attaching): New global.
13473 (win32_create_inferior): Clear the `attaching' global.
13474 (win32_attach): Set the `attaching' global.
13475 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13476 attaching. Only set a breakpoint at the entry point if not
13477 attaching.
13478
13479 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13480
13481 * server.c (main): Don't report dll events on the initial
13482 connection on attaches.
13483
13484 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13485
13486 * server.c (main): Relax numerical bases supported for the pid of
13487 the --attach command line argument.
13488
13489 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13490
13491 * win32-low.c (win32_attach): Call OpenProcess before
13492 DebugActiveProcess, not after. Add last error output to error
13493 call.
13494
13495 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13496
13497 * win32-low.c (win32_get_thread_context)
13498 (win32_set_thread_context): New functions.
13499 (thread_rec): Use win32_get_thread_context.
13500 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13501 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13502 field.
13503
13504 2007-12-03 Leo Zayas
13505 Pedro Alves <pedro_alves@portugalmail.pt>
13506
13507 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13508 global variables.
13509 (child_add_thread): Minor cleanup.
13510 (child_continue): Resume artificially suspended threads before
13511 calling ContinueDebugEvent.
13512 (suspend_one_thread): New.
13513 (fake_breakpoint_event): New.
13514 (get_child_debug_event): Change return type to int. Check here if
13515 gdb sent an interrupt request. If a soft interrupt was requested,
13516 fake a breakpoint event. Return 0 if there is no event to handle,
13517 and 1 otherwise.
13518 (win32_wait): Don't check here if gdb sent an interrupt request.
13519 Ensure there is a valid event to handle.
13520 (win32_request_interrupt): Add soft interruption method as last
13521 resort.
13522
13523 2007-12-03 Leo Zayas
13524 Pedro Alves <pedro_alves@portugalmail.pt>
13525
13526 * win32-low.h (win32_thread_info): Add descriptions to the
13527 structure members. Replace `suspend_count' counter by a
13528 `suspended' flag.
13529 * win32-low.c (thread_rec): Update condition of when to get the
13530 context from the inferior. Rely on ContextFlags being set if it
13531 has already been retrieved. Only suspend the inferior thread if
13532 we haven't already. Warn if that fails.
13533 (continue_one_thread): s/suspend_count/suspended/. Only call
13534 ResumeThread once. Warn if that fails.
13535
13536 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13537
13538 * win32-low.c (win32_wait): Don't read from the inferior when it
13539 has already exited.
13540
13541 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13542
13543 * Makefile.in (win32_low_h): New variable.
13544 (win32-low.o): Add dependency on $(win32_low_h).
13545 (win32-arm-low.o, win32-i386-low.o): New rules.
13546
13547 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13548
13549 * hostio.c: Correct copyright year.
13550
13551 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13552
13553 * Makefile.in (OBS): Add hostio.o.
13554 (hostio.o): New rule.
13555 * server.h (handle_vFile): Declare.
13556 * hostio.c: New file.
13557 * server.c (handle_v_requests): Take packet_len and new_packet_len
13558 for binary packets. Call handle_vFile.
13559 (main): Update call to handle_v_requests.
13560
13561 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13562
13563 * linux-low.c: Include <sched.h>.
13564
13565 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13566
13567 * linux-low.c (linux_tracefork_grandchild): New.
13568 (linux_tracefork_child): Use clone.
13569 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13570
13571 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13572
13573 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13574
13575 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13576
13577 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13578
13579 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13580
13581 * inferiors.c (change_inferior_id): Delete.
13582 (add_pid_to_list, pull_pid_from_list): New.
13583 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13584 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13585 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13586 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13587 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13588 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13589 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13590 (using_threads): Always set to 1.
13591 (handle_extended_wait): New.
13592 (add_process): Do not set TID.
13593 (linux_create_inferior): Set must_set_ptrace_flags.
13594 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13595 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13596 (linux_thread_alive): Rename TID argument to LWPID.
13597 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13598 (linux_wait_for_event): Do not use TID or check using_threads. Update
13599 call to dead_thread_notify. Call handle_extended_wait.
13600 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13601 (send_sigstop): Delete sigstop_sent.
13602 (wait_for_sigstop): Avoid TID.
13603 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13604 (linux_test_for_tracefork): New.
13605 (linux_lookup_signals): Use thread_db_active and
13606 linux_supports_tracefork_flag.
13607 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13608 * linux-low.h (get_process_thread): Avoid TID.
13609 (struct process_ifo): Move thread_known and tid to the end. Remove
13610 sigstop_sent.
13611 (linux_attach_lwp, thread_db_init): Update prototypes.
13612 * server.h (change_inferior_id): Delete prototype.
13613 (add_pid_to_list, pull_pid_from_list): New prototypes.
13614 * thread-db.c (thread_db_use_events): New.
13615 (find_first_thread): Rename to...
13616 (find_one_thread): ...this. Update callers and messages. Do not
13617 call fatal. Check thread_db_use_events. Do not call
13618 change_inferior_id or new_thread_notify.
13619 (maybe_attach_thread): Update. Do not call new_thread_notify.
13620 (thread_db_init): Set thread_db_use_events. Check use_events.
13621 * utils.c (fatal, warning): Correct message prefix.
13622
13623 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13624
13625 * Makefile.in (clean): Remove new files.
13626 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13627 (powerpc-64.o, powerpc-64.c): New rules.
13628 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13629 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13630 with SPE.
13631 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13632 SPE targets.
13633 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13634 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13635 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13636 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13637 (target_regsets): Add AltiVec and SPE register sets.
13638 * configure.ac: Check for AltiVec and SPE.
13639 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13640 (ppc_fill_vrregset, ppc_store_vrregset): New.
13641 (target_regsets): Add AltiVec register set.
13642 * configure: Regenerated.
13643
13644 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13645
13646 * linux-low.c (O_LARGEFILE): Define.
13647 (linux_read_memory): Use /proc/PID/mem.
13648 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13649 * configure, config.in: Regenerated.
13650
13651 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13652
13653 * linux-low.c (linux_wait_for_event): Do not pass signals while
13654 single-stepping.
13655
13656 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13657
13658 * win32-low.c (create_process): New.
13659 (win32_create_inferior): Use create_process instead of
13660 CreateProcess. If create_process failed retry appending an ".exe"
13661 suffix. Store the GetLastError result immediatelly after
13662 create_process calls and use it on the call to error.
13663
13664 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13665
13666 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13667
13668 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13669
13670 * configure.ac: Switch license to GPLv3.
13671
13672 2007-08-01 Michael Snyder <msnyder@access-company.com>
13673
13674 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13675
13676 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13677
13678 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13679 typedef.
13680 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13681 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13682 CloseToolhelp32Snapshot.
13683 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13684 CloseToolhelp32Snapshot.
13685
13686 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13687
13688 * server.c (main): Check for inferior exit before main loop.
13689
13690 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13691
13692 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13693 instead of on tmp_desc.
13694
13695 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13696 Daniel Jacobowitz <dan@codesourcery.com>
13697
13698 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13699 (add_thread): Minor cleanups.
13700 (clear_inferiors): Move lower in the file. Clear the DLL
13701 list.
13702 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13703 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13704 (xml_escape_text): New.
13705 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13706 for qSupported.
13707 (handle_v_cont): Report errors.
13708 (gdbserver_version): Update.
13709 (main): Correct size of own_buf. Do not report initial DLL events.
13710 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13711 (unloaded_dll, xml_escape_text): New.
13712 * win32-low.c (enum target_waitkind): Update comments.
13713 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13714 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13715 (win32_EnumProcessModules, win32_GetModuleInformation)
13716 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13717 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13718 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13719 (win32_Module32First, win32_Module32Next, load_toolhelp)
13720 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13721 (get_child_debug_event): Handle DLL events.
13722 (win32_wait): Likewise.
13723
13724 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13725
13726 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13727 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13728
13729 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13730
13731 * win32-low.c (handle_output_debug_string): Ignore event if not
13732 waiting.
13733
13734 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13735
13736 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13737
13738 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13741
13742 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13743
13744 * inferiors.c (change_inferior_id): Add comment.
13745 * linux-low.c (check_removed_breakpoint): Add an early
13746 prototype. Improve debug output.
13747 (linux_attach): Doc update.
13748 (linux_detach_one_process, linux_detach): Clean up before releasing
13749 each process.
13750 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13751 * linux-low.h (struct process_info): Doc improvement.
13752 * mem-break.c (delete_all_breakpoints): New.
13753 * mem-break.h (delete_all_breakpoints): New prototype.
13754 * thread-db.c (find_first_thread): New.
13755 (thread_db_create_event): Call it instead of
13756 thread_db_find_new_threads. Clean up unused variables.
13757 (maybe_attach_thread): Remove first thread handling.
13758 (thread_db_find_new_threads): Use find_first_thread.
13759 (thread_db_get_tls_address): Likewise.
13760
13761 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * thread-db.c (thread_db_find_new_threads): Add prototype.
13764 (thread_db_create_event): Check for the main thread before adding
13765 a new thread.
13766 (maybe_attach_thread): Only enable event reporting if TID == 0.
13767 (thread_db_get_tls_address): Check for new threads.
13768
13769 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13770
13771 * linux-low.c (linux_create_inferior): Try execv before execvp.
13772 * spu-low.c (spu_create_inferior): Likewise.
13773
13774 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13775
13776 * linux-low.c (linux_create_inferior): Change execv to execvp.
13777 * spu-low.c (spu_create_inferior): Likewies.
13778
13779 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * Makefile.in (clean): Clean new files instead of deleted ones.
13782 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13783 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13784 rules.
13785 * configure.srv: Specify XML files and new regformats for MIPS and
13786 MIPS64 GNU/Linux.
13787 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13788 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13789 an entry for the restart register.
13790 (mips_cannot_fetch_register, mips_cannot_store_register)
13791 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13792 register names to match the XML descriptions.
13793 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13794 restart register instead of $0.
13795
13796 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13797 Markus Deuling <deuling@de.ibm.com>
13798
13799 * remote-utils.c (decode_xfer_write): New function.
13800 * server.h (decode_xfer_write): Add prototype.
13801 * server.c (handle_query): Add PACKET_LEN argument. Support
13802 qXfer:spu:read and qXfer:spu:write packets.
13803 (main): Pass packet_len to handle_query.
13804 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13805 * target.h (target_ops): Add qxfer_spu.
13806
13807 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13808
13809 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13810 accessing non-seekable spufs files.
13811
13812 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13813
13814 * server.c (handle_query): Add reply for qC packet.
13815
13816 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13817 Leo Zayas <lerele@champenstudios@com>
13818
13819 * server.h (check_remote_input_interrupt_request): New function.
13820 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13821 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13822 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13823 (check_remote_input_interrupt_request): New function.
13824 * server.h (check_remote_input_interrupt_request): Declare.
13825 * win32-low.c (winapi_DebugBreakProcess,
13826 winapi_GenerateConsoleCtrlEvent): New typedefs.
13827 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13828 to 250 ms.
13829 (win32_wait): Check for remote interrupt request
13830 with check_remote_input_interrupt_request.
13831 (win32_request_interrupt): New function.
13832 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13833
13834 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13835
13836 * win32-low.c (debug_registers_changed,
13837 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13838 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13839 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13840 (thread_rec): Get context using the low target.
13841 (child_add_thread): Call thread_added on the low target,
13842 which does the same thing.
13843 (regptr): Delete.
13844 (do_initial_child_stuff): Remove debug registers references.
13845 Set context using the low target. Resume threads after
13846 setting the contexts.
13847 (child_continue): Remove dead variable. Remove debug
13848 registers references.
13849 (child_fetch_inferior_registers): Go through the low target.
13850 (do_child_store_inferior_registers): Remove.
13851 (child_store_inferior_registers): Go through the low target.
13852 (win32_resume): Remove debug registers references.
13853 Set context using the low target.
13854 (handle_exception): Change return type to void. Don't record
13855 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13856 first chance exception.
13857 (get_child_debug_event): Change return type to void. Remove
13858 goto loop. Always return after waiting for debug event.
13859 (win32_wait): Convert to switch statement. Handle spurious
13860 events.
13861
13862 * win32-i386-low.c (debug_registers_changed,
13863 debug_registers_used): New.
13864 (initial_stuff): Rename to ...
13865 (i386_initial_stuff): ... this. Clear debug registers
13866 state variables.
13867 (store_debug_registers): Delete.
13868 (i386_get_thread_context): New.
13869 (load_debug_registers): Delete.
13870 (i386_set_thread_context): New.
13871 (i386_thread_added): New.
13872 (single_step): Rename to ...
13873 (i386_single_step): ... this.
13874 (do_fetch_inferior_registers): Rename to ...
13875 (i386_fetch_inferior_register): ... this.
13876 (i386_store_inferior_register): New.
13877 (the_low_target): Adapt to new interface.
13878
13879 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13880 (arm_get_thread_context): New.
13881 (arm_set_thread_context): New.
13882 (regptr): New.
13883 (do_fetch_inferior_registers): Rename to ...
13884 (arm_fetch_inferior_register): ... this.
13885 (arm_store_inferior_register): New.
13886 (arm_wince_breakpoint): Reimplement as unsigned long.
13887 (arm_wince_breakpoint_len): Define.
13888 (the_low_target): Adapt to new interface.
13889
13890 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13891 load_debug_registers. Add get_thread_context, set_thread_context,
13892 thread_added and store_inferior_register. Rename
13893 fetch_inferior_registers to fetch_inferior_register.
13894 (regptr): Remove declaration.
13895
13896 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13897
13898 * linux-low.c (linux_detach): Change return type to int. Return 0.
13899 * spu-low.c (spu_detach): Likewise.
13900
13901 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * target.h (target_ops): Change return type of detach to int.
13904 Add join.
13905 (join_inferior): New.
13906 * server.c (main): Don't skip detach support on mingw32.
13907 If the inferior doesn't support detaching return error.
13908 Call join_inferior instead of using waitpid.
13909 * linux-low.c (linux_join): New.
13910 (linux_target_op): Add linux_join.
13911 * spu-low.c (spu_join): New.
13912 (spu_target_ops): Add spu_join.
13913 * win32-low.c (win32_detach): Adapt to new interface.
13914 Reopen current_process_handle before detaching. Issue a child
13915 resume before detaching.
13916 (win32_join): New.
13917 (win32_target_op): Add win32_join.
13918
13919 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13920
13921 * win32-low.c (win32-attach): Fix return value.
13922 * target.h (target_ops): Describe ATTACH return values.
13923
13924 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13925
13926 * win32-low.c (GETPROCADDRESS): Define.
13927 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13928 (winapi_DebugSetProcessKillOnExit): Likewise.
13929 (win32_create_inferior): Force usage of ansi CreateProcessA.
13930 (win32_attach): Use GETPROCADDRESS.
13931 (win32_detach): Likewise.
13932
13933 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13934
13935 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13936
13937 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13938
13939 * win32-low.c: Commit leftover changes from 2007-03-29.
13940
13941 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13942
13943 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13944 fields short instead of int. Add explicit padding.
13945 (i387_cache_to_fsave): Remove unnecessary casts.
13946 (i387_fsave_to_cache): Doc fix.
13947 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13948
13949 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13950
13951 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13952 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13953
13954 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13955
13956 * configure.srv (arm*-*-mingw32ce*): Move near the other
13957 arm targets.
13958
13959 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13960
13961 * configure.ac: Add errno checking.
13962 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13963 sys/file.h and malloc.h.
13964 (AC_CHECK_DECLS): Add perror.
13965 (srv_mingwce): Handle.
13966 * configure.srv (i[34567]86-*-cygwin*): Add
13967 win32-i386-low.o to srv_tgtobj.
13968 (i[34567]86-*-mingw*): Likewise.
13969 (arm*-*-mingw32ce*): Add case.
13970 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13971 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13972 [__MINGW32CE__] (strerror): New function.
13973 [__MINGW32CE__] (errno): Define to GetLastError.
13974 [__MINGW32CE__] (COUNTOF): New macro.
13975 (remote_open): Remove extra close call.
13976 * mem-break.c (delete_breakpoint_at): New function.
13977 * mem-break.h (delete_breakpoint_at): Declare.
13978 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13979 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13980 [USE_WIN32API] (read, write): Add char* casts.
13981 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13982 * server.h: Include wincecompat.h on Windows CE.
13983 [HAVE_ERRNO_H]: Check.
13984 (perror): Declare if not declared.
13985 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13986 (perror_with_name): Remove errno declaration.
13987 * wincecompat.h: New.
13988 * wincecompat.c: New.
13989 * win32-low.h: New.
13990 * win32-arm-low.c: New.
13991 * win32-i386-low.c: New.
13992 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13993 (OUTMSG2): Make it safe.
13994 (_T): New macro.
13995 (COUNTOF): New macro.
13996 (NUM_REGS): Get it from the low target.
13997 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13998 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13999 (thread_rec): Let low target handle debug registers.
14000 (child_add_thread): Likewise.
14001 (child_init_thread_list): Likewise.
14002 (continue_one_thread): Likewise.
14003 (regptr): New.
14004 (do_child_fetch_inferior_registers): Move to ...
14005 * win32-i386-low.c: ... here, and rename to ...
14006 (do_fetch_inferior_registers): ... this.
14007 * win32-low.c (child_fetch_inferior_registers):
14008 Go through the low target.
14009 (do_child_store_inferior_registers): Use regptr.
14010 (strwinerror): New function.
14011 (win32_create_inferior): Handle Windows CE.
14012 Use strwinerror instead of strerror on Windows error
14013 codes. Add program to the error output.
14014 Don't close the main thread handle on Windows CE.
14015 (win32_attach): Use coredll.dll on Windows CE.
14016 (win32_kill): Close current process and current
14017 thread handles.
14018 (win32_detach): Use coredll.dll on Windows CE.
14019 (win32_resume): Let low target handle debug registers, and
14020 step request.
14021 (handle_exception): Add/Remove initial breakpoint. Avoid
14022 non-existant WSTOPSIG on Windows CE.
14023 (win32_read_inferior_memory): Cast to remove warning.
14024 (win32_arch_string): Go through the low target.
14025 (initialize_low): Call set_breakpoint_data with the low
14026 target's breakpoint.
14027 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14028 FOP_REGNUM, mappings): Move to ...
14029 * win32-i386-low.c: ... here.
14030 * win32-low.c (win32_thread_info): Move to ...
14031 * win32-low.h: ... here.
14032 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14033 win32-arm-low.c and wincecompat.c.
14034 (all:): Add $EXEEXT.
14035 (install-only:): Likewise.
14036 (gdbserver:): Likewise.
14037 (gdbreplay:): Likewise.
14038 * config.in: Regenerate.
14039 * configure: Regenerate.
14040
14041 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14042
14043 * win32-low.c: Rename typedef thread_info to
14044 win32_thread_info throughout.
14045
14046 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14047
14048 * win32-i386-low.c: Rename to ...
14049 * win32-low.c: ... this.
14050 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14051 * Makefile.in: Likewise.
14052
14053 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14054
14055 * remote-utils.c (monitor_output): Constify msg parameter.
14056 * server.h (monitor_output): Likewise.
14057 * win32-i386-low.c (handle_output_debug_string): New.
14058 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14059 handle_output_debug_string.
14060 (get_child_debug_event): Likewise.
14061
14062 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14063
14064 * server.c (main): Correct strtoul check.
14065
14066 2007-03-27 Jon Ringle <jon@ringle.org>
14067
14068 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14069
14070 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14071
14072 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14073
14074 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14075
14076 * terminal.h: Check HAVE_SGTTY_H.
14077
14078 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14079
14080 * remote-utils.c (remote_open): Print out the assigned port number.
14081
14082 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * remote-utils.c (monitor_output): New function.
14085 * server.c (debug_threads): Define here.
14086 (monitor_show_help): New function.
14087 (handle_query): Handle qRcmd.
14088 (main): Do not handle 'd' packet.
14089 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14090 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14091 of debug_threads.
14092
14093 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14094
14095 * Makefile.in (EXEEXT): New.
14096 (clean): Use $(EXEEXT).
14097
14098 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14099
14100 * target.h (target_ops): Rename send_signal to request_interrupt,
14101 and remove enum target_signal parameter.
14102 * linux-low.c (linux_request_interrupt): Rename from
14103 linux_send_signal, and always send SIGINT.
14104 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14105 and always send SIGINT.
14106 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14107 of send_signal.
14108 (input_interrupt): Likewise.
14109
14110 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14111
14112 * server.c (get_features_xml): Check if target implemented
14113 arch_string.
14114 * win32-i386-low.c (win32_arch_string): New.
14115 (win32_target_ops): Add win32_arch_string as arch_string member.
14116
14117 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14118
14119 * spu-low.c (spu_arch_string): New.
14120 (spu_target_ops): Add spu_arch_string.
14121
14122 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14123
14124 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14125 * configure.ac: Do not check for terminal.h.
14126 * configure, config.in: Regenerated.
14127
14128 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14129
14130 * Makefile.in (OBS): Add $(XML_BUILTIN).
14131 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14132 (clean): Update.
14133 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14134 (arm-with-iwmmxt.c): New.
14135 * config.in, configure: Regenerate.
14136 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14137 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14138 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14139 (arm*-*-linux*): Add iWMMXt and regset support.
14140 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14141 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14142 (arm_store_wmmxregset, target_regsets): New.
14143 * server.c (get_features_xml): Take annex argument. Check builtin
14144 XML documents.
14145 (handle_query): Handle multiple annexes.
14146
14147 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * remote-utils.c [USE_WIN32API] (read, write): Define.
14150 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14151 write.
14152
14153 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14154
14155 * linux-i386-low.c (the_low_target): Set arch_string.
14156 * linux-x86-64-low.c (the_low_target): Likewise.
14157 * linux-low.c (linux_arch_string): New.
14158 (linux_target_ops): Add it.
14159 * linux-low.h (struct linux_target_ops): Add arch_string.
14160 * server.c (write_qxfer_response): Use const void * for DATA.
14161 (get_features_xml): New.
14162 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14163 * target.h (struct target_ops): Add arch_string method.
14164
14165 2007-01-03 Denis Pilat <denis.pilat@st.com>
14166 Daniel Jacobowitz <dan@codesourcery.com>
14167
14168 * linux-low.c (linux_kill): Handle being called with no threads.
14169 * win32-i386-low.c (win32_kill): Likewise.
14170 (get_child_debug_event): Clear current_process_handle.
14171
14172 2006-12-30 Denis PILAT <denis.pilat@st.com>
14173 Daniel Jacobowitz <dan@codesourcery.com>
14174
14175 * remote-utils.c (remote_open): Check the type of specified
14176 serial port devices before opening them.
14177 * server.c (main): Kill the inferior if an error occurs during
14178 the first remote_open.
14179
14180 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14181
14182 * README: Update supported targets.
14183
14184 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14185
14186 * Makefile.in (clean): Remove reg-mips64.c.
14187 (reg-mips64.c, reg-mips64.o): New rules.
14188 * configure.srv: Handle mips64. Include regset support for mips.
14189 * linux-mips-low.c (union mips_register): New.
14190 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14191 (mips_breakpoint, mips_breakpoint_at): Use int.
14192 (mips_collect_register, mips_supply_register)
14193 (mips_collect_register_32bit, mips_supply_register_32bit)
14194 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14195 (mips_store_fpregset, target_regsets): New.
14196 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14197
14198 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14199
14200 * configure.srv: Add target "spu*-*-*".
14201 * Makefile.in (clean): Remove reg-spu.c.
14202 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14203 * spu-low.c: New file.
14204
14205 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14206
14207 * configure.ac: Correct td_thr_tls_get_addr test.
14208 * configure: Regenerated.
14209
14210 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14211
14212 * linux-low.c (linux_wait_for_event): Reformat. Use the
14213 pass_signals array.
14214 * remote-utils.c (decode_address_to_semicolon): New.
14215 * server.c (pass_signals, handle_general_set): New.
14216 (handle_query): Mention QPassSignals for qSupported.
14217 (main): Call handle_general_set.
14218 * server.h (pass_signals, decode_address_to_semicolon): New.
14219
14220 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14221
14222 * server.c (handle_query): Correct error handling for read_auxv.
14223
14224 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14225
14226 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14227 and srv_linux_thread_db to yes.
14228 * linux-s390-low.c (s390_fill_gregset): New function.
14229 (target_regsets): Define data structure.
14230
14231 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14232
14233 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14234 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14235 * config.in, configure: Regenerated.
14236 * inferiors.c (gdb_id_to_thread): New function.
14237 (gdb_id_to_thread_id): Use it.
14238 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14239 * linux-low.h (struct process_info): Add th member.
14240 (thread_db_get_tls_address): New prototype.
14241 * remote-utils.c (decode_address): Make non-static.
14242 * server.c (handle_query): Handle qGetTLSAddr.
14243 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14244 * target.h (struct target_ops): Add get_tls_address.
14245 * thread-db.c (maybe_attach_thread): Save the thread handle.
14246 (thread_db_get_tls_address): New.
14247
14248 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14249
14250 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14251 (linux_resume_one_process): Take a siginfo_t *. Update all
14252 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14253 (struct pending_signals): Add a siginfo_t.
14254 (linux_wait_for_process): Always set last_status.
14255 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14256 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14257 * linux-low.h (struct process_info): Add last_status.
14258
14259 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14260
14261 * remote-utils.c (try_rle): New function.
14262 (putpkt_binary): Use it.
14263
14264 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14265
14266 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14267 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14268 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14269 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14270 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14271 point registers.
14272
14273 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14274
14275 * server.c (terminal_fd): New variable.
14276 (old_foreground_pgrp): Likewise.
14277 (restore_old_foreground_pgrp): New function.
14278 (start_inferior): Record the terminal file descriptor in terminal_fd
14279 and its original foreground group in old_foreground_pgrp. Register
14280 restore_old_foreground_pgrp with atexit().
14281
14282 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14283
14284 * server.c (handle_query): Correct qPart to qXfer.
14285
14286 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * configure.ac: Check for more headers which are missing on
14289 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14290 * configure.srv: Add Cygwin and mingw32.
14291 * remote-utils.c: Don't include headers unconditionally which
14292 are missing on mingw32. Include <winsock.h> for mingw32.
14293 (remote_open): Adjust for mingw32 support. Flush
14294 standard error after writing to it.
14295 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14296 (unblock_async_io, enable_async_io, disable_async_io)
14297 (readchar, getpkt): Update for Winsock support.
14298 (prepare_resume_reply): Expect a protocol signal number.
14299 * server.c: Disable <sys/wait.h> on mingw32.
14300 (start_inferior): Adjust for mingw32 support. Flush
14301 standard error after writing to it.
14302 (attach_inferior): Likewise. Use protocol signal
14303 numbers.
14304 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14305 and names.
14306 * win32-i386-low.c: New file.
14307 * Makefile.in (XM_CLIBS): Set.
14308 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14309 (win32-i386-low.o): New dependency rule.
14310 * linux-low.c (linux_wait): Use target signal numbers.
14311 * target.h (struct target_ops): Doc fix.
14312 * server.h (target_signal_to_name): New prototype.
14313 * gdbreplay.c: Don't include headers unconditionally which
14314 are missing on mingw32. Include <winsock.h> for mingw32.
14315 (remote_close, remote_open): Adjust for Winsock support.
14316 * configure, config.in: Regenerated.
14317
14318 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * server.c (decode_xfer_read, write_qxfer_response): New.
14321 (handle_query): Take a packet length argument. Handle
14322 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14323 the qSupported response.
14324 (main): Update call to handle_query.
14325
14326 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14327
14328 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14329 (putpkt_binary): Renamed from putpkt and adjusted for binary
14330 data.
14331 (putpkt): New wrapper for putpkt_binary.
14332 (readchar): Don't mask off the high bit.
14333 (decode_X_packet): New function.
14334 * server.c (main): Call putpkt_binary if a handler sets the packet
14335 length. Save the length of the incoming packet. Handle 'X'.
14336 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14337
14338 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14339
14340 * server.c (handle_query): Handle qSupported.
14341
14342 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14343
14344 * remote-utils.c (all_symbols_looked_up): New variable.
14345 (look_up_one_symbol): Check it.
14346 * server.h (look_up_one_symbol): New declaration.
14347 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14348
14349 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14350
14351 * Makefile.in (linux-arm-low.o): Update dependencies.
14352 * linux-arm-low.c: Include "gdb_proc_service.h".
14353 (PTRACE_GET_THREAD_AREA): Define.
14354 (ps_get_thread_area): New function.
14355
14356 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14357
14358 * configure.srv (m68k*-*-uclinux*): New target.
14359 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14360 (linux_resume_one_process): Remove extraneous cast.
14361 (linux_read_offsets): New.
14362 (linux_target_op): Add linux_read_offsets on mmuless systems.
14363 * server.c (handle_query): Add qOffsets logic.
14364 * target.h (struct target_ops): Add read_offsets.
14365
14366 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14367
14368 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14369 (PTRACE_GET_THREAD_AREA): Define.
14370 (ps_get_thread_area): New function.
14371 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14372 (linux-x86-64-low.o): Update.
14373
14374 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14375
14376 * configure.ac: Remove checks for prfpregset_t.
14377 * gdb_proc_service.h: New file.
14378 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14379 new "gdb_proc_service.h".
14380 * proc-service.c: Likewise.
14381 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14382 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14383 * Makefile.in (gdb_proc_service_h): Updated.
14384 * configure, config.in: Regenerated.
14385
14386 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14387
14388 * remote-utils.c (prepare_resume_reply): Move declaration
14389 of gdb_id_from_wait to the top of the block.
14390
14391 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * linux-low.c (regsets_store_inferior_registers): Read the regset
14394 from the target before filling it.
14395
14396 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14397
14398 * server.c (attach_inferior): Return SIGTRAP for a successful
14399 attach.
14400
14401 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * Makefile.in (OBS): Add version.o.
14404 (STAGESTUFF): Delete.
14405 (version.o): Add dependencies.
14406 (version.c): Replace rule.
14407 (clean): Remove version.c.
14408 * server.c (gdbserver_version): New.
14409 (gdbserver_usage): Use printf.
14410 (main): Handle --version and --help.
14411 * server.h (version, host_name): Add declarations.
14412
14413 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14414
14415 * linux-arm-low.c:
14416 * linux-arm-low.c:
14417 * inferiors.c:
14418 * i387-fp.h:
14419 * i387-fp.c:
14420 * gdbreplay.c:
14421 * regcache.c:
14422 * proc-service.c:
14423 * mem-break.h:
14424 * mem-break.c:
14425 * linux-x86-64-low.c:
14426 * linux-sh-low.c:
14427 * linux-s390-low.c:
14428 * linux-ppc64-low.c:
14429 * linux-ppc-low.c:
14430 * linux-mips-low.c:
14431 * linux-m68k-low.c:
14432 * linux-m32r-low.c:
14433 * linux-low.h:
14434 * linux-low.c:
14435 * linux-ia64-low.c:
14436 * linux-i386-low.c:
14437 * linux-crisv32-low.c:
14438 * thread-db.c:
14439 * terminal.h:
14440 * target.h:
14441 * target.c:
14442 * server.h:
14443 * server.c:
14444 * remote-utils.c:
14445 * regcache.h:
14446 * utils.c:
14447 * Makefile.in:
14448 * configure.ac:
14449 * gdbserver.1: Add (C) after Copyright. Update the FSF
14450 address.
14451
14452 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14453
14454 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14455 (arm_breakpoint_at): Recognize both breakpoints.
14456 (the_low_target): Use the correct breakpoint instruction.
14457
14458 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14459
14460 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14461 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14462 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14463 (the_low_target): Update.
14464
14465 2005-10-25 Andreas Schwab <schwab@suse.de>
14466
14467 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14468
14469 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14470 (ia64_num_regs): Reduce to 462.
14471
14472 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14473
14474 * acinclude.m4: Correct quoting.
14475 * aclocal.m4: Regenerated.
14476
14477 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14478 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14479 (thread_db_init): Call thread_db_err_str.
14480 * configure.ac: Check for TD_VERSION.
14481 * config.in, configure: Regenerated.
14482
14483 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14484
14485 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14486
14487 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14488
14489 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14490 is not available. Define HAVE_PTRACE_GETREGS if it is.
14491 * config.in, configure: Regenerated.
14492 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14493 * linux-i386-low.c, linux-m68k-low.c: Update to use
14494 HAVE_PTRACE_GETREGS.
14495 * linux-low.c (regsets_fetch_inferior_registers)
14496 (regsets_store_inferior_registers): Only return 0 if we processed
14497 GENERAL_REGS.
14498 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14499 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14500
14501 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14502
14503 * inferiors.c (struct thread_info): Add gdb_id.
14504 (add_thread): Add gdb_id argument.
14505 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14506 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14507 calls to add_thread.
14508 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14509 * server.c (handle_query): Use thread_to_gdb_id.
14510 (handle_v_cont, main): Use gdb_id_to_thread_id.
14511 * server.h (add_thread): Update prototype.
14512 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14513 prototypes.
14514
14515 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14516
14517 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14518 left-padded registers.
14519 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14520 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14521
14522 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14523
14524 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14525 * configure: Regenerate.
14526 * config.in: Regenerate.
14527 * server.h (NEED_DECLARATION_STRERROR):
14528 Replace with !HAVE_DECL_STRERROR.
14529
14530 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14531
14532 * linux-low.c (linux_wait, linux_send_signal): Don't test
14533 an unsigned long variable for > 0 if it could be MAX_ULONG.
14534 * server.c (myresume): Likewise.
14535 * target.c (set_desired_inferior): Likewise.
14536
14537 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14538
14539 * configure.ac: Simplify and improve check for socklen_t.
14540 * configure, config.in: Regenerate.
14541
14542 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14543
14544 * acconfig.h: Remove.
14545 * configure.ac: Add a test for socklen_t. Use three-argument
14546 AC_DEFINE throughout.
14547 * config.in: Regenerated using autoheader 2.59.
14548 * configure: Regenerated.
14549
14550 * gdbreplay.c (socklen_t): Provide a default.
14551 (remote_open): Use socklen_t.
14552 * remote-utils.c (socklen_t): Provide a default.
14553 (remote_open): Use socklen_t.
14554 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14555 unsigned char.
14556
14557 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14558 char for buffers.
14559 * linux-low.c (linux_read_memory, linux_write_memory)
14560 (linux_read_auxv): Likewise.
14561 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14562 (check_mem_write): Likewise.
14563 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14564 Likewise.
14565 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14566 (registers_from_string, register_data): Likewise.
14567 * server.c (handle_query, main): Likewise.
14568 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14569 (decode_M_packet): Likewise.
14570 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14571 * target.h (struct target_ops): Update read_memory, write_memory,
14572 and read_auxv.
14573 (read_inferior_memory, write_inferior_memory): Update.
14574 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14575 to unsigned char *.
14576 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14577 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14578 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14579 linux-s390-low.c, linux-sh-low.c: Update for changes in
14580 read_inferior_memory and the_low_target->breakpoint.
14581
14582 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14583
14584 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14585 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14586 * configure.srv: Add powerpc64-*-linux*.
14587 * linux-ppc64-low.c: New file.
14588
14589 2005-05-23 Orjan Friberg <orjanf@axis.com>
14590
14591 * linux-cris-low.c: New file with support for CRIS.
14592 * linux-crisv32-low.c: Ditto for CRISv32.
14593 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14594 (clean): Add reg-cris.c and reg-crisv32.c.
14595 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14596 reg-crisv32.o, and reg-crisv32.c to make rules.
14597 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14598 recognized targets.
14599
14600 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14601
14602 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14603 of sizeof (PTRACE_XFER_TYPE).
14604 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14605
14606 2005-05-12 Orjan Friberg <orjanf@axis.com>
14607
14608 * target.h (struct target_ops): Add insert_watchpoint,
14609 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14610 pointers for hardware watchpoint support.
14611 * linux-low.h (struct linux_target_ops): Ditto.
14612 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14613 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14614 to linux_target_ops.
14615 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14616 reply packet.
14617 * server.c (main): Recognize 'Z' and 'z' packets.
14618
14619 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14620
14621 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14622 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14623 (the_low_target): Add new members.
14624
14625 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14626
14627 * proc-service.c (ps_lgetregs): Search all_processes instead of
14628 all_threads.
14629
14630 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14631
14632 * server.c (start_inferior): Change return type to int.
14633 (attach_inferior): Change sigptr to int *.
14634 (handle_v_cont, handle_v_requests): Change signal to int *.
14635 (main): Change signal to int.
14636
14637 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14638
14639 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14640 * configure.srv: Add m32r*-*-linux*.
14641 * linux-m32r-low.c: New file.
14642
14643 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14644
14645 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14646
14647 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14648
14649 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14650 Take unsigned long arguments for PIDs.
14651 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14652 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14653 (wait_for_sigstop, linux_resume_one_process)
14654 (regsets_fetch_inferior_registers, linux_send_signal)
14655 (linux_read_auxv): Likewise. Update the types of variables holding
14656 PIDs. Update format string specifiers.
14657 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14658 * remote-utils.c (prepare_resume_reply): Likewise.
14659 * server.c (cont_thread, general_thread, step_thread)
14660 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14661 unsigned long.
14662 (handle_query): Update format specifiers.
14663 (handle_v_cont, main): Use strtoul for thread IDs.
14664 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14665 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14666 (general_thread, step_thread, thread_from_wait)
14667 (old_thread_from_wait): Update.
14668 * target.h (struct thread_resume): Use unsigned long for THREAD.
14669 (struct target_ops): Use unsigned long for arguments to attach and
14670 thread_alive.
14671
14672 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * acinclude.m4: Include bfd/bfd.m4 directly.
14675 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14676 <agriffis@toolchain.org>.
14677 * aclocal.m4, configure: Regenerated.
14678
14679 2005-01-07 Andrew Cagney <cagney@gnu.org>
14680
14681 * configure.ac: Rename configure.in, require autoconf 2.59.
14682 * configure: Re-generate.
14683
14684 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14685
14686 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14687 LIBS when finished.
14688 * aclocal.m4: Regenerated.
14689 * configure: Regenerated.
14690
14691 2004-11-21 Andreas Schwab <schwab@suse.de>
14692
14693 * linux-m68k-low.c (m68k_num_gregs): Define.
14694 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14695 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14696 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14697 (m68k_breakpoint_at): New. Add to the_low_target.
14698
14699 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14700 srv_linux_thread_db to yes.
14701
14702 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14703
14704 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14705 (ARCH_SET_FS): Likewise.
14706 (ARCH_GET_FS): Likewise.
14707 (ARCH_GET_GS): Likewise.
14708
14709 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14710
14711 * linux-i386-low.c (ps_get_thread_area): New.
14712 * linux-x86-64-low.c (ps_get_thread_area): New.
14713 * linux-low.c: Include <sys/syscall.h>.
14714 (linux_kill_one_process): Don't kill the first thread here.
14715 (linux_kill): Kill the first thread here.
14716 (kill_lwp): New function.
14717 (send_sigstop, linux_send_signal): Use it.
14718 * proc-service.c: Clean up #ifdefs.
14719 (fpregset_info): Delete.
14720 (ps_lgetregs): Update and enable implementation.
14721 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14722 implementations.
14723 * remote-utils.c (struct sym_cache, symbol_cache): New.
14724 (input_interrupt): Print a clearer message.
14725 (async_io_enabled): New variable.
14726 (enable_async_io, disable_async_io): Use it. Update comments.
14727 (look_up_one_symbol): Use the symbol cache.
14728 * thread-db.c (thread_db_look_up_symbols): New function.
14729 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14730
14731 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14732
14733 * configure.in: Test for -rdynamic.
14734 * configure: Regenerated.
14735 * Makefile (INTERNAL_LDFLAGS): New.
14736 (gdbserver, gdbreplay): Use it.
14737
14738 2004-09-02 Andrew Cagney <cagney@gnu.org>
14739
14740 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14741
14742 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14743
14744 * linux-low.c (linux_wait): Clear all_processes list also.
14745
14746 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14747
14748 * linux-low.c: Include <errno.h>. Remove extern declaration of
14749 errno.
14750
14751 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14752
14753 * gdbreplay.c, server.h, utils.c: Update copyright years.
14754
14755 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14756
14757 * server.c (main): Print child status or termination signal from
14758 variable 'signal', not 'sig'.
14759
14760 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14761
14762 * linux-low.c (linux_read_memory): Change return type to
14763 int. Check for and return error from ptrace().
14764 * target.c (read_inferior_memory): Change return type to int. Pass
14765 back return status from the_target->read_memory().
14766 * target.h (struct target_ops): Adapt *read_memory() prototype.
14767 Update comment.
14768 (read_inferior_memory): Adapt prototype.
14769 * server.c (main): Return an error packet if
14770 read_inferior_memory() returns an error.
14771
14772 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14773
14774 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14775 Unify with other clean targets.
14776
14777 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14778
14779 * server.c (handle_v_cont): Call set_desired_inferior.
14780
14781 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14782
14783 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14784
14785 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14786
14787 * linux-low.c (linux_wait): Unblock async I/O.
14788 (linux_resume): Block and enable async I/O.
14789 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14790 * server.h (block_async_io, unblock_async_io): Add prototypes.
14791
14792 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14793
14794 * remote-utils.c (remote_open): Print a status notice after
14795 opening a TCP port.
14796 * server.c (attach_inferior): Print a status notice after
14797 attaching.
14798
14799 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14800
14801 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14802
14803 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14804
14805 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14806 error packet.
14807 * server.c, target.h: Update copyright years.
14808
14809 2004-02-25 Roland McGrath <roland@redhat.com>
14810
14811 * target.h (struct target_ops): New member `read_auxv'.
14812 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14813 * linux-low.c (linux_read_auxv): New function.
14814 (linux_target_ops): Initialize `read_auxv' member to that.
14815
14816 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14817
14818 Committed by Jim Blandy <jimb@redhat.com>.
14819
14820 * linux-s390-low.c (s390_num_regs): Update.
14821 (s390_regmap): Remove control registers. Use __s390x__ predefine
14822 instead of GPR_SIZE to distiguish s390 and s390x targets.
14823
14824 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14825
14826 * linux-low.c: Update copyright year.
14827 (check_removed_breakpoint): Clear pending_is_breakpoint.
14828 (linux_set_resume_request, linux_queue_one_thread)
14829 (resume_status_pending_p): New functions.
14830 (linux_continue_one_thread): Use process->resume.
14831 (linux_resume): Only resume threads if there are no pending events.
14832 * linux-low.h (struct process_info): Add resume request
14833 pointer.
14834
14835 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14836
14837 * regcache.c (new_register_cache): Clear the allocated register
14838 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14839
14840 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14841
14842 * linux-low.c (linux_resume): Take a struct thread_resume *
14843 argument.
14844 (linux_wait): Update call.
14845 (resume_ptr): New static variable.
14846 (linux_continue_one_thread): Renamed from
14847 linux_continue_one_process. Use resume_ptr.
14848 (linux_resume): Use linux_continue_one_thread.
14849 * server.c (handle_v_cont, handle_v_requests): New functions.
14850 (myresume): New function.
14851 (main): Handle 'v' case.
14852 * target.h (struct thread_resume): New type.
14853 (struct target_ops): Change argument of "resume" to struct
14854 thread_resume *.
14855 (myresume): Delete macro.
14856
14857 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14858
14859 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14860 (uninstall): Support DESTDIR.
14861
14862 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14863
14864 * configure.srv: Add xscale*linux copy of arm*linux entry.
14865
14866 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14867
14868 * linux-arm-low.c (arm_reinsert_addr): New function.
14869 (the_low_target): Add arm_reinsert_addr.
14870
14871 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14872
14873 * mem-break.c: Remove whitespace at end of file.
14874
14875 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14876
14877 * configure.in: Check whether we need to prototype strerror.
14878 * server.h: Optionally prototype strerror.
14879 * gdbreplay.c (perror_with_name): Use strerror.
14880 * linux-low.c (linux_attach_lwp): Use strerror.
14881 * utils.c (perror_with_name): Use strerror.
14882 * config.in, configure: Regenerated.
14883
14884 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14885
14886 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14887 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14888
14889 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14890
14891 * Makefile.in (SFILES): Update.
14892 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14893 low-sun3.c: Remove files.
14894
14895 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14898 (linux_detach_one_process, linux_detach): New functions.
14899 (linux_target_ops): Add linux_detach.
14900 * server.c (main): Handle 'D' packet.
14901 * target.h (struct target_ops): Add "detach" member.
14902 (detach_inferior): Define.
14903
14904 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14905
14906 From Kelley Cook <kelleycook@wideopenwest.com>:
14907 * configure.srv: Accept i[34567]86 variants.
14908
14909 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14910
14911 * linux-low.c (linux_wait_for_event): Correct comment typos.
14912 (linux_resume_one_process): Call check_removed_breakpoint.
14913 (linux_send_signal): New function.
14914 (linux_target_ops): Add linux_send_signal.
14915 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14916 of kill.
14917 * target.h (struct target_ops): Add send_signal.
14918
14919 2003-05-29 Jim Blandy <jimb@redhat.com>
14920
14921 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14922 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14923 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14924 away part of the register's value.
14925
14926 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14927
14928 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14929 (linux_wait_for_event, linux_init_signals): Likewise.
14930
14931 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14932
14933 * configure.in: Check for stdlib.h.
14934 * configure: Regenerated.
14935 * config.in: Regenerated.
14936
14937 2003-01-04 Andreas Schwab <schwab@suse.de>
14938
14939 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14940
14941 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14942
14943 * Makefile.in: Remove obsolete code.
14944
14945 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14946
14947 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14948 defined(PT_FPR0_HI).
14949
14950 2002-11-17 Stuart Hughes <seh@zee2.com>
14951
14952 * linux-arm-low.c (arm_num_regs): Increase.
14953 (arm_regmap): Include status register.
14954
14955 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14956
14957 * linux-low.c (register_addr): Remove incorrect -1 check.
14958
14959 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14960
14961 * linux-low.c (linux_create_inferior): Call setpgid. Return
14962 the new PID.
14963 (unstopped_p, linux_signal_pid): Remove.
14964 (linux_target_ops): Remove linux_signal_pid.
14965 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14966 global instead of target method.
14967 * target.h (struct target_ops): Remove signal_pid. Update comment
14968 for create_inferior.
14969 * server.c (signal_pid): New variable.
14970 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14971 gdbserver. Set the child to be the foreground process group.
14972 (attach_inferior): Set signal_pid.
14973
14974 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14975
14976 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14977
14978 2002-08-20 Jim Blandy <jimb@redhat.com>
14979
14980 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14981 default for this.
14982
14983 2002-08-01 Andrew Cagney <cagney@redhat.com>
14984
14985 * Makefile.in: Make chill references obsolete.
14986
14987 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14988
14989 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14990 * configure: Regenerate.
14991 * config.in: Regenerate.
14992
14993 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14994
14995 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14996 (perror_with_name, remote_close, remote_open, expect, play): Static.
14997
14998 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14999
15000 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15001 byte offsets instead of an array of indexes.
15002 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15003
15004 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15005
15006 * regcache.c: Add comment.
15007
15008 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15009
15010 * thread-db.c: New file.
15011 * proc-service.c: New file.
15012 * acinclude.m4: New file.
15013 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15014 proc-service.o, and thread-db.o.
15015 (linux-low.o): Add USE_THREAD_DB.
15016 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15017 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15018 * aclocal.m4: Regenerated.
15019 * config.in: Regenerated.
15020 * configure: Regenerated.
15021 * configure.in: Check for proc_service.h, sys/procfs.h,
15022 thread_db.h, and linux/elf.h headrs.
15023 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15024 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15025 Check for -lthread_db and thread support.
15026 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15027 PowerPC, and SuperH.
15028 * i387-fp.c: Constify arguments.
15029 * i387-fp.h: Likewise.
15030 * inferiors.c: (struct thread_info): Renamed from
15031 `struct inferior_info'. Remove PID member. Use generic inferior
15032 list header. All uses updated.
15033 (inferiors, signal_pid): Removed.
15034 (all_threads): New variable.
15035 (get_thread): Define.
15036 (add_inferior_to_list): New function.
15037 (for_each_inferior): New function.
15038 (change_inferior_id): New function.
15039 (add_inferior): Removed.
15040 (remove_inferior): New function.
15041 (add_thread): New function.
15042 (free_one_thread): New function.
15043 (remove_thread): New function.
15044 (clear_inferiors): Use for_each_inferior and free_one_thread.
15045 (find_inferior): New function.
15046 (find_inferior_id): New function.
15047 (inferior_target_data): Update argument type.
15048 (set_inferior_target_data): Likewise.
15049 (inferior_regcache_data): Likewise.
15050 (set_inferior_regcache_data): Likewise.
15051 * linux-low.c (linux_bp_reinsert): Remove.
15052 (all_processes, stopping_threads, using_thrads)
15053 (struct pending_signals, debug_threads, pid_of): New.
15054 (inferior_pid): Replace with macro.
15055 (struct inferior_linux_data): Remove.
15056 (get_stop_pc, add_process): New functions.
15057 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15058 Use add_process and add_thread.
15059 (linux_attach_lwp): New function, based on old linux_attach. Use
15060 add_process and add_thread. Set stop_expected for new threads.
15061 (linux_attach): New function.
15062 (linux_kill_one_process): New function.
15063 (linux_kill): Kill all LWPs.
15064 (linux_thread_alive): Use find_inferior_id.
15065 (check_removed_breakpoints, status_pending_p): New functions.
15066 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15067 Update. Use WNOHANG. Wait for cloned processes also. Update process
15068 struct for the found process.
15069 (linux_wait_for_event): New function.
15070 (linux_wait): Use it. Support LWPs.
15071 (send_sigstop, wait_for_sigstop, stop_all_processes)
15072 (linux_resume_one_process, linux_continue_one_process): New functions.
15073 (linux_resume): Support LWPs.
15074 (REGISTER_RAW_SIZE): Remove.
15075 (fetch_register): Use register_size instead. Call supply_register.
15076 (usr_store_inferior_registers): Likewise. Call collect_register.
15077 Fix recursive case.
15078 (regsets_fetch_inferior_registers): Improve error message.
15079 (regsets_store_inferior_registers): Add debugging.
15080 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15081 (unstopped_p, linux_signal_pid): New functions.
15082 (linux_target_ops): Add linux_signal_pid.
15083 (linux_init_signals): New function.
15084 (initialize_low): Call it. Initialize using_threads.
15085 * regcache.c (inferior_regcache_data): Add valid
15086 flag.
15087 (get_regcache): Fetch registers lazily. Add fetch argument
15088 and update all callers.
15089 (regcache_invalidate_one, regcache_invalidate): New
15090 functions.
15091 (new_register_cache): Renamed from create_register_cache.
15092 Return the new regcache.
15093 (free_register_cache): Change argument to a void *.
15094 (registers_to_string, registers_from_string): Call get_regcache
15095 with fetch flag set.
15096 (register_data): Make static. Pass fetch flag to get_regcache.
15097 (supply_register): Call get_regcache with fetch flag clear.
15098 (collect_register): Call get_regcache with fetch flag set.
15099 (collect_register_as_string): New function.
15100 * regcache.h: Update.
15101 * remote-utils.c (putpkt): Flush after debug output and use
15102 stderr.
15103 Handle input interrupts while waiting for an ACK.
15104 (input_interrupt): Use signal_pid method.
15105 (getpkt): Flush after debug output and use stderr.
15106 (outreg): Use collect_register_as_string.
15107 (new_thread_notify, dead_thread_notify): New functions.
15108 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15109 and general_thread.
15110 (look_up_one_symbol): Flush after debug output.
15111 * server.c (step_thread, server_waiting): New variables.
15112 (start_inferior): Don't use signal_pid. Update call to mywait.
15113 (attach_inferior): Update call to mywait.
15114 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15115 (main): Don't fetch/store registers explicitly. Use
15116 set_desired_inferior. Support proposed ``Hs'' packet. Update
15117 calls to mywait.
15118 * server.h: Update.
15119 (struct inferior_list, struct_inferior_list_entry): New.
15120 * target.c (set_desired_inferior): New.
15121 (write_inferior_memory): Constify.
15122 (mywait): New function.
15123 * target.h: Update.
15124 (struct target_ops): New signal_pid method.
15125 (mywait): Removed macro, added prototype.
15126
15127 * linux-low.h (regset_func): Removed.
15128 (regset_fill_func, regset_store_func): New.
15129 (enum regset_type): New.
15130 (struct regset_info): Add type field. Use new operation types.
15131 (struct linux_target_ops): stop_pc renamed to get_pc.
15132 Add decr_pc_after_break and breakpoint_at.
15133 (get_process, get_thread_proess, get_process_thread)
15134 (strut process_info, all_processes, linux_attach_lwp)
15135 (thread_db_init): New.
15136
15137 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15138 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15139 (the_low_target): Add new members.
15140 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15141 (i386_store_fpxregset): Constify.
15142 (target_regsets): Add new kind identifier.
15143 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15144 (i386_set_pc): Add debugging.
15145 (i386_breakpoint_at): New function.
15146 (the_low_target): Add new members.
15147 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15148 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15149 (mips_breakpoint_at): New.
15150 (the_low_target): Add new members.
15151 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15152 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15153 (the_low_target): Add new members.
15154 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15155 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15156 (the_low_target): Add new members.
15157 * linux-x86-64-low.c (target_regsets): Add new kind
15158 identifier.
15159
15160 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15161
15162 From Martin Pool <mbp@samba.org>:
15163 * server.c (gdbserver_usage): New function.
15164 (main): Call it.
15165
15166 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15167
15168 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15169 stop_at -> stop_pc.
15170
15171 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15172
15173 * Makefile.in: Remove obsolete code.
15174
15175 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15176
15177 * linux-low.c (regsets_fetch_inferior_registers),
15178 (regsets_store_inferior_registers): Removed cast to int from
15179 ptrace() calls.
15180 * regcache.h: Added declaration of struct inferior_info.
15181
15182 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15183
15184 * inferiors.c (struct inferior_info): Add regcache_data.
15185 (add_inferior): Call create_register_cache.
15186 (clear_inferiors): Call free_register_cache.
15187 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15188 * regcache.c (struct inferior_regcache_data): New.
15189 (registers): Remove.
15190 (get_regcache): New function.
15191 (create_register_cache, free_register_cache): New functions.
15192 (set_register_cache): Don't initialize the register cache here.
15193 (registers_to_string, registers_from_string, register_data): Call
15194 get_regcache.
15195 * regcache.h: Add prototypes.
15196 * server.h: Likewise.
15197
15198 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15199
15200 * mem-break.c: New file.
15201 * mem-break.h: New file.
15202 * Makefile.in: Add mem-break.o rule; update server.h
15203 dependencies.
15204 * inferiors.c (struct inferior_info): Add target_data
15205 member.
15206 (clear_inferiors): Free target_data member if set.
15207 (inferior_target_data, set_inferior_target_data): New functions.
15208 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15209 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15210 * linux-low.c (linux_bp_reinsert): New variable.
15211 (struct inferior_linux_data): New.
15212 (linux_create_inferior): Use set_inferior_target_data.
15213 (linux_attach): Likewise. Call add_inferior.
15214 (linux_wait_for_one_inferior): New function.
15215 (linux_wait): Call it.
15216 (linux_write_memory): Add const.
15217 (initialize_low): Call set_breakpoint_data.
15218 * linux-low.h (struct linux_target_ops): Add breakpoint
15219 handling members.
15220 * server.c (attach_inferior): Remove extra add_inferior
15221 call.
15222 * server.h: Include mem-break.h. Update inferior.c
15223 prototypes.
15224 * target.c (read_inferior_memory)
15225 (write_inferior_memory): New functions.
15226 * target.h (read_inferior_memory)
15227 (write_inferior_memory): Change macros to prototypes.
15228 (struct target_ops): Update comments. Add const to write_memory
15229 definition.
15230
15231 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15232
15233 * linux-low.c (usr_store_inferior_registers): Support
15234 registers which are allowed to fail to store.
15235 * linux-low.h (linux_target_ops): Likewise.
15236 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15237 (ppc_cannot_store_register): FPSCR may not be storable.
15238
15239 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15240
15241 * server.h: Include <string.h> if HAVE_STRING_H.
15242 * ChangeLog: Correct paths in last ChangeLog entry.
15243
15244 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15245
15246 * linux-low.h: Remove obsolete prototypes.
15247 (struct linux_target_ops): New.
15248 (extern the_low_target): New.
15249 * linux-low.c (num_regs, regmap): Remove declarations.
15250 (register_addr): Use the_low_target explicitly.
15251 (fetch_register): Likewise.
15252 (usr_fetch_inferior_registers): Likewise.
15253 (usr_store_inferior_registers): Likewise.
15254 * linux-arm-low.c (num_regs): Remove.
15255 (arm_num_regs): Define.
15256 (arm_regmap): Renamed from regmap, made static.
15257 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15258 made static.
15259 (arm_cannot_store_register): Renamed from cannot_store_register,
15260 made static.
15261 (the_low_target): New.
15262 * linux-i386-low.c (num_regs): Remove.
15263 (i386_num_regs): Define.
15264 (i386_regmap): Renamed from regmap, made static.
15265 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15266 made static.
15267 (i386_cannot_store_register): Renamed from cannot_store_register,
15268 made static.
15269 (the_low_target): New.
15270 * linux-ia64-low.c (num_regs): Remove.
15271 (ia64_num_regs): Define.
15272 (ia64_regmap): Renamed from regmap, made static.
15273 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15274 made static.
15275 (ia64_cannot_store_register): Renamed from cannot_store_register,
15276 made static.
15277 (the_low_target): New.
15278 * linux-m68k-low.c (num_regs): Remove.
15279 (m68k_num_regs): Define.
15280 (m68k_regmap): Renamed from regmap, made static.
15281 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15282 made static.
15283 (m68k_cannot_store_register): Renamed from cannot_store_register,
15284 made static.
15285 (the_low_target): New.
15286 * linux-mips-low.c (num_regs): Remove.
15287 (mips_num_regs): Define.
15288 (mips_regmap): Renamed from regmap, made static.
15289 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15290 made static.
15291 (mips_cannot_store_register): Renamed from cannot_store_register,
15292 made static.
15293 (the_low_target): New.
15294 * linux-ppc-low.c (num_regs): Remove.
15295 (ppc_num_regs): Define.
15296 (ppc_regmap): Renamed from regmap, made static.
15297 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15298 made static.
15299 (ppc_cannot_store_register): Renamed from cannot_store_register,
15300 made static.
15301 (the_low_target): New.
15302 * linux-s390-low.c (num_regs): Remove.
15303 (s390_num_regs): Define.
15304 (s390_regmap): Renamed from regmap, made static.
15305 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15306 made static.
15307 (s390_cannot_store_register): Renamed from cannot_store_register,
15308 made static.
15309 (the_low_target): New.
15310 * linux-sh-low.c (num_regs): Remove.
15311 (sh_num_regs): Define.
15312 (sh_regmap): Renamed from regmap, made static.
15313 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15314 made static.
15315 (sh_cannot_store_register): Renamed from cannot_store_register,
15316 made static.
15317 (the_low_target): New.
15318 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15319 (the_low_target): New.
15320
15321 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15322
15323 * Makefile.in: Add stamp-h target.
15324 * configure.in: Create stamp-h.
15325 * configure: Regenerated.
15326
15327 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15328
15329 * inferiors.c: New file.
15330 * target.c: New file.
15331 * target.h: New file.
15332 * Makefile.in: Add target.o and inferiors.o. Update
15333 dependencies.
15334 * linux-low.c (inferior_pid): New static variable,
15335 moved from server.c.
15336 (linux_create_inferior): Renamed from create_inferior.
15337 Call add_inferior. Return 0 on success instead of a PID.
15338 (linux_attach): Renamed from myattach.
15339 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15340 (linux_thread_alive): Renamed from mythread_alive.
15341 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15342 child dies.
15343 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15344 (regsets_store_inferior_registers): Correct error message.
15345 Add missing ``return 0''.
15346 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15347 (linux_store_registers): Renamed from store_inferior_registers.
15348 (linux_read_memory): Renamed from read_inferior_memory.
15349 (linux_write_memory): Renamed from write_inferior_memory.
15350 (linux_target_ops): New structure.
15351 (initialize_low): Call set_target_ops ().
15352 * remote-utils.c (unhexify): New function.
15353 (hexify): New function.
15354 (input_interrupt): Send signals to ``signal_pid''.
15355 * server.c (inferior_pid): Remove.
15356 (start_inferior): Update create_inferior call.
15357 (attach_inferior): Call add_inferior.
15358 (handle_query): New function.
15359 (main): Call handle_query for `q' packets.
15360 * server.h: Include "target.h". Remove obsolete prototypes.
15361 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15362
15363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15364
15365 * Makefile.in: Add WARN_CFLAGS. Update configury
15366 dependencies.
15367 * configure.in: Check for <string.h>
15368 * configure: Regenerate.
15369 * config.in: Regenerate.
15370 * gdbreplay.c: Include needed system headers.
15371 (remote_open): Remove strchr prototype.
15372 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15373 * regcache.c (supply_register): Change buf argument to const void *.
15374 (supply_register_by_name): Likewise.
15375 (collect_register): Change buf argument to void *.
15376 (collect_register_by_name): Likewise.
15377 * regcache.h: Add missing prototypes.
15378 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15379 * server.c (handle_query): New function.
15380 (attached): New static variable, moved out of main.
15381 (main): Quiet longjmp clobber warnings.
15382 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15383 * utils.c (error): Remove NORETURN.
15384 (fatal): Likewise.