]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/ChangeLog
gdbserver: Remove thread_to_gdb_id
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2
3 * inferiors.h (thread_to_gdb_id): Remove.
4 * inferiors.c (thread_to_gdb_id): Remove.
5 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7 lynx_store_registers, lynx_read_memory, lynx_write_memory):
8 Likewise.
9 * nto-low.c (nto_fetch_registers, nto_store_registers,
10 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
11
12 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
13
14 * inferiors.h (gdb_id_to_thread_id): Remove.
15 * inferiors.c (gdb_id_to_thread_id): Remove.
16 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
17 removal. Move pid declaration closer to where it's used.
18
19 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
20
21 * server.c (handle_detach): New function.
22 (process_serial_event): Move code out, call handle_detach.
23
24 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
25
26 * server.c (require_running): Rename to ...
27 (require_running_or_return): ... this ...
28 (require_running_or_break): ... and this.
29 (handle_query, process_serial_event): Adjust.
30
31 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
32
33 * linux-low.c (linux_set_resume_request): Remove unused
34 variables.
35
36 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
37
38 * server.c (first_thread_of): Remove.
39 (process_serial_event): Replace usage of first_thread_of with
40 find_any_thread_of_pid.
41 * tracepoint.c (same_process_p): Remove.
42 (gdb_agent_about_to_close): Replace usage of same_process_p with
43 find_any_thread_of_pid.
44 * linux-x86-low.c (same_process_callback): Remove.
45 (x86_arch_setup_process_callback): Replace usage of
46 same_process_callback with find_any_thread_of_pid.
47 * thread-db.c (any_thread_of): Remove.
48 (switch_to_process): Replace usage of any_thread_of with
49 find_any_thread_of_pid.
50 * inferiors.c (thread_pid_matches_callback): Remove.
51 (find_thread_process): Adjust to use find_any_thread_of_pid.
52
53 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
54
55 * regcache.c (get_thread_regcache): Guard calls to "memset"
56 with "!VEC_empty".
57
58 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
59
60 * linux-low.c (handle_extended_wait): Use
61 "allocate_target_description" instead of "XNEW".
62 * linux-x86-low.c (initialize_low_arch): Likewise.
63
64 2017-09-05 Yao Qi <yao.qi@linaro.org>
65
66 * configure.srv (srv_i386_regobj): Remove.
67 (srv_amd64_regobj): Remove.
68 (srv_regobj): Set it to "" for x86 non-linux targets.
69 * linux-x86-tdesc.c (i386_linux_read_description):
70 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
71 (init_registers_i386): Remove the declaration.
72 (tdesc_i386): Remove the declaration.
73 (lynx_i386_arch_setup): Call i386_create_target_description.
74 * nto-x86-low.c: Likewise.
75 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
76 [!__x86_64__]: include arch/i386.h.
77 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
78
79 2017-09-05 Yao Qi <yao.qi@linaro.org>
80
81 * configure.srv (srv_amd64_linux_xmlfiles): Remove
82 i386/amd64-XXX-linux from it.
83
84 2017-09-05 Yao Qi <yao.qi@linaro.org>
85
86 * configure.srv: Empty srv_amd64_linux_regobj if $development is
87 false.
88 (ipa_amd64_linux_regobj): Remove.
89 (ipa_x32_linux_regobj): Remove.
90
91 2017-09-05 Yao Qi <yao.qi@linaro.org>
92
93 * Makefile.in (arch-amd64.o): New rule.
94 * configure.srv: Append arch-amd64.o.
95 * linux-amd64-ipa.c: Include common/x86-xstate.h.
96 (get_ipa_tdesc): Call amd64_linux_read_description.
97 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
98 and init_registers_amd64_XXX.
99 * linux-x86-low.c (x86_linux_read_description): Call
100 amd64_linux_read_description.
101 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
102 (initialize_low_arch): Don't call init_registers_x32_XXX and
103 init_registers_amd64_XXX.
104 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
105 and tdesc_amd64_XXX.
106 [__x86_64__] (amd64_tdesc_test): New function.
107 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
108 and init_registers_amd64_XXX.
109 * linux-x86-tdesc.c: Include arch/amd64.h.
110 (xcr0_to_tdesc_idx): New function.
111 (i386_linux_read_description): New function.
112 (amd64_get_ipa_tdesc_idx): New function.
113 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
114 (amd64_get_ipa_tdesc): Declare.
115
116 2017-09-05 Yao Qi <yao.qi@linaro.org>
117
118 * configure.srv (srv_i386_linux_xmlfiles): Remove
119 i386/i386-XXX-linux.xml from it.
120
121 2017-09-05 Yao Qi <yao.qi@linaro.org>
122
123 * configure.srv: Set srv_i386_linux_regobj empty if $development
124 is false.
125 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
126 initialize_low_tdesc.
127 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
128 with #if initialize_low_tdesc.
129 * linux-x86-tdesc-selftest.c: New file.
130 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
131
132 2017-09-05 Yao Qi <yao.qi@linaro.org>
133
134 * Makefile.in (arch-i386.o): New rule.
135 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
136 (x86_64-*-linux*): Likewise.
137 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
138 include arch/i386.h.
139 (i386_linux_read_description): Remove code and call
140 i386_create_target_description.
141 * tdesc.c (allocate_target_description): New function.
142 * tdesc.h (set_tdesc_architecture): Remove declaration.
143 (set_tdesc_osabi): Likewise.
144
145 2017-09-05 Yao Qi <yao.qi@linaro.org>
146
147 * linux-x86-tdesc.c: Don't include <inttypes.h>.
148 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
149 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
150 .xmltarget.
151 * server.c (get_features_xml): Call tdesc_get_features_xml.
152 * tdesc.c (set_tdesc_architecture): New function.
153 (set_tdesc_osabi): New function.
154 (tdesc_get_features_xml): New function.
155 (tdesc_create_feature): Add an argument.
156 * tdesc.h (struct target_desc) <features>: New field.
157 <arch, osabi>: New field.
158 (~target_desc): xfree features, arch, and osabi.
159 (target_desc::oerator==): Don't compare .xmltarget.
160 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
161 (set_tdesc_osabi): Likewise.
162 (tdesc_get_features_xml): Likewise.
163
164 2017-09-05 Yao Qi <yao.qi@linaro.org>
165
166 * linux-x86-tdesc.c: Include selftest.h.
167 (i386_tdesc_test): New function.
168 (initialize_low_tdesc): Call selftests::register_test.
169 * tdesc.h: Include regdef.h.
170 (target_desc): Override operator == and !=.
171
172 2017-09-05 Yao Qi <yao.qi@linaro.org>
173
174 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
175 (ipa_obj): Likewise.
176 * linux-i386-ipa.c: Include common/x86-xstate.h
177 (get_ipa_tdesc): Call i386_linux_read_description.
178 (initialize_low_tracepoint): Don't call init_registers_XXX
179 functions, call initialize_low_tdesc instead.
180 * linux-x86-low.c (x86_linux_read_description): Call
181 i386_linux_read_description.
182 (initialize_low_arch): Don't call init_registers_i386_XXX
183 functions, call initialize_low_tdesc.
184 * linux-x86-tdesc.c: New file.
185 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
186 (i386_get_ipa_tdesc_idx): Declare.
187 (i386_get_ipa_tdesc): Declare.
188 (initialize_low_tdesc): Declare.
189
190 2017-09-05 Yao Qi <yao.qi@linaro.org>
191
192 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
193 instead of 0.
194
195 2017-09-05 Yao Qi <yao.qi@linaro.org>
196
197 * Makefile.in (IPA_OBJS): Add vec-ipa.o
198 * regcache.c (get_thread_regcache): Use VEC_length.
199 (init_register_cache): Likewise.
200 (regcache_cpy): Likewise.
201 (registers_to_string): Iterate reg_defs via VEC_iterate.
202 (find_regno): Likewise.
203 (find_register_by_number): Use VEC_index.
204 (register_size): Call find_register_by_number.
205 (register_data): Call find_register_by_number.
206 (supply_regblock): Use VEC_length.
207 (regcache_raw_read_unsigned): Likewise.
208 * tdesc.c (init_target_desc): Iterate reg_defs via
209 VEC_iterate.
210 (default_description): Update initializer.
211 (copy_target_description): Don't update field num_registers.
212 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
213 <num_registers>: Remove.
214
215 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
216
217 * Makefile.in (.SECONDARY): Define target.
218
219 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
220
221 * linux-low.c (linux_wait_1): Adjust.
222 * server.c (queue_stop_reply_callback): Adjust.
223
224 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
225
226 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
227 QEnvironmentUnset and QEnvironmentReset packets.
228 (handle_query): Inform remote that QEnvironmentHexEncoded,
229 QEnvironmentUnset and QEnvironmentReset are supported.
230
231 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
232
233 * inferiors.h (inferior_target_data): Rename to ...
234 (thread_target_data): ... this.
235 (inferior_regcache_data): Rename to ...
236 (thread_regcache_data): ... this.
237 (set_inferior_regcache_data): Rename to ...
238 (set_thread_regcache_data): ... this.
239 * inferiors.c (inferior_target_data): Rename to ...
240 (thread_target_data): ... this.
241 (inferior_regcache_data): Rename to ...
242 (thread_regcache_data): ... this.
243 (set_inferior_regcache_data): Rename to ...
244 (set_thread_regcache_data): ... this.
245 (free_one_thread): Update.
246 * linux-low.h (get_thread_lwp): Update.
247 * regcache.c (get_thread_regcache): Update.
248 (regcache_invalidate_thread): Update.
249 (free_register_cache_thread): Update.
250 * win32-i386-low.c (update_debug_registers_callback): Update.
251 (win32_get_current_dr): Update.
252 * win32-low.c (thread_rec): Update.
253 (delete_thread_info): Update.
254 (continue_one_thread): Update.
255 (suspend_one_thread): Update.
256
257 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
258
259 * inferiors.c (set_inferior_target_data): Remove.
260 * inferiors.h (set_inferior_target_data): Remove.
261
262 2017-08-18 Yao Qi <yao.qi@linaro.org>
263
264 * Makefile.in (OBS): Add selftest.o.
265 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
266 * configure, config.in: Re-generated.
267 * server.c: Include common/sefltest.h.
268 (captured_main): Handle option --selftest.
269
270 2017-08-09 Yao Qi <yao.qi@linaro.org>
271
272 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
273 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
274 i386-avx-mpx.o and i386-mmx.o.
275 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
276 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
277 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
278 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
279 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
280 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
281 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
282 i386/amd64-avx-mpx.xml.
283
284 2017-08-09 Yao Qi <yao.qi@linaro.org>
285
286 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
287 and x32-avx-avx512.o.
288 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
289 i386/x32-avx-avx512.xml.
290
291 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
292
293 * tracepoint.h (enum class fast_tpoint_collect_result): New
294 enumeration.
295 (fast_tracepoint_collecting): Change return type to
296 fast_tpoint_collect_result.
297 * tracepoint.c (fast_tracepoint_collecting): Likewise.
298 * linux-low.h: Include tracepoint.h.
299 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
300 fast_tpoint_collect_result.
301 * linux-low.c (handle_tracepoints): Adjust.
302 (linux_fast_tracepoint_collecting): Change return type to
303 fast_tpoint_collect_result.
304 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
305 linux_wait_1, stuck_in_jump_pad_callback,
306 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
307 proceed_one_lwp): Adjust to type change.
308
309 2017-07-10 Yao Qi <yao.qi@linaro.org>
310
311 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
312
313 2017-06-29 Yao Qi <yao.qi@linaro.org>
314
315 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
316 Remove.
317 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
318
319 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
320
321 * Makefile.in (IPA_OBJS): Sort and format one item per line.
322
323 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
324
325 * linux-low.c (linux_create_inferior): Adjust code to access the
326 environment information via 'gdb_environ' class.
327 * lynx-low.c (lynx_create_inferior): Likewise.
328 * server.c (our_environ): Make it an instance of 'gdb_environ'.
329 (get_environ): Return a pointer to 'our_environ'.
330 (captured_main): Initialize 'our_environ'.
331 * server.h (get_environ): Adjust prototype.
332 * spu-low.c (spu_create_inferior): Adjust code to access the
333 environment information via 'gdb_environ' class.
334
335 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
336
337 * linux-low.c (linux_read_memory, linux_write_memory): Remove
338 usage of "register" keyword.
339
340 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
341
342 * configure: Re-generate.
343
344 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
345
346 * configure: Re-generate.
347
348 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
349
350 * Makefile.in (COMPILE.pre): Add "-x c++".
351
352 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
353
354 * fork-child.c: Conditionally include <signal.h>.
355
356 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
357
358 * server.c (handle_general_set): Handle new packet
359 "QStartupWithShell".
360 (handle_query): Add "QStartupWithShell" to the list of supported
361 packets.
362 (gdbserver_usage): Add help text explaining the
363 new "--startup-with-shell" and "--no-startup-with-shell" CLI
364 options.
365 (captured_main): Recognize and act upon the presence of the new
366 CLI options.
367
368 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
369 Pedro Alves <palves@redhat.com>
370
371 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
372 * configure: Regenerate.
373 * configure.srv (srv_linux_obj): Add "fork-child.o" and
374 "fork-inferior.o".
375 (i[34567]86-*-lynxos*): Likewise.
376 (spu*-*-*): Likewise.
377 * fork-child.c: New file.
378 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
379 and "environ.h".
380 (linux_ptrace_fun): New function.
381 (linux_create_inferior): Adjust function prototype to reflect
382 change on "target.h". Adjust function code to use
383 "fork_inferior".
384 (linux_request_interrupt): Delete "signal_pid".
385 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
386 (lynx_ptrace_fun): New function.
387 (lynx_create_inferior): Adjust function prototype to reflect
388 change on "target.h". Adjust function code to use
389 "fork_inferior".
390 * nto-low.c (nto_create_inferior): Adjust function prototype and
391 code to reflect change on "target.h". Update comments.
392 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
393 "common-terminal.h" and "environ.h".
394 (terminal_fd): Moved to fork-child.c.
395 (old_foreground_pgrp): Likewise.
396 (restore_old_foreground_pgrp): Likewise.
397 (last_status): Make it global.
398 (last_ptid): Likewise.
399 (our_environ): New variable.
400 (startup_with_shell): Likewise.
401 (program_name): Likewise.
402 (program_argv): Rename to...
403 (program_args): ...this.
404 (wrapper_argv): New variable.
405 (start_inferior): Delete function.
406 (get_exec_wrapper): New function.
407 (get_exec_file): Likewise.
408 (get_environ): Likewise.
409 (prefork_hook): Likewise.
410 (post_fork_inferior): Likewise.
411 (postfork_hook): Likewise.
412 (postfork_child_hook): Likewise.
413 (handle_v_run): Update code to deal with arguments coming from the
414 remote host. Update calls from "start_inferior" to
415 "create_inferior".
416 (captured_main): Likewise. Initialize environment variable. Call
417 "have_job_control".
418 * server.h (post_fork_inferior): New prototype.
419 (get_environ): Likewise.
420 (last_status): Declare.
421 (last_ptid): Likewise.
422 (signal_pid): Likewise.
423 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
424 (spu_ptrace_fun): New function.
425 (spu_create_inferior): Adjust function prototype to reflect change
426 on "target.h". Adjust function code to use "fork_inferior".
427 * target.c (target_terminal_init): New function.
428 (target_terminal_inferior): Likewise.
429 (target_terminal_ours): Likewise.
430 * target.h: Include <vector>.
431 (struct target_ops) <create_inferior>: Update prototype.
432 (create_inferior): Update macro.
433 * utils.c (gdb_flush_out_err): New function.
434 * win32-low.c (win32_create_inferior): Adjust function prototype
435 and code to reflect change on "target.h".
436
437 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
438
439 * inferiors.c (switch_to_thread): New function.
440
441 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
442
443 * Makefile.in (SFILE): Add "common/job-control.c".
444 (OBS): Add "job-control.o".
445
446 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
447
448 * Makefile: Remove "@host_makefile_frag@".
449
450 2017-05-05 Pedro Alves <palves@redhat.com>
451
452 * configure: Regenerate.
453
454 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
455
456 * configure: Regenerate.
457
458 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
459
460 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
461 software_single_step change of return type to
462 std::vector<CORE_ADDR>.
463 * linux-low.c (install_software_single_step_breakpoints):
464 Likewise.
465 * linux-low.h (install_software_single_step_breakpoints):
466 Likewise.
467
468 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
469
470 * remote-utils.c: Include "gdb_termios.h" instead of
471 "terminal.h".
472 * terminal.h: Delete file.
473
474 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
475
476 * server.c: Include <vector>.
477 <program_argv, wrapper_argv>: Convert to std::vector.
478 (start_inferior): Rewrite function to use C++.
479 (handle_v_run): Likewise. Update code that calculates the argv
480 based on the vRun packet; use C++.
481 (captured_main): Likewise.
482
483 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
484
485 * server.c (handle_v_cont): Initialize thread_resume::thread
486 with null_ptid.
487
488 2017-04-05 Pedro Alves <palves@redhat.com>
489
490 * configure: Regenerate.
491
492 2017-04-05 Pedro Alves <palves@redhat.com>
493
494 * gdbreplay.c (sync_error): Constify.
495 * linux-x86-low.c (push_opcode): Constify.
496
497 2017-04-05 Pedro Alves <palves@redhat.com>
498
499 * win32-low.c (get_child_debug_event)
500 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
501 Report TARGET_WAITKIND_SPURIOUS instead.
502
503 2017-04-05 Pedro Alves <palves@redhat.com>
504
505 * remote-utils.c (remote_prepare, remote_open): Constify.
506 * remote-utils.h (remote_prepare, remote_open): Constify.
507 * server.c (captured_main): Constify 'port' handling.
508
509 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
510
511 * Makefile.in (clean): Clear .deps.
512
513 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
514
515 * .gitignore: Remove generated files, replace with wildcard.
516 * (clean): Replace removal of generated files with wildcard.
517 (version.c): Replace with...
518 (version-generated.c): ...this.
519 (xml-builtin.c): Replace with...
520 (xml-builtin-generated.c): ...this.
521 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
522 (%.c: *regformats*): Replace with...
523 (%-generated.c: *regformats*): ...this.
524
525 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
526
527 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
528 (xtensa_fill_gregset): Call collect_register_by_name for
529 threadptr register.
530 (xtensa_store_gregset): Call supply_register_by_name for
531 threadptr register.
532
533 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
534
535 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
536 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
537 (xtensa_store_gregset): Call supply_register for all registers in
538 a0_regnum..a0_regnum + C0_NREGS range.
539
540 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
543 (ax-ipa.o: ax.c): Remove.
544 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
545 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
546 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
547 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
548 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
549
550 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
551
552 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
553 (print-utils-ipa.o: ../common/print-utils.c): Remove.
554 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
555 (errors-ipa.o: ../common/errors.c): Remove.
556 (format-ipa.o: ../common/format.c): Remove.
557 (common-utils-ipa.o: ../common/common-utils.c): Remove.
558
559 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
560
561 * Makefile.in (%-ipa.o: %.c): New rule.
562 (tracepoint-ipa.o: tracepoint.c): Remove.
563 (utils-ipa.o: utils.c): Remove.
564 (remote-utils-ipa.o: remote-utils.c): Remove.
565 (regcache-ipa.o: regcache.c): Remove.
566 (i386-linux-ipa.o: i386-linux.c): Remove.
567 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
568 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
569 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
570 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
571 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
572 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
573 (amd64-linux-ipa.o: amd64-linux.c): Remove.
574 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
575 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
576 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
577 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
578 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
579 (aarch64-ipa.o: aarch64.c): Remove.
580 (s390-linux32-ipa.o: s390-linux32.c): Remove.
581 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
582 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
583 (s390-linux64-ipa.o: s390-linux64.c): Remove.
584 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
585 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
586 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
587 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
588 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
589 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
590 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
591 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
592 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
593 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
594 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
595 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
596 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
597 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
598 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
599 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
600 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
601 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
602 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
603 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
604 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
605 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
606 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
607 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
608 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
609 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
610 (tdesc-ipa.o: tdesc.c): Remove.
611 (x32-linux-ipa.o: x32-linux.c): Remove.
612 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
613 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
614
615 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
616
617 * Makefile.in (%.o: ../arch/%.c): New rule.
618 (arm.o: ../arch/arm.c): Remove.
619 (arm-linux.o: ../arch/arm-linux.c): Remove.
620 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
621 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
622
623 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
624
625 * Makefile.in (%.o: ../nat/%.c): New rule.
626 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
627 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
628 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
629 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
630 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
631 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
632 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
633 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
634 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
635 (linux-personality.o: ../nat/linux-personality.c): Remove.
636 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
637 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
638 (x86-linux.o: ../nat/x86-linux.c): Remove.
639 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
640 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
641
642 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
643
644 * Makefile.in (%.o: ../common/%.c): New rule.
645 (signals.o: ../common/signals.c): Remove.
646 (print-utils.o: ../common/print-utils.c): Remove.
647 (rsp-low.o: ../common/rsp-low.c): Remove.
648 (common-utils.o: ../common/common-utils.c): Remove.
649 (posix-strerror.o: ../common/posix-strerror.c): Remove.
650 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
651 (vec.o: ../common/vec.c): Remove.
652 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
653 (xml-utils.o: ../common/xml-utils.c): Remove.
654 (ptid.o: ../common/ptid.c): Remove.
655 (buffer.o: ../common/buffer.c): Remove.
656 (format.o: ../common/format.c): Remove.
657 (filestuff.o: ../common/filestuff.c): Remove.
658 (agent.o: ../common/agent.c): Remove.
659 (errors.o: ../common/errors.c): Remove.
660 (environ.o: ../common/environ.c): Remove.
661 (common-debug.o: ../common/common-debug.c): Remove.
662 (cleanups.o: ../common/cleanups.c): Remove.
663 (common-exceptions.o: ../common/common-exceptions.c): Remove.
664 (fileio.o: ../common/fileio.c): Remove.
665 (common-regcache.o: ../common/common-regcache.c): Remove.
666 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
667 (new-op.o: ../common/new-op.c): Remove.
668 (btrace-common.o: ../common/btrace-common.c): Remove.
669
670 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
671
672 * Makefile.in (%.o: ../target/%.c): New rule.
673 (waitstatus.o: ../target/waitstatus.c): Remove.
674
675 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
676
677 * Makefile.in
678 (%.c: ../regformats/%.dat,
679 (%.c: ../regformats/arm/%.dat,
680 (%.c: ../regformats/i386/%.dat,
681 (%.c: ../regformats/rs6000/%.dat): New rules.
682 (aarch64.c): Remove.
683 (reg-arm.c): Remove.
684 (arm-with-iwmmxt.c): Remove.
685 (arm-with-vfpv2.c): Remove.
686 (arm-with-vfpv3.c): Remove.
687 (arm-with-neon.c): Remove.
688 (reg-bfin.c): Remove.
689 (reg-cris.c): Remove.
690 (reg-crisv32.c): Remove.
691 (i386.c): Remove.
692 (i386-linux.c): Remove.
693 (i386-avx.c): Remove.
694 (i386-avx-linux.c): Remove.
695 (i386-avx-avx512.c): Remove.
696 (i386-avx-avx512-linux.c): Remove.
697 (i386-mpx.c): Remove.
698 (i386-mpx-linux.c): Remove.
699 (i386-avx-mpx-avx512-pku.c): Remove.
700 (i386-avx-mpx-avx512-pku-linux.c): Remove.
701 (i386-avx-mpx.c): Remove.
702 (i386-avx-mpx-linux.c): Remove.
703 (i386-mmx.c): Remove.
704 (i386-mmx-linux.c): Remove.
705 (reg-ia64.c): Remove.
706 (reg-m32r.c): Remove.
707 (reg-m68k.c): Remove.
708 (reg-cf.c): Remove.
709 (mips-linux.c): Remove.
710 (mips-dsp-linux.c): Remove.
711 (mips64-linux.c): Remove.
712 (mips64-dsp-linux.c): Remove.
713 (nios2-linux.c): Remove.
714 (powerpc-32.c): Remove.
715 (powerpc-32l.c): Remove.
716 (powerpc-altivec32l.c): Remove.
717 (powerpc-cell32l.c): Remove.
718 (powerpc-vsx32l.c): Remove.
719 (powerpc-isa205-32l.c): Remove.
720 (powerpc-isa205-altivec32l.c): Remove.
721 (powerpc-isa205-vsx32l.c): Remove.
722 (powerpc-e500l.c): Remove.
723 (powerpc-64l.c): Remove.
724 (powerpc-altivec64l.c): Remove.
725 (powerpc-cell64l.c): Remove.
726 (powerpc-vsx64l.c): Remove.
727 (powerpc-isa205-64l.c): Remove.
728 (powerpc-isa205-altivec64l.c): Remove.
729 (powerpc-isa205-vsx64l.c): Remove.
730 (s390-linux32.c): Remove.
731 (s390-linux32v1.c): Remove.
732 (s390-linux32v2.c): Remove.
733 (s390-linux64.c): Remove.
734 (s390-linux64v1.c): Remove.
735 (s390-linux64v2.c): Remove.
736 (s390-te-linux64.c): Remove.
737 (s390-vx-linux64.c): Remove.
738 (s390-tevx-linux64.c): Remove.
739 (s390x-linux64.c): Remove.
740 (s390x-linux64v1.c): Remove.
741 (s390x-linux64v2.c): Remove.
742 (s390x-te-linux64.c): Remove.
743 (s390x-vx-linux64.c): Remove.
744 (s390x-tevx-linux64.c): Remove.
745 (tic6x-c64xp-linux.c): Remove.
746 (tic6x-c64x-linux.c): Remove.
747 (tic6x-c62x-linux.c): Remove.
748 (reg-sh.c): Remove.
749 (reg-sparc64.c): Remove.
750 (reg-spu.c): Remove.
751 (amd64.c): Remove.
752 (amd64-linux.c): Remove.
753 (amd64-avx.c): Remove.
754 (amd64-avx-linux.c): Remove.
755 (amd64-avx-avx512.c): Remove.
756 (amd64-avx-avx512-linux.c): Remove.
757 (amd64-mpx.c): Remove.
758 (amd64-mpx-linux.c): Remove.
759 (amd64-avx-mpx-avx512-pku.c): Remove.
760 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
761 (amd64-avx-mpx.c): Remove.
762 (amd64-avx-mpx-linux.c): Remove.
763 (x32.c): Remove.
764 (x32-linux.c): Remove.
765 (x32-avx.c): Remove.
766 (x32-avx-linux.c): Remove.
767 (x32-avx-avx512.c): Remove.
768 (x32-avx-avx512-linux.c): Remove.
769 (reg-xtensa.c): Remove.
770 (reg-tilegx.c): Remove.
771 (reg-tilegx32.c): Remove.
772
773 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
774
775 * Makefile.in (SFILES): Add "common/environ.c".
776 (OBJS): Add "common/environ.h".
777
778 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
779
780 * configure.ac: Check if the fs_base and gs_base members of
781 `struct user_regs_struct' exist.
782 * config.in: Regenerated.
783 * configure: Likewise.
784
785 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
786
787 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
788 target_read_memory.
789 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
790 (get_next_pcs_syscall_next_pc): Likewise.
791
792 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
793
794 * win32-i386-low.c: Fix incorrect reference to a couple source files.
795 * nto-x86-low.c: Likewise.
796
797 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
798
799 * Makefile.in: Include disable-implicit-rules.mk.
800
801 2016-11-23 Pedro Alves <palves@redhat.com>
802
803 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
804 (debug_vprintf): Use std::chrono::steady_clock instead of
805 gettimeofday. Use '.' instead of ':'.
806 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
807 (get_timestamp): Use std::chrono::steady_clock instead of
808 gettimeofday.
809
810 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
811
812 * Makefile.in: Fix whitespace formatting.
813
814 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
815
816 * Makefile.in (SFILES, OBS): Flatten list and order
817 alphabetically.
818
819 2016-11-23 Pedro Alves <palves@redhat.com>
820
821 * event-loop.c (handle_file_event): Use warning.
822 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
823 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
824 Use warning.
825
826 2016-11-23 Pedro Alves <palves@redhat.com>
827
828 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
829 output.
830 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
831 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
832 debug_printf and debug_flush for debug output.
833 * server.c (handle_general_set): Likewise.
834 * thread-db.c (try_thread_db_load): Use debug_printf for debug
835 output.
836
837 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
838
839 * Makefile.in (.c.o): Replace rule with ...
840 (%.o: %.c): ... this one.
841
842 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
845 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
846 make.
847 * configure.ac: Remove checks for the make program.
848 * configure: Re-generate.
849
850 2016-10-28 Pedro Alves <palves@redhat.com>
851
852 * Makefile.in (CXX_DIALECT): Get from configure.
853 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
854 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
855 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
856 * config.in: Regenerate.
857 * configure: Regenerate.
858
859 2016-10-27 Yao Qi <yao.qi@linaro.org>
860
861 * linux-low.c (linux_supports_range_stepping): Return true if
862 can_software_single_step return true.
863
864 2016-10-27 Yao Qi <yao.qi@linaro.org>
865
866 * inferiors.c (find_inferior_in_random): New function.
867 * inferiors.h (find_inferior_in_random): Declare.
868 * linux-low.c (linux_wait_for_event_filtered): Call
869 find_inferior_in_random instead of find_inferior.
870
871 2016-10-27 Yao Qi <yao.qi@linaro.org>
872
873 * linux-low.c (linux_wait_1): If single-step breakpoints are
874 inserted, remove them.
875
876 2016-10-26 Pedro Alves <palves@redhat.com>
877
878 * linux-low.c (handle_extended_wait): Link parent/child fork
879 threads.
880 (linux_wait_1): Unlink them.
881 (linux_set_resume_request): Ignore resume requests for
882 already-resumed and unhandled fork child threads.
883 * linux-low.h (struct lwp_info) <fork_relative>: New field.
884 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
885 New functions.
886 (handle_v_requests) <vCont>: Don't call require_running.
887 * server.h (in_queued_stop_replies): New declaration.
888
889 2016-10-24 Yao Qi <yao.qi@linaro.org>
890
891 PR server/20733
892 * linux-aarch64-low.c (append_insns): Cast the return value to
893 'uint32_t *'.
894
895 2016-10-10 Yao Qi <yao.qi@linaro.org>
896
897 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
898
899 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
900
901 * target.c (target_supports_multi_process): New function, moved
902 from...
903 * target.h (target_supports_multi_process): ... here. Remove
904 macro.
905
906 2016-10-05 Tom Tromey <tom@tromey.com>
907
908 PR remote/20655:
909 * tracepoint.c (handle_tracepoint_bkpts): Check
910 ipa_error_tracepoint, not ipa_stopping_tracepoint.
911
912 2016-10-05 Yao Qi <yao.qi@linaro.org>
913
914 * configure.srv: Update the path of arm-*.xml files.
915
916 2016-10-05 Terry Guo <terry.guo@arm.com>
917 Yao Qi <yao.qi@linaro.org>
918
919 * Makefile.in: Adjust the path of rules.
920 * configure.srv: Update the path of xml files.
921 * regformats/arm-with-iwmmxt.dat: Regenerated.
922 * regformats/arm-with-neon.dat: Likewise.
923 * regformats/arm-with-vfpv2.dat: Likewise.
924 * regformats/arm-with-vfpv3.dat Likewise.
925
926 2016-09-30 Yao Qi <yao.qi@linaro.org>
927
928 PR gdbserver/20627
929 * target.c (target_stop_and_wait): Don't call
930 target_continue_no_signal, use resume_stop instead.
931
932 2016-09-26 Yao Qi <yao.qi@linaro.org>
933
934 * linux-low.c (linux_wait_1): Call debug_exit.
935
936 2016-09-23 Pedro Alves <palves@redhat.com>
937
938 * Makefile.in (SFILES): Add common/new-op.c.
939 (OBS): Add common/new-op.o.
940 (new-op.o): New rule.
941
942 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
943
944 * .gitinore: Ignore more files.
945
946 2016-09-21 Yao Qi <yao.qi@linaro.org>
947
948 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
949 23.
950
951 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
952
953 * server.c (start_inferior): Call target_mourn_inferior instead of
954 mourn_inferior; pass ptid_t argument to it.
955 (resume): Likewise.
956 (handle_target_event): Likewise.
957 * target.c (target_mourn_inferior): New function.
958 * target.h (mourn_inferior): Delete macro.
959
960 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
961
962 * linux-low.c (lwp_is_stepping): New function.
963
964 2016-09-06 Carl Love <cel@us.ibm.com>
965
966 * server.c (start_inferior): Fixed comment, requested comment change
967 didn't get updated correctly. Removed reference to ptrace () call as
968 it is only true on Linux systems.
969
970 2016-09-06 Carl Love <cel@us.ibm.com>
971
972 * server.c (start_inferior): Do not call
973 function target_post_create_inferior () if the
974 inferior process has already exited.
975
976 2016-09-05 Pedro Alves <palves@redhat.com>
977
978 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
979 (COMPILE.pre, CC_LD): Use CXX directly.
980 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
981 * acinclude.m4: Don't include build-with-cxx.m4.
982 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
983 * configure: Regenerate.
984
985 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
986
987 PR gdb/19495
988 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
989 call writing data to own_buf.
990
991 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
992
993 * target.c (mywait): Call target_wait instead of
994 the_target->wait.
995 (target_wait): New function.
996
997 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
998
999 * server.c (start_inferior): New variable 'ptid'. Replace calls
1000 to the_target->resume by target_continue{,_no_signal}, depending
1001 on the case.
1002 * target.c (target_stop_and_wait): Call target_continue_no_signal
1003 instead of the_target->resume.
1004 (target_continue): New function.
1005
1006 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1007
1008 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1009
1010 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1011
1012 PR server/20491
1013 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1014 ps_prochandle.
1015 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1016 * linux-arm-low.c (ps_get_thread_area): Likewise.
1017 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1018 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1019 * linux-mips-low.c (ps_get_thread_area): Likewise.
1020 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1021 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1022 * linux-x86-low.c (ps_get_thread_area): Likewise.
1023 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1024
1025 2016-08-19 Pedro Alves <palves@redhat.com>
1026
1027 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1028
1029 2016-08-19 Pedro Alves <palves@redhat.com>
1030
1031 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1032 comment. Use memcpy instead of casting through unsigned long.
1033
1034 2016-08-19 Pedro Alves <palves@redhat.com>
1035
1036 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1037 allocating around 0x80000000.
1038
1039 2016-08-19 Pedro Alves <palves@redhat.com>
1040
1041 PR gdb/20415
1042 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1043 (x32-avx512-linux-ipa.o): New rules.
1044 * configure.ac (x86_64-*-linux*): New x32 check.
1045 * configure.srv (ipa_x32_linux_regobj): New.
1046 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1047 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1048 descriptions.
1049 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1050 descriptions.
1051 * configure: Regenerate.
1052
1053 2016-08-09 Pedro Alves <palves@redhat.com>
1054
1055 PR gdb/18653
1056 * Makefile.in (OBS): Add signals-state-save-restore.o.
1057 (signals-state-save-restore.o): New rule.
1058 * config.in: Regenerate.
1059 * configure: Regenerate.
1060 * linux-low.c: Include "signals-state-save-restore.h".
1061 (linux_create_inferior): Call
1062 restore_original_signals_state.
1063 * server.c: Include "dispositions-save-restore.h".
1064 (captured_main): Call save_original_signals_state.
1065
1066 2016-08-05 Pedro Alves <palves@redhat.com>
1067
1068 * configure: Regenerate.
1069
1070 2016-08-04 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-low.c (regsets_fetch_inferior_registers): Check
1073 errno is ESRCH or not.
1074
1075 2016-08-02 Yao Qi <yao.qi@linaro.org>
1076
1077 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1078 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1079 (thread_db_load_search): Update.
1080 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1081 td_ta_set_event and td_ta_event_getmsg.
1082
1083 2016-07-26 Pedro Alves <palves@redhat.com>
1084
1085 PR server/20414
1086 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1087 of unsigned long for 64-bit registers and use uint32_t instead of
1088 unsigned int for 32-bit registers.
1089
1090 2016-07-26 Pedro Alves <palves@redhat.com>
1091
1092 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1093 to 'ptrace'.
1094
1095 2016-07-21 Tom Tromey <tom@tromey.com>
1096
1097 * configure: Rebuild.
1098
1099 2016-07-21 Yao Qi <yao.qi@linaro.org>
1100
1101 * mem-break.c (find_gdb_breakpoint): Cast bp to
1102 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1103
1104 2016-07-21 Yao Qi <yao.qi@linaro.org>
1105
1106 * server.c (handle_v_requests): Support s and S actions
1107 if target_supports_software_single_step return true.
1108
1109 2016-07-21 Yao Qi <yao.qi@linaro.org>
1110
1111 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1112 is resume_step, call maybe_hw_step.
1113 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1114 and unstop them.
1115 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1116 breakpoints or not.
1117 (proceed_one_lwp): If resume request is resume_step, install
1118 reinsert breakpoints and call maybe_hw_step.
1119
1120 2016-07-21 Yao Qi <yao.qi@linaro.org>
1121
1122 * linux-low.c (proceed_one_lwp): Declare.
1123 (linux_resume_one_thread): Remove local variable 'step'.
1124 Lift code enqueue signal. Call proceed_one_lwp instead of
1125 linux_resume_one_lwp.
1126
1127 2016-07-21 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (linux_resume_one_thread): Call
1130 enqueue_pending_signal.
1131
1132 2016-07-21 Yao Qi <yao.qi@linaro.org>
1133
1134 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1135 * inferiors.c (do_restore_current_thread_cleanup): New function.
1136 (make_cleanup_restore_current_thread): Likewise.
1137 * linux-low.c (install_software_single_step_breakpoints): Call
1138 make_cleanup_restore_current_thread. Switch current_thread to
1139 thread.
1140
1141 2016-07-21 Yao Qi <yao.qi@linaro.org>
1142
1143 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1144 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1145 (clone_one_breakpoint): Likewise.
1146 (delete_reinsert_breakpoints): Change parameter to thread.
1147 Callers updated.
1148 (has_reinsert_breakpoints): Likewise.
1149 (uninsert_reinsert_breakpoints): Likewise.
1150 (reinsert_reinsert_breakpoints): Likewise.
1151 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1152 (delete_reinsert_breakpoints): Likewise.
1153 (reinsert_reinsert_breakpoints): Likewise.
1154 (uninsert_reinsert_breakpoints): Likewise.
1155 (has_reinsert_breakpoints): Likewise.
1156
1157 2016-07-21 Yao Qi <yao.qi@linaro.org>
1158
1159 * inferiors.c (get_thread_process): Make parameter const.
1160 * inferiors.h (get_thread_process): Update declaration.
1161 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1162 Add new parameters child_thread and parent_thread. Callers
1163 updated.
1164 * mem-break.h (clone_all_breakpoints): Update declaration.
1165
1166 2016-07-21 Yao Qi <yao.qi@linaro.org>
1167
1168 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1169 <command_list, handler>: Remove.
1170 (struct gdb_breakpoint): New.
1171 (struct other_breakpoint): New.
1172 (struct reinsert_breakpoint): New.
1173 (is_gdb_breakpoint): New function.
1174 (any_persistent_commands): Update command_list if
1175 is_gdb_breakpoint returns true.
1176 (set_breakpoint): Create breakpoints according to their types.
1177 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1178 (set_gdb_breakpoint_1): Likewise.
1179 (set_gdb_breakpoint): Likewise.
1180 (clear_breakpoint_conditions): Change parameter type to
1181 'struct gdb_breakpoint *'.
1182 (clear_breakpoint_commands): Likewise.
1183 (clear_breakpoint_conditions_and_commands): Likewise.
1184 (add_condition_to_breakpoint): Likewise.
1185 (add_breakpoint_condition): Likewise.
1186 (add_commands_to_breakpoint): Likewise.
1187 (check_breakpoints): Check other_breakpoint.
1188 (clone_one_breakpoint): Clone breakpopint according to its type.
1189 * mem-break.h (struct gdb_breakpoint): Declare.
1190 (set_gdb_breakpoint): Update declaration.
1191 (clear_breakpoint_conditions_and_commands): Likewise.
1192 (add_breakpoint_condition): Likewise.
1193 (add_breakpoint_commands): Likewise.
1194 * server.c (process_point_options): Change parameter type to
1195 'struct gdb_breakpoint *'.
1196
1197 2016-07-21 Yao Qi <yao.qi@linaro.org>
1198
1199 * mem-break.c (set_breakpoint_at): Rename it to ...
1200 (set_breakpoint_type_at): ... it.
1201 (set_breakpoint_at): Call set_breakpoint_type_at.
1202 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1203 * mem-break.h (set_breakpoint_at): Update comments.
1204
1205 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1206
1207 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1208 to buf parameter.
1209 (nios2_store_gregset): Likewise.
1210
1211 2016-07-01 Pedro Alves <palves@redhat.com>
1212 Antoine Tremblay <antoine.tremblay@ericsson.com>
1213
1214 * linux-low.c: Change interface to take the target lwp_info
1215 pointer directly and return void. Handle detaching from a zombie
1216 thread.
1217 (linux_detach_lwp_callback): New function.
1218 (linux_detach): Detach from the leader thread after detaching from
1219 the clone threads.
1220
1221 2016-06-28 Yao Qi <yao.qi@linaro.org>
1222
1223 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1224 for variable new_offset.
1225 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1226 (aarch64_ftrace_insn_reloc_cb): Likewise.
1227 (aarch64_ftrace_insn_reloc_tb): Likewise.
1228 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1229 PRIx64 instead of PRIx32.
1230
1231 2016-06-28 Yao Qi <yao.qi@linaro.org>
1232
1233 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1234 (the_low_target): Install arm_get_syscall_trapinfo.
1235
1236 2016-06-28 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1239 function.
1240 (the_low_target): Install aarch64_get_syscall_trapinfo.
1241
1242 2016-06-28 Yao Qi <yao.qi@linaro.org>
1243
1244 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1245 Callers updated.
1246 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1247 Remove parameter sysno.
1248 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1249 sysret.
1250
1251 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1252
1253 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1254 (s390_emit_ne_goto): Likewise.
1255 (s390_emit_lt_goto): Likewise.
1256 (s390_emit_le_goto): Likewise.
1257 (s390_emit_gt_goto): Likewise.
1258 (s390_emit_ge_goto): Likewise.
1259 (s390x_emit_eq_goto): Likewise.
1260 (s390x_emit_ne_goto): Likewise.
1261 (s390x_emit_lt_goto): Likewise.
1262 (s390x_emit_le_goto): Likewise.
1263 (s390x_emit_gt_goto): Likewise.
1264 (s390x_emit_ge_goto): Likewise.
1265 (s390_emit_ops_impl): Mark variable static.
1266 (s390x_emit_ops): Likewise.
1267
1268 2016-06-17 Yao Qi <yao.qi@linaro.org>
1269
1270 * linux-low.c (handle_extended_wait): Call
1271 uninsert_reinsert_breakpoints for the parent process. Remove
1272 reinsert breakpoints from the child process. Reinsert them to
1273 the parent process when vfork is done.
1274 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1275 (reinsert_reinsert_breakpoints): New function.
1276 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1277 (reinsert_reinsert_breakpoints): Declare.
1278
1279 2016-06-17 Yao Qi <yao.qi@linaro.org>
1280
1281 * linux-low.c (handle_extended_wait): If the parent is doing
1282 step-over, remove the reinsert breakpoints from the forked child.
1283
1284 2016-06-17 Yao Qi <yao.qi@linaro.org>
1285
1286 * linux-low.c (unsuspend_all_lwps): Declare.
1287 (linux_low_filter_event): If thread exited, call finish_step_over.
1288 If step-over is finished, unsuspend other threads.
1289
1290 2016-06-17 Yao Qi <yao.qi@linaro.org>
1291
1292 * linux-low.c (linux_resume_one_lwp_throw): Assert
1293 has_reinsert_breakpoints returns false.
1294 * mem-break.c (delete_disabled_breakpoints): Assert
1295 bp type isn't reinsert_breakpoint.
1296
1297 2016-06-17 Yao Qi <yao.qi@linaro.org>
1298
1299 * linux-low.c (maybe_hw_step): New function.
1300 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1301 (finish_step_over): Switch current_thread to lwp temporarily,
1302 and assert has_reinsert_breakpoints returns true.
1303 (proceed_one_lwp): Call maybe_hw_step.
1304 * mem-break.c (has_reinsert_breakpoints): New function.
1305 * mem-break.h (has_reinsert_breakpoints): Declare.
1306
1307 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1308
1309 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1310
1311 2016-05-17 Yao Qi <yao.qi@linaro.org>
1312
1313 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1314 instead of find_inferior.
1315
1316 2016-05-05 Yao Qi <yao.qi@linaro.org>
1317
1318 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1319 Initialize res to zero.
1320
1321 2016-05-05 Yao Qi <yao.qi@linaro.org>
1322
1323 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1324 to uint32_t.
1325
1326 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1327
1328 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1329 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1330 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1331
1332 2016-04-28 Par Olsson <par.olsson@windriver.com>
1333 Simon Marchi <simon.marchi@ericsson.com>
1334
1335 * tracepoint.c (write_inferior_int8): New function.
1336 (cmd_qtenable_disable): Write enable flag using
1337 write_inferior_int8.
1338
1339 2016-04-25 Yao Qi <yao.qi@linaro.org>
1340
1341 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1342 (need_step_over_p): Return zero if the LWP has pending signals
1343 can be delivered on software single step target.
1344
1345 2016-04-25 Yao Qi <yao.qi@linaro.org>
1346
1347 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1348 return instead of error.
1349
1350 2016-04-22 Yao Qi <yao.qi@linaro.org>
1351
1352 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1353 to 23.
1354
1355 2016-04-22 Yao Qi <yao.qi@linaro.org>
1356
1357 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1358 signal when stepping over breakpoint with software single
1359 step.
1360
1361 2016-04-21 Pedro Alves <palves@redhat.com>
1362
1363 * linux-s390-low.c (s390_collect_ptrace_register)
1364 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1365 add casts.
1366 (s390_check_regset): Use void * instead of gdb_byte *.
1367
1368 2016-04-20 Pedro Alves <palves@redhat.com>
1369
1370 * configure: Renegerate.
1371
1372 2016-04-20 Yao Qi <yao.qi@linaro.org>
1373
1374 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1375 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1376 number 16.
1377 (arm_store_gregset): Likewise.
1378
1379 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1380
1381 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1382 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1383 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1384 (amd64-avx-mpx-linux.c): New rules.
1385 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1386 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1387 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1388 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1389 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1390 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1391 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1392 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1393 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1394 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1395 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1396 * linux-x86-low.c (x86_linux_read_description): Add case for
1397 X86_XSTATE_AVX_MPX_MASK.
1398 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1399 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1400 init_registers_i386_avx_mpx_linux.
1401 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1402 (initialize_low_tracepoint): Call
1403 init_registers_i386_avx_mpx_linux.
1404 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1405 (initialize_low_tracepoint): Call
1406 init_registers_amd64_avx_mpx_linux.
1407 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1408 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1409 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1410 declarations.
1411
1412 2016-04-18 Pedro Alves <palves@redhat.com>
1413
1414 * configure: Regenerate.
1415
1416 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1417
1418 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1419 (aarch64_emit_sub): Likewise.
1420
1421 2016-04-12 Pedro Alves <palves@redhat.com>
1422
1423 * utils.c (prepare_to_throw_exception): Delete.
1424
1425 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1428
1429 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1430
1431 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1432
1433 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1434
1435 * linux-aarch64-ipa.c: Add <elf.h> include.
1436 * linux-ppc-ipa.c: Add <elf.h> include.
1437 * linux-s390-ipa.c: Add <elf.h> include.
1438
1439 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1440
1441 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1442 (get_raw_reg_ptr): Likewise.
1443 (get_trace_state_variable_value_ptr): Likewise.
1444 (set_trace_state_variable_value_ptr): Likewise.
1445 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1446 char *.
1447
1448 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1449 Marcin Kościelnicki <koriakin@0x04.net>
1450
1451 PR/17221
1452 * linux-ppc-low.c (emit_insns): New function.
1453 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1454 (ppc_emit_prologue): New function.
1455 (ppc_emit_epilogue): New function.
1456 (ppc_emit_add): New function.
1457 (ppc_emit_sub): New function.
1458 (ppc_emit_mul): New function.
1459 (ppc_emit_lsh): New function.
1460 (ppc_emit_rsh_signed): New function.
1461 (ppc_emit_rsh_unsigned): New function.
1462 (ppc_emit_ext): New function.
1463 (ppc_emit_zero_ext): New function.
1464 (ppc_emit_log_not): New function.
1465 (ppc_emit_bit_and): New function.
1466 (ppc_emit_bit_or): New function.
1467 (ppc_emit_bit_xor): New function.
1468 (ppc_emit_bit_not): New function.
1469 (ppc_emit_equal): New function.
1470 (ppc_emit_less_signed): New function.
1471 (ppc_emit_less_unsigned): New function.
1472 (ppc_emit_ref): New function.
1473 (ppc_emit_const): New function.
1474 (ppc_emit_reg): New function.
1475 (ppc_emit_pop): New function.
1476 (ppc_emit_stack_flush): New function.
1477 (ppc_emit_swap): New function.
1478 (ppc_emit_stack_adjust): New function.
1479 (ppc_emit_call): New function.
1480 (ppc_emit_int_call_1): New function.
1481 (ppc_emit_void_call_2): New function.
1482 (ppc_emit_if_goto): New function.
1483 (ppc_emit_goto): New function.
1484 (ppc_emit_eq_goto): New function.
1485 (ppc_emit_ne_goto): New function.
1486 (ppc_emit_lt_goto): New function.
1487 (ppc_emit_le_goto): New function.
1488 (ppc_emit_gt_goto): New function.
1489 (ppc_emit_ge_goto): New function.
1490 (ppc_write_goto_address): New function.
1491 (ppc_emit_ops_impl): New static variable.
1492 (ppc64v1_emit_prologue): New function.
1493 (ppc64v2_emit_prologue): New function.
1494 (ppc64_emit_epilogue): New function.
1495 (ppc64_emit_add): New function.
1496 (ppc64_emit_sub): New function.
1497 (ppc64_emit_mul): New function.
1498 (ppc64_emit_lsh): New function.
1499 (ppc64_emit_rsh_signed): New function.
1500 (ppc64_emit_rsh_unsigned): New function.
1501 (ppc64_emit_ext): New function.
1502 (ppc64_emit_zero_ext): New function.
1503 (ppc64_emit_log_not): New function.
1504 (ppc64_emit_bit_and): New function.
1505 (ppc64_emit_bit_or): New function.
1506 (ppc64_emit_bit_xor): New function.
1507 (ppc64_emit_bit_not): New function.
1508 (ppc64_emit_equal): New function.
1509 (ppc64_emit_less_signed): New function.
1510 (ppc64_emit_less_unsigned): New function.
1511 (ppc64_emit_ref): New function.
1512 (ppc64_emit_const): New function.
1513 (ppc64v1_emit_reg): New function.
1514 (ppc64v2_emit_reg): New function.
1515 (ppc64_emit_pop): New function.
1516 (ppc64_emit_stack_flush): New function.
1517 (ppc64_emit_swap): New function.
1518 (ppc64v1_emit_call): New function.
1519 (ppc64v2_emit_call): New function.
1520 (ppc64v1_emit_int_call_1): New function.
1521 (ppc64v2_emit_int_call_1): New function.
1522 (ppc64v1_emit_void_call_2): New function.
1523 (ppc64v2_emit_void_call_2): New function.
1524 (ppc64_emit_if_goto): New function.
1525 (ppc64_emit_eq_goto): New function.
1526 (ppc64_emit_ne_goto): New function.
1527 (ppc64_emit_lt_goto): New function.
1528 (ppc64_emit_le_goto): New function.
1529 (ppc64_emit_gt_goto): New function.
1530 (ppc64_emit_ge_goto): New function.
1531 (ppc64v1_emit_ops_impl): New static variable.
1532 (ppc64v2_emit_ops_impl): New static variable.
1533 (ppc_emit_ops): New function.
1534 (linux_low_target): Wire in ppc_emit_ops.
1535
1536 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1537 Marcin Kościelnicki <koriakin@0x04.net>
1538
1539 PR/17221
1540 * Makefile.in: Add powerpc-*-ipa.o
1541 * configure.srv: Add ipa_obj for powerpc*-linux.
1542 * linux-ppc-ipa.c: New file.
1543 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1544 includes.
1545 (PPC_FIELD): New macro.
1546 (PPC_SEXT): New macro.
1547 (PPC_OP6): New macro.
1548 (PPC_BO): New macro.
1549 (PPC_LI): New macro.
1550 (PPC_BD): New macro.
1551 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1552 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1553 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1554 (ppc_get_thread_area): New function.
1555 (is_elfv2_inferior): New function.
1556 (gen_ds_form): New function.
1557 (GEN_STD): New macro.
1558 (GEN_STDU): New macro.
1559 (GEN_LD): New macro.
1560 (GEN_LDU): New macro.
1561 (gen_d_form): New function.
1562 (GEN_ADDI): New macro.
1563 (GEN_ADDIS): New macro.
1564 (GEN_LI): New macro.
1565 (GEN_LIS): New macro.
1566 (GEN_ORI): New macro.
1567 (GEN_ORIS): New macro.
1568 (GEN_LWZ): New macro.
1569 (GEN_STW): New macro.
1570 (GEN_STWU): New macro.
1571 (gen_xfx_form): New function.
1572 (GEN_MFSPR): New macro.
1573 (GEN_MTSPR): New macro.
1574 (GEN_MFCR): New macro.
1575 (GEN_MTCR): New macro.
1576 (GEN_SYNC): New macro.
1577 (GEN_LWSYNC): New macro.
1578 (gen_x_form): New function.
1579 (GEN_OR): New macro.
1580 (GEN_MR): New macro.
1581 (GEN_LWARX): New macro.
1582 (GEN_STWCX): New macro.
1583 (GEN_CMPW): New macro.
1584 (gen_md_form): New function.
1585 (GEN_RLDICL): New macro.
1586 (GEN_RLDICR): New macro.
1587 (gen_i_form): New function.
1588 (GEN_B): New macro.
1589 (GEN_BL): New macro.
1590 (gen_b_form): New function.
1591 (GEN_BNE): New macro.
1592 (GEN_LOAD): New macro.
1593 (GEN_STORE): New macro.
1594 (gen_limm): New function.
1595 (gen_atomic_xchg): New function.
1596 (gen_call): New function.
1597 (ppc_relocate_instruction): New function.
1598 (ppc_install_fast_tracepoint_jump_pad): New function.
1599 (ppc_get_min_fast_tracepoint_insn_len): New function.
1600 (ppc_get_ipa_tdesc_idx): New function.
1601 (the_low_target): Wire in the new functions.
1602 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1603 tdescs.
1604 * linux-ppc-tdesc.h: New file.
1605
1606 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1607
1608 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1609 (alloc_jump_pad_buffer): New function.
1610 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1611 (alloc_jump_pad_buffer): New function.
1612 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1613 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1614 (alloc_jump_pad_buffer): New function.
1615 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1616 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1617 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1618 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1619
1620 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1621
1622 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1623 * linux-amd64-ipa.c: Likewise.
1624 * linux-i386-ipa.c: Likewise.
1625 * linux-s390-ipa.c: Likewise.
1626 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1627 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1628 set_trace_state_variable_value_ptr.
1629 (struct ipa_sym_addresses): Likewise.
1630 (symbol_list): Likewise.
1631 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1632 accessing gdb_collect directly.
1633 (gdb_collect_ptr_type): New typedef.
1634 (get_raw_reg_ptr_type): New typedef.
1635 (get_trace_state_variable_value_ptr_type): New typedef.
1636 (set_trace_state_variable_value_ptr_type): New typedef.
1637 (gdb_collect_ptr): New global.
1638 (get_raw_reg_ptr): New global.
1639 (get_trace_state_variable_value_ptr): New global.
1640 (set_trace_state_variable_value_ptr): New global.
1641 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1642 accessing get_raw_reg directly.
1643 (get_get_tsv_func_addr): Likewise for
1644 get_trace_state_variable_value_ptr.
1645 (get_set_tsv_func_addr): Likewise for
1646 set_trace_state_variable_value_ptr.
1647 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1648
1649 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1650
1651 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1652
1653 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1654
1655 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1656 packets.
1657 (relocate_instruction): Remove own_buf.
1658 * server.c (own_buf): Make global.
1659 (handle_v_requests): Make global.
1660 * server.h (own_buf): New declaration.
1661 (handle_v_requests): New prototype.
1662
1663 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1664
1665 PR 18377
1666 * linux-s390-low.c (add_insns): New function.
1667 (s390_emit_prologue): New function.
1668 (s390_emit_epilogue): New function.
1669 (s390_emit_add): New function.
1670 (s390_emit_sub): New function.
1671 (s390_emit_mul): New function.
1672 (s390_emit_lsh): New function.
1673 (s390_emit_rsh_signed): New function.
1674 (s390_emit_rsh_unsigned): New function.
1675 (s390_emit_ext): New function.
1676 (s390_emit_log_not): New function.
1677 (s390_emit_bit_and): New function.
1678 (s390_emit_bit_or): New function.
1679 (s390_emit_bit_xor): New function.
1680 (s390_emit_bit_not): New function.
1681 (s390_emit_equal): New function.
1682 (s390_emit_less_signed): New function.
1683 (s390_emit_less_unsigned): New function.
1684 (s390_emit_ref): New function.
1685 (s390_emit_if_goto): New function.
1686 (s390_emit_goto): New function.
1687 (s390_write_goto_address): New function.
1688 (s390_emit_litpool): New function.
1689 (s390_emit_const): New function.
1690 (s390_emit_call): New function.
1691 (s390_emit_reg): New function.
1692 (s390_emit_pop): New function.
1693 (s390_emit_stack_flush): New function.
1694 (s390_emit_zero_ext): New function.
1695 (s390_emit_swap): New function.
1696 (s390_emit_stack_adjust): New function.
1697 (s390_emit_set_r2): New function.
1698 (s390_emit_int_call_1): New function.
1699 (s390_emit_void_call_2): New function.
1700 (s390_emit_eq_goto): New function.
1701 (s390_emit_ne_goto): New function.
1702 (s390_emit_lt_goto): New function.
1703 (s390_emit_le_goto): New function.
1704 (s390_emit_gt_goto): New function.
1705 (s390_emit_ge_goto): New function.
1706 (s390x_emit_prologue): New function.
1707 (s390x_emit_epilogue): New function.
1708 (s390x_emit_add): New function.
1709 (s390x_emit_sub): New function.
1710 (s390x_emit_mul): New function.
1711 (s390x_emit_lsh): New function.
1712 (s390x_emit_rsh_signed): New function.
1713 (s390x_emit_rsh_unsigned): New function.
1714 (s390x_emit_ext): New function.
1715 (s390x_emit_log_not): New function.
1716 (s390x_emit_bit_and): New function.
1717 (s390x_emit_bit_or): New function.
1718 (s390x_emit_bit_xor): New function.
1719 (s390x_emit_bit_not): New function.
1720 (s390x_emit_equal): New function.
1721 (s390x_emit_less_signed): New function.
1722 (s390x_emit_less_unsigned): New function.
1723 (s390x_emit_ref): New function.
1724 (s390x_emit_if_goto): New function.
1725 (s390x_emit_const): New function.
1726 (s390x_emit_call): New function.
1727 (s390x_emit_reg): New function.
1728 (s390x_emit_pop): New function.
1729 (s390x_emit_stack_flush): New function.
1730 (s390x_emit_zero_ext): New function.
1731 (s390x_emit_swap): New function.
1732 (s390x_emit_stack_adjust): New function.
1733 (s390x_emit_int_call_1): New function.
1734 (s390x_emit_void_call_2): New function.
1735 (s390x_emit_eq_goto): New function.
1736 (s390x_emit_ne_goto): New function.
1737 (s390x_emit_lt_goto): New function.
1738 (s390x_emit_le_goto): New function.
1739 (s390x_emit_gt_goto): New function.
1740 (s390x_emit_ge_goto): New function.
1741 (s390_emit_ops): New function.
1742 (struct linux_target_ops): Fill in emit_ops hook.
1743
1744 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1745
1746 PR 18377
1747 * Makefile.in: Add s390 IPA files.
1748 * configure.srv: Build IPA for s390.
1749 * linux-s390-ipa.c: New file.
1750 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1751 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1752 (tdesc_s390_linux32): Likewise.
1753 (init_registers_s390_linux32v1): Likewise.
1754 (tdesc_s390_linux32v1): Likewise.
1755 (init_registers_s390_linux32v2): Likewise.
1756 (tdesc_s390_linux32v2): Likewise.
1757 (init_registers_s390_linux64): Likewise.
1758 (tdesc_s390_linux64): Likewise.
1759 (init_registers_s390_linux64v1): Likewise.
1760 (tdesc_s390_linux64v1): Likewise.
1761 (init_registers_s390_linux64v2): Likewise.
1762 (tdesc_s390_linux64v2): Likewise.
1763 (init_registers_s390_te_linux64): Likewise.
1764 (tdesc_s390_te_linux64): Likewise.
1765 (init_registers_s390_vx_linux64): Likewise.
1766 (tdesc_s390_vx_linux64): Likewise.
1767 (init_registers_s390_tevx_linux64): Likewise.
1768 (tdesc_s390_tevx_linux64): Likewise.
1769 (init_registers_s390x_linux64): Likewise.
1770 (tdesc_s390x_linux64): Likewise.
1771 (init_registers_s390x_linux64v1): Likewise.
1772 (tdesc_s390x_linux64v1): Likewise.
1773 (init_registers_s390x_linux64v2): Likewise.
1774 (tdesc_s390x_linux64v2): Likewise.
1775 (init_registers_s390x_te_linux64): Likewise.
1776 (tdesc_s390x_te_linux64): Likewise.
1777 (init_registers_s390x_vx_linux64): Likewise.
1778 (tdesc_s390x_vx_linux64): Likewise.
1779 (init_registers_s390x_tevx_linux64): Likewise.
1780 (tdesc_s390x_tevx_linux64): Likewise.
1781 (have_hwcap_s390_vx): New static variable.
1782 (s390_arch_setup): Fill have_hwcap_s390_vx.
1783 (s390_get_thread_area): New function.
1784 (s390_ft_entry_gpr_esa): New const.
1785 (s390_ft_entry_gpr_zarch): New const.
1786 (s390_ft_entry_misc): New const.
1787 (s390_ft_entry_fr): New const.
1788 (s390_ft_entry_vr): New const.
1789 (s390_ft_main_31): New const.
1790 (s390_ft_main_64): New const.
1791 (s390_ft_exit_fr): New const.
1792 (s390_ft_exit_vr): New const.
1793 (s390_ft_exit_misc): New const.
1794 (s390_ft_exit_gpr_esa): New const.
1795 (s390_ft_exit_gpr_zarch): New const.
1796 (append_insns): New function.
1797 (s390_relocate_instruction): New function.
1798 (s390_install_fast_tracepoint_jump_pad): New function.
1799 (s390_get_min_fast_tracepoint_insn_len): New function.
1800 (s390_get_ipa_tdesc_idx): New function.
1801 (struct linux_target_ops): Wire in the above functions.
1802 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1803 * linux-s390-tdesc.h: New file.
1804
1805 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1806
1807 * linux-s390-low.c (s390_supports_tracepoints): New function.
1808 (struct linux_target_ops): Fill supports_tracepoints hook.
1809
1810 2016-03-18 Yao Qi <yao.qi@linaro.org>
1811
1812 * linux-low.c (lwp_signal_can_be_delivered): New function.
1813 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1814
1815 2016-03-18 Yao Qi <yao.qi@linaro.org>
1816
1817 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1818 0 if signal is enqueued. Remove 'signal' from one debugging
1819 message. Move one debugging message to some lines below.
1820 Remove code setting 'signal' to 0.
1821
1822 2016-03-18 Yao Qi <yao.qi@linaro.org>
1823
1824 * linux-low.c (linux_low_filter_event): Remove redundant
1825 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1826
1827 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1828
1829 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1830 (struct linux_target_ops): Wire in the above.
1831
1832 2016-03-03 Yao Qi <yao.qi@linaro.org>
1833
1834 * linux-low.c: Update comments to start_step_over.
1835
1836 2016-03-03 Yao Qi <yao.qi@linaro.org>
1837
1838 PR server/19736
1839 * linux-low.c (handle_extended_wait): Set child suspended
1840 if event_lwp->bp_reinsert isn't zero.
1841
1842 2016-03-02 Yao Qi <yao.qi@linaro.org>
1843
1844 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1845 enqueue_pending_signal.
1846
1847 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1848
1849 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1850 is actually loaded.
1851
1852 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1853
1854 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1855 (s390_regmap_3264) [!__s390x__]: New global.
1856 (s390_collect_ptrace_register): Skip map entries containing -1.
1857 (s390_supply_ptrace_register): Ditto.
1858 (s390_fill_gprs_high): New function.
1859 (s390_store_gprs_high): New function.
1860 (s390_regsets): Add NT_S390_HIGH_GPRS.
1861 (s390_get_hwcap): Enable on 31-bit.
1862 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1863 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1864 Detect NT_S390_HIGH_GPRS.
1865 (s390_usrregs_info_3264): Enable on 31-bit.
1866 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1867 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1868
1869 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1870
1871 PR gdb/13808
1872 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1873 * configure.srv: Ditto.
1874 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1875 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1876 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1877 (init_registers_amd64_linux): Remove prototype.
1878 (tdesc_amd64_linux): Remove declaration.
1879 (get_ipa_tdesc): New function.
1880 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1881 initialize remaining tdescs.
1882 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1883 (init_registers_i386_linux): Remove prototype.
1884 (tdesc_i386_linux): Remove declaration.
1885 (get_ipa_tdesc): New function.
1886 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1887 initialize remaining tdescs.
1888 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1889 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1890 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1891 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1892 (x86_get_ipa_tdesc_idx): New function.
1893 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1894 * linux-x86-tdesc.h: New file.
1895 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1896 (target_get_ipa_tdesc_idx): New macro.
1897 * tracepoint.c (ipa_tdesc_idx): New macro.
1898 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1899 (symbol_list): Add ipa_tdesc_idx.
1900 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1901 (ipa_tdesc): Remove.
1902 (ipa_tdesc_idx): New variable.
1903 (get_context_regcache): Use get_ipa_tdesc.
1904 (gdb_collect): Ditto.
1905 (gdb_probe): Ditto.
1906 * tracepoint.h (get_ipa_tdesc): New prototype.
1907 (ipa_tdesc): Remove.
1908
1909 2016-02-24 Pedro Alves <palves@redhat.com>
1910
1911 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1912 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1913 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1914 Factor out common code between the USE_SIGTRAP_SIGINFO and
1915 !USE_SIGTRAP_SIGINFO blocks.
1916 (linux_low_filter_event): Call save_stop_reason instead of
1917 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1918 Update comments.
1919 (linux_wait_1): Update comments.
1920
1921 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1922
1923 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1924 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1925 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1926 ppc_insert_point, ppc_remove_point.
1927
1928 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1929
1930 * linux-s390-low.c (s390_supports_z_point_type): New function.
1931 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1932
1933 2016-02-16 Yao Qi <yao.qi@linaro.org>
1934
1935 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1936 PC. Get pc from regcache_read_pc.
1937
1938 2016-02-12 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1941 or linux_get_pc_32bit.
1942 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1943
1944 2016-02-12 Yao Qi <yao.qi@linaro.org>
1945
1946 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1947 arm_linux_get_next_pcs_fixup.
1948
1949 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1950
1951 * tracepoint.c (x_tracepoint_action_download): Change
1952 write_inferior_data_ptr to write_inferior_data_pointer.
1953 (cmd_qtstart): Likewise.
1954 (write_inferior_data_ptr): Remove.
1955 (download_agent_expr): Change write_inferior_data_ptr to
1956 write_inferior_data_pointer.
1957 (download_tracepoint_1): Likewise.
1958 (download_tracepoint): Likewise.
1959 (download_trace_state_variables): Likewise.
1960
1961 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1962 Marcin Kościelnicki <koriakin@0x04.net>
1963
1964 * tracepoint.c (struct tracepoint_action_ops): Remove.
1965 (struct tracepoint_action): Remove ops.
1966 (m_tracepoint_action_download, r_tracepoint_action_download)
1967 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1968 size and offset accordingly.
1969 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1970 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1971 (tracepoint_action_send, tracepoint_action_download): New functions.
1972 Helpers for trace action handlers.
1973 (add_tracepoint_action): Remove setup actions ops.
1974 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1975
1976 2016-02-10 Yao Qi <yao.qi@linaro.org>
1977
1978 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1979
1980 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1983 to AC_OUTPUT.
1984 * configure: Regenerate.
1985
1986 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1987
1988 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1989 void * to gdb_byte *.
1990 * linux-low.c (siginfo_fixup): Likewise.
1991 (linux_xfer_siginfo): Likewise.
1992 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1993 Likewise.
1994 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1995
1996 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1997
1998 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1999 to srv_tgtobj.
2000 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2001 to srv_tgtobj.
2002 * linux-x86-low.c [__x86_64__]: Include
2003 "nat/amd64-linux-siginfo.h".
2004 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2005 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2006 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2007 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2008 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2009 (cpt_si_fd, si_timerid, si_overrun): Move from
2010 nat/amd64-linux-siginfo.c.
2011 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2012
2013 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2014
2015 * server.c (skip_to_semicolon): Remove.
2016 (process_point_options): Use strchrnul instead of
2017 skip_to_semicolon.
2018
2019 2016-01-26 Yao Qi <yao.qi@linaro.org>
2020
2021 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2022 * linux-low.c (install_software_single_step_breakpoints): Don't
2023 call regcache_read_pc.
2024 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2025 argument pc.
2026
2027 2016-01-26 Yao Qi <yao.qi@linaro.org>
2028
2029 * linux-low.c (install_software_single_step_breakpoints): Call
2030 regcache_read_pc instead of get_pc.
2031
2032 2016-01-26 Yao Qi <yao.qi@linaro.org>
2033
2034 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2035 (unblock_async_io): Rename to ...
2036 (block_unblock_async_io): ... it. New function.
2037 (enable_async_io): Don't install SIGIO handler. Unblock it
2038 instead.
2039 (disable_async_io): Don't ignore SIGIO. Block it instead.
2040 (initialize_async_io): Install SIGIO handler. Don't call
2041 unblock_async_io.
2042
2043 2016-01-26 Yao Qi <yao.qi@linaro.org>
2044
2045 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2046 first character is '\003', call *the_target->request_interrupt.
2047
2048 2016-01-25 Yao Qi <yao.qi@linaro.org>
2049
2050 * remote-utils.c (new_thread_notify): Remove.
2051 (dead_thread_notify): Likewise.
2052 * remote-utils.h (new_thread_notify): Remove declaration.
2053 (dead_thread_notify): Likewise.
2054
2055 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2056
2057 * gdb.trace/pending.exp: Fix expected message on continue.
2058
2059 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2060
2061 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2062 it works properly on big-endian machines where sizeof (CORE_ADDR)
2063 != sizeof (void *).
2064
2065 2016-01-21 Pedro Alves <palves@redhat.com>
2066
2067 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2068 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2069 * configure: Regenerate.
2070
2071 2016-01-21 Yao Qi <yao.qi@linaro.org>
2072
2073 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2074 is_thumb and set it according to CPSR saved on the stack.
2075 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2076 arm_sigreturn_next_pc.
2077
2078 2016-01-18 Yao Qi <yao.qi@linaro.org>
2079
2080 * linux-low.c (linux_set_pc_64bit): New function.
2081 (linux_get_pc_64bit): New function.
2082 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2083 Declare.
2084 * linux-sparc-low.c (debug_threads): Remove declaration.
2085 (sparc_get_pc): Remove.
2086 (the_low_target): Use linux_get_pc_64bit instead of
2087 sparc_get_pc.
2088 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2089 (the_low_target): Use linux_get_pc_64bit and
2090 linux_set_pc_64bit.
2091
2092 2016-01-18 Yao Qi <yao.qi@linaro.org>
2093
2094 * linux-arm-low.c (debug_threads): Remove declaration.
2095 (arm_get_pc, arm_set_pc): Remove.
2096 (the_low_target): Use linux_get_pc_32bit and
2097 linux_set_pc_32bit.
2098 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2099 (the_low_target): Use linux_get_pc_32bit and
2100 linux_set_pc_32bit.
2101 * linux-cris-low.c (debug_threads): Remove declaration.
2102 (cris_get_pc, cris_set_pc,): Remove.
2103 (the_low_target): Use linux_get_pc_32bit and
2104 linux_set_pc_32bit.
2105 * linux-crisv32-low.c (debug_threads): Remove declaration.
2106 (cris_get_pc, cris_set_pc): Remove.
2107 (the_low_target): Use linux_get_pc_32bit and
2108 linux_set_pc_32bit.
2109 * linux-low.c: Include inttypes.h.
2110 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2111 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2112 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2113 (the_low_target): Use linux_get_pc_32bit and
2114 linux_set_pc_32bit.
2115 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2116 (the_low_target): Use linux_get_pc_32bit and
2117 linux_set_pc_32bit.
2118 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2119 (the_low_target): Use linux_get_pc_32bit and
2120 linux_set_pc_32bit.
2121 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2122 (the_low_target): Use linux_get_pc_32bit and
2123 linux_set_pc_32bit.
2124 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2125 (the_low_target): Use linux_get_pc_32bit and
2126 linux_set_pc_32bit.
2127
2128 2016-01-18 Gary Benson <gbenson@redhat.com>
2129
2130 * configure.ac (AC_FUNC_FORK): New check.
2131 * config.in: Regenerate.
2132 * configure: Likewise.
2133
2134 2016-01-14 Yao Qi <yao.qi@linaro.org>
2135
2136 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2137 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2138 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2139 arm_get_next_pcs_ctor.
2140
2141 2016-01-12 Josh Stone <jistone@redhat.com>
2142 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2143
2144 * inferiors.h: Include "gdb_vecs.h".
2145 (struct process_info): Add syscalls_to_catch.
2146 * inferiors.c (remove_process): Free syscalls_to_catch.
2147 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2148 syscall_return stops.
2149 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2150 * server.c (handle_general_set): Handle QCatchSyscalls.
2151 (handle_query): Report support for QCatchSyscalls.
2152 * target.h (struct target_ops): Add supports_catch_syscall.
2153 (target_supports_catch_syscall): New macro.
2154 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2155 (struct lwp_info): Add syscall_state.
2156 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2157 Maintain syscall_state and syscalls_to_catch across exec.
2158 (get_syscall_trapinfo): New function, proxy to the_low_target.
2159 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2160 (linux_low_filter_event): Toggle syscall_state entry/return for
2161 syscall traps, and set it ignored for all others.
2162 (gdb_catching_syscalls_p): New function.
2163 (gdb_catch_this_syscall_p): New function.
2164 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2165 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2166 (linux_supports_catch_syscall): New function.
2167 (linux_target_ops): Install it.
2168 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2169 (the_low_target): Install it.
2170
2171 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2172
2173 * acinclude.m4: Include new ../warning.m4 file.
2174 * configure: Regenerated.
2175 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2176
2177 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2178
2179 * ax.c (is_goto_target): Mark static.
2180 * linux-low.c (register_addr): Likewise.
2181 (linux_fetch_registers, linux_store_registers): Likewise.
2182 * mem-break.c (any_persistent_commands): Fix old prototype.
2183 (add_commands_to_breakpoint): Mark static.
2184 * regcache.c (find_register_by_name): Delete unused func.
2185 * remote-utils.c (hex_or_minus_one): Mark static.
2186 * server.c (monitor_show_help): Mark static.
2187 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2188 handle_v_requests): Likewise.
2189
2190 2016-01-12 Pedro Alves <palves@redhat.com>
2191
2192 Remove use of the registered trademark symbol throughout.
2193
2194 2016-01-08 Yao Qi <yao.qi@linaro.org>
2195
2196 * remote-utils.c (getpkt): If c is '\003', call target hook
2197 request_interrupt.
2198
2199 2016-01-06 Yao Qi <yao.qi@linaro.org>
2200
2201 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2202 linux-aarch32-low.c.
2203 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2204 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2205 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2206 (thumb2_breakpoint): Declare.
2207 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2208 linux-aarch32-low.h.
2209 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2210 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2211 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2212
2213 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2214
2215 * gdbreplay.c (gdbreplay_version): Change copyright year in
2216 version message.
2217 * server.c (gdbserver_version): Likewise.
2218
2219 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2220
2221 * server.c (crc32_table): Delete.
2222 (crc32): Use libiberty's xcrc32 function.
2223
2224 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2225
2226 * lynx-low.c (lynx_delete_thread_callback): New function.
2227 (lynx_mourn): Properly delete our process and all of its
2228 threads. Remove call to clear_inferiors.
2229
2230 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2231
2232 * target.c (thread_search_callback): Add check that
2233 the thread_stopped target callback is not NULL before
2234 calling it.
2235
2236 2015-12-21 Yao Qi <yao.qi@linaro.org>
2237
2238 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2239 arm breakpoint.
2240
2241 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2242
2243 * server.c (handle_query): Call target_supports_software_single_step.
2244
2245 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2246
2247 * linux-low.c (single_step): New function.
2248 (linux_resume_one_lwp_throw): Call single_step.
2249 (start_step_over): Likewise.
2250
2251 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2252
2253 * Makefile.in (SFILES): Append arch/arm-linux.c,
2254 arch/arm-get-next-pcs.c.
2255 (arm-linux.o): New rule.
2256 (arm-get-next-pcs.o): New rule.
2257 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2258 arm-linux.o.
2259 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2260 to linux-aarch32-low.c.
2261 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2262 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2263 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2264 (thumb2_breakpoint_len): Likewise.
2265 (arm_is_thumb_mode): Make non-static.
2266 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2267 from linux-aarch32-low.c.
2268 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2269 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2270 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2271 (thumb2_breakpoint_len): Likewise.
2272 (arm_is_thumb_mode): New declaration.
2273 * linux-arm-low.c: Include arch/arm-linux.h
2274 aarch/arm-get-next-pcs.h, sys/syscall.h.
2275 (get_next_pcs_ops): New struct.
2276 (get_next_pcs_addr_bits_remove): New function.
2277 (get_next_pcs_is_thumb): New function.
2278 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2279 (arm_sigreturn_next_pc): Likewise.
2280 (get_next_pcs_syscall_next_pc): Likewise.
2281 (arm_gdbserver_get_next_pcs): Likewise.
2282 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2283 Initialize.
2284 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2285 * server.h: Include gdb_vecs.h.
2286
2287 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2288
2289 * Makefile.in (SFILES): Append common/common-regcache.c.
2290 (OBS): Append common-regcache.o.
2291 (common-regcache.o): New rule.
2292 * regcache.c (init_register_cache): Initialize cache to
2293 REG_UNAVAILABLE.
2294 (regcache_raw_read_unsigned): New function.
2295 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2296 register_status enum.
2297
2298 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2299
2300 * linux-aarch64-low.c (the_low_targets): Rename
2301 breakpoint_reinsert_addr to get_next_pcs.
2302 * linux-arm-low.c (the_low_targets): Likewise.
2303 * linux-bfin-low.c (the_low_targets): Likewise.
2304 * linux-cris-low.c (the_low_targets): Likewise.
2305 * linux-crisv32-low.c (the_low_targets): Likewise.
2306 * linux-low.c (can_software_single_step): Likewise.
2307 (install_software_single_step_breakpoints): New function.
2308 (start_step_over): Use install_software_single_step_breakpoints.
2309 * linux-low.h: New CORE_ADDR vector.
2310 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2311 get_next_pcs.
2312 * linux-mips-low.c (the_low_targets): Likewise.
2313 * linux-nios2-low.c (the_low_targets): Likewise.
2314 * linux-sparc-low.c (the_low_targets): Likewise.
2315
2316 2015-12-17 Pedro Alves <palves@redhat.com>
2317
2318 * linux-low.c (linux_kill_one_lwp): Remove references to
2319 LinuxThreads.
2320 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2321 to 'kill'.
2322 (linux_init_signals): Delete.
2323 (initialize_low): Adjust.
2324 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2325
2326 2015-12-16 Pedro Alves <palves@redhat.com>
2327
2328 * configure.ac (compiler warning flags): When testing a
2329 -Wno-foo option, check whether -Wfoo works instead.
2330 * configure: Regenerate.
2331
2332 2015-12-11 Don Breazeal <donb@codesourcery.com>
2333
2334 * server.c (process_serial_event): Don't exit from gdbserver
2335 in remote mode if there are still active inferiors.
2336
2337 2015-12-11 Yao Qi <yao.qi@linaro.org>
2338
2339 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2340 arm_breakpoint_at if the process is 32-bit.
2341
2342 2015-12-11 Yao Qi <yao.qi@linaro.org>
2343
2344 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2345 arm breakpoint.
2346
2347 2015-12-07 Yao Qi <yao.qi@linaro.org>
2348
2349 * configure.srv: Append arm.o to srv_tgtobj for
2350 aarch64*-*-linux* target.
2351 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2352 from linux-arm-low.c.
2353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2354 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2355 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2356 (thumb2_breakpoint_len): Likewise.
2357 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2358 (arm_breakpoint_kinds): Likewise.
2359 (arm_breakpoint_kind_from_pc): Likewise.
2360 (arm_sw_breakpoint_from_kind): Likewise.
2361 (arm_breakpoint_kind_from_current_state): Likewise.
2362 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2363 (arm_sw_breakpoint_from_kind): Declare.
2364 (arm_breakpoint_kind_from_current_state): Declare.
2365 (arm_breakpoint_at): Declare.
2366 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2367 arm_sw_breakpoint_from_kind if process is 32-bit.
2368 (aarch64_breakpoint_kind_from_pc): New function.
2369 (aarch64_breakpoint_kind_from_current_state): New function.
2370 (the_low_target): Initialize fields breakpoint_kind_from_pc
2371 and breakpoint_kind_from_current_state.
2372 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2373 linux-aarch32-low.c.
2374 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2375 (arm_breakpoint, arm_breakpoint_len): Likewise.
2376 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2377 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2378 (arm_is_thumb_mode): Likewise.
2379 (arm_breakpoint_at): Likewise.
2380 (arm_breakpoint_kind_from_pc): Likewise.
2381 (arm_sw_breakpoint_from_kind): Likewise.
2382 (arm_breakpoint_kind_from_current_state): Likewise.
2383
2384 Revert:
2385 2015-08-04 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2388 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2389 * server.c (extended_protocol): Remove "static".
2390 * server.h (extended_protocol): Declare it.
2391
2392 2015-12-04 Josh Stone <jistone@redhat.com>
2393
2394 * target.h (struct target_ops) <arch_setup>: Rename to ...
2395 (struct target_ops) <post_create_inferior>: ... this.
2396 (target_arch_setup): Rename to ...
2397 (target_post_create_inferior): ... this, calling post_create_inferior.
2398 * server.c (start_inferior): Update target_arch_setup calls to
2399 target_post_create_inferior.
2400 * linux-low.c (linux_low_ptrace_options): Forward declare.
2401 (linux_arch_setup): Update its comment for general use.
2402 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2403 (struct linux_target_ops): Use linux_post_create_inferior.
2404 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2405 to post_create_inferior.
2406 * nto-low.c (struct nto_target_ops): Likewise.
2407 * spu-low.c (struct spu_target_ops): Likewise.
2408 * win32-low.c (struct win32_target_ops): Likewise.
2409
2410 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2411
2412 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2413
2414 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2415
2416 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2417 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2418 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2419 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2420 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2421 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2422 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2423 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2424 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2425 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2426 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2427 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2428
2429 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2430
2431 * linux-low.c (linux_look_up_symbols): Don't call
2432 linux_supports_traceclone.
2433 * linux-low.h (thread_db_init): Remove use_events argument.
2434 * thread-db.c (thread_db_use_event): Remove global variable.
2435 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2436 (struct thread_db) <td_create_bp>: Remove field.
2437 (thread_db_create_event): Remove function.
2438 (thread_db_enable_reporting): Likewise.
2439 (find_one_thread): Don't check for thread_db_use_events.
2440 (attach_thread): Likewise.
2441 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2442 (try_thread_db_load_1): Don't check for thread_db_use_events.
2443 (thread_db_init): Remove use_events argument and thread events
2444 handling.
2445 (remove_thread_event_breakpoints): Remove function.
2446 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2447
2448 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2449
2450 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2451 New function.
2452 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2453 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2454 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2455 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2456 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2457 Initialize.
2458 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2459 New function.
2460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2461 * linux-low.c (can_hardware_single_step): Use
2462 supports_hardware_single_step.
2463 (can_software_single_step): New function.
2464 (start_step_over): Call can_software_single_step.
2465 (linux_supports_hardware_single_step): New function.
2466 (struct target_ops) <supports_software_single_step>: Initialize.
2467 * linux-low.h (struct linux_target_ops)
2468 <supports_hardware_single_step>: Initialize.
2469 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2470 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2471 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2472 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2473 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2474 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2475 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2476 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2477 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2478 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2479 Initialize.
2480 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2481 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2482 Initialize.
2483 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2484 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2485 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2486 New function.
2487 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2488 * target.h (struct target_ops): <supports_software_single_step>:
2489 New field.
2490 (target_supports_software_single_step): New macro.
2491
2492 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2493
2494 * linux-low.c (linux_wait_1): Fix pc advance condition.
2495 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2496 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2497
2498 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2499
2500 * linux-arm-low.c (arm_is_thumb_mode): New function.
2501 (arm_breakpoint_at): Use arm_is_thumb_mode.
2502 (arm_breakpoint_kind_from_current_state): New function.
2503 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2504 Initialize.
2505 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2506 (linux_breakpoint_kind_from_current_state): New function.
2507 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2508 * linux-low.h (struct linux_target_ops)
2509 <breakpoint_kind_from_current_state>: New field.
2510 * target.h (struct target_ops): Likewise.
2511 (target_breakpoint_kind_from_current_state): New macro.
2512
2513 2015-11-30 Pedro Alves <palves@redhat.com>
2514
2515 * linux-low.c (linux_resume): Wake up the event loop before
2516 returning.
2517
2518 2015-11-30 Pedro Alves <palves@redhat.com>
2519
2520 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2521 check.
2522 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2523 to -1.
2524 * target.c (struct thread_search): New structure.
2525 (thread_search_callback): New function.
2526 (prev_general_thread): New global.
2527 (prepare_to_access_memory, done_accessing_memory): New functions.
2528 * target.h (prepare_to_access_memory, done_accessing_memory):
2529 Replace macros with function declarations.
2530
2531 2015-11-30 Pedro Alves <palves@redhat.com>
2532
2533 PR 14618
2534 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2535 report TARGET_WAITKIND_NO_RESUMED.
2536 * remote-utils.c (prepare_resume_reply): Handle
2537 TARGET_WAITKIND_NO_RESUMED.
2538 * server.c (report_no_resumed): New global.
2539 (handle_query) <qSupported>: Handle "no-resumed+". Report
2540 "no-resumed+" support.
2541 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2542 return error if the client doesn't support no-resumed events.
2543 (push_stop_notification): New function.
2544 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2545 events if the client supports them.
2546
2547 2015-11-30 Pedro Alves <palves@redhat.com>
2548
2549 * linux-low.c (thread_still_has_status_pending_p): Don't check
2550 vCont;t here.
2551 (lwp_resumed): New function.
2552 (status_pending_p_callback): Return early if the LWP is not
2553 supposed to be resumed.
2554
2555 2015-11-30 Pedro Alves <palves@redhat.com>
2556
2557 * linux-low.c (handle_extended_wait): Assert that the LWP's
2558 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2559 thread create events, leave the new child's status pending.
2560 (linux_low_filter_event): If GDB wants to hear about thread exit
2561 events, leave the LWP marked dead and don't delete it.
2562 (linux_wait_for_event_filtered): Don't check for thread exit.
2563 (filter_exit_event): New function.
2564 (linux_wait_1): Use it, when returning an exit event.
2565 (linux_resume_one_lwp_throw): Assert that the LWP's
2566 waitstatus is TARGET_WAITKIND_IGNORE.
2567 * remote-utils.c (prepare_resume_reply): Handle
2568 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2569 * server.c (report_thread_events): New global.
2570 (handle_general_set): Handle QThreadEvents.
2571 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2572 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2573 TARGET_WAITKIND_THREAD_EXITED.
2574 * server.h (report_thread_events): Declare.
2575
2576 2015-11-30 Pedro Alves <palves@redhat.com>
2577
2578 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2579 the thread's last_resume_kind was resume_stop.
2580
2581 2015-11-30 Pedro Alves <palves@redhat.com>
2582
2583 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2584 before returning.
2585
2586 2015-11-30 Pedro Alves <palves@redhat.com>
2587
2588 * server.c (handle_v_requests): Handle vCtrlC.
2589
2590 2015-11-30 Pedro Alves <palves@redhat.com>
2591
2592 * gdbthread.h (find_any_thread_of_pid): Declare.
2593 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2594 functions.
2595 * server.c (handle_query): If current_thread is NULL, look for
2596 another thread of the selected process.
2597
2598 2015-11-26 Daniel Colascione <dancol@dancol.org>
2599 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2602 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2603 name in reply.
2604 * target.h (struct target_ops) <thread_name>: New field.
2605 (target_thread_name): New macro.
2606
2607 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2608
2609 * regcache.h (regcache_invalidate_pid): Add declaration.
2610 * regcache.c (regcache_invalidate_pid): New function, extracted
2611 from regcache_invalidate.
2612 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2613 Add trivial documentation comment.
2614 * lynx-low.c: Use regcache_invalidate_pid instead of
2615 regcache_invalidate.
2616
2617 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2618
2619 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2620 and Elf64_auxv_t if the target is Android.
2621
2622 2015-11-22 Doug Evans <xdje42@gmail.com>
2623
2624 * target.h: #include <sys/types.h>.
2625
2626 2015-11-19 Pedro Alves <palves@redhat.com>
2627
2628 * linux-low.c (linux_process_qsupported): Change prototype.
2629 Adjust.
2630 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2631 Change prototype.
2632 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2633 and adjust to loop over all features.
2634 * server.c (handle_query) <qSupported>: Adjust to call
2635 target_process_qsupported once, passing it a vector of unprocessed
2636 features.
2637 * target.h (struct target_ops) <process_qsupported>: Change
2638 prototype.
2639 (target_process_qsupported): Adjust.
2640
2641 2015-11-19 Pedro Alves <palves@redhat.com>
2642
2643 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2644 mode.
2645 * configure: Regenerate.
2646
2647 2015-11-19 Pedro Alves <palves@redhat.com>
2648
2649 * configure: Regenerate.
2650
2651 2015-11-19 Yao Qi <yao.qi@linaro.org>
2652
2653 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2654 type to uint32_t.
2655
2656 2015-11-19 Yao Qi <yao.qi@linaro.org>
2657
2658 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2659 (struct aarch64_operand): Move enum out.
2660
2661 2015-11-19 Yao Qi <yao.qi@linaro.org>
2662
2663 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2664 struct user_fpsimd_state *.
2665 (aarch64_store_fpregset): Likewise.
2666
2667 2015-11-19 Yao Qi <yao.qi@linaro.org>
2668
2669 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2670 struct user_pt_regs *.
2671 (aarch64_store_gregset): Likewise.
2672
2673 2015-11-18 Pedro Alves <palves@redhat.com>
2674
2675 * Makefile.in (all_object_files): Add $IPA_OBJS.
2676
2677 2015-11-17 Pedro Alves <palves@redhat.com>
2678
2679 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2680 GDB_SIGNAL_0 and gdb_signal_to_string.
2681
2682 2015-11-17 Pedro Alves <palves@redhat.com>
2683
2684 * win32-low.c (handle_output_debug_string): Remove parameter.
2685 (win32_kill): Remove our_status local and adjust call to
2686 handle_output_debug_string.
2687 (get_child_debug_event): Adjust call to
2688 handle_output_debug_string.
2689
2690 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2691
2692 * linux-mips-low.c (mips_fill_gregset): Add cast.
2693 (mips_store_gregset): Likewise.
2694 (mips_fill_fpregset): Likewise.
2695 (mips_store_fpregset): Likewise.
2696
2697 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2698
2699 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2700 priv.
2701
2702 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2703
2704 * linux-mips-low.c (mips_linux_new_thread): Change type of
2705 watch_type to enum target_hw_bp_type.
2706
2707 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2708
2709 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2710 Change return type to arm_hwbp_type.
2711
2712 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2713
2714 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2715 (arm_store_gregset): Likewise.
2716 * linux-arm-low.c (arm_get_hwcap): Likewise.
2717 (arm_read_description): Likewise.
2718
2719 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2720
2721 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2722
2723 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2724
2725 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2726 (ppc_fill_vsxregset): Likewise.
2727 (ppc_store_vsxregset): Likewise.
2728 (ppc_fill_vrregset): Likewise.
2729 (ppc_store_vrregset): Likewise.
2730 (ppc_fill_evrregset): Likewise.
2731 (ppc_store_evrregset): Likewise.
2732
2733 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2734
2735 * linux-ppc-low.c (ppc_usrregs_info): Remove
2736 forward-declaration.
2737 (ppc_arch_setup): Move lower in file.
2738
2739 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2740
2741 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2742 (ps_pdwrite): Likewise.
2743
2744 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2745
2746 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2747 to after assert checks.
2748
2749 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2750
2751 * proc-service.c (ps_pdread): Add/adjust casts.
2752 (ps_pdwrite): Add/adjust casts.
2753
2754 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2755
2756 * server.c (handle_search_memory_1): Cast return value of
2757 memmem.
2758
2759 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2760
2761 * server.c (write_qxfer_response): Change type of data to
2762 gdb_byte *.
2763
2764 2015-10-29 Pedro Alves <palves@redhat.com>
2765
2766 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2767
2768 2015-10-29 Pedro Alves <palves@redhat.com>
2769
2770 * tracepoint.c (clear_installed_tracepoints): Add casts.
2771
2772 2015-10-29 Pedro Alves <palves@redhat.com>
2773
2774 * server.c (handle_v_cont, process_serial_event): Add enum
2775 gdb_signal casts to signal parsing code.
2776
2777 2015-10-29 Pedro Alves <palves@redhat.com>
2778
2779 * linux-low.h (NULL_REGSET): Define.
2780 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2781 * linux-arm-low.c (arm_regsets): Likewise.
2782 * linux-crisv32-low.c (cris_regsets): Likewise.
2783 * linux-m68k-low.c (m68k_regsets): Likewise.
2784 * linux-mips-low.c (mips_regsets): Likewise.
2785 * linux-nios2-low.c (nios2_regsets): Likewise.
2786 * linux-ppc-low.c (ppc_regsets): Likewise.
2787 * linux-s390-low.c (s390_regsets): Likewise.
2788 * linux-sh-low.c (sh_regsets): Likewise.
2789 * linux-sparc-low.c (sparc_regsets): Likewise.
2790 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2791 * linux-tile-low.c (tile_regsets): Likewise.
2792 * linux-x86-low.c (x86_regsets): Likewise.
2793 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2794
2795 2015-10-29 Pedro Alves <palves@redhat.com>
2796
2797 * linux-low.h (NULL_REGSET): Define.
2798 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2799 * linux-arm-low.c (arm_regsets): Likewise.
2800 * linux-crisv32-low.c (cris_regsets): Likewise.
2801 * linux-m68k-low.c (m68k_regsets): Likewise.
2802 * linux-mips-low.c (mips_regsets): Likewise.
2803 * linux-nios2-low.c (nios2_regsets): Likewise.
2804 * linux-ppc-low.c (ppc_regsets): Likewise.
2805 * linux-s390-low.c (s390_regsets): Likewise.
2806 * linux-sh-low.c (sh_regsets): Likewise.
2807 * linux-sparc-low.c (sparc_regsets): Likewise.
2808 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2809 * linux-tile-low.c (tile_regsets): Likewise.
2810 * linux-x86-low.c (x86_regsets): Likewise.
2811 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2812
2813 2015-10-26 Doug Evans <dje@google.com>
2814
2815 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2816
2817 2015-10-26 Doug Evans <dje@google.com>
2818
2819 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2820
2821 2015-10-26 Doug Evans <dje@google.com>
2822
2823 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2824 for debug_printf.
2825 (attach_thread, find_new_threads_callback): Ditto.
2826
2827 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2828
2829 * mem-break.h (set_breakpoint_data): Remove.
2830
2831 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2832
2833 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2834 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2835 (initialize_low): Remove set_breakpoint_data call.
2836 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2837 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2838 (initialize_low): Remove set_breakpoint_data call.
2839 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2840 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2841 (initialize_low): Remove set_breakpoint_data call.
2842
2843 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2844
2845 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2846 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2847 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2848 * target.h (target_breakpoint_kind_from_pc): New macro.
2849
2850 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2851
2852 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2853 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2854 the default breakpoint kind.
2855
2856 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2857
2858 * linux-arm-low.c (arm_supports_z_point_type): Add software
2859 breakpoint support.
2860
2861 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2862
2863 * linux-arm-low.c: Refactor breakpoint definitions.
2864 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2865 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2866
2867 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2868
2869 * Makefile.in: Add arm.c/o.
2870 * configure.srv: Likewise.
2871 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2872 (arm_breakpoint_kind_from_pc): New function.
2873 (arm_sw_breakpoint_from_kind): Return proper kind.
2874 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2875
2876 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2877
2878 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2879 removal.
2880 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2881 (struct raw_breakpoint) <size>: Remove.
2882 (struct raw_breakpoint) <kind>: Add.
2883 (bp_size): New function.
2884 (bp_opcode): Likewise.
2885 (find_raw_breakpoint_at): Adjust for kind.
2886 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2887 (remove_memory_breakpoint): Adjust for kind call bp_size.
2888 (set_raw_breakpoint_at): Adjust for kind.
2889 (set_breakpoint): Likewise.
2890 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2891 (delete_raw_breakpoint): Adjust for kind.
2892 (delete_breakpoint): Likewise.
2893 (find_gdb_breakpoint): Likewise.
2894 (set_gdb_breakpoint_1): Likewise.
2895 (set_gdb_breakpoint): Likewise.
2896 (delete_gdb_breakpoint_1): Likewise.
2897 (delete_gdb_breakpoint): Likewise.
2898 (uninsert_raw_breakpoint): Likewise.
2899 (reinsert_raw_breakpoint): Likewise.
2900 (set_breakpoint_data): Remove.
2901 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2902 (check_mem_read): Adjust for kind call bp_size.
2903 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2904 (clone_one_breakpoint): Adjust for kind.
2905 * mem-break.h (set_gdb_breakpoint): Likewise.
2906 (delete_gdb_breakpoint): Likewise.
2907 * server.c (process_serial_event): Likewise.
2908
2909 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2910
2911 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2912 (struct linux_target_ops) <breakpoint>: Remove.
2913 (struct linux_target_ops) <breakpoint_len>: Remove.
2914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2916 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2917 (arm_sw_breakpoint_from_kind): New function.
2918 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2919 (struct linux_target_ops) <breakpoint>: Remove.
2920 (struct linux_target_ops) <breakpoint_len>: Remove.
2921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2923 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2924 (struct linux_target_ops) <breakpoint>: Remove.
2925 (struct linux_target_ops) <breakpoint_len>: Remove.
2926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2928 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2929 (struct linux_target_ops) <breakpoint>: Remove.
2930 (struct linux_target_ops) <breakpoint_len>: Remove.
2931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2933 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2934 and sw_breakpoint_from_kind to increment the pc.
2935 (linux_breakpoint_kind_from_pc): New function.
2936 (linux_sw_breakpoint_from_kind): New function.
2937 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2938 (initialize_low): Call breakpoint_kind_from_pc and
2939 sw_breakpoint_from_kind to replace breakpoint_data/len.
2940 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2941 New field.
2942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2943 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2944 (struct linux_target_ops) <breakpoint>: Remove.
2945 (struct linux_target_ops) <breakpoint_len>: Remove.
2946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2948 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2949 (struct linux_target_ops) <breakpoint>: Remove.
2950 (struct linux_target_ops) <breakpoint_len>: Remove.
2951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2953 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2954 (struct linux_target_ops) <breakpoint>: Remove.
2955 (struct linux_target_ops) <breakpoint_len>: Remove.
2956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2958 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2959 (struct linux_target_ops) <breakpoint>: Remove.
2960 (struct linux_target_ops) <breakpoint_len>: Remove.
2961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2963 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2964 (struct linux_target_ops) <breakpoint>: Remove.
2965 (struct linux_target_ops) <breakpoint_len>: Remove.
2966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2968 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2969 (struct linux_target_ops) <breakpoint>: Remove.
2970 (struct linux_target_ops) <breakpoint_len>: Remove.
2971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2973 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2974 (struct linux_target_ops) <breakpoint>: Remove.
2975 (struct linux_target_ops) <breakpoint_len>: Remove.
2976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2978 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2979 (struct linux_target_ops) <breakpoint>: Remove.
2980 (struct linux_target_ops) <breakpoint_len>: Remove.
2981 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2983 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2984 (struct linux_target_ops) <breakpoint>: Remove.
2985 (struct linux_target_ops) <breakpoint_len>: Remove.
2986 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2987 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2988 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2989 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2990 (struct linux_target_ops) <breakpoint>: Remove.
2991 (struct linux_target_ops) <breakpoint_len>: Remove.
2992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2994 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2995 (struct linux_target_ops) <breakpoint>: Remove.
2996 (struct linux_target_ops) <breakpoint_len>: Remove.
2997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2999
3000 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3001
3002 * linux-cris-low.c (cris_get_pc): Remove void arg.
3003
3004 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3005
3006 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3007 variable name.
3008
3009 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3010
3011 * inferiors.c (thread_pid_matches_callback): New function.
3012 (find_thread_process): New function.
3013 (remove_thread): Reset current_thread.
3014 (remove_process): Assert threads have been removed first.
3015
3016 2015-10-15 Yao Qi <yao.qi@linaro.org>
3017
3018 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3019 if it is 3.
3020 (aarch64_remove_point): Likewise.
3021 * regcache.c (regcache_register_size): New function.
3022
3023 2015-10-12 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-aarch64-low.c: Update all callers as emit_load_store
3026 is renamed to aarch64_emit_load_store.
3027
3028 2015-10-12 Yao Qi <yao.qi@linaro.org>
3029
3030 * linux-aarch64-low.c: Update all callers of function renaming
3031 from emit_insn to aarch64_emit_insn.
3032
3033 2015-10-12 Yao Qi <yao.qi@linaro.org>
3034
3035 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3036 arch/aarch64-insn.h.
3037 (struct aarch64_memory_operand): Likewise.
3038 (ENCODE): Likewise.
3039 (emit_insn): Move to arch/aarch64-insn.c.
3040 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3041 (emit_load_store): Move to arch/aarch64-insn.c.
3042 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3043 (can_encode_int32): Remove.
3044
3045 2015-10-12 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3048 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3049 (aarch64_relocate_instruction): Likewise.
3050 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3051 (struct aarch64_insn_visitor): Likewise.
3052
3053 2015-10-12 Yao Qi <yao.qi@linaro.org>
3054
3055 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3056 (struct aarch64_insn_visitor): New.
3057 (struct aarch64_insn_relocation_data): New.
3058 (aarch64_ftrace_insn_reloc_b): New function.
3059 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3060 (aarch64_ftrace_insn_reloc_cb): Likewise.
3061 (aarch64_ftrace_insn_reloc_tb): Likewise.
3062 (aarch64_ftrace_insn_reloc_adr): Likewise.
3063 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3064 (aarch64_ftrace_insn_reloc_others): Likewise.
3065 (visitor): New.
3066 (aarch64_relocate_instruction): Use visitor.
3067
3068 2015-10-12 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3071 int. Add argument buf.
3072 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3073 aarch64_relocate_instruction.
3074
3075 2015-10-12 Yao Qi <yao.qi@linaro.org>
3076
3077 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3078 argument insn. Remove local variable insn. Don't call
3079 target_read_uint32.
3080 (aarch64_install_fast_tracepoint_jump_pad): Call
3081 target_read_uint32.
3082
3083 2015-09-30 Yao Qi <yao.qi@linaro.org>
3084
3085 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3086 (emit_load_store_pair): Likewise.
3087
3088 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3089
3090 * dll.c (match_dll): Add cast(s).
3091 (unloaded_dll): Likewise.
3092 * linux-low.c (second_thread_of_pid_p): Likewise.
3093 (delete_lwp_callback): Likewise.
3094 (count_events_callback): Likewise.
3095 (select_event_lwp_callback): Likewise.
3096 (linux_set_resume_request): Likewise.
3097 * server.c (accumulate_file_name_length): Likewise.
3098 (emit_dll_description): Likewise.
3099 (handle_qxfer_threads_worker): Likewise.
3100 (visit_actioned_threads): Likewise.
3101 * thread-db.c (any_thread_of): Likewise.
3102 * tracepoint.c (same_process_p): Likewise.
3103 (match_blocktype): Likewise.
3104 (build_traceframe_info_xml): Likewise.
3105
3106 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3107
3108 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3109 assignment.
3110 (gdb_unparse_agent_expr): Likewise.
3111 * hostio.c (require_data): Likewise.
3112 (handle_pread): Likewise.
3113 * linux-low.c (disable_regset): Likewise.
3114 (fetch_register): Likewise.
3115 (store_register): Likewise.
3116 (get_dynamic): Likewise.
3117 (linux_qxfer_libraries_svr4): Likewise.
3118 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3119 (set_fast_tracepoint_jump): Likewise.
3120 (uninsert_fast_tracepoint_jumps_at): Likewise.
3121 (reinsert_fast_tracepoint_jumps_at): Likewise.
3122 (validate_inserted_breakpoint): Likewise.
3123 (clone_agent_expr): Likewise.
3124 * regcache.c (init_register_cache): Likewise.
3125 * remote-utils.c (putpkt_binary_1): Likewise.
3126 (decode_M_packet): Likewise.
3127 (decode_X_packet): Likewise.
3128 (look_up_one_symbol): Likewise.
3129 (relocate_instruction): Likewise.
3130 (monitor_output): Likewise.
3131 * server.c (handle_search_memory): Likewise.
3132 (handle_qxfer_exec_file): Likewise.
3133 (handle_qxfer_libraries): Likewise.
3134 (handle_qxfer): Likewise.
3135 (handle_query): Likewise.
3136 (handle_v_cont): Likewise.
3137 (handle_v_run): Likewise.
3138 (captured_main): Likewise.
3139 * target.c (write_inferior_memory): Likewise.
3140 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3141 * tracepoint.c (init_trace_buffer): Likewise.
3142 (add_tracepoint_action): Likewise.
3143 (add_traceframe): Likewise.
3144 (add_traceframe_block): Likewise.
3145 (cmd_qtdpsrc): Likewise.
3146 (cmd_qtdv): Likewise.
3147 (cmd_qtstatus): Likewise.
3148 (response_source): Likewise.
3149 (response_tsv): Likewise.
3150 (cmd_qtnotes): Likewise.
3151 (gdb_collect): Likewise.
3152 (initialize_tracepoint): Likewise.
3153
3154 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3155
3156 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3157 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3158 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3159 <NOP>: New.
3160 (enum aarch64_condition_codes): New enum.
3161 (w0): New static global.
3162 (fp): Likewise.
3163 (lr): Likewise.
3164 (struct aarch64_memory_operand) <type>: New
3165 MEMORY_OPERAND_POSTINDEX type.
3166 (postindex_memory_operand): New helper function.
3167 (emit_ret): New function.
3168 (emit_load_store_pair): New function, factored out of emit_stp
3169 with support for MEMORY_OPERAND_POSTINDEX.
3170 (emit_stp): Rewrite using emit_load_store_pair.
3171 (emit_ldp): New function.
3172 (emit_load_store): Likewise.
3173 (emit_ldr): Mention post-index instruction in comment.
3174 (emit_ldrh): New function.
3175 (emit_ldrb): New function.
3176 (emit_ldrsw): Mention post-index instruction in comment.
3177 (emit_str): Likewise.
3178 (emit_subs): New function.
3179 (emit_cmp): Likewise.
3180 (emit_and): Likewise.
3181 (emit_orr): Likewise.
3182 (emit_orn): Likewise.
3183 (emit_eor): Likewise.
3184 (emit_mvn): Likewise.
3185 (emit_lslv): Likewise.
3186 (emit_lsrv): Likewise.
3187 (emit_asrv): Likewise.
3188 (emit_mul): Likewise.
3189 (emit_sbfm): Likewise.
3190 (emit_sbfx): Likewise.
3191 (emit_ubfm): Likewise.
3192 (emit_ubfx): Likewise.
3193 (emit_csinc): Likewise.
3194 (emit_cset): Likewise.
3195 (emit_nop): Likewise.
3196 (emit_ops_insns): New helper function.
3197 (emit_pop): Likewise.
3198 (emit_push): Likewise.
3199 (aarch64_emit_prologue): New function.
3200 (aarch64_emit_epilogue): Likewise.
3201 (aarch64_emit_add): Likewise.
3202 (aarch64_emit_sub): Likewise.
3203 (aarch64_emit_mul): Likewise.
3204 (aarch64_emit_lsh): Likewise.
3205 (aarch64_emit_rsh_signed): Likewise.
3206 (aarch64_emit_rsh_unsigned): Likewise.
3207 (aarch64_emit_ext): Likewise.
3208 (aarch64_emit_log_not): Likewise.
3209 (aarch64_emit_bit_and): Likewise.
3210 (aarch64_emit_bit_or): Likewise.
3211 (aarch64_emit_bit_xor): Likewise.
3212 (aarch64_emit_bit_not): Likewise.
3213 (aarch64_emit_equal): Likewise.
3214 (aarch64_emit_less_signed): Likewise.
3215 (aarch64_emit_less_unsigned): Likewise.
3216 (aarch64_emit_ref): Likewise.
3217 (aarch64_emit_if_goto): Likewise.
3218 (aarch64_emit_goto): Likewise.
3219 (aarch64_write_goto_address): Likewise.
3220 (aarch64_emit_const): Likewise.
3221 (aarch64_emit_call): Likewise.
3222 (aarch64_emit_reg): Likewise.
3223 (aarch64_emit_pop): Likewise.
3224 (aarch64_emit_stack_flush): Likewise.
3225 (aarch64_emit_zero_ext): Likewise.
3226 (aarch64_emit_swap): Likewise.
3227 (aarch64_emit_stack_adjust): Likewise.
3228 (aarch64_emit_int_call_1): Likewise.
3229 (aarch64_emit_void_call_2): Likewise.
3230 (aarch64_emit_eq_goto): Likewise.
3231 (aarch64_emit_ne_goto): Likewise.
3232 (aarch64_emit_lt_goto): Likewise.
3233 (aarch64_emit_le_goto): Likewise.
3234 (aarch64_emit_gt_goto): Likewise.
3235 (aarch64_emit_ge_got): Likewise.
3236 (aarch64_emit_ops_impl): New static global variable.
3237 (aarch64_emit_ops): New target function, return
3238 &aarch64_emit_ops_impl.
3239 (struct linux_target_ops): Install it.
3240
3241 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3242
3243 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3244 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3245 aarch64-ipa.o.
3246 * linux-aarch64-ipa.c: New file.
3247 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3248 and endian.h.
3249 (aarch64_get_thread_area): New target method.
3250 (extract_signed_bitfield): New helper function.
3251 (aarch64_decode_ldr_literal): New function.
3252 (enum aarch64_opcodes): New enum.
3253 (struct aarch64_register): New struct.
3254 (struct aarch64_operand): New struct.
3255 (x0): New static global.
3256 (x1): Likewise.
3257 (x2): Likewise.
3258 (x3): Likewise.
3259 (x4): Likewise.
3260 (w2): Likewise.
3261 (ip0): Likewise.
3262 (sp): Likewise.
3263 (xzr): Likewise.
3264 (aarch64_register): New helper function.
3265 (register_operand): Likewise.
3266 (immediate_operand): Likewise.
3267 (struct aarch64_memory_operand): New struct.
3268 (offset_memory_operand): New helper function.
3269 (preindex_memory_operand): Likewise.
3270 (enum aarch64_system_control_registers): New enum.
3271 (ENCODE): New macro.
3272 (emit_insn): New helper function.
3273 (emit_b): New function.
3274 (emit_bcond): Likewise.
3275 (emit_cb): Likewise.
3276 (emit_tb): Likewise.
3277 (emit_blr): Likewise.
3278 (emit_stp): Likewise.
3279 (emit_ldp_q_offset): Likewise.
3280 (emit_stp_q_offset): Likewise.
3281 (emit_load_store): Likewise.
3282 (emit_ldr): Likewise.
3283 (emit_ldrsw): Likewise.
3284 (emit_str): Likewise.
3285 (emit_ldaxr): Likewise.
3286 (emit_stxr): Likewise.
3287 (emit_stlr): Likewise.
3288 (emit_data_processing_reg): Likewise.
3289 (emit_data_processing): Likewise.
3290 (emit_add): Likewise.
3291 (emit_sub): Likewise.
3292 (emit_mov): Likewise.
3293 (emit_movk): Likewise.
3294 (emit_mov_addr): Likewise.
3295 (emit_mrs): Likewise.
3296 (emit_msr): Likewise.
3297 (emit_sevl): Likewise.
3298 (emit_wfe): Likewise.
3299 (append_insns): Likewise.
3300 (can_encode_int32_in): New helper function.
3301 (aarch64_relocate_instruction): New function.
3302 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3303 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3304 (struct linux_target_ops): Install aarch64_get_thread_area,
3305 aarch64_install_fast_tracepoint_jump_pad and
3306 aarch64_get_min_fast_tracepoint_insn_len.
3307
3308 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3309
3310 * Makefile.in (aarch64-insn.o): New rule.
3311 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3312
3313 2015-09-21 Yao Qi <yao.qi@linaro.org>
3314
3315 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3316
3317 2015-09-21 Yao Qi <yao.qi@linaro.org>
3318
3319 * tracepoint.c (max_jump_pad_size): Remove.
3320
3321 2015-09-18 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-aarch64-low.c: Don't include sys/uio.h.
3324 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3325
3326 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3327
3328 * tracepoint.c (eval_result_type): Change prototype.
3329 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3330
3331 2015-09-15 Pedro Alves <palves@redhat.com>
3332
3333 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3334 Check whether to report exec events instead of checking whether
3335 multiprocess is enabled.
3336
3337 2015-09-15 Pedro Alves <palves@redhat.com>
3338
3339 PR remote/18965
3340 * remote-utils.c (prepare_resume_reply): Merge
3341 TARGET_WAITKIND_VFORK_DONE switch case with the
3342 TARGET_WAITKIND_FORKED case.
3343
3344 2015-09-15 Yao Qi <yao.qi@linaro.org>
3345
3346 * server.c (handle_query): Check string comparison using
3347 "else if" instead of "if".
3348
3349 2015-09-15 Yao Qi <yao.qi@linaro.org>
3350
3351 * server.c (vCont_supported): New global variable.
3352 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3353 matches. Append ";vContSupported+" to own_buf.
3354 (handle_v_requests): Append ";s;S" to own_buf if target supports
3355 hardware single step or vCont_supported is false.
3356 (capture_main): Set vCont_supported to zero.
3357
3358 2015-09-15 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3361 it to ...
3362 (linux_supports_hardware_single_step): ... New function.
3363 (linux_target_ops): Update.
3364 * lynx-low.c (lynx_target_ops): Set field
3365 supports_hardware_single_step to target_can_do_hardware_single_step.
3366 * nto-low.c (nto_target_ops): Likewise.
3367 * spu-low.c (spu_target_ops): Likewise.
3368 * win32-low.c (win32_target_ops): Likewise.
3369 * target.c (target_can_do_hardware_single_step): New function.
3370 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3371 Remove. <supports_hardware_single_step>: New field.
3372 (target_supports_conditional_breakpoints): Remove.
3373 (target_supports_hardware_single_step): New macro.
3374 (target_can_do_hardware_single_step): Declare.
3375 * server.c (handle_query): Use target_supports_hardware_single_step
3376 instead of target_supports_conditional_breakpoints.
3377
3378 2015-09-15 Yao Qi <yao.qi@linaro.org>
3379
3380 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3381 function.
3382 (struct linux_target_ops the_low_target): Install
3383 aarch64_linux_siginfo_fixup.
3384
3385 2015-09-11 Don Breazeal <donb@codesourcery.com>
3386 Luis Machado <lgustavo@codesourcery.com>
3387
3388 * linux-low.c (linux_mourn): Static declaration.
3389 (linux_arch_setup): Move in front of
3390 handle_extended_wait.
3391 (linux_arch_setup_thread): New function.
3392 (handle_extended_wait): Handle exec events. Call
3393 linux_arch_setup_thread. Make event_lwp argument a
3394 pointer-to-a-pointer.
3395 (check_zombie_leaders): Do not check stopped threads.
3396 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3397 (linux_low_filter_event): Add lwp and thread for exec'ing
3398 non-leader thread if leader thread has been deleted.
3399 Refactor code into linux_arch_setup_thread and call it.
3400 Pass child lwp pointer by reference to handle_extended_wait.
3401 (linux_wait_for_event_filtered): Update comment.
3402 (linux_wait_1): Prevent clobbering exec event status.
3403 (linux_supports_exec_events): New function.
3404 (linux_target_ops) <supports_exec_events>: Initialize new member.
3405 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3406 new member.
3407 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3408 * server.c (report_exec_events): New global variable.
3409 (handle_query): Handle qSupported query for exec-events feature.
3410 (captured_main): Initialize report_exec_events.
3411 * server.h (report_exec_events): Declare new global variable.
3412 * target.h (struct target_ops) <supports_exec_events>: New
3413 member.
3414 (target_supports_exec_events): New macro.
3415 * win32-low.c (win32_target_ops) <supports_exec_events>:
3416 Initialize new member.
3417
3418 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3419
3420 * linux-low.c (linux_low_enable_btrace): Remove.
3421 (linux_target_ops): Replace linux_low_enable_btrace with
3422 linux_enable_btrace.
3423
3424 2015-09-03 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-aarch64-low.c (aarch64_insert_point): Call
3427 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3428 returns true.
3429
3430 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3431
3432 * linux-low.c (check_stopped_by_breakpoint): Use
3433 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3434
3435 2015-08-27 Pedro Alves <palves@redhat.com>
3436
3437 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3438
3439 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3440
3441 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3442 the XNEW-family equivalent.
3443 (compile_bytecodes): Likewise.
3444 * dll.c (loaded_dll): Likewise.
3445 * event-loop.c (append_callback_event): Likewise.
3446 (create_file_handler): Likewise.
3447 (create_file_event): Likewise.
3448 * hostio.c (handle_open): Likewise.
3449 * inferiors.c (add_thread): Likewise.
3450 (add_process): Likewise.
3451 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3452 * linux-arm-low.c (arm_new_process): Likewise.
3453 (arm_new_thread): Likewise.
3454 * linux-low.c (add_to_pid_list): Likewise.
3455 (linux_add_process): Likewise.
3456 (handle_extended_wait): Likewise.
3457 (add_lwp): Likewise.
3458 (enqueue_one_deferred_signal): Likewise.
3459 (enqueue_pending_signal): Likewise.
3460 (linux_resume_one_lwp_throw): Likewise.
3461 (linux_resume_one_thread): Likewise.
3462 (linux_read_memory): Likewise.
3463 (linux_write_memory): Likewise.
3464 * linux-mips-low.c (mips_linux_new_process): Likewise.
3465 (mips_linux_new_thread): Likewise.
3466 (mips_add_watchpoint): Likewise.
3467 * linux-x86-low.c (initialize_low_arch): Likewise.
3468 * lynx-low.c (lynx_add_process): Likewise.
3469 * mem-break.c (set_raw_breakpoint_at): Likewise.
3470 (set_breakpoint): Likewise.
3471 (add_condition_to_breakpoint): Likewise.
3472 (add_commands_to_breakpoint): Likewise.
3473 (clone_agent_expr): Likewise.
3474 (clone_one_breakpoint): Likewise.
3475 * regcache.c (new_register_cache): Likewise.
3476 * remote-utils.c (look_up_one_symbol): Likewise.
3477 * server.c (queue_stop_reply): Likewise.
3478 (start_inferior): Likewise.
3479 (queue_stop_reply_callback): Likewise.
3480 (handle_target_event): Likewise.
3481 * spu-low.c (fetch_ppc_memory): Likewise.
3482 (store_ppc_memory): Likewise.
3483 * target.c (set_target_ops): Likewise.
3484 * thread-db.c (thread_db_load_search): Likewise.
3485 (try_thread_db_load_1): Likewise.
3486 * tracepoint.c (add_tracepoint): Likewise.
3487 (add_tracepoint_action): Likewise.
3488 (create_trace_state_variable): Likewise.
3489 (cmd_qtdpsrc): Likewise.
3490 (cmd_qtro): Likewise.
3491 (add_while_stepping_state): Likewise.
3492 * win32-low.c (child_add_thread): Likewise.
3493 (get_image_name): Likewise.
3494
3495 2015-08-25 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3498
3499 2015-08-25 Yao Qi <yao.qi@linaro.org>
3500
3501 * Makefile.in (aarch64-linux.o): New rule.
3502 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3503 srv_tgtobj.
3504 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3505 (aarch64_init_debug_reg_state): Make it extern.
3506 (aarch64_linux_prepare_to_resume): Remove.
3507
3508 2015-08-25 Yao Qi <yao.qi@linaro.org>
3509
3510 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3511 lwp_arch_private_info and ptid_of_lwp.
3512
3513 2015-08-25 Yao Qi <yao.qi@linaro.org>
3514
3515 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3516 Find proc_info by find_process_pid. All callers updated.
3517
3518 2015-08-25 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3521 Remove.
3522 (debug_reg_change_callback): Remove.
3523 (aarch64_notify_debug_reg_change): Remove.
3524
3525 2015-08-25 Yao Qi <yao.qi@linaro.org>
3526
3527 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3528 Call current_lwp_ptid.
3529
3530 2015-08-25 Yao Qi <yao.qi@linaro.org>
3531
3532 * linux-aarch64-low.c (debug_reg_change_callback): Use
3533 debug_printf.
3534
3535 2015-08-25 Yao Qi <yao.qi@linaro.org>
3536
3537 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3538
3539 2015-08-25 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3542
3543 2015-08-25 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3546 the code.
3547
3548 2015-08-25 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3551 Remove.
3552 (debug_reg_change_callback): Remove argument entry and add argument
3553 lwp. Remove local variable thread. Don't print thread id in the
3554 debugging output. Don't check whether pid of thread equals to pid.
3555 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3556 iterate_over_lwps instead find_inferior.
3557
3558 2015-08-24 Pedro Alves <palves@redhat.com>
3559
3560 * inferiors.c (get_first_process): New function.
3561 * inferiors.h (get_first_process): New declaration.
3562 * remote-utils.c (read_ptid): Default to the first process in the
3563 list, instead of to the current thread's process.
3564
3565 2015-08-24 Pedro Alves <palves@redhat.com>
3566
3567 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3568 * event-loop.c: Likewise.
3569 * remote-utils.c: Likewise.
3570 * tracepoint.c: Likewise.
3571
3572 2015-08-24 Pedro Alves <palves@redhat.com>
3573
3574 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3575 ptid_get_lwp.
3576
3577 2015-08-21 Pedro Alves <palves@redhat.com>
3578
3579 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3580 instead of literal 1.
3581
3582 2015-08-21 Pedro Alves <palves@redhat.com>
3583
3584 * tdesc.c (default_description): Explicitly zero-initialize.
3585
3586 2015-08-21 Pedro Alves <palves@redhat.com>
3587
3588 PR gdb/18749
3589 * inferiors.c (remove_thread): Discard any pending stop reply for
3590 this thread.
3591 * server.c (remove_all_on_match_pid): Rename to ...
3592 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3593 instead of a pid.
3594 (discard_queued_stop_replies): Change parameter to a ptid. Now
3595 extern.
3596 (handle_v_kill, kill_inferior_callback, captured_main)
3597 (process_serial_event): Adjust.
3598 * server.h (discard_queued_stop_replies): Declare.
3599
3600 2015-08-21 Pedro Alves <palves@redhat.com>
3601
3602 * linux-low.c (wait_for_sigstop): Always switch to no thread
3603 selected if the previously current thread dies.
3604 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3605 process instead of the current thread's.
3606 * remote-utils.c (input_interrupt): Don't check if there's no
3607 current thread.
3608 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3609 current thread to the general thread fails, error out.
3610 (handle_qxfer_auxv, handle_qxfer_libraries)
3611 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3612 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3613 (handle_query): Check if there's a thread selected instead of
3614 checking whether there's any thread in the thread list.
3615 (handle_qxfer_threads, handle_qxfer_btrace)
3616 (handle_qxfer_btrace_conf): Don't error out early if there's no
3617 thread in the thread list.
3618 (handle_v_cont, myresume): Don't set the current thread to the
3619 continue thread.
3620 (process_serial_event) <Hg handling>: Also set thread_id if the
3621 previous general thread is still alive.
3622 (process_serial_event) <g/G handling>: If setting the current
3623 thread to the general thread fails, error out.
3624 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3625 thread's lwp instead of the current thread's.
3626 * target.c (set_desired_thread): If the desired thread was not
3627 found, leave the current thread pointing to NULL. Return an int
3628 (boolean) indicating success.
3629 * target.h (set_desired_thread): Change return type to int.
3630
3631 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3632
3633 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3634 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3635 #includes.
3636 (ps_get_thread_area): New function.
3637
3638 2015-08-19 Gary Benson <gbenson@redhat.com>
3639
3640 * hostio.c (handle_pread): Do not attempt to read more data
3641 than hostio_reply_with_data can fit in a packet.
3642
3643 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3644
3645 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3646
3647 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3648
3649 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3650
3651 2015-08-06 Pedro Alves <palves@redhat.com>
3652
3653 * tracepoint.c (expr_eval_result): Now an int.
3654
3655 2015-08-06 Pedro Alves <palves@redhat.com>
3656
3657 * gdbthread.h (struct regcache): Forward declare.
3658 (struct thread_info) <regcache_data>: Now a struct regcache
3659 pointer.
3660 * inferiors.c (inferior_regcache_data)
3661 (set_inferior_regcache_data): Now work with struct regcache
3662 pointers.
3663 * inferiors.h (struct regcache): Forward declare.
3664 (inferior_regcache_data, set_inferior_regcache_data): Now work
3665 with struct regcache pointers.
3666 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3667 (free_register_cache_thread): Remove struct regcache pointer
3668 casts.
3669
3670 2015-08-06 Pedro Alves <palves@redhat.com>
3671
3672 * server.c (captured_main): On error, print the exception message
3673 to stderr, and if run_once is set, throw a quit.
3674
3675 2015-08-06 Pedro Alves <palves@redhat.com>
3676
3677 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3678 the current thread.
3679
3680 2015-08-06 Pedro Alves <palves@redhat.com>
3681
3682 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3683 reading beyond the passed in buffer length.
3684
3685 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3686
3687 * tracepoint.c (symbol_list) <required>: Remove.
3688
3689 2015-08-06 Pedro Alves <palves@redhat.com>
3690
3691 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3692 count if stopping and suspending threads.
3693 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3694 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3695 (linux_detach): Complete an ongoing step-over.
3696 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3697 throughout.
3698 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3699 (linux_wait_1): If passing a signal to the inferior after
3700 finishing a step-over, unsuspend and re-resume all lwps. If we
3701 see a single-step event but the thread should be continuing, don't
3702 pass the trap to gdb.
3703 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3704 internal_error instead of gdb_assert.
3705 (enqueue_pending_signal): New function.
3706 (check_ptrace_stopped_lwp_gone): Add debug output.
3707 (start_step_over): Use internal_error instead of gdb_assert.
3708 (complete_ongoing_step_over): New function.
3709 (linux_resume_one_thread): Don't resume a suspended thread.
3710 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3711 it stepping.
3712
3713 2015-08-06 Pedro Alves <palves@redhat.com>
3714
3715 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3716 (linux_thread_alive): Use lwp_is_marked_dead.
3717 (extended_event_reported): Delete.
3718 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3719 instead of extended_event_reported.
3720 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3721 as well.
3722 (lwp_is_marked_dead): New function.
3723 (lwp_running): Use lwp_is_marked_dead.
3724 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3725 comment.
3726
3727 2015-08-06 Pedro Alves <palves@redhat.com>
3728
3729 * linux-low.c (linux_wait_1): Move fork event output out of the
3730 !report_to_gdb check. Pass event_child->waitstatus to
3731 target_waitstatus_to_string instead of ourstatus.
3732
3733 2015-08-04 Yao Qi <yao.qi@linaro.org>
3734
3735 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3736 if current_thread is 32 bit.
3737
3738 2015-08-04 Yao Qi <yao.qi@linaro.org>
3739
3740 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3741 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3742 * server.c (extended_protocol): Remove "static".
3743 * server.h (extended_protocol): Declare it.
3744
3745 2015-08-04 Yao Qi <yao.qi@linaro.org>
3746
3747 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3748 both aarch64 and aarch32.
3749 (aarch64_set_pc): Likewise.
3750
3751 2015-08-04 Yao Qi <yao.qi@linaro.org>
3752
3753 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3754 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3755 arm-with-neon.xml to srv_xmlfiles.
3756 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3757 (is_64bit_tdesc): New function.
3758 (aarch64_linux_read_description): New function.
3759 (aarch64_arch_setup): Call aarch64_linux_read_description.
3760 (regs_info): Rename to regs_info_aarch64.
3761 (aarch64_regs_info): Return right regs_info.
3762 (initialize_low_arch): Call initialize_low_arch_aarch32.
3763
3764 2015-08-04 Yao Qi <yao.qi@linaro.org>
3765
3766 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3767 * linux-aarch32-low.c: New file.
3768 * linux-aarch32-low.h: New file.
3769 * linux-arm-low.c (arm_fill_gregset): Move it to
3770 linux-aarch32-low.c.
3771 (arm_store_gregset): Likewise.
3772 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3773 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3774 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3775 (regs_info): Rename to regs_info_arm.
3776 (arm_regs_info): Return regs_info_aarch32 if
3777 have_ptrace_getregset is 1 and target description is
3778 arm_with_neon or arm_with_vfpv3.
3779 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3780 Call initialize_low_arch_aarch32 instead.
3781
3782 2015-08-04 Yao Qi <yao.qi@linaro.org>
3783
3784 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3785 * linux-low.c: ... here.
3786 * linux-low.h (have_ptrace_getregset): Declare it.
3787
3788 2015-08-04 Pedro Alves <palves@redhat.com>
3789
3790 * thread-db.c (struct thread_db): Use new typedefs.
3791 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3792 CHK calls.
3793 (disable_thread_event_reporting): Cast result of dlsym to
3794 destination function pointer type.
3795 (thread_db_mourn): Use td_ta_delete_ftype.
3796
3797 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3798
3799 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3800 arch variant.
3801 (CDX_BREAKPOINT): Define for R2.
3802 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3803 (the_low_target): Add comments.
3804
3805 2015-07-30 Yao Qi <yao.qi@linaro.org>
3806
3807 * linux-arm-low.c (arm_hwcap): Remove it.
3808 (arm_read_description): New local variable arm_hwcap. Don't
3809 set arm_hwcap to zero.
3810
3811 2015-07-30 Yao Qi <yao.qi@linaro.org>
3812
3813 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3814 Use regcache->tdesc instead.
3815 (arm_store_wmmxregset): Likewise.
3816 (arm_fill_vfpregset): Likewise.
3817 (arm_store_vfpregset): Likewise.
3818
3819 2015-07-30 Yao Qi <yao.qi@linaro.org>
3820
3821 * linux-arm-low.c: Include arch/arm.h.
3822 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3823 (arm_store_gregset): Likewise.
3824
3825 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3826
3827 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3828 ptrace's 4th parameter.
3829
3830 2015-07-27 Yao Qi <yao.qi@linaro.org>
3831
3832 * configure.srv (case aarch64*-*-linux*): Don't set
3833 srv_linux_usrregs.
3834
3835 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3836
3837 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3838 sys/ptrace.h.
3839 * linux-arm-low.c: Likewise.
3840 * linux-cris-low.c: Likewise.
3841 * linux-crisv32-low.c: Likewise.
3842 * linux-low.c: Likewise.
3843 * linux-m68k-low.c: Likewise.
3844 * linux-mips-low.c: Likewise.
3845 * linux-nios2-low.c: Likewise.
3846 * linux-s390-low.c: Likewise.
3847 * linux-sparc-low.c: Likewise.
3848 * linux-tic6x-low.c: Likewise.
3849 * linux-tile-low.c: Likewise.
3850 * linux-x86-low.c: Likewise.
3851
3852 2015-07-24 Pedro Alves <palves@redhat.com>
3853
3854 * config.in: Regenerate.
3855 * configure: Regenerate.
3856
3857 2015-07-24 Pedro Alves <palves@redhat.com>
3858
3859 * acinclude.m4: Include ../ptrace.m4.
3860 * configure.ac: Call GDB_AC_PTRACE.
3861 * config.in, configure: Regenerate.
3862
3863 2015-07-24 Yao Qi <yao.qi@linaro.org>
3864
3865 * linux-low.c (linux_create_inferior): Remove setting to
3866 proc->priv->new_inferior.
3867 (linux_attach): Likewise.
3868 (linux_low_filter_event): Likewise.
3869 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3870
3871 2015-07-24 Yao Qi <yao.qi@linaro.org>
3872
3873 * linux-low.c (linux_arch_setup): New function.
3874 (linux_low_filter_event): If proc->tdesc is NULL and
3875 proc->attached is true, call the_low_target.arch_setup.
3876 Otherwise, keep status pending, and return.
3877 (linux_resume_one_lwp_throw): Don't call get_pc if
3878 thread->while_stepping isn't NULL. Don't call
3879 get_thread_regcache if proc->tdesc is NULL.
3880 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3881 (linux_target_ops): Install arch_setup.
3882 * server.c (start_inferior): Call the_target->arch_setup.
3883 * target.h (struct target_ops) <arch_setup>: New field.
3884 (target_arch_setup): New marco.
3885 * lynx-low.c (lynx_target_ops): Update.
3886 * nto-low.c (nto_target_ops): Update.
3887 * spu-low.c (spu_target_ops): Update.
3888 * win32-low.c (win32_target_ops): Update.
3889
3890 2015-07-24 Yao Qi <yao.qi@linaro.org>
3891
3892 * linux-low.c (linux_add_process): Don't set
3893 proc->priv->new_inferior.
3894 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3895 (linux_attach): Likewise.
3896
3897 2015-07-24 Yao Qi <yao.qi@linaro.org>
3898
3899 * server.c (start_inferior): Code refactor.
3900
3901 2015-07-24 Yao Qi <yao.qi@linaro.org>
3902
3903 * server.c (process_serial_event): Set general_thread.
3904
3905 2015-07-21 Yao Qi <yao.qi@linaro.org>
3906
3907 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3908 aarch64_linux_get_debug_reg_capacity.
3909
3910 2015-07-17 Yao Qi <yao.qi@linaro.org>
3911
3912 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3913 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3914 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3915 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3916 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3917 (AARCH64_HWP_ALIGNMENT): Likewise.
3918 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3919 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3920 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3921 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3922 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3923 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3924 (struct aarch64_debug_reg_state): Likewise.
3925 (struct arch_lwp_info): Likewise.
3926 (aarch64_align_watchpoint): Likewise.
3927 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3928 (aarch64_watchpoint_length): Likewise.
3929 (aarch64_point_encode_ctrl_reg): Likewise
3930 (aarch64_point_is_aligned): Likewise.
3931 (aarch64_align_watchpoint): Likewise.
3932 (aarch64_linux_set_debug_regs):
3933 (aarch64_dr_state_insert_one_point): Likewise.
3934 (aarch64_dr_state_remove_one_point): Likewise.
3935 (aarch64_handle_breakpoint): Likewise.
3936 (aarch64_handle_aligned_watchpoint): Likewise.
3937 (aarch64_handle_unaligned_watchpoint): Likewise.
3938 (aarch64_handle_watchpoint): Likewise.
3939
3940 2015-07-17 Yao Qi <yao.qi@linaro.org>
3941
3942 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3943 and don't aarch64_get_debug_reg_state. All callers update.
3944 (aarch64_handle_aligned_watchpoint): Likewise.
3945 (aarch64_handle_unaligned_watchpoint): Likewise.
3946 (aarch64_handle_watchpoint): Likewise.
3947 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3948 (aarch64_remove_point): Likewise.
3949
3950 2015-07-17 Yao Qi <yao.qi@linaro.org>
3951
3952 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3953 debug_printf.
3954 (aarch64_handle_unaligned_watchpoint): Likewise.
3955
3956 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3957
3958 Revert the previous 3 commits:
3959 Move gdb_regex* to common/
3960 Move linux_find_memory_regions_full & co.
3961 gdbserver build-id attribute generator
3962
3963 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3964 Jan Kratochvil <jan.kratochvil@redhat.com>
3965
3966 gdbserver build-id attribute generator.
3967 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3968 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3969 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3970 (find_phdr): New.
3971 (get_dynamic): Use find_pdhr to traverse program headers.
3972 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3973 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3974 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3975 (get_hex_build_id): New.
3976 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3977 to reply XML document.
3978
3979 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3980 Jan Kratochvil <jan.kratochvil@redhat.com>
3981
3982 * target.c: Include target/target-utils.h and fcntl.h.
3983 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3984 (target_fileio_read_stralloc): New functions.
3985
3986 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3987
3988 * Makefile.in (OBS): Add gdb_regex.o.
3989 (gdb_regex.o): New.
3990 * config.in: Rebuilt.
3991 * configure: Rebuilt.
3992
3993 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3994 Jan Kratochvil <jan.kratochvil@redhat.com>
3995
3996 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3997 * Makefile.in (OBS): Add target-utils.o.
3998 (linux-maps.o, target-utils.o): New.
3999 * configure.srv (srv_linux_obj): Add linux-maps.o.
4000
4001 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4002
4003 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4004 function, return 1.
4005 (the_low_target): Install it.
4006
4007 2015-07-14 Pedro Alves <palves@redhat.com>
4008
4009 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4010 Instead, ignore ECHILD, and throw an error for other errnos.
4011
4012 2015-07-10 Pedro Alves <palves@redhat.com>
4013
4014 * event-loop.c (struct callback_event) <data>: Change type to
4015 gdb_client_data instance instead of gdb_client_data pointer.
4016 (append_callback_event): Adjust.
4017
4018 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4019
4020 * linux-aarch64-low.c: Add comments for each linux_target_ops
4021 method. Remove comments already covered in target_ops and
4022 linux_target_ops definitions.
4023 (the_low_target): Add comments for each unimplemented method.
4024
4025 2015-07-09 Yao Qi <yao.qi@linaro.org>
4026
4027 * linux-aarch64-low.c (aarch64_regmap): Remove.
4028 (aarch64_usrregs_info): Remove.
4029 (regs_info): Set field usrregs to NULL.
4030
4031 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4032
4033 * linux-low.c: Include "rsp-low.h"
4034 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4035 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4036 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4037 (handle_btrace_enable_pt): New.
4038 (handle_btrace_general_set): Support "pt".
4039 (handle_btrace_conf_general_set): Support "pt:size".
4040
4041 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4042
4043 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4044 Z_PACKET_SW_BP.
4045
4046 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4047
4048 * linux-aarch64-low.c: Remove comment about endianness.
4049 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4050 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4051 memcmp.
4052
4053 2015-06-24 Gary Benson <gbenson@redhat.com>
4054
4055 * linux-i386-ipa.c (stdint.h): Do not include.
4056 * lynx-i386-low.c (stdint.h): Likewise.
4057 * lynx-ppc-low.c (stdint.h): Likewise.
4058 * mem-break.c (stdint.h): Likewise.
4059 * thread-db.c (stdint.h): Likewise.
4060 * tracepoint.c (stdint.h): Likewise.
4061 * win32-low.c (stdint.h): Likewise.
4062
4063 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4064
4065 * server.c (write_qxfer_response): Update call to
4066 remote_escape_output.
4067
4068 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4069 Jan Kratochvil <jan.kratochvil@redhat.com>
4070
4071 Merge multiple hex conversions.
4072 * gdbreplay.c (tohex): Rename to 'fromhex'.
4073 (logchar): Use fromhex.
4074
4075 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4076
4077 * server.c (handle_qxfer_libraries): Set `version' attribute for
4078 <library-list>.
4079
4080 2015-06-10 Gary Benson <gbenson@redhat.com>
4081
4082 * target.h (struct target_ops) <multifs_open>: New field.
4083 <multifs_unlink>: Likewise.
4084 <multifs_readlink>: Likewise.
4085 * linux-low.c (nat/linux-namespaces.h): New include.
4086 (linux_target_ops): Initialize the_target->multifs_open,
4087 the_target->multifs_unlink and the_target->multifs_readlink.
4088 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4089 * hostio.c (hostio_fs_pid): New static variable.
4090 (hostio_handle_new_gdb_connection): New function.
4091 (handle_setfs): Likewise.
4092 (handle_open): Use the_target->multifs_open as appropriate.
4093 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4094 (handle_readlink): Use the_target->multifs_readlink as
4095 appropriate.
4096 (handle_vFile): Handle vFile:setfs packets.
4097 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4098 after target_handle_new_gdb_connection.
4099
4100 2015-06-10 Gary Benson <gbenson@redhat.com>
4101
4102 * configure.ac (AC_CHECK_FUNCS): Add setns.
4103 * config.in: Regenerate.
4104 * configure: Likewise.
4105 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4106 (linux-namespaces.o): New rule.
4107 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4108
4109 2015-06-09 Gary Benson <gbenson@redhat.com>
4110
4111 * hostio.c (handle_open): Process mode argument with
4112 fileio_to_host_mode.
4113
4114 2015-06-01 Yao Qi <yao.qi@linaro.org>
4115
4116 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4117 * linux-x86-low.c: Likewise.
4118
4119 2015-05-28 Don Breazeal <donb@codesourcery.com>
4120
4121 * linux-low.c (handle_extended_wait): Initialize
4122 thread_info.last_resume_kind for new fork children.
4123
4124 2015-05-15 Pedro Alves <palves@redhat.com>
4125
4126 * target.h (target_handle_new_gdb_connection): Rewrite using if
4127 wrapped in do/while.
4128
4129 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4130
4131 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4132 * configure, config.in: Regenerate.
4133 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4134 Declare typedef.
4135
4136 2015-05-12 Don Breazeal <donb@codesourcery.com>
4137
4138 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4139 PTRACE_EVENT_VFORK_DONE.
4140 (linux_low_ptrace_options, extended_event_reported): Add vfork
4141 events.
4142 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4143 and "vforkdone" for RSP 'T' Stop Reply Packet.
4144 * server.h (report_vfork_events): Declare
4145 global variable.
4146
4147 2015-05-12 Don Breazeal <donb@codesourcery.com>
4148
4149 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4150 (the_low_target) <new_fork>: Initialize new member.
4151 * linux-arm-low.c (arm_new_fork): New function.
4152 (the_low_target) <new_fork>: Initialize new member.
4153 * linux-low.c (handle_extended_wait): Call new target function
4154 new_fork.
4155 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4156 * linux-mips-low.c (mips_add_watchpoint): New function
4157 extracted from mips_insert_point.
4158 (the_low_target) <new_fork>: Initialize new member.
4159 (mips_linux_new_fork): New function.
4160 (mips_insert_point): Call mips_add_watchpoint.
4161 * linux-x86-low.c (x86_linux_new_fork): New function.
4162 (the_low_target) <new_fork>: Initialize new member.
4163
4164 2015-05-12 Don Breazeal <donb@codesourcery.com>
4165
4166 * linux-low.c (handle_extended_wait): Implement return value,
4167 rename argument 'event_child' to 'event_lwp', handle
4168 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4169 (linux_low_ptrace_options): New function.
4170 (linux_low_filter_event): Call linux_low_ptrace_options,
4171 use different argument fo linux_enable_event_reporting,
4172 use return value from handle_extended_wait.
4173 (extended_event_reported): New function.
4174 (linux_wait_1): Call extended_event_reported and set
4175 status to report fork events.
4176 (linux_write_memory): Add pid to debug message.
4177 (reset_lwp_ptrace_options_callback): New function.
4178 (linux_handle_new_gdb_connection): New function.
4179 (linux_target_ops): Initialize new structure member.
4180 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4181 * lynx-low.c: Initialize new structure member.
4182 * remote-utils.c (prepare_resume_reply): Implement stop reason
4183 "fork" for "T" stop message.
4184 * server.c (handle_query): Call handle_new_gdb_connection.
4185 * server.h (report_fork_events): Declare global flag.
4186 * target.h (struct target_ops) <handle_new_gdb_connection>:
4187 New member.
4188 (target_handle_new_gdb_connection): New macro.
4189 * win32-low.c: Initialize new structure member.
4190
4191 2015-05-12 Don Breazeal <donb@codesourcery.com>
4192
4193 * mem-break.c (APPEND_TO_LIST): Define macro.
4194 (clone_agent_expr): New function.
4195 (clone_one_breakpoint): New function.
4196 (clone_all_breakpoints): New function.
4197 * mem-break.h: Declare new functions.
4198
4199 2015-05-12 Don Breazeal <donb@codesourcery.com>
4200
4201 * linux-low.c (linux_supports_fork_events): New function.
4202 (linux_supports_vfork_events): New function.
4203 (linux_target_ops): Initialize new structure members.
4204 (initialize_low): Call linux_check_ptrace_features.
4205 * lynx-low.c (lynx_target_ops): Initialize new structure
4206 members.
4207 * server.c (report_fork_events, report_vfork_events):
4208 New global flags.
4209 (handle_query): Add new features to qSupported packet and
4210 response.
4211 (captured_main): Initialize new global variables.
4212 * target.h (struct target_ops) <supports_fork_events>:
4213 New member.
4214 <supports_vfork_events>: New member.
4215 (target_supports_fork_events): New macro.
4216 (target_supports_vfork_events): New macro.
4217 * win32-low.c (win32_target_ops): Initialize new structure
4218 members.
4219
4220 2015-05-12 Gary Benson <gbenson@redhat.com>
4221
4222 * server.c (handle_qxfer_exec_file): Use current process
4223 if annex is empty.
4224
4225 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4226
4227 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4228 Remove HAVE_PTRACE_GETREGS conditionals.
4229 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4230 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4231
4232 2015-05-08 Yao Qi <yao.qi@linaro.org>
4233
4234 * linux-low.c (linux_supports_conditional_breakpoints): New
4235 function.
4236 (linux_target_ops): Install new target method.
4237 * lynx-low.c (lynx_target_ops): Install NULL hook for
4238 supports_conditional_breakpoints.
4239 * nto-low.c (nto_target_ops): Likewise.
4240 * spu-low.c (spu_target_ops): Likewise.
4241 * win32-low.c (win32_target_ops): Likewise.
4242 * server.c (handle_query): Check
4243 target_supports_conditional_breakpoints.
4244 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4245 New field.
4246 (target_supports_conditional_breakpoints): New macro.
4247
4248 2015-05-06 Pedro Alves <palves@redhat.com>
4249
4250 PR server/18081
4251 * server.c (start_inferior): If the process exits, mourn it.
4252
4253 2015-04-21 Gary Benson <gbenson@redhat.com>
4254
4255 * hostio.c (fileio_open_flags_to_host): Factored out to
4256 fileio_to_host_openflags in common/fileio.c. Single use
4257 updated.
4258
4259 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4260
4261 * linux-xtensa-low.c (xtensa_fill_gregset)
4262 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4263 XCHAL_HAVE_LOOP.
4264
4265 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4266
4267 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4268 (regs_info): Replace usrregs pointer with NULL.
4269
4270 2015-04-17 Gary Benson <gbenson@redhat.com>
4271
4272 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4273 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4274 * server.c (handle_qxfer_exec_file): New function.
4275 (qxfer_packets): Add exec-file entry.
4276 (handle_query): Report qXfer:exec-file:read as supported packet.
4277
4278 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4279
4280 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4281
4282 2015-04-09 Gary Benson <gbenson@redhat.com>
4283
4284 * hostio-errno.c (errno_to_fileio_error): Remove function.
4285 Update caller to use remote_fileio_to_fio_error.
4286
4287 2015-04-09 Yao Qi <yao.qi@linaro.org>
4288
4289 * linux-low.c (linux_insert_point): Call
4290 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4291 (linux_remove_point): Call remove_memory_breakpoint if type is
4292 raw_bkpt_type_sw.
4293 * linux-x86-low.c (x86_insert_point): Don't call
4294 insert_memory_breakpoint.
4295 (x86_remove_point): Don't call remove_memory_breakpoint.
4296
4297 2015-04-01 Pedro Alves <palves@redhat.com>
4298 Cleber Rosa <crosa@redhat.com>
4299
4300 * server.c (gdbserver_usage): Reorganize and extend the usage
4301 message.
4302
4303 2015-03-24 Pedro Alves <palves@redhat.com>
4304
4305 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4306 output. Also dump TRAP_TRACE.
4307 (linux_low_filter_event): In debug output, distinguish a
4308 resume_stop SIGSTOP from a delayed SIGSTOP.
4309
4310 2015-03-24 Gary Benson <gbenson@redhat.com>
4311
4312 * linux-x86-low.c (x86_linux_new_thread): Moved to
4313 nat/x86-linux.c.
4314 (x86_linux_prepare_to_resume): Likewise.
4315
4316 2015-03-24 Gary Benson <gbenson@redhat.com>
4317
4318 * Makefile.in (x86-linux-dregs.o): New rule.
4319 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4320 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4321 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4322 (x86_linux_dr_get): Likewise.
4323 (x86_linux_dr_set): Likewise.
4324 (update_debug_registers_callback): Likewise.
4325 (x86_linux_dr_set_addr): Likewise.
4326 (x86_linux_dr_get_addr): Likewise.
4327 (x86_linux_dr_set_control): Likewise.
4328 (x86_linux_dr_get_control): Likewise.
4329 (x86_linux_dr_get_status): Likewise.
4330 (x86_linux_update_debug_registers): Likewise.
4331
4332 2015-03-24 Gary Benson <gbenson@redhat.com>
4333
4334 * linux-x86-low.c (x86_linux_update_debug_registers):
4335 New function, factored out from...
4336 (x86_linux_prepare_to_resume): ...this.
4337
4338 2015-03-24 Gary Benson <gbenson@redhat.com>
4339
4340 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4341 (x86_linux_dr_set): Likewise.
4342 (update_debug_registers_callback): Likewise.
4343 (x86_linux_dr_set_addr): Likewise.
4344 (x86_linux_dr_get_addr): Likewise.
4345 (x86_linux_dr_set_control): Likewise.
4346 (x86_linux_dr_get_control): Likewise.
4347 (x86_linux_dr_get_status): Likewise.
4348 (x86_linux_prepare_to_resume): Likewise.
4349
4350 2015-03-24 Gary Benson <gbenson@redhat.com>
4351
4352 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4353 Use perror_with_name. Pass string through gettext.
4354 (x86_linux_dr_set): Likewise.
4355
4356 2015-03-24 Gary Benson <gbenson@redhat.com>
4357
4358 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4359 (x86_linux_dr_set_addr): ...this.
4360 (x86_dr_low_get_addr): Rename to...
4361 (x86_linux_dr_get_addr): ...this.
4362 (x86_dr_low_set_control): Rename to...
4363 (x86_linux_dr_set_control): ...this.
4364 (x86_dr_low_get_control): Rename to...
4365 (x86_linux_dr_get_control): ...this.
4366 (x86_dr_low_get_status): Rename to...
4367 (x86_linux_dr_get_status): ...this.
4368 (x86_dr_low): Update with new function names.
4369
4370 2015-03-24 Gary Benson <gbenson@redhat.com>
4371
4372 * Makefile.in (x86-linux.o): New rule.
4373 * configure.srv: Add x86-linux.o to relevant targets.
4374 * linux-low.c (lwp_set_arch_private_info): New function.
4375 (lwp_arch_private_info): Likewise.
4376 * linux-x86-low.c: Include nat/x86-linux.h.
4377 (arch_lwp_info): Removed structure.
4378 (update_debug_registers_callback):
4379 Use lwp_set_debug_registers_changed.
4380 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4381 and lwp_set_debug_registers_changed.
4382 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4383
4384 2015-03-24 Gary Benson <gbenson@redhat.com>
4385
4386 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4387 * linux-arm-low.c (arm_new_thread): Likewise.
4388 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4389 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4390 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4391 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4392
4393 2015-03-24 Gary Benson <gbenson@redhat.com>
4394
4395 * linux-low.c (ptid_of_lwp): New function.
4396 (lwp_is_stopped): Likewise.
4397 (lwp_stop_reason): Likewise.
4398 * linux-x86-low.c (update_debug_registers_callback):
4399 Use lwp_is_stopped.
4400 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4401 lwp_stop_reason.
4402
4403 2015-03-24 Gary Benson <gbenson@redhat.com>
4404
4405 * linux-low.h (linux_stop_lwp): Remove declaration.
4406
4407 2015-03-24 Gary Benson <gbenson@redhat.com>
4408
4409 * linux-low.h: Include nat/linux-nat.h.
4410 * linux-low.c (iterate_over_lwps_args): New structure.
4411 (iterate_over_lwps_filter): New function.
4412 (iterate_over_lwps): Likewise.
4413 * linux-x86-low.c (update_debug_registers_callback):
4414 Update signature to what iterate_over_lwps expects.
4415 Remove PID check that iterate_over_lwps now performs.
4416 (x86_dr_low_set_addr): Use iterate_over_lwps.
4417 (x86_dr_low_set_control): Likewise.
4418
4419 2015-03-24 Gary Benson <gbenson@redhat.com>
4420
4421 * linux-x86-low.c (x86_debug_reg_state): New function.
4422 (x86_linux_prepare_to_resume): Use the above.
4423
4424 2015-03-24 Gary Benson <gbenson@redhat.com>
4425
4426 * linux-low.c (current_lwp_ptid): New function.
4427 * linux-x86-low.c: Include nat/linux-nat.h.
4428 (x86_dr_low_get_addr): Use current_lwp_ptid.
4429 (x86_dr_low_get_control): Likewise.
4430 (x86_dr_low_get_status): Likewise.
4431
4432 2015-03-20 Pedro Alves <palves@redhat.com>
4433
4434 * tracepoint.c (cmd_qtstatus): Make "str" const.
4435
4436 2015-03-20 Pedro Alves <palves@redhat.com>
4437
4438 * server.c (handle_general_set): Make "req_str" const.
4439
4440 2015-03-19 Pedro Alves <palves@redhat.com>
4441
4442 * linux-low.c (linux_resume_one_lwp): Rename to ...
4443 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4444 instead call perror_with_name.
4445 (check_ptrace_stopped_lwp_gone): New function.
4446 (linux_resume_one_lwp): Reimplement as wrapper around
4447 linux_resume_one_lwp_throw that swallows errors if the LWP is
4448 gone.
4449
4450 2015-03-19 Pedro Alves <palves@redhat.com>
4451
4452 * linux-low.c (count_events_callback, select_event_lwp_callback):
4453 No longer check whether the thread has resume_stop as last resume
4454 kind.
4455
4456 2015-03-19 Pedro Alves <palves@redhat.com>
4457
4458 * linux-low.c (count_events_callback, select_event_lwp_callback):
4459 Use the lwp's status_pending_p field, not the thread's.
4460
4461 2015-03-19 Pedro Alves <palves@redhat.com>
4462
4463 * linux-low.c (select_event_lwp_callback): Update comments to
4464 no longer mention SIGTRAP.
4465
4466 2015-03-18 Gary Benson <gbenson@redhat.com>
4467
4468 * server.c (handle_query): Do not report vFile:fstat as supported.
4469
4470 2015-03-11 Gary Benson <gbenson@redhat.com>
4471
4472 * hostio.c (sys/types.h): New include.
4473 (sys/stat.h): Likewise.
4474 (common-remote-fileio.h): Likewise.
4475 (handle_fstat): New function.
4476 (handle_vFile): Handle vFile:fstat packets.
4477
4478 2015-03-11 Gary Benson <gbenson@redhat.com>
4479
4480 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4481 struct stat.st_blocks and struct stat.st_blksize.
4482 * configure: Regenerate.
4483 * config.in: Likewise.
4484 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4485 (OBS): Add common-remote-fileio.o.
4486 (common-remote-fileio.o): New rule.
4487
4488 2015-03-09 Pedro Alves <palves@redhat.com>
4489
4490 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4491 'struct sockaddr' pointer in 'accept' call.
4492
4493 2015-03-09 Pedro Alves <palves@redhat.com>
4494
4495 Revert:
4496 2015-03-07 Pedro Alves <palves@redhat.com>
4497 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4498 or <winsock2.h> here. Instead include "gdb_socket.h".
4499 (remote_open): Use union gdb_sockaddr_u.
4500 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4501 or <winsock2.h> here. Instead include "gdb_socket.h".
4502 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4503 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4504 or <sys/un.h>.
4505 (init_named_socket, gdb_agent_helper_thread): Use union
4506 gdb_sockaddr_u.
4507
4508 2015-03-07 Pedro Alves <palves@redhat.com>
4509
4510 * configure.ac (build_warnings): Move
4511 -Wdeclaration-after-statement to the C-specific set.
4512 * configure: Regenerate.
4513
4514 2015-03-07 Pedro Alves <palves@redhat.com>
4515
4516 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4517 or <winsock2.h> here. Instead include "gdb_socket.h".
4518 (remote_open): Use union gdb_sockaddr_u.
4519 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4520 or <winsock2.h> here. Instead include "gdb_socket.h".
4521 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4522 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4523 or <sys/un.h>.
4524 (init_named_socket, gdb_agent_helper_thread): Use union
4525 gdb_sockaddr_u.
4526
4527 2015-03-07 Pedro Alves <palves@redhat.com>
4528
4529 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4530 instead.
4531
4532 2015-03-06 Yao Qi <yao.qi@linaro.org>
4533
4534 * linux-aarch64-low.c (aarch64_insert_point): Use
4535 show_debug_regs as a boolean.
4536 (aarch64_remove_point): Likewise.
4537
4538 2015-03-05 Pedro Alves <palves@redhat.com>
4539
4540 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4541 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4542 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4543 * nto-low.c (nto_target_ops): Likewise.
4544 * spu-low.c (spu_target_ops): Likewise.
4545 * win32-low.c (win32_target_ops): Likewise.
4546
4547 2015-03-04 Pedro Alves <palves@redhat.com>
4548
4549 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4550 Decide whether a breakpoint triggered based on the SIGTRAP's
4551 siginfo.si_code.
4552 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4553 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4554 (linux_low_filter_event): Check for breakpoints before checking
4555 watchpoints.
4556 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4557 siginfo.si_code.
4558 (linux_stopped_by_sw_breakpoint)
4559 (linux_supports_stopped_by_sw_breakpoint)
4560 (linux_stopped_by_hw_breakpoint)
4561 (linux_supports_stopped_by_hw_breakpoint): New functions.
4562 (linux_target_ops): Install new target methods.
4563
4564 2015-03-04 Pedro Alves <palves@redhat.com>
4565
4566 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4567 * server.c (swbreak_feature, hwbreak_feature): New globals.
4568 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4569 (captured_main): Clear swbreak_feature and hwbreak_feature.
4570 * server.h (swbreak_feature, hwbreak_feature): Declare.
4571 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4572 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4573 supports_stopped_by_hw_breakpoint>: New fields.
4574 (target_supports_stopped_by_sw_breakpoint)
4575 (target_stopped_by_sw_breakpoint)
4576 (target_supports_stopped_by_hw_breakpoint)
4577 (target_stopped_by_hw_breakpoint): Declare.
4578
4579 2015-03-04 Pedro Alves <palves@redhat.com>
4580
4581 enum lwp_stop_reason -> enum target_stop_reason
4582 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4583 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4584 (linux_wait_1, stuck_in_jump_pad_callback)
4585 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4586 (linux_stopped_by_watchpoint):
4587 * linux-low.h (enum lwp_stop_reason): Delete.
4588 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4589 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4590
4591 2015-03-04 Yao Qi <yao.qi@linaro.org>
4592
4593 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4594
4595 2015-03-03 Gary Benson <gbenson@redhat.com>
4596
4597 * hostio.c (handle_vFile): Fix prefix lengths.
4598
4599 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4600
4601 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4602 ptr_bits.
4603
4604 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4605
4606 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4607 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4608 (clean): Add "rm -f" for above C files.
4609 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4610 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4611 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4612 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4613 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4614 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4615 (init_registers_s390x_vx_linux64)
4616 (init_registers_s390x_tevx_linux64)
4617 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4618 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4619 declarations.
4620 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4621 (s390_store_vxrs_high): New functions.
4622 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4623 NT_S390_VXRS_HIGH.
4624 (s390_arch_setup): Add logic for selecting one of the new target
4625 descriptions. Activate the new vector regsets if applicable.
4626 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4627 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4628 and init_registers_s390x_tevx_linux64.
4629
4630 2015-03-01 Pedro Alves <palves@redhat.com>
4631
4632 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4633 parameter.
4634
4635 2015-02-27 Pedro Alves <palves@redhat.com>
4636
4637 * linux-x86-low.c (u_debugreg_offset): New function.
4638 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4639
4640 2015-02-27 Pedro Alves <palves@redhat.com>
4641
4642 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4643 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4644 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4645 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4646 (ps_lsetfpregs, ps_getpid)
4647 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4648 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4649 (ps_lsetxregs, ps_plog): Declare.
4650
4651 2015-02-27 Pedro Alves <palves@redhat.com>
4652
4653 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4654 IP_AGENT_EXPORT_FUNC.
4655 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4656 IP_AGENT_EXPORT_FUNC.
4657 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4658 (IP_AGENT_EXPORT): Delete.
4659 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4660 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4661 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4662 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4663 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4664 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4665 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4666 (traceframe_read_count, traceframe_write_count)
4667 (traceframes_created, trace_state_variables, get_raw_reg)
4668 (get_trace_state_variable_value, set_trace_state_variable_value)
4669 (ust_loaded, helper_thread_id, cmd_buf): Use
4670 IPA_SYM_EXPORTED_NAME.
4671 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4672 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4673 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4674 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4675 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4676 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4677 EXTERN_C_PUSH/EXTERN_C_POP.
4678 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4679 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4680 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4681 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4682 (traceframe_write_count, traceframe_read_count)
4683 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4684 (about_to_request_buffer_space, get_trace_state_variable_value)
4685 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4686 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4687 EXTERN_C_PUSH/EXTERN_C_POP.
4688 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4689 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4690 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4691 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4692 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4693 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4694 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4695 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4696 Define.
4697 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4698 (IP_AGENT_EXPORT_VAR_DECL): Define.
4699 (tracing): Declare.
4700 (gdb_agent_get_raw_reg): Declare.
4701
4702 2015-02-27 Tom Tromey <tromey@redhat.com>
4703 Pedro Alves <palves@redhat.com>
4704
4705 Rename symbols whose names are reserved C++ keywords throughout.
4706
4707 2015-02-27 Pedro Alves <palves@redhat.com>
4708
4709 * Makefile.in (COMPILER): New, get it from autoconf.
4710 (CXX): Get from autoconf instead.
4711 (COMPILE.pre): Use COMPILER.
4712 (CC-LD): Rename to ...
4713 (CC_LD): ... this. Use COMPILER.
4714 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4715 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4716 * acinclude.m4: Include build-with-cxx.m4.
4717 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4718 Disable -Werror by default if building in C++ mode.
4719 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4720 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4721 the C++ compiler. Save/restore CXXFLAGS too.
4722 * configure: Regenerate.
4723
4724 2015-02-27 Pedro Alves <palves@redhat.com>
4725
4726 * acinclude.m4: Include libiberty.m4.
4727 * configure.ac: Call libiberty_INIT.
4728 * config.in, configure: Regenerate.
4729
4730 2015-02-26 Pedro Alves <palves@redhat.com>
4731
4732 * linux-low.c (linux_wait_1): When incrementing the PC past a
4733 program breakpoint always use the_low_target.breakpoint_len as
4734 increment, rather than the maximum between that and
4735 the_low_target.decr_pc_after_break.
4736
4737 2015-02-23 Pedro Alves <palves@redhat.com>
4738
4739 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4740 thread was doing a step-over; always adjust the PC if
4741 we stepped over a permanent breakpoint.
4742 (linux_wait_1): If we stepped over breakpoint that was on top of a
4743 permanent breakpoint, manually advance the PC past it.
4744
4745 2015-02-23 Pedro Alves <palves@redhat.com>
4746
4747 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4748 modes.
4749 (x86_fill_gregset, x86_store_gregset): Use it when handling
4750 $orig_eax.
4751
4752 2015-02-20 Pedro Alves <palves@redhat.com>
4753
4754 * thread-db.c: Include "nat/linux-procfs.h".
4755 (thread_db_init): Skip listing new threads if the kernel supports
4756 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4757
4758 2015-02-20 Pedro Alves <palves@redhat.com>
4759
4760 * linux-low.c (status_pending_p_callback): Use ptid_match.
4761
4762 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4763
4764 PR breakpoints/16812
4765 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4766 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4767 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4768
4769 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4770
4771 PR breakpoints/15956
4772 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4773
4774 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4775
4776 * linux-low.c (linux_low_btrace_conf): Print size.
4777 * server.c (handle_btrace_conf_general_set): New.
4778 (hanle_general_set): Call handle_btrace_conf_general_set.
4779 (handle_query): Report Qbtrace-conf:bts:size as supported.
4780
4781 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4782
4783 * linux-low.c (linux_low_enable_btrace): Update parameters.
4784 (linux_low_btrace_conf): New.
4785 (linux_target_ops)<to_btrace_conf>: Initialize.
4786 * server.c (current_btrace_conf): New.
4787 (handle_btrace_enable): Rename to ...
4788 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4789 to target_enable_btrace. Update comment. Update users.
4790 (handle_qxfer_btrace_conf): New.
4791 (qxfer_packets): Add btrace-conf entry.
4792 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4793 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4794 (target_ops)<read_btrace_conf>: New.
4795 (target_enable_btrace): Update parameters.
4796 (target_read_btrace_conf): New.
4797
4798 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4799
4800 * server.c (handle_btrace_general_set): Remove call to
4801 target_supports_btrace.
4802 (supported_btrace_packets): New.
4803 (handle_query): Call supported_btrace_packets.
4804 * target.h: include btrace-common.h.
4805 (btrace_target_info): Removed.
4806 (supports_btrace, target_supports_btrace): Update parameters.
4807
4808 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4809
4810 * Makefile.in (SFILES): Add common/btrace-common.c.
4811 (OBS): Add common/btrace-common.o.
4812 (btrace-common.o): Add build rules.
4813 * linux-low: Include btrace-common.h.
4814 (linux_low_read_btrace): Use struct btrace_data. Call
4815 btrace_data_init and btrace_data_fini.
4816
4817 2015-02-06 Pedro Alves <palves@redhat.com>
4818
4819 * thread-db.c (find_new_threads_callback): Add debug output.
4820
4821 2015-02-04 Pedro Alves <palves@redhat.com>
4822
4823 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4824 (resume_stopped_resumed_lwps): New function.
4825 (linux_wait_for_event_filtered): Use it.
4826
4827 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4828
4829 * Makefile.in (SFILES): Add linux-personality.c.
4830 (linux-personality.o): New rule.
4831 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4832 list of objects to be built.
4833 * linux-low.c: Include nat/linux-personality.h.
4834 (linux_create_inferior): Remove code to disable address space
4835 randomization (moved to ../nat/linux-personality.c). Create
4836 cleanup to disable address space randomization.
4837
4838 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4839
4840 * Makefile.in (posix-strerror.o): New rule.
4841 (mingw-strerror.o): Likewise.
4842 * configure: Regenerated.
4843 * configure.ac: Source file ../common/common.host. Initialize new
4844 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4845
4846 2015-01-14 Yao Qi <yao@codesourcery.com>
4847
4848 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4849 (ppc-linux.o): New rule.
4850 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4851 * configure.ac: AC_CHECK_FUNCS(getauxval).
4852 * config.in: Re-generated.
4853 * configure: Re-generated.
4854 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4855 ppc64_64bit_inferior_p
4856
4857 2015-01-14 Yao Qi <yao@codesourcery.com>
4858
4859 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4860 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4861 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4862 (PT_ORIG_R3, PT_TRAP): Likewise.
4863 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4864 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4865 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4866
4867 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4868
4869 * i387-fp.c (i387_cache_to_xsave): In look over
4870 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4871 zmmh_low_space field by use of zmmh_high_space.
4872
4873 2015-01-09 Pedro Alves <palves@redhat.com>
4874
4875 * linux-low.c (step_over_bkpt): Move higher up in the file.
4876 (handle_extended_wait): Don't store the stop_pc here.
4877 (get_stop_pc): Adjust comments and rename to ...
4878 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4879 stopped for a software breakpoint or hardware breakpoint.
4880 (thread_still_has_status_pending_p): New function.
4881 (status_pending_p_callback): Use
4882 thread_still_has_status_pending_p. If the event is no longer
4883 interesting, resume the LWP.
4884 (handle_tracepoints): Add assert.
4885 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4886 (wstatus_maybe_breakpoint): New function.
4887 (cancel_breakpoint): Delete function.
4888 (check_stopped_by_watchpoint): New function, factored out from
4889 linux_low_filter_event.
4890 (lp_status_maybe_breakpoint): Delete function.
4891 (linux_low_filter_event): Remove filter_ptid argument.
4892 Leave thread group exits pending here. Store the LWP's stop PC.
4893 Always leave events pending.
4894 (linux_wait_for_event_filtered): Pull all events out of the
4895 kernel, and leave them all pending.
4896 (count_events_callback, select_event_lwp_callback): Consider all
4897 events.
4898 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4899 (select_event_lwp): Only give preference to the stepping LWP in
4900 all-stop mode. Adjust comments.
4901 (ignore_event): New function.
4902 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4903 references to cancel_breakpoints. Adjust to renames. Also give
4904 equal priority to all LWPs that have had events in non-stop mode.
4905 If reporting a software breakpoint event, unadjust the LWP's PC.
4906 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4907 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4908 Adjust.
4909 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4910 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4911 (linux_stopped_by_watchpoint): Adjust.
4912 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4913 * linux-low.h (enum lwp_stop_reason): New.
4914 (struct lwp_info) <stop_pc>: Adjust comment.
4915 <stopped_by_watchpoint>: Delete field.
4916 <stop_reason>: New field.
4917 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4918 * mem-break.c (software_breakpoint_inserted_here)
4919 (hardware_breakpoint_inserted_here): New function.
4920 * mem-break.h (software_breakpoint_inserted_here)
4921 (hardware_breakpoint_inserted_here): Declare.
4922 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4923 (cancel_breakpoints): Delete.
4924 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4925 (upload_fast_traceframes): Remove references to
4926 cancel_breakpoints.
4927
4928 2015-01-09 Pedro Alves <palves@redhat.com>
4929
4930 * thread-db.c (find_new_threads_callback): Ignore thread if the
4931 kernel thread ID is -1.
4932
4933 2015-01-09 Pedro Alves <palves@redhat.com>
4934
4935 * linux-low.c (linux_attach_fail_reason_string): Move to
4936 nat/linux-ptrace.c, and rename.
4937 (linux_attach_lwp): Update comment.
4938 (attach_proc_task_lwp_callback): New function.
4939 (linux_attach): Adjust to rename and use
4940 linux_proc_attach_tgid_threads.
4941 (linux_attach_fail_reason_string): Delete declaration.
4942
4943 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4944
4945 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4946 * server.c (gdbserver_version): Likewise.
4947
4948 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4949
4950 * remote-utils.c: Include ctype.h.
4951 (input_interrupt): Explicitly handle the case when the char
4952 received is the NUL byte. Improve the printing of non-ASCII
4953 characters.
4954
4955 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4956
4957 * linux-low.c (linux_low_filter_event): Update call to
4958 linux_enable_event_reporting following the addition of
4959 a new parameter to that function.
4960
4961 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4962
4963 PR server/17457
4964 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4965 (AARCH64_FPCR_REGNO): Likewise.
4966 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4967 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4968 (aarch64_store_fpregset): Likewise.
4969
4970 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4971
4972 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4973 Remove FIXME comment about assumption about N.
4974
4975 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4976
4977 * configure.ac: If large-file support is disabled in GDBserver,
4978 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4979 * configure: Regenerate.
4980
4981 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4982
4983 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4984 warning upon ENODATA from ptrace.
4985 * linux-s390-low.c (s390_store_tdb): New.
4986 (s390_regsets): Add regset for NT_S390_TDB.
4987
4988 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4989
4990 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4991 without a fill_function.
4992 * linux-s390-low.c (s390_fill_last_break): Remove.
4993 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4994 (s390_arch_setup): Use regset's size instead of fill_function for
4995 loop end condition.
4996
4997 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4998
4999 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5000 the regset's store function when ptrace returned an error.
5001 * regcache.c (get_thread_regcache): Invalidate register cache
5002 before fetching inferior's registers.
5003
5004 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5005
5006 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5007 while-loop as for-loop.
5008 (regsets_store_inferior_registers): Likewise.
5009
5010 2014-11-28 Yao Qi <yao@codesourcery.com>
5011
5012 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5013 * config.in, configure: Re-generate.
5014 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5015 is defined.
5016
5017 2014-11-21 Yao Qi <yao@codesourcery.com>
5018
5019 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5020 (AC_CHECK_HEADERS): Remove malloc.h.
5021 * configure: Re-generated.
5022 * config.in: Re-generated.
5023 * server.h: Don't include alloca.h and malloc.h.
5024 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5025 Don't include malloc.h.
5026
5027 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5028
5029 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5030 corresponding ERRNO check in same block.
5031
5032 2014-11-12 Pedro Alves <palves@redhat.com>
5033
5034 * server.c (cont_thread): Update comment.
5035 (start_inferior, attach_inferior): No longer clear cont_thread.
5036 (handle_v_cont): No longer set cont_thread.
5037 (captured_main): Clear cont_thread each time a GDB connects.
5038
5039 2014-11-12 Pedro Alves <palves@redhat.com>
5040
5041 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5042 thread, and don't resume all threads if the Hc thread has exited.
5043
5044 2014-11-12 Pedro Alves <palves@redhat.com>
5045
5046 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5047 the process group instead of to a specific LWP.
5048
5049 2014-10-15 Pedro Alves <palves@redhat.com>
5050
5051 PR server/17487
5052 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5053 parameter.
5054 (arm_set_thread_context): Delete.
5055 (the_low_target): Adjust.
5056 * win32-i386-low.c (debug_registers_changed)
5057 (debug_registers_used): Delete.
5058 (update_debug_registers_callback): New function.
5059 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5060 needing to update their debug registers.
5061 (win32_get_current_dr): New function.
5062 (x86_dr_low_get_addr, x86_dr_low_get_control)
5063 (x86_dr_low_get_status): Fetch the debug register from the thread
5064 record's context.
5065 (i386_initial_stuff): Adjust.
5066 (i386_get_thread_context): Remove current_event parameter. Don't
5067 clear debug_registers_changed nor copy DR values to
5068 debug_reg_state.
5069 (i386_set_thread_context): Delete.
5070 (i386_prepare_to_resume): New function.
5071 (i386_thread_added): Mark the thread as needing to update irs
5072 debug registers.
5073 (the_low_target): Remove i386_set_thread_context and install
5074 i386_prepare_to_resume.
5075 * win32-low.c (win32_get_thread_context): Adjust.
5076 (win32_set_thread_context): Use SetThreadContext
5077 directly.
5078 (win32_prepare_to_resume): New function.
5079 (win32_require_context): New function, factored out from ...
5080 (thread_rec): ... this.
5081 (continue_one_thread): Call win32_prepare_to_resume on each thread
5082 we're about to continue.
5083 (win32_resume): Call win32_prepare_to_resume on the event thread.
5084 * win32-low.h (struct win32_thread_info)
5085 <debug_registers_changed>: New field.
5086 (struct win32_target_ops): Change prototype of set_thread_context,
5087 delete set_thread_context and add prepare_to_resume.
5088 (win32_require_context): New declaration.
5089
5090 2014-10-08 Gary Benson <gbenson@redhat.com>
5091
5092 * server.h: Do not include common-exceptions.h.
5093
5094 2014-10-08 Gary Benson <gbenson@redhat.com>
5095
5096 * server.h: Do not include cleanups.h.
5097
5098 2014-09-30 James Hogan <james.hogan@imgtec.com>
5099
5100 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5101 mips64-dsp-linux.c.
5102
5103 2014-09-23 Yao Qi <yao@codesourcery.com>
5104
5105 * linux-low.c (lp_status_maybe_breakpoint): New function.
5106 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5107 (count_events_callback): Likewise.
5108 (select_event_lwp_callback): Likewise.
5109 (cancel_breakpoints_callback): Likewise.
5110
5111 2014-09-19 Don Breazeal <donb@codesourcery.com>
5112
5113 * linux-low.c (handle_extended_wait): Call
5114 linux_ptrace_get_extended_event.
5115 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5116 linux_is_extended_waitstatus.
5117
5118 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5119
5120 * Makefile.in (CPPFLAGS): Define.
5121 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5122 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5123
5124 2014-09-16 Gary Benson <gbenson@redhat.com>
5125
5126 * inferiors.h (current_inferior): Renamed as...
5127 (current_thread): New variable. All uses updated.
5128 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5129 (maybe_move_out_of_jump_pad): Likewise.
5130 (cancel_breakpoint): Likewise.
5131 (linux_low_filter_event): Likewise.
5132 (wait_for_sigstop): Likewise.
5133 (linux_resume_one_lwp): Likewise.
5134 (need_step_over_p): Likewise.
5135 (start_step_over): Likewise.
5136 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5137 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5138 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5139 and save_inferior as saved_thread.
5140 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5141 saved_thread.
5142 (regcache_invalidate_thread): Likewise.
5143 * remote-utils.c (prepare_resume_reply): Likewise.
5144 * thread-db.c (thread_db_get_tls_address): Likewise.
5145 (disable_thread_event_reporting): Likewise.
5146 (remove_thread_event_breakpoints): Likewise.
5147 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5148 as saved_thread.
5149 * target.h (set_desired_inferior): Renamed as...
5150 (set_desired_thread): New declaration. All uses updated.
5151 * server.c (myresume): Updated comment to reference thread instead
5152 of inferior.
5153 (handle_serial_event): Likewise.
5154 (handle_target_event): Likewise.
5155
5156 2014-09-12 Tom Tromey <tromey@redhat.com>
5157 Gary Benson <gbenson@redhat.com>
5158
5159 * regcache.h: Include common-regcache.h.
5160 (regcache_read_pc): Don't declare.
5161 * regcache.c (get_thread_regcache_for_ptid): New function.
5162
5163 2014-09-11 Tom Tromey <tromey@redhat.com>
5164 Gary Benson <gbenson@redhat.com>
5165
5166 * symbol.c: New file.
5167 * Makefile.in (SFILES): Add symbol.c.
5168 (OBS): Add symbol.o.
5169
5170 2014-09-11 Gary Benson <gbenson@redhat.com>
5171
5172 * target.c (target_stop_ptid, target_continue_ptid): New
5173 functions.
5174
5175 2014-09-11 Tom Tromey <tromey@redhat.com>
5176 Gary Benson <gbenson@redhat.com>
5177
5178 * target.h: Include target/target.h.
5179 * target.c (target_read_memory, target_read_uint32)
5180 (target_write_memory): New functions.
5181
5182 2014-09-11 Gary Benson <gbenson@redhat.com>
5183
5184 * server.h (debug_hw_points): Don't declare.
5185 * server.c (debug_hw_points): Don't define. Replace all uses
5186 with show_debug_regs.
5187 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5188 all uses with show_debug_regs.
5189
5190 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5191
5192 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5193 endianness into account.
5194 (ppc_supply_ptrace_register): Likewise.
5195
5196 2014-09-03 James Hogan <james.hogan@imgtec.com>
5197
5198 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5199 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5200
5201 2014-09-03 Gary Benson <gbenson@redhat.com>
5202
5203 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5204 ALL_DEBUG_ADDRESS_REGISTERS.
5205
5206 2014-09-02 Gary Benson <gbenson@redhat.com>
5207
5208 * i386-low.h: Renamed as...
5209 * x86-low.h: New file. All type, function and variable name
5210 prefixes changed from "i386_" to "x86_". All references updated.
5211 * i386-low.c: Renamed as...
5212 * x86-low.c: New file. All type, function and variable name
5213 prefixes changed from "i386_" to "x86_". All references updated.
5214
5215 2014-09-02 Gary Benson <gbenson@redhat.com>
5216
5217 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5218 (x86_linux_new_thread): Likewise.
5219
5220 2014-08-29 Gary Benson <gbenson@redhat.com>
5221
5222 * server.h (setjmp.h): Do not include.
5223 (toplevel): Do not declare.
5224 (common-exceptions.h): Include.
5225 (cleanups.h): Likewise.
5226 * server.c (toplevel): Do not define.
5227 (exit_code): New static global.
5228 (detach_or_kill_for_exit_cleanup): New function.
5229 (main): New function. Original main renamed to...
5230 (captured_main): New function.
5231 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5232
5233 2014-08-29 Gary Benson <gbenson@redhat.com>
5234
5235 * Makefile.in (SFILES): Add common/common-exceptions.c.
5236 (OBS): Add common-exceptions.o.
5237 (common-exceptions.o): New rule.
5238 * utils.c (prepare_to_throw_exception): New function.
5239
5240 2014-08-29 Gary Benson <gbenson@redhat.com>
5241
5242 * config.in: Regenerate.
5243 * configure: Likewise.
5244
5245 2014-08-29 Gary Benson <gbenson@redhat.com>
5246
5247 * Makefile.in (SFILES): Add common/cleanups.c.
5248 (OBS): cleanups.o.
5249 (cleanups.o): New rule.
5250
5251 2014-08-29 Gary Benson <gbenson@redhat.com>
5252
5253 * utils.c (internal_vwarning): New function.
5254
5255 2014-08-28 Gary Benson <gbenson@redhat.com>
5256
5257 * utils.h (fatal): Remove declaration.
5258 * utils.c (fatal): Remove function.
5259
5260 2014-08-28 Gary Benson <gbenson@redhat.com>
5261
5262 * tracepoint.c (gdb_agent_init): Replace fatal with
5263 perror_with_name.
5264 (initialize_tracepoint): Likewise.
5265
5266 2014-08-28 Gary Benson <gbenson@redhat.com>
5267
5268 * remote-utils.c (remote_prepare): Replace fatal with error.
5269
5270 2014-08-28 Gary Benson <gbenson@redhat.com>
5271
5272 * linux-low.c (linux_async): Replace fatal with warning.
5273 Tidy up and return.
5274 (linux_start_non_stop): Return -1 if linux_async failed.
5275
5276 2014-08-28 Gary Benson <gbenson@redhat.com>
5277
5278 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5279 gdb_assert.
5280 (i386_dr_low_get_addr): Remove vague comment.
5281 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5282 gdb_assert.
5283
5284 2014-08-28 Gary Benson <gbenson@redhat.com>
5285
5286 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5287 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5288 internal_error.
5289 (linux_resume_one_lwp): Likewise.
5290 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5291 gdb_assert.
5292 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5293 with internal_error.
5294 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5295 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5296 (find_register_by_name): Replace fatal with internal_error.
5297 (find_regno): Likewise.
5298 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5299 * thread-db.c (thread_db_create_event): Likewise.
5300 (thread_db_load_search): Likewise.
5301 (try_thread_db_load_1): Likewise.
5302 * tracepoint.c (get_jump_space_head): Replace fatal with
5303 internal_error.
5304 (claim_trampoline_space): Likewise.
5305 (have_fast_tracepoint_trampoline_buffer): Likewise.
5306 (cmd_qtstart): Likewise.
5307 (stop_tracing): Likewise.
5308 (fast_tracepoint_collecting): Likewise.
5309 (target_malloc): Likewise.
5310 (download_tracepoint): Likewise.
5311 (download_trace_state_variables): Replace check with gdb_assert.
5312 (upload_fast_traceframes): Replace fatal with internal_error.
5313
5314 2014-08-19 Tom Tromey <tromey@redhat.com>
5315 Gary Benson <gbenson@redhat.com>
5316
5317 * Makefile.in (SFILES): Add common/common-debug.c.
5318 (OBS): Add common-debug.o.
5319 (common-debug.o): New rule.
5320 * debug.h (debug_printf): Don't declare.
5321 * debug.c (debug_printf): Renamed and rewritten as...
5322 (debug_vprintf): New function.
5323
5324 2014-08-19 Gary Benson <gbenson@redhat.com>
5325
5326 * utils.h: Do not include print-utils.h.
5327
5328 2014-08-19 Tom Tromey <tromey@redhat.com>
5329 Gary Benson <gbenson@redhat.com>
5330
5331 * server.h: Add static assertion.
5332 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5333
5334 2014-08-19 Tom Tromey <tromey@redhat.com>
5335 Gary Benson <gbenson@redhat.com>
5336
5337 * Makefile.in (SFILES): Add common/errors.c.
5338 (OBS): Add errors.o.
5339 (IPA_OBS): Add errors-ipa.o.
5340 (errors.o): New rule.
5341 (errors-ipa.o): Likewise.
5342 * utils.h (perror_with_name, error, warning): Don't declare.
5343 * utils.c (warning): Renamed and rewritten as...
5344 (vwarning): New function.
5345 (error): Renamed and rewritten as...
5346 (verror): New function.
5347 (internal_error): Renamed and rewritten as...
5348 (internal_verror): New function.
5349
5350 2014-08-07 Gary Benson <gbenson@redhat.com>
5351
5352 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5353 * configure: Regenerate.
5354 * config.in: Likewise.
5355 * server.h: Do not include errno.h.
5356 * event-loop.c: Likewise.
5357 * hostio-errno.c: Likewise.
5358 * linux-low.c: Likewise.
5359 * remote-utils.c: Likewise.
5360 * spu-low.c: Likewise.
5361 * utils.c: Likewise.
5362 * gdbreplay.c: Unconditionally include errno.h.
5363
5364 2014-08-07 Gary Benson <gbenson@redhat.com>
5365
5366 * server.h: Do not include string.h.
5367 * event-loop.c: Likewise.
5368 * linux-low.c: Likewise.
5369 * regcache.c: Likewise.
5370 * remote-utils.c: Likewise.
5371 * spu-low.c: Likewise.
5372 * utils.c: Likewise.
5373
5374 2014-08-07 Gary Benson <gbenson@redhat.com>
5375
5376 * server.h: Do not include gdb_assert.h.
5377
5378 2014-08-07 Gary Benson <gbenson@redhat.com>
5379
5380 * server.h: Do not include common-utils.h.
5381
5382 2014-08-07 Gary Benson <gbenson@redhat.com>
5383
5384 * server.h: Do not include ptid.h.
5385 * notif.h: Likewise.
5386
5387 2014-08-07 Gary Benson <gbenson@redhat.com>
5388
5389 * server.h: Do not include gdb_locale.h.
5390
5391 2014-08-07 Gary Benson <gbenson@redhat.com>
5392
5393 * server.h: Do not include gdb/signals.h.
5394 * win32-low.c: Likewise.
5395
5396 2014-08-07 Gary Benson <gbenson@redhat.com>
5397
5398 * server.h: Do not include pathmax.h.
5399
5400 2014-08-07 Gary Benson <gbenson@redhat.com>
5401
5402 * server.h: Do not include libiberty.h.
5403 * linux-bfin-low.c: Likewise.
5404
5405 2014-08-07 Gary Benson <gbenson@redhat.com>
5406
5407 * server.h: Do not include ansidecl.h.
5408
5409 2014-08-07 Gary Benson <gbenson@redhat.com>
5410
5411 * linux-x86-low.c: Do not include stddef.h.
5412 * lynx-ppc-low.c: Likewise.
5413 * tracepoint.c: Likewise.
5414
5415 2014-08-07 Gary Benson <gbenson@redhat.com>
5416
5417 * server.h: Do not include stdarg.h.
5418 * nto-low.c: Likewise.
5419
5420 2014-08-07 Gary Benson <gbenson@redhat.com>
5421
5422 * server.h: Do not include stdlib.h.
5423 * inferiors.c: Likewise.
5424 * linux-low.c: Likewise.
5425 * regcache.c: Likewise.
5426 * spu-low.c: Likewise.
5427 * tracepoint.c: Likewise.
5428 * utils.c: Likewise.
5429
5430 2014-08-07 Gary Benson <gbenson@redhat.com>
5431
5432 * server.h: Do not include stdio.h.
5433 * linux-low.c: Likewise.
5434 * remote-utils.c: Likewise.
5435 * spu-low.c: Likewise.
5436 * utils.c: Likewise.
5437 * wincecompat.c: Likewise.
5438
5439 2014-08-06 Gary Benson <gbenson@redhat.com>
5440
5441 * regcache.c (init_register_cache): Move conditionals inside if.
5442
5443 2014-08-06 Gary Benson <gbenson@redhat.com>
5444
5445 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5446
5447 2014-07-31 Gary Benson <gbenson@redhat.com>
5448
5449 * ax.h: Do not include server.h.
5450 * gdbthread.h: Likewise.
5451 * lynx-low.h: Likewise.
5452 * notif.h: Likewise.
5453
5454 2014-07-30 Gary Benson <gbenson@redhat.com>
5455
5456 * server.h: Include common-defs.h.
5457 Do not include config.h or build-gnulib-gdbserver/config.h.
5458
5459 2014-07-30 Gary Benson <gbenson@redhat.com>
5460
5461 * hostio-errno.c: Move server.h to top of includes list.
5462 * inferiors.c: Likewise.
5463 * linux-x86-low.c: Likewise.
5464 * notif.c: Include server.h.
5465
5466 2014-07-24 Tom Tromey <tromey@redhat.com>
5467 Gary Benson <gbenson@redhat.com>
5468
5469 * server.h (CORE_ADDR): Now unsigned.
5470
5471 2014-07-16 Pedro Alves <palves@redhat.com>
5472
5473 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5474
5475 2014-07-15 Pedro Alves <palves@redhat.com>
5476
5477 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5478 copy.
5479
5480 2014-07-11 Pedro Alves <palves@redhat.com>
5481
5482 * linux-low.c (kill_wait_lwp): New function, based on
5483 kill_one_lwp_callback, but use my_waitpid directly.
5484 (kill_one_lwp_callback, linux_kill): Use it.
5485
5486 2014-06-23 Pedro Alves <palves@redhat.com>
5487
5488 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5489 before setting DR0..DR3.
5490
5491 2014-06-20 Gary Benson <gbenson@redhat.com>
5492
5493 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5494 * configure: Regenerated.
5495 * config.in: Likewise.
5496
5497 2014-06-20 Gary Benson <gbenson@redhat.com>
5498
5499 * Makefile.in (SFILES): Update locations for files moved
5500 from common to nat.
5501 (object file files): Reordered.
5502
5503 2014-06-20 Gary Benson <gbenson@redhat.com>
5504
5505 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5506 (i386_dr_low_set_addr): Likewise.
5507 (i386_dr_low_get_addr): Likewise.
5508 (i386_dr_low_can_set_control): Likewise.
5509 (i386_dr_low_set_control): Likewise.
5510 (i386_dr_low_get_control): Likewise.
5511 (i386_dr_low_get_status): Likewise.
5512 (i386_get_debug_register_length): Likewise.
5513 * linux-x86-low.c (i386_dr_low_set_addr):
5514 Changed signature. Made static.
5515 (i386_dr_low_get_addr): Likewise.
5516 (i386_dr_low_set_control): Likewise.
5517 (i386_dr_low_get_control): Likewise.
5518 (i386_dr_low_get_status): Likewise.
5519 (i386_dr_low): New global variable.
5520 * win32-i386-low.c (i386_dr_low_set_addr):
5521 Changed signature. Made static.
5522 (i386_dr_low_get_addr): Likewise.
5523 (i386_dr_low_set_control): Likewise.
5524 (i386_dr_low_get_control): Likewise.
5525 (i386_dr_low_get_status): Likewise.
5526 (i386_dr_low): New global variable.
5527
5528 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5529
5530 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5531 * Makefile.in (AR, AR_FLAGS): Define.
5532 * configure: Regenerate.
5533
5534 2014-06-19 Gary Benson <gbenson@redhat.com>
5535
5536 * Makefile.in (i386-dregs.o): New rule.
5537 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5538 * i386-low.c (target.h): Remove include.
5539 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5540 (DR_CONTROL_SHIFT): Likewise.
5541 (DR_CONTROL_SIZE): Likewise.
5542 (DR_RW_EXECUTE): Likewise.
5543 (DR_RW_WRITE): Likewise.
5544 (DR_RW_READ): Likewise.
5545 (DR_RW_IORW): Likewise.
5546 (DR_LEN_1): Likewise.
5547 (DR_LEN_2): Likewise.
5548 (DR_LEN_4): Likewise.
5549 (DR_LEN_8): Likewise.
5550 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5551 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5552 (DR_ENABLE_SIZE): Likewise.
5553 (DR_LOCAL_SLOWDOWN): Likewise.
5554 (DR_GLOBAL_SLOWDOWN): Likewise.
5555 (DR_CONTROL_RESERVED): Likewise.
5556 (I386_DR_CONTROL_MASK): Likewise.
5557 (I386_DR_VACANT): Likewise.
5558 (I386_DR_LOCAL_ENABLE): Likewise.
5559 (I386_DR_GLOBAL_ENABLE): Likewise.
5560 (I386_DR_DISABLE): Likewise.
5561 (I386_DR_SET_RW_LEN): Likewise.
5562 (I386_DR_GET_RW_LEN): Likewise.
5563 (I386_DR_WATCH_HIT): Likewise.
5564 (i386_wp_op_t): Likewise.
5565 (i386_show_dr): Likewise.
5566 (i386_length_and_rw_bits): Likewise.
5567 (i386_insert_aligned_watchpoint): Likewise.
5568 (i386_remove_aligned_watchpoint): Likewise.
5569 (i386_handle_nonaligned_watchpoint): Likewise.
5570 i386_update_inferior_debug_regs(): Likewise.
5571 (i386_dr_insert_watchpoint): Likewise.
5572 (i386_dr_remove_watchpoint): Likewise.
5573 (i386_dr_region_ok_for_watchpoint): Likewise.
5574 (i386_dr_stopped_data_address): Likewise.
5575 (i386_dr_stopped_by_watchpoint): Likewise.
5576
5577 2014-06-19 Gary Benson <gbenson@redhat.com>
5578
5579 * i386-low.c (i386_dr_show): Renamed to
5580 i386_show_dr and made static. All uses updated.
5581 (i386_dr_length_and_rw_bits): Renamed to
5582 i386_length_and_rw_bits and made static.
5583 All uses updated.
5584 (i386_dr_insert_aligned_watchpoint): Renamed to
5585 i386_insert_aligned_watchpoint and made static.
5586 All uses updated.
5587 (i386_dr_remove_aligned_watchpoint): Renamed to
5588 i386_remove_aligned_watchpoint and made static.
5589 All uses updated.
5590 (i386_dr_update_inferior_debug_regs): Renamed to
5591 i386_update_inferior_debug_regs and made static.
5592 All uses updated.
5593
5594 2014-06-18 Gary Benson <gbenson@redhat.com>
5595
5596 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5597 (i386_dr_low_can_set_control): Likewise.
5598 (i386_get_debug_register_length): Likewise.
5599 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5600 (i386_dr_low_can_set_control): Likewise.
5601 (i386_get_debug_register_length): Likewise.
5602
5603 2014-06-17 Gary Benson <gbenson@redhat.com>
5604
5605 * i386-low.h (i386-dregs.h): New include.
5606 (DR_FIRSTADDR): Now in i386-dregs.h.
5607 (DR_LASTADDR): Likewise.
5608 (DR_NADDR): Likewise.
5609 (DR_STATUS): Likewise.
5610 (DR_CONTROL): Likewise.
5611 (i386_debug_reg_state): Likewise.
5612 (i386_dr_insert_watchpoint): Likewise.
5613 (i386_dr_remove_watchpoint): Likewise.
5614 (i386_dr_region_ok_for_watchpoint): Likewise.
5615 (i386_dr_stopped_data_address): Likewise.
5616 (i386_dr_stopped_by_watchpoint): Likewise.
5617 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5618
5619 2014-06-18 Gary Benson <gbenson@redhat.com>
5620
5621 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5622 i386_dr_insert_watchpoint.
5623 (i386_low_remove_watchpoint): Renamed to
5624 i386_dr_remove_watchpoint.
5625 (i386_low_region_ok_for_watchpoint): Renamed to
5626 i386_dr_region_ok_for_watchpoint.
5627 (i386_low_stopped_data_address): Renamed to
5628 i386_dr_stopped_data_address.
5629 (i386_low_stopped_by_watchpoint): Renamed to
5630 i386_dr_stopped_by_watchpoint.
5631 * i386-low.c (i386_show_dr): Renamed to
5632 i386_dr_show and made nonstatic. All uses updated.
5633 (i386_length_and_rw_bits): Renamed to
5634 i386_dr_length_and_rw_bits and made nonstatic.
5635 All uses updated.
5636 (i386_insert_aligned_watchpoint): Renamed to
5637 i386_dr_insert_aligned_watchpoint and made nonstatic.
5638 All uses updated.
5639 (i386_remove_aligned_watchpoint): Renamed to
5640 i386_dr_remove_aligned_watchpoint and made nonstatic.
5641 All uses updated.
5642 (i386_update_inferior_debug_regs): Renamed to
5643 i386_dr_update_inferior_debug_regs and made nonstatic.
5644 All uses updated.
5645 (i386_low_insert_watchpoint): Renamed to
5646 i386_dr_insert_watchpoint. All uses updated.
5647 (i386_low_remove_watchpoint): Renamed to
5648 i386_dr_remove_watchpoint. All uses updated.
5649 (i386_low_region_ok_for_watchpoint): Renamed to
5650 i386_dr_region_ok_for_watchpoint. All uses updated.
5651 (i386_low_stopped_data_address): Renamed to
5652 i386_dr_stopped_data_address. All uses updated.
5653 (i386_low_stopped_by_watchpoint): Renamed to
5654 i386_dr_stopped_by_watchpoint. All uses updated.
5655
5656 2014-06-18 Gary Benson <gbenson@redhat.com>
5657
5658 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5659 (i386_dr_low_can_set_control): Likewise.
5660 (i386_insert_aligned_watchpoint): New check.
5661
5662 2014-06-18 Gary Benson <gbenson@redhat.com>
5663
5664 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5665 Renamed to state.
5666
5667 2014-06-18 Gary Benson <gbenson@redhat.com>
5668
5669 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5670 instead of fatal and error.
5671 (i386_handle_nonaligned_watchpoint): Likewise.
5672
5673 2014-06-18 Gary Benson <gbenson@redhat.com>
5674
5675 * i386-low.c (i386_get_debug_register_length): New macro.
5676 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5677 (i386_show_dr): Use debug_printf instead of fprintf. Use
5678 phex to format values.
5679
5680 2014-06-18 Gary Benson <gbenson@redhat.com>
5681
5682 * i386-low.h: Comment changes.
5683 * i386-low.c: Likewise.
5684
5685 2014-06-18 Gary Benson <gbenson@redhat.com>
5686
5687 * i386-low.c: Whitespace changes.
5688
5689 2014-06-12 Tom Tromey <tromey@redhat.com>
5690
5691 * utils.c (freeargv): Remove.
5692
5693 2014-06-12 Tom Tromey <tromey@redhat.com>
5694
5695 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5696 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5697 (parse_debug_format_options): Likewise.
5698 (gdbserver_usage): Likewise.
5699 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5700 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5701 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5702 against libiberty.
5703 ($(LIBGNU)): Depend on libiberty.
5704 (all-lib): Recurse into all subdirs.
5705 (install-only): Invoke "install" target in subdirs.
5706 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5707 targets.
5708 * configure: Rebuild.
5709 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5710 for vasprintf, vsnprintf, or gettimeofday.
5711 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5712 srv_tgtobj.
5713
5714 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5715
5716 * development.sh: Delete.
5717 * Makefile.in (config.status): Adjust dependency on development.sh.
5718 * configure.ac: Adjust development.sh source call.
5719 * configure: Regenerate.
5720
5721 2014-06-02 Pedro Alves <palves@redhat.com>
5722
5723 * ax.c (gdb_free_agent_expr): New function.
5724 * ax.h (gdb_free_agent_expr): New declaration.
5725 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5726 list.
5727 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5728 static.
5729 (clear_breakpoint_conditions_and_commands): New function.
5730 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5731 (clear_breakpoint_conditions_and_commands): New declaration.
5732
5733 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5734
5735 * linux-aarch64-low.c (asm/ptrace.h): Include.
5736
5737 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5738
5739 Fix TLS access for -static -pthread.
5740 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5741 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5742 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5743
5744 2014-05-20 Pedro Alves <palves@redhat.com>
5745
5746 * linux-aarch64-low.c (aarch64_insert_point)
5747 (aarch64_remove_point): No longer check whether the type is
5748 supported here. Adjust to new interface.
5749 (the_low_target): Install aarch64_supports_z_point_type as
5750 supports_z_point_type method.
5751 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5752 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5753 instead of a Z packet char. Adjust.
5754 (arm_supports_z_point_type): New function.
5755 (arm_insert_point, arm_remove_point): Adjust to new interface.
5756 (the_low_target): Install arm_supports_z_point_type.
5757 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5758 (cris_insert_point, cris_remove_point): Adjust to new interface.
5759 Don't check whether the type is supported here.
5760 (the_low_target): Install cris_supports_z_point_type.
5761 * linux-low.c (linux_supports_z_point_type): New function.
5762 (linux_insert_point, linux_remove_point): Adjust to new interface.
5763 * linux-low.h (struct linux_target_ops) <insert_point,
5764 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5765 raw_breakpoint pointer parameter.
5766 <supports_z_point_type>: New method.
5767 * linux-mips-low.c (mips_supports_z_point_type): New function.
5768 (mips_insert_point, mips_remove_point): Adjust to new interface.
5769 Use mips_supports_z_point_type.
5770 (the_low_target): Install mips_supports_z_point_type.
5771 * linux-ppc-low.c (the_low_target): Install NULL as
5772 supports_z_point_type method.
5773 * linux-s390-low.c (the_low_target): Install NULL as
5774 supports_z_point_type method.
5775 * linux-sparc-low.c (the_low_target): Install NULL as
5776 supports_z_point_type method.
5777 * linux-x86-low.c (x86_supports_z_point_type): New function.
5778 (x86_insert_point): Adjust to new insert_point interface. Use
5779 insert_memory_breakpoint. Adjust to new
5780 i386_low_insert_watchpoint interface.
5781 (x86_remove_point): Adjust to remove_point interface. Use
5782 remove_memory_breakpoint. Adjust to new
5783 i386_low_remove_watchpoint interface.
5784 (the_low_target): Install x86_supports_z_point_type.
5785 * lynx-low.c (lynx_target_ops): Install NULL as
5786 supports_z_point_type callback.
5787 * nto-low.c (nto_supports_z_point_type): New.
5788 (nto_insert_point, nto_remove_point): Adjust to new interface.
5789 (nto_target_ops): Install nto_supports_z_point_type.
5790 * mem-break.c: Adjust intro comment.
5791 (struct raw_breakpoint) <raw_type, size>: New fields.
5792 <inserted>: Update comment.
5793 <shlib_disabled>: Delete field.
5794 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5795 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5796 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5797 (raw_bkpt_type_to_target_hw_bp_type): New function.
5798 (find_enabled_raw_code_breakpoint_at): New function.
5799 (find_raw_breakpoint_at): New type and size parameters. Use them.
5800 (insert_memory_breakpoint): New function, based off
5801 set_raw_breakpoint_at.
5802 (remove_memory_breakpoint): New function.
5803 (set_raw_breakpoint_at): Reimplement.
5804 (set_breakpoint): New, based on set_breakpoint_at.
5805 (set_breakpoint_at): Reimplement.
5806 (delete_raw_breakpoint): Go through the_target->remove_point
5807 instead of assuming memory breakpoints.
5808 (find_gdb_breakpoint_at): Delete.
5809 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5810 (find_gdb_breakpoint): New function.
5811 (set_gdb_breakpoint_at): Delete.
5812 (z_type_supported): New function.
5813 (set_gdb_breakpoint_1): New function, loosely based off
5814 set_gdb_breakpoint_at.
5815 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5816 (delete_gdb_breakpoint_at): Delete.
5817 (delete_gdb_breakpoint_1): New function, loosely based off
5818 delete_gdb_breakpoint_at.
5819 (delete_gdb_breakpoint): New function.
5820 (clear_gdb_breakpoint_conditions): Rename to ...
5821 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5822 breakpoint.
5823 (add_condition_to_breakpoint): Make static.
5824 (add_breakpoint_condition): Take a struct breakpoint pointer
5825 instead of an address. Adjust.
5826 (gdb_condition_true_at_breakpoint): Rename to ...
5827 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5828 z_type parameter.
5829 (gdb_condition_true_at_breakpoint): Reimplement.
5830 (add_breakpoint_commands): Take a struct breakpoint pointer
5831 instead of an address. Adjust.
5832 (gdb_no_commands_at_breakpoint): Rename to ...
5833 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5834 parameter. Return true if no breakpoint was found. Change debug
5835 output.
5836 (gdb_no_commands_at_breakpoint): Reimplement.
5837 (run_breakpoint_commands): Rename to ...
5838 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5839 and change return type to boolean.
5840 (run_breakpoint_commands): New function.
5841 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5842 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5843 breakpoint. Go through the_target->remove_point instead of
5844 assuming memory breakpoint.
5845 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5846 software and hardware breakpoints.
5847 (reinsert_raw_breakpoint): Go through the_target->insert_point
5848 instead of assuming memory breakpoint.
5849 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5850 software and hardware breakpoints.
5851 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5852 Check both software and hardware breakpoints.
5853 (validate_inserted_breakpoint): Assert the breakpoint is a
5854 software breakpoint. Set the inserted flag to -1 instead of
5855 setting shlib_disabled.
5856 (delete_disabled_breakpoints): Adjust.
5857 (validate_breakpoints): Only validate software breakpoints.
5858 Adjust to inserted flag change.
5859 (check_mem_read, check_mem_write): Skip breakpoint types other
5860 than software breakpoints. Adjust to inserted flag change.
5861 * mem-break.h (enum raw_bkpt_type): New enum.
5862 (raw_breakpoint, struct process_info): Forward declare.
5863 (Z_packet_to_target_hw_bp_type): Delete declaration.
5864 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5865 (set_gdb_breakpoint, delete_gdb_breakpoint)
5866 (clear_breakpoint_conditions): New declarations.
5867 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5868 (breakpoint_inserted_here): Update comment.
5869 (add_breakpoint_condition, add_breakpoint_commands): Replace
5870 address parameter with a breakpoint pointer parameter.
5871 (gdb_breakpoint_here): Update comment.
5872 (delete_gdb_breakpoint_at): Delete.
5873 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5874 * server.c (process_point_options): Take a struct breakpoint
5875 pointer instead of an address. Adjust.
5876 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5877 delete_gdb_breakpoint.
5878 * spu-low.c (spu_target_ops): Install NULL as
5879 supports_z_point_type method.
5880 * target.h: Include mem-break.h.
5881 (struct target_ops) <prepare_to_access_memory>: Update comment.
5882 <supports_z_point_type>: New field.
5883 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5884 instead of a char. Also take a raw breakpoint pointer.
5885 * win32-arm-low.c (the_low_target): Install NULL as
5886 supports_z_point_type.
5887 * win32-i386-low.c (i386_supports_z_point_type): New function.
5888 (i386_insert_point, i386_remove_point): Adjust to new interface.
5889 (the_low_target): Install i386_supports_z_point_type.
5890 * win32-low.c (win32_supports_z_point_type): New function.
5891 (win32_insert_point, win32_remove_point): Adjust to new interface.
5892 (win32_target_ops): Install win32_supports_z_point_type.
5893 * win32-low.h (struct win32_target_ops):
5894 <supports_z_point_type>: New method.
5895 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5896 instead of a char. Also take a raw breakpoint pointer.
5897
5898 2014-05-20 Pedro Alves <palves@redhat.com>
5899
5900 * mem-break.h: Include break-common.h.
5901 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5902 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5903 (Z_packet_to_target_hw_bp_type): New declaration.
5904 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5905 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5906 (Z_PACKET_ACCESS_WP): Delete macros.
5907 (Z_packet_to_hw_type): Delete function.
5908 * i386-low.h: Don't include break-common.h here.
5909 (Z_packet_to_hw_type): Delete declaration.
5910 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5911 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5912 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5913 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5914 * linux-aarch64-low.c: Don't include break-common.h here.
5915 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5916 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5917 (Z_packet_to_target_hw_bp_type): Delete function.
5918 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5919 function.
5920 (mips_insert_point, mips_remove_point): Use
5921 Z_packet_to_target_hw_bp_type.
5922
5923 2014-05-20 Pedro Alves <palves@redhat.com>
5924
5925 * linux-aarch64-low.c: Include break-common.h.
5926 (enum target_point_type): Delete.
5927 (Z_packet_to_point_type): Rename to ...
5928 (Z_packet_to_target_hw_bp_type): ... this, and return a
5929 target_hw_bp_type instead.
5930 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5931 instead of an enum target_point_type.
5932 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5933 breakpoint type.
5934 (aarch64_dr_state_insert_one_point)
5935 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5936 (aarch64_handle_aligned_watchpoint)
5937 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5938 Take an enum target_hw_bp_type instead of an enum
5939 target_point_type.
5940 (aarch64_supports_z_point_type): New function.
5941 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5942 use Z_packet_to_target_hw_bp_type.
5943
5944 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5945
5946 * configure.ac: Only use -Werror by default when DEVELOPMENT
5947 is true.
5948 * configure: Regenerate.
5949
5950 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5951
5952 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5953 * linux-x86-low.c (X86_64_USER_REGS): New.
5954 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5955
5956 2014-04-28 Yao Qi <yao@codesourcery.com>
5957
5958 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5959 name.
5960
5961 2014-04-25 Pedro Alves <palves@redhat.com>
5962
5963 PR server/16255
5964 * linux-low.c (linux_attach_fail_reason_string): New function.
5965 (linux_attach_lwp): Delete.
5966 (linux_attach_lwp_1): Rename to ...
5967 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5968 argument. Remove "initial" parameter. Return int instead of
5969 void. Don't error or warn here.
5970 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5971 failure to attach to the tgid. Call warning when failing to
5972 attach to an lwp.
5973 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5974 argument. Remove "initial" parameter. Return int instead of
5975 void. Don't error or warn here.
5976 (linux_attach_fail_reason_string): New declaration.
5977 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5978 interface change. Use linux_attach_fail_reason_string.
5979
5980 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5981 Walfred Tedeschi <walfred.tedeschi@intel.com>
5982
5983 * Makefile.in: Added rules to handle new files
5984 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5985 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5986 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5987 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5988 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5989 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5990 x32-avx512-linux.o.
5991 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5992 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5993 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5994 i386/x32-avx512.xml.
5995 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5996 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5997 i386/x32-avx512-linux.xml.
5998 * i387-fp.c (num_avx512_k_registers): New constant for number
5999 of K registers.
6000 (num_avx512_zmmh_low_registers): New constant for number of
6001 lower ZMM registers (0-15).
6002 (num_avx512_zmmh_high_registers): New constant for number of
6003 higher ZMM registers (16-31).
6004 (num_avx512_ymmh_registers): New contant for number of higher
6005 YMM registers (ymm16-31 added by avx521 on x86_64).
6006 (num_avx512_xmm_registers): New constant for number of higher
6007 XMM registers (xmm16-31 added by AVX512 on x86_64).
6008 (struct i387_xsave): Add space for AVX512 registers.
6009 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6010 Add code to handle AVX512 registers.
6011 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6012 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6013 prototypei from generated file.
6014 (tdesc_amd64_avx512_linux): Likewise.
6015 (init_registers_x32_avx512_linux): Likewise.
6016 (tdesc_x32_avx512_linux): Likewise.
6017 (init_registers_i386_avx512_linux): Likewise.
6018 (tdesc_i386_avx512_linux): Likewise.
6019 (x86_64_regmap): Add AVX512 registers.
6020 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6021 mask.
6022 (initialize_low_arch): Add code to initialize AVX512 registers.
6023
6024 2014-04-23 Pedro Alves <palves@redhat.com>
6025
6026 * mem-break.c (find_gdb_breakpoint_at): Make static.
6027 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6028
6029 2014-04-23 Pedro Alves <palves@redhat.com>
6030
6031 * i386-low.c: Don't include break-common.h here.
6032 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6033 prototype to take target_hw_bp_type as argument instead of a Z
6034 packet char.
6035 * i386-low.h: Include break-common.h here.
6036 (Z_packet_to_hw_type): Declare.
6037 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6038 prototypes.
6039 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6040 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6041 (x86_remove_point): Convert the packet number to a
6042 target_hw_bp_type before calling i386_low_remove_watchpoint.
6043 * win32-i386-low.c (i386_insert_point): Convert the packet number
6044 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6045 (i386_remove_point): Convert the packet number to a
6046 target_hw_bp_type before calling i386_low_remove_watchpoint.
6047
6048 2014-04-23 Pedro Alves <palves@redhat.com>
6049
6050 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6051
6052 2014-04-10 Pedro Alves <palves@redhat.com>
6053
6054 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6055 Check if the condition or command is NULL before checking if the
6056 breakpoint is known. On success, return true.
6057 * mem-break.h (add_breakpoint_condition): Document return.
6058 (add_breakpoint_commands): Add describing comment.
6059 * server.c (skip_to_semicolon): New function.
6060 (process_point_options): Use it.
6061
6062 2014-04-09 Pedro Alves <palves@redhat.com>
6063
6064 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6065 to lwpid_of.
6066
6067 2014-02-27 Pedro Alves <palves@redhat.com>
6068
6069 PR 12702
6070 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6071 macros.
6072 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6073 output.
6074 (last_thread_of_process_p): Take a PID argument instead of a
6075 thread pointer.
6076 (linux_wait_for_lwp): Delete.
6077 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6078 functions.
6079 (linux_low_filter_event): New function, party factored out from
6080 linux_wait_for_event.
6081 (linux_wait_for_event): Rename to ...
6082 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6083 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6084 sigsuspend. Check for zombie leaders.
6085 (linux_wait_for_event): Reimplement as wrapper around
6086 linux_wait_for_event_filtered.
6087 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6088 a normal or signal exit is seen, it's the whole process exiting.
6089 (wait_for_sigstop): No longer a for_each_inferior callback.
6090 Rewrite on top of linux_wait_for_event_filtered.
6091 (stop_all_lwps): Call wait_for_sigstop directly.
6092 * server.c (resume, handle_target_event): Handle
6093 TARGET_WAITKIND_NO_RESUMED.
6094
6095 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6096
6097 * win32-low.c (psapi_get_dll_name,
6098 * win32_CreateToolhelp32Snapshot): Delete.
6099 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6100 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6101 Delete.
6102 (handle_load_dll): Add function description.
6103 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6104
6105 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6106
6107 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6108 Add comment.
6109 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6110 base address when calling win32_add_one_solib.
6111 (handle_load_dll): Delete local variable load_addr.
6112 Remove 0x1000 offset applied to DLL base address when calling
6113 win32_add_one_solib.
6114 (handle_unload_dll): Add comment.
6115
6116 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6117
6118 * win32-low.c (win32_add_all_dlls): Renames
6119 win32_ensure_ntdll_loaded. Rewrite function documentation.
6120 Adjust implementation to always load all DLLs.
6121 Add 0x1000 offset to DLL base address when calling
6122 win32_add_one_solib.
6123 (child_initialization_done): New static global.
6124 (do_initial_child_stuff): Set child_initialization_done to
6125 zero during child initialization, and 1 after. Replace call
6126 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6127 Add comment.
6128 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6129 (handle_unload_dll): Add function documentation.
6130 (get_child_debug_event): Ignore load and unload DLL events
6131 during child initialization.
6132
6133 2014-02-20 Doug Evans <dje@google.com>
6134
6135 Remove global all_lwps.
6136 * inferiors.h (ptid_of): Move here from linux-low.h.
6137 (pid_of, lwpid_of): Ditto.
6138 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6139 parameter is a struct thread_info * now.
6140 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6141 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6142 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6143 directly.
6144 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6145 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6146 * linux-arm-low.c (update_registers_callback): Update, "entry"
6147 parameter is a struct thread_info * now.
6148 Fetch lwpid from current_inferior directly.
6149 (arm_insert_point): Pass &all_threads to find_inferior instead of
6150 &all_lwps.
6151 (arm_remove_point): Ditto.
6152 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6153 (arm_prepare_to_resume): Fetch pid from thread.
6154 (arm_read_description): Fetch lwpid from current_inferior directly.
6155 * linux-low.c (all_lwps): Delete.
6156 (delete_lwp): Delete call to remove_inferior.
6157 (handle_extended_wait): Fetch lwpid from thread.
6158 (add_lwp): Don't set lwp->entry.id. Remove call to
6159 add_inferior_to_list.
6160 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6161 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6162 (kill_one_lwp_callback): Ditto.
6163 (linux_kill): Don't dereference NULL pointer.
6164 Fetch ptid,lwpid from thread.
6165 (get_detach_signal): Fetch ptid from thread.
6166 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6167 Simplify call to regcache_invalidate_thread.
6168 (delete_lwp_callback): Update, "entry" parameter is a
6169 struct thread_info * now. Fetch pid from thread.
6170 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6171 (status_pending_p_callback): Update, "entry" parameter is a
6172 struct thread_info * now. Fetch ptid from thread.
6173 (find_lwp_pid): Update, "entry" parameter is a
6174 struct thread_info * now.
6175 (linux_wait_for_lwp): Fetch pid from thread.
6176 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6177 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6178 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6179 (dequeue_one_deferred_signal): Ditto.
6180 (cancel_breakpoint): Fetch ptid from current_inferior.
6181 (linux_wait_for_event): Pass &all_threads to find_inferior,
6182 not &all_lwps. Fetch ptid, lwpid from thread.
6183 (count_events_callback): Update, "entry" parameter is a
6184 struct thread_info * now.
6185 (select_singlestep_lwp_callback): Ditto.
6186 (select_event_lwp_callback): Ditto.
6187 (cancel_breakpoints_callback): Ditto.
6188 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6189 not &all_lwps.
6190 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6191 (unsuspend_one_lwp): Update, "entry" parameter is a
6192 struct thread_info * now.
6193 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6194 not &all_lwps.
6195 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6196 Fetch lwpid from thread, not lwp.
6197 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6198 Pass &all_threads to find_inferior, not &all_lwps.
6199 (send_sigstop): Fetch lwpid from thread, not lwp.
6200 (send_sigstop_callback): Update, "entry" parameter is a
6201 struct thread_info * now.
6202 (suspend_and_send_sigstop_callback): Ditto.
6203 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6204 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6205 struct thread_info * now.
6206 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6207 from thread, lwp.
6208 (lwp_running): Update, "entry" parameter is a
6209 struct thread_info * now.
6210 (stop_all_lwps): Fetch ptid from thread.
6211 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6212 (linux_resume_one_lwp): Fetch lwpid from thread.
6213 (linux_set_resume_request): Update, "entry" parameter is a
6214 struct thread_info * now. Fetch pid, lwpid from thread.
6215 (resume_status_pending_p): Update, "entry" parameter is a
6216 struct thread_info * now.
6217 (need_step_over_p): Ditto. Fetch lwpid from thread.
6218 (start_step_over): Fetch lwpid from thread.
6219 (linux_resume_one_thread): Update, "entry" parameter is a
6220 struct thread_info * now. Fetch lwpid from thread.
6221 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6222 (proceed_one_lwp): Update, "entry" parameter is a
6223 struct thread_info * now. Fetch lwpid from thread.
6224 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6225 struct thread_info * now.
6226 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6227 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6228 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6229 directly.
6230 (regsets_store_inferior_registers): Ditto.
6231 (fetch_register, store_register): Ditto.
6232 (linux_read_memory, linux_write_memory): Ditto.
6233 (linux_request_interrupt): Ditto.
6234 (linux_read_auxv): Ditto.
6235 (linux_xfer_siginfo): Ditto.
6236 (linux_qxfer_spu): Ditto.
6237 (linux_qxfer_libraries_svr4): Ditto.
6238 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6239 moved to inferiors.h.
6240 (get_lwp): Delete.
6241 (get_thread_lwp): Update.
6242 (struct lwp_info): Delete member "entry". Simplify comment for
6243 member "thread".
6244 (all_lwps): Delete.
6245 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6246 current_inferior directly.
6247 (update_watch_registers_callback): Update, "entry" parameter is a
6248 struct thread_info * now. Fetch pid from thread.
6249 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6250 (mips_insert_point): Fetch lwpid from current_inferior.
6251 Pass &all_threads to find_inferior, not &all_lwps.
6252 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6253 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6254 directly.
6255 (mips_stopped_data_address): Ditto.
6256 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6257 directly.
6258 * linux-tile-low.c (tile_arch_setup): Ditto.
6259 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6260 (update_debug_registers_callback): Update, "entry" parameter is a
6261 struct thread_info * now. Fetch pid from thread.
6262 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6263 Pass &all_threads to find_inferior, not &all_lwps.
6264 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6265 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6266 Pass &all_threads to find_inferior, not &all_lwps.
6267 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6268 (i386_dr_low_get_status): Ditto.
6269 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6270 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6271 (x86_linux_read_description): Ditto.
6272 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6273
6274 2014-02-20 Doug Evans <dje@google.com>
6275
6276 * inferiors.c (get_first_inferior): Fix buglet.
6277
6278 2014-02-19 Doug Evans <dje@google.com>
6279
6280 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6281 * inferiors.c (add_thread): Change result type to struct thread_info *.
6282 All callers updated.
6283 (add_lwp): Call add_thread here instead of in callers.
6284 All callers updated.
6285 * linux-low.h (get_lwp_thread): Rewrite.
6286 (struct lwp_info): New member "thread".
6287
6288 2014-02-19 Doug Evans <dje@google.com>
6289
6290 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6291 All callers updated.
6292
6293 2014-02-19 Doug Evans <dje@google.com>
6294
6295 * inferiors.c (add_thread): Fix whitespace.
6296
6297 2014-02-19 Doug Evans <dje@google.com>
6298
6299 * dll.c (clear_dlls): Replace accessing list implemention details
6300 with API function.
6301 * gdbthread.h (get_first_thread): Declare.
6302 * inferiors.c (for_each_inferior_with_data): New function.
6303 (get_first_thread): New function.
6304 (find_thread_ptid): Simplify.
6305 (get_first_inferior): New function.
6306 (clear_list): Delete.
6307 (one_inferior_p): New function.
6308 (clear_inferior_list): New function.
6309 (clear_inferiors): Update.
6310 * inferiors.h (for_each_inferior_with_data): Declare.
6311 (clear_inferior_list): Declare.
6312 (one_inferior_p): Declare.
6313 (get_first_inferior): Declare.
6314 * linux-low.c (linux_wait_for_event): Replace accessing list
6315 implemention details with API function.
6316 * server.c (target_running): Ditto.
6317 (accumulate_file_name_length): New function.
6318 (emit_dll_description): New function.
6319 (handle_qxfer_libraries): Replace accessing list implemention
6320 details with API function.
6321 (handle_qxfer_threads_worker): New function.
6322 (handle_qxfer_threads_proper): Replace accessing list implemention
6323 details with API function.
6324 (handle_query): Ditto.
6325 (visit_actioned_threads_callback_ftype): New typedef.
6326 (visit_actioned_threads_data): New struct.
6327 (visit_actioned_threads): Rewrite to be find_inferior callback.
6328 (resume): Call find_inferior.
6329 (handle_status): Replace accessing list implemention
6330 details with API function.
6331 (process_serial_event): Replace accessing list implemention details
6332 with API function.
6333 * target.c (set_desired_inferior): Replace accessing list implemention
6334 details with API function.
6335 * tracepoint.c (same_process_p): New function.
6336 (gdb_agent_about_to_close): Replace accessing list implemention
6337 details with API function.
6338 * win32-low.c (child_delete_thread): Replace accessing list
6339 implemention details with API function.
6340 (match_dll_by_basename): New function.
6341 (dll_is_loaded_by_basename): New function.
6342 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6343 details call to dll_is_loaded_by_basename.
6344
6345 2014-02-19 Doug Evans <dje@google.com>
6346
6347 * dll.h (struct dll_info): Add comment.
6348 * gdbthread.h (struct thread_info): Add comment.
6349 (current_ptid): Simplify.
6350 * inferiors.c (add_process): Update.
6351 (remove_process): Update.
6352 * inferiors.h (struct process_info): Rename member "head" to "entry".
6353 * linux-low.c (delete_lwp): Update.
6354 (add_lwp): Update.
6355 (last_thread_of_process_p): Update.
6356 (kill_one_lwp_callback, linux_kill): Update.
6357 (status_pending_p_callback): Update.
6358 (wait_for_sigstop): Update. Simplify read of ptid.
6359 (start_step_over): Update.
6360 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6361 (get_lwp_thread): Update.
6362 (struct lwp_info): Rename member "head" to "entry".
6363 * regcache.h (inferior_list_entry): Delete.
6364 * server.c (kill_inferior_callback): Update.
6365 (detach_or_kill_inferior_callback): Update.
6366 (print_started_pid): Update.
6367 (print_attached_pid): Update.
6368 (process_serial_event): Simplify read of ptid.
6369 * thread-db.c (thread_db_create_event): Update.
6370 (thread_db_get_tls_address): Update.
6371 * win32-low.c (current_inferior_ptid): Simplify.
6372
6373 2014-02-19 Tom Tromey <tromey@redhat.com>
6374
6375 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6376 argument.
6377 (target_supports_btrace): Update.
6378
6379 2014-02-14 Yao Qi <yao@codesourcery.com>
6380
6381 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6382 (rsp-low-ipa.o): New target.
6383
6384 2014-02-12 Tom Tromey <tromey@redhat.com>
6385
6386 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6387 convert_ascii_to_int.
6388 * regcache.c (registers_to_string): Likewise.
6389 * remote-utils.c (decode_M_packet): Likewise.
6390 * server.c (process_serial_event): Likewise.
6391
6392 2014-02-12 Tom Tromey <tromey@redhat.com>
6393
6394 * server.c (handle_query, handle_v_run): Use hex2bin, not
6395 unhexify.
6396 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6397
6398 2014-02-12 Tom Tromey <tromey@redhat.com>
6399
6400 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6401 convert_int_to_ascii.
6402 * regcache.c (registers_to_string, collect_register_as_string):
6403 Likewise.
6404 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6405 Likewise.
6406 * server.c (process_serial_event): Likewise.
6407 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6408 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6409
6410 2014-02-12 Tom Tromey <tromey@redhat.com>
6411
6412 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6413 bin2hex, not hexify.
6414 * tracepoint.c (cmd_qtstatus): Likewise.
6415
6416 2014-02-12 Tom Tromey <tromey@redhat.com>
6417
6418 * remote-utils.c (monitor_output): Pass explicit length to
6419 hexify.
6420
6421 2014-02-12 Tom Tromey <tromey@redhat.com>
6422
6423 * tracepoint.c: Include rsp-low.h.
6424 * server.c: Include rsp-low.h.
6425 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6426 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6427 declare.
6428 * remote-utils.c: Include rsp-low.h.
6429 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6430 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6431 (convert_int_to_ascii, convert_ascii_to_int): Move to
6432 common/rsp-low.c.
6433 * regcache.c: Include rsp-low.h.
6434 * ax.c: Include rsp-low.h.
6435 * Makefile.in (SFILES): Add common/rsp-low.c.
6436 (OBS): Add rsp-low.o.
6437 (rsp-low.o): New target.
6438
6439 2014-02-12 Tom Tromey <tromey@redhat.com>
6440
6441 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6442 Include print-utils.h.
6443 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6444 (plongest, thirty_two, phex_nz): Remove.
6445 * Makefile.in (SFILES): Add common/print-utils.c.
6446 (OBS): Add print-utils.o.
6447 (print-utils-ipa.o): New target.
6448 (print-utils.o): New target.
6449 (IPA_OBJS): Add print-utils-ipa.o.
6450
6451 2014-02-06 Tom Tromey <tromey@redhat.com>
6452
6453 * Makefile.in (SFILES): Fix indentation.
6454
6455 2014-02-05 Doug Evans <dje@google.com>
6456
6457 * linux-low.c (linux_wait_for_event): Improve comment.
6458 (linux_wait_1): Keep current_inferior in sync with event_child.
6459
6460 2014-01-22 Doug Evans <dje@google.com>
6461
6462 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6463
6464 2014-01-22 Doug Evans <dje@google.com>
6465
6466 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6467 * configure: Regenerate.
6468 * config.in: Regenerate.
6469 * Makefile.in (SFILES): Add debug.c.
6470 (OBS): Add debug.o.
6471 * debug.c: New file.
6472 * debug.h: New file.
6473 * linux-aarch64-low.c (*): Update all debugging printfs to use
6474 debug_printf instead of fprintf.
6475 * linux-arm-low.c (*): Ditto.
6476 * linux-cris-low.c (*): Ditto.
6477 * linux-crisv32-low.c (*): Ditto.
6478 * linux-m32r-low.c (*): Ditto.
6479 * linux-sparc-low.c (*): Ditto.
6480 * linux-x86.c (*): Ditto.
6481 * linux-low.c (*): Ditto.
6482 (linux_wait_1): Add calls to debug_enter, debug_exit.
6483 (linux_wait): Remove redundant debugging printf.
6484 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6485 (linux_resume, unstop_all_lwps): Ditto.
6486 * mem-break.c (*): Update all debugging printfs to use
6487 debug_printf instead of fprintf.
6488 * remote-utils.c (*): Ditto.
6489 * thread-db.c (*): Ditto.
6490 * server.c #include <ctype.h>, "gdb_vecs.h".
6491 (debug_threads): Moved to debug.c.
6492 (*): Update all debugging printfs to use debug_printf instead of
6493 fprintf.
6494 (start_inferior): Replace call to fflush with call to debug_flush.
6495 (monitor_show_help): Mention set debug-format.
6496 (parse_debug_format_options): New function.
6497 (handle_monitor_command): Handle "monitor set debug-format".
6498 (gdbserver_usage): Mention --debug-format.
6499 (main): Parse --debug-format.
6500 * server.h (debug_threads): Declaration moved to debug.h.
6501 #include "debug.h".
6502 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6503 trace_debug_1 that uses debug_printf.
6504 (tracepoint_look_up_symbols): Update all debugging printfs to use
6505 debug_printf instead of fprintf.
6506
6507 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6508
6509 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6510 sys/ptrace.h.
6511
6512 2014-01-17 Pedro Alves <palves@redhat.com>
6513
6514 PR build/16445
6515 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6516 defined after including gdb_proc_service.h.
6517
6518 2014-01-16 Doug Evans <dje@google.com>
6519
6520 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6521 (match_dll): Use it.
6522
6523 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6524
6525 * target.h (target_ops) <read_btrace>: Change parameters and
6526 return type to allow error reporting.
6527 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6528 trace reading errors on.
6529 * linux-low.c (linux_low_read_btrace): Pass trace reading
6530 errors on.
6531 (linux_low_disable_btrace): New.
6532
6533 2014-01-15 Doug Evans <dje@google.com>
6534
6535 * inferiors.c (thread_id_to_gdb_id): Delete.
6536 * inferiors.h (thread_id_to_gdb_id): Delete.
6537
6538 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6539
6540 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6541 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6542 versions.
6543
6544 2014-01-08 Pedro Alves <palves@redhat.com>
6545
6546 * server.c (handle_status): Don't discard previous queued stop
6547 replies or thread's pending status here.
6548 (main) <disconnection>: Do it here instead.
6549
6550 2014-01-08 Pedro Alves <palves@redhat.com>
6551
6552 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6553 * server.c (visit_actioned_threads, handle_pending_status): New
6554 function.
6555 (handle_v_cont): Factor out parts to ...
6556 (resume): ... this new function. If in all-stop, and a thread
6557 being resumed has a pending status, report it without actually
6558 resuming.
6559 (myresume): Adjust to use the new 'resume' function.
6560 (clear_pending_status_callback, set_pending_status_callback)
6561 (find_status_pending_thread_callback): New functions.
6562 (handle_status): Handle the case of multiple threads having
6563 interesting statuses to report. Report threads' real last signal
6564 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6565 with an interesting thread to report the status for, instead of
6566 always reporting the status of the first thread.
6567
6568 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6569
6570 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6571 * gdbreplay.c (gdbreplay_version): Likewise.
6572
6573 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6574
6575 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6576 iov.iov_len with the real length in use.
6577
6578 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6579
6580 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6581 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6582 for all targets that use win32-low.c.
6583 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6584 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6585
6586 2013-12-13 Pedro Alves <palves@redhat.com>
6587
6588 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6589 if equal to TARGET_WAITKIND_LOADED.
6590 * win32-low.c (cached_status): New static global.
6591 (win32_wait): Add declaration.
6592 (do_initial_child_stuff): Flush all initial pending debug events
6593 up to the initial breakpoint.
6594 (win32_wait): If CACHED_STATUS was set, return that instead
6595 of doing a real wait. Remove the code resuming the execution
6596 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6597 during the initial phase. Also remove the code changing
6598 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6599 TARGET_WAITKIND_STOPPED.
6600
6601 2013-12-11 Yao Qi <yao@codesourcery.com>
6602
6603 * notif.c (handle_notif_ack): Return 0 if no notification
6604 matches.
6605
6606 2013-11-20 Doug Evans <dje@google.com>
6607
6608 * linux-low.c (linux_set_resume_request): Fix comment.
6609
6610 2013-11-20 Doug Evans <dje@google.com>
6611
6612 * linux-low.c (resume_status_pending_p): Tweak comment.
6613
6614 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6615
6616 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6617 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6618 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6619 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6620 (srv_amd64_regobj): Add amd64-mpx.o.
6621 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6622 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6623 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6624 * i387-fp.c (num_pl_bnd_register) Added constant.
6625 (num_pl_bnd_cfg_registers) Added constant.
6626 (struct i387_xsave) Added reserved area and MPX fields.
6627 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6628 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6629 function.
6630 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6631 (init_registers_amd64_mpx_linux): Declare new function.
6632 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6633 (x86_64_regmap): Add MPX registers.
6634 (x86_linux_read_description): Add MPX case.
6635 (initialize_low_arch): Initialize MPX targets.
6636
6637 2013-11-18 Tom Tromey <tromey@redhat.com>
6638
6639 * configure: Rebuild.
6640 * configure.ac: Don't check for stdlib.h.
6641 * gdbreplay.c: Unconditionally include stdlib.h.
6642
6643 2013-11-18 Tom Tromey <tromey@redhat.com>
6644
6645 * config.in: Rebuild.
6646 * configure: Rebuild.
6647 * configure.ac: Don't use AC_HEADER_DIRENT.
6648
6649 2013-11-18 Tom Tromey <tromey@redhat.com>
6650
6651 * server.h: Don't check HAVE_STRING_H.
6652 * gdbreplay.c: Don't check HAVE_STRING_H.
6653 * configure: Rebuild.
6654
6655 2013-11-18 Tom Tromey <tromey@redhat.com>
6656
6657 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6658 LIBGNU.
6659
6660 2013-11-08 Tom Tromey <tromey@redhat.com>
6661
6662 * configure, config.in: Rebuild.
6663 * configure.ac: Remove unused configury.
6664
6665 2013-11-08 Tom Tromey <tromey@redhat.com>
6666
6667 * acinclude.m4: Include common.m4, codeset.m4.
6668 * configure, config.in: Rebuild.
6669 * configure.ac: Use GDB_AC_COMMON.
6670
6671 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6672
6673 * linux-s390-low.c (HWCAP_S390_TE): New define.
6674 (s390_arch_setup): Consider the TE field in the HWCAP for
6675 determining 'have_regset_tdb'.
6676
6677 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6678
6679 PR gdb/16014
6680 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6681 call to sizeof.
6682
6683 2013-10-02 Pedro Alves <palves@redhat.com>
6684
6685 * server.c (process_serial_event): Don't output "GDBserver
6686 exiting" if GDB is connected through stdio.
6687 * target.c (mywait): Likewise, be silent if GDB is connected
6688 through stdio.
6689
6690 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6691
6692 * lynx-low.c (lynx_add_threads_after_attach): New function.
6693 (lynx_attach): Remove call to add_thread. Add call to
6694 lynx_add_threads_after_attach instead.
6695
6696 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6697
6698 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6699 * config.in, configure: Regenerated.
6700
6701 2013-09-18 Yao Qi <yao@codesourcery.com>
6702
6703 PR server/15959
6704 * server.c (start_inferior): Clear 'resume_info'.
6705
6706 2013-09-16 Jiong Wang <jiwang@tilera.com>
6707
6708 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6709 for each register.
6710
6711 2013-09-16 Jiong Wang <jiwang@tilera.com>
6712
6713 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6714 linux-tile-low.o to srv_tgtobj.
6715
6716 2013-09-16 Will Newton <will.newton@linaro.org>
6717
6718 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6719 out regs.
6720
6721 2013-09-06 Pedro Alves <palves@redhat.com>
6722
6723 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6724 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6725 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6726 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6727 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6728 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6729
6730 2013-09-06 Pedro Alves <palves@redhat.com>
6731
6732 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6733 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6734
6735 2013-09-06 Pedro Alves <palves@redhat.com>
6736
6737 * linux-amd64-ipa.c: Include tracepoint.h.
6738 * linux-i386-ipa.c: Include tracepoint.h.
6739
6740 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6741
6742 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6743 (ps_get_thread_area): New function.
6744
6745 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6746
6747 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6748 (initialize_low_arch): Call init_registers_crisv32 rather than
6749 init_register_crisv32.
6750
6751 2013-09-05 Pedro Alves <palves@redhat.com>
6752
6753 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6754 to ...
6755 * hostio.h: ... this new file.
6756 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6757 win32-low.c: Include hostio.h.
6758
6759 2013-09-05 Pedro Alves <palves@redhat.com>
6760
6761 * server.h (gdb_client_data, handler_func, callback_handler_func)
6762 (delete_file_handler, add_file_handler, append_callback_event)
6763 (delete_callback_event, start_event_loop, initialize_event_loop):
6764 Move to event-loop.h and include it.
6765 * event-loop.h: New file.
6766
6767 2013-09-05 Pedro Alves <palves@redhat.com>
6768
6769 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6770 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6771 (loaded_dll, unloaded_dll): Move to ...
6772 * dll.h: ... this new file.
6773 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6774
6775 2013-09-05 Pedro Alves <palves@redhat.com>
6776
6777 * server.h (current_process, get_thread_process, all_processes)
6778 (add_inferior_to_list, for_each_inferior, current_inferior)
6779 (remove_inferior, add_process, remove_process, find_process_pid)
6780 (have_started_inferiors_p, have_attached_inferiors_p)
6781 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6782 (clear_inferiors, find_inferior, find_inferior_id)
6783 (inferior_target_data, set_inferior_target_data)
6784 (inferior_regcache_data, set_inferior_regcache_data): Move to
6785 inferiors.h, and include it.
6786 * inferiors.h: New file.
6787
6788 2013-09-05 Pedro Alves <palves@redhat.com>
6789
6790 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6791 Move ...
6792 * ax.h: ... here.
6793
6794 2013-09-05 Pedro Alves <palves@redhat.com>
6795
6796 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6797 tracepoint.h.
6798 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6799 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6800 (handle_tracepoint_general_set, handle_tracepoint_query)
6801 (tracepoint_finished_step, tracepoint_was_hit)
6802 (release_while_stepping_state_list, current_traceframe)
6803 (in_readonly_region, traceframe_read_mem)
6804 (fetch_traceframe_registers, traceframe_read_sdata)
6805 (traceframe_read_info, struct fast_tpoint_collect_status)
6806 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6807 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6808 (supply_fast_tracepoint_registers)
6809 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6810 (ipa_tdesc, claim_trampoline_space)
6811 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6812 (agent_mem_read, agent_get_trace_state_variable_value)
6813 (agent_set_trace_state_variable_value, agent_tsv_read)
6814 (agent_mem_read_string, get_raw_reg_func_addr)
6815 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6816 * tracepoint.h: ... this new file.
6817
6818 2013-09-05 Pedro Alves <palves@redhat.com>
6819
6820 * server.h (perror_with_name, error, fatal, warning, paddress)
6821 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6822 include it.
6823 * utils.h: New file.
6824
6825 2013-09-05 Pedro Alves <palves@redhat.com>
6826
6827 * server.h (remote_debug, noack_mode, transport_is_reliable)
6828 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6829 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6830 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6831 (write_enn, initialize_async_io, enable_async_io)
6832 (disable_async_io, check_remote_input_interrupt_request)
6833 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6834 (dead_thread_notify, prepare_resume_reply)
6835 (decode_address_to_semicolon, decode_address, decode_m_packet)
6836 (decode_M_packet, decode_X_packet, decode_xfer_write)
6837 (decode_search_memory_packet, unhexify, hexify)
6838 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6839 (look_up_one_symbol, relocate_instruction)
6840 (monitor_output): Move to remote-utils.h, and include it.
6841 * remote-utils.h: New file.
6842
6843 2013-09-05 Pedro Alves <palves@redhat.com>
6844
6845 * server.h (_): Delete.
6846
6847 2013-09-02 Pedro Alves <palves@redhat.com>
6848
6849 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6850 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6851 allocated.
6852 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6853
6854 2013-09-02 Pierre Muller <muller@sourceware.org>
6855
6856 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6857 or WriteProcessMemory complete successfully and handle
6858 ERROR_PARTIAL_COPY error.
6859
6860 2013-09-02 Pedro Alves <palves@redhat.com>
6861
6862 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6863 error instead of EIO.
6864
6865 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6866
6867 PR server/15604
6868 * linux-low.c: Include filestuff.h.
6869 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6870 * lynx-low.c: Include filestuff.h.
6871 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6872 * server.c: Include filestuff.h.
6873 (main): Call notice_open_fds.
6874 * spu-low.c: Include filestuff.h.
6875 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6876
6877 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6878
6879 * Makefile.in: Explain why ../target and ../nat are not
6880 listed as include file search paths.
6881 (linux-waitpid.o): New object file rule.
6882 * configure.srv (srv_native_linux_obj): New variable.
6883 Replace all occurrences of linux native object files with
6884 $srv_native_linux_obj.
6885 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6886 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6887 (linux_enable_event_reporting): Remove declaration.
6888 (my_waitpid): Moved to common/linux-waitpid.c.
6889 (linux_wait_for_event): Pass ptid when calling
6890 linux_enable_event_reporting.
6891 (linux_supports_tracefork_flag): Remove.
6892 (linux_enable_event_reporting): Likewise.
6893 (linux_tracefork_grandchild): Remove.
6894 (STACK_SIZE): Moved to common/linux-ptrace.c.
6895 (linux_tracefork_child): Remove.
6896 (linux_test_for_tracefork): Remove.
6897 (linux_look_up_symbols): Call linux_supports_traceclone.
6898 (initialize_low): Remove call to linux_test_for_tracefork.
6899 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6900 common/linux-ptrace.h.
6901 (PTRACE_TYPE_ARG4): Likewise.
6902 Include linux-ptrace.h.
6903
6904 2013-08-21 Pedro Alves <palves@redhat.com>
6905
6906 * config.in: Renegerate.
6907
6908 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6909
6910 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6911 (SFILES): Remove $(srcdir)/common/target-common.c and
6912 add $(srcdir)/target/waitstatus.c.
6913 (OBS): Remove target-common.o and add waitstatus.o.
6914 (server_h): Remove $(srcdir)/../common/target-common.h and
6915 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6916 and $(srcdir)/../target/waitstatus.h.
6917 (target-common.o): Remove.
6918 (waitstatus.o): New target object file.
6919 * target.h: Do not include target-common.h and
6920 include target/resume.h, target/wait.h and
6921 target/waitstatus.h.
6922
6923 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6924
6925 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6926 to PTRACE_TYPE_ARG3.
6927 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6928 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6929 PTRACE_TYPE_ARG4.
6930 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6931 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6932
6933 2013-07-27 Jie Zhang <jie@codesourcery.com>
6934 Daniel Jacobowitz <dan@codesourcery.com>
6935 Yao Qi <yao@codesourcery.com>
6936
6937 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6938 (mips-linux-watch.o): New rule.
6939 (mips_linux_watch_h): New variable.
6940 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6941 srv_tgtobj.
6942 * linux-mips-low.c: Include mips-linux-watch.h.
6943 (struct arch_process_info, struct arch_lwp_info): New.
6944 (update_watch_registers_callback): New function.
6945 (mips_linux_new_process, mips_linux_new_thread) New functions.
6946 (mips_linux_prepare_to_resume, mips_insert_point): New
6947 functions.
6948 (mips_remove_point, mips_stopped_by_watchpoint): New
6949 functions.
6950 (rsp_bp_type_to_target_hw_bp_type): New function.
6951 (mips_stopped_data_address): New function.
6952 (the_low_target): Add watchpoint support functions.
6953
6954 2013-07-27 Yao Qi <yao@codesourcery.com>
6955
6956 * i386-low.c: Include break-common.h.
6957 (enum target_hw_bp_type): Remove.
6958
6959 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6960
6961 * Makefile.in (SFILES): /common/target-common.c.
6962 (OBS): Add target-common.o.
6963 (server_h): Add $(srcdir)/../common/target-common.h.
6964 (target-common.o): New target.
6965 * server.c (queue_stop_reply_callback): Free
6966 status string after use.
6967 * target.c (target_waitstatus_to_string): Remove.
6968 * target.h: Include target-common.h.
6969 (resume_kind): Likewise.
6970 (target_waitkind): Likewise.
6971 (target_waitstatus): Likewise.
6972 (TARGET_WNOHANG): Likewise.
6973
6974 2013-07-04 Yao Qi <yao@codesourcery.com>
6975
6976 * Makefile.in (host_alias): Use @host_noncanonical@.
6977 (target_alias): Use @target_noncanonical@.
6978 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6979 ACX_NONCANONICAL_HOST.
6980 * configure: Regenerated.
6981
6982 Revert:
6983 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6984
6985 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6986 * configure: Rebuild.
6987 * Makefile.in (version_host, version_target): Get from configure.
6988 (version.c): Use $(version_host) and $(version_target).
6989
6990 2013-07-03 Pedro Alves <palves@redhat.com>
6991
6992 * Makefile.in (config.status): Depend on development.sh.
6993 * acinclude.m4: Include libmcheck.m4.
6994 * configure: Regenerate.
6995
6996 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6997
6998 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6999 attribute inside the parentheses.
7000 (winapi_DebugSetProcessKillOnExit): Ditto.
7001 (winapi_DebugBreakProcess): Ditto.
7002 (winapi_GenerateConsoleCtrlEvent): Ditto.
7003
7004 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7005
7006 * notif.h (notif_event): Add a dummy member to avoid compiler
7007 errors.
7008
7009 2013-07-01 Pedro Alves <palves@redhat.com>
7010
7011 * hostio.c (HOSTIO_PATH_MAX): Define.
7012 (require_filename, handle_open, handle_unlink, handle_readlink):
7013 Use it.
7014
7015 2013-07-01 Pedro Alves <palves@redhat.com>
7016
7017 * server.h: Include "pathmax.h".
7018 * linux-low.c: Don't include sys/param.h.
7019 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7020 MAXPATHLEN.
7021 * win32-low.c: Don't include sys/param.h.
7022 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7023
7024 2013-07-01 Pedro Alves <palves@redhat.com>
7025
7026 * event-loop.c: Don't check HAVE_UNISTD_H before including
7027 <unistd.h>.
7028 * gdbreplay.c: Likewise.
7029 * remote-utils.c: Likewise.
7030 * server.c: Likewise.
7031 * configure.ac: Don't check for unistd.h.
7032 * configure: Regenerate.
7033
7034 2013-06-28 Tom Tromey <tromey@redhat.com>
7035
7036 * Makefile.in (version.c): Use version.in, not
7037 common/version.in.
7038
7039 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7040
7041 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7042 * configure: Rebuild.
7043 * Makefile.in (version_host, version_target): Get from configure.
7044 (version.c): Use $(version_host) and $(version_target).
7045
7046 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7047
7048 Fix trace-status to output user name without trailing colon.
7049 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7050
7051 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7052
7053 Fix trace-status to output proper start-time and stop-time.
7054 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7055 output start time and stop time in hex as gdb expects.
7056
7057 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7058
7059 * tracepoint.c (build_traceframe_info_xml): Output trace state
7060 variables present in the trace buffer.
7061
7062 2013-06-24 Tom Tromey <tromey@redhat.com>
7063
7064 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7065 create-version.sh.
7066 (version.o): Remove.
7067 * gdbreplay.c: Include version.h.
7068 (version, host_name): Don't declare.
7069 * server.h: Include version.h.
7070 (version, host_name): Don't declare.
7071
7072 2013-06-12 Pedro Alves <palves@redhat.com>
7073
7074 * linux-x86-low.c (linux_is_elf64): Delete global.
7075 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7076 with local linux_pid_exe_is_elf_64_file use.
7077
7078 2013-06-11 Pedro Alves <palves@redhat.com>
7079
7080 * linux-low.c (regset_disabled, disable_regset): New functions.
7081 (regsets_fetch_inferior_registers)
7082 (regsets_store_inferior_registers): Use them.
7083 (initialize_regsets_info); Don't allocate the disabled_regsets
7084 array here.
7085 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7086 comment.
7087
7088 2013-06-11 Pedro Alves <palves@redhat.com>
7089
7090 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7091 xmalloc.
7092
7093 2013-06-11 Pedro Alves <palves@redhat.com>
7094
7095 * linux-x86-low.c (initialize_low_arch): Call
7096 init_registers_x32_avx_linux.
7097
7098 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7099
7100 Fix compatibility with Android Bionic.
7101 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7102 it is not empty.
7103
7104 2013-06-07 Pedro Alves <palves@redhat.com>
7105
7106 PR server/14823
7107 * Makefile.in (OBS): Add tdesc.o.
7108 (IPA_OBJS): Add tdesc-ipa.o.
7109 (tdesc-ipa.o): New rule.
7110 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7111 interface.
7112 * linux-low.c (new_inferior): Delete.
7113 (disabled_regsets, num_regsets): Delete.
7114 (linux_add_process): Adjust to set the new per-process
7115 new_inferior flag.
7116 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7117 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7118 was a stop. When calling arch_setup, switch the current inferior
7119 to the thread that got an event.
7120 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7121 (regsets_fetch_inferior_registers)
7122 (regsets_store_inferior_registers): New regsets_info parameter.
7123 Adjust to use it.
7124 (linux_register_in_regsets): New regs_info parameter. Adjust to
7125 use it.
7126 (register_addr, fetch_register, store_register): New usrregs_info
7127 parameter. Adjust to use it.
7128 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7129 parameter regs_info. Adjust to use it.
7130 (linux_fetch_registers): Get the current inferior's regs_info, and
7131 adjust to use it.
7132 (linux_store_registers): Ditto.
7133 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7134 (initialize_low): Don't initialize the target_regsets here. Call
7135 initialize_low_arch.
7136 * linux-low.h (target_regsets): Delete declaration.
7137 (struct regsets_info): New.
7138 (struct usrregs_info): New.
7139 (struct regs_info): New.
7140 (struct process_info_private) <new_inferior>: New field.
7141 (struct linux_target_ops): Delete the num_regs, regmap, and
7142 regset_bitmap fields. New field regs_info.
7143 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7144 * i387-fp.c (num_xmm_registers): Delete.
7145 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7146 calls to new interface.
7147 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7148 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7149 Infer the number of xmm registers from the regcache's target
7150 description.
7151 * i387-fp.h (num_xmm_registers): Delete.
7152 * inferiors.c (add_thread): Don't install the thread's regcache
7153 here.
7154 * proc-service.c (gregset_info): Fetch the current inferior's
7155 regs_info. Adjust to use it.
7156 * regcache.c: Include tdesc.h.
7157 (register_bytes, reg_defs, num_registers)
7158 (gdbserver_expedite_regs): Delete.
7159 (get_thread_regcache): If the thread doesn't have a regcache yet,
7160 create one, instead of aborting gdbserver.
7161 (regcache_invalidate_one): Rename to ...
7162 (regcache_invalidate_thread): ... this.
7163 (regcache_invalidate_one): New.
7164 (regcache_invalidate): Only invalidate registers of the current
7165 process.
7166 (init_register_cache): Add target_desc parameter, and use it.
7167 (new_register_cache): Ditto. Assert the target description has a
7168 non zero registers_size.
7169 (regcache_cpy): Add assertions. Adjust.
7170 (realloc_register_cache, set_register_cache): Delete.
7171 (registers_to_string, registers_from_string): Adjust.
7172 (find_register_by_name, find_regno, find_register_by_number)
7173 (register_cache_size): Add target_desc parameter, and use it.
7174 (free_register_cache_thread, free_register_cache_thread_one)
7175 (regcache_release, register_cache_size): New.
7176 (register_size): Add target_desc parameter, and use it.
7177 (register_data, supply_register, supply_register_zeroed)
7178 (supply_regblock, supply_register_by_name, collect_register)
7179 (collect_register_as_string, collect_register_by_name): Adjust.
7180 * regcache.h (struct target_desc): Forward declare.
7181 (struct regcache) <tdesc>: New field.
7182 (init_register_cache, new_register_cache): Add target_desc
7183 parameter.
7184 (regcache_invalidate_thread): Declare.
7185 (regcache_invalidate_one): Delete declaration.
7186 (regcache_release): Declare.
7187 (find_register_by_number, register_cache_size, register_size)
7188 (find_regno): Add target_desc parameter.
7189 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7190 declarations.
7191 * remote-utils.c: Include tdesc.h.
7192 (outreg, prepare_resume_reply): Adjust.
7193 * server.c: Include tdesc.h.
7194 (gdbserver_xmltarget): Delete declaration.
7195 (get_features_xml, process_serial_event): Adjust.
7196 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7197 declare.
7198 (struct process_info) <tdesc>: New field.
7199 (ipa_tdesc): Declare.
7200 * tdesc.c: New file.
7201 * tdesc.h: New file.
7202 * tracepoint.c: Include tdesc.h.
7203 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7204 (get_context_regcache): Adjust to pass ipa_tdesc down.
7205 (do_action_at_tracepoint): Adjust to get the register cache size
7206 from the context regcache's description.
7207 (traceframe_walk_blocks): Adjust to get the register cache size
7208 from the current trace frame's description.
7209 (traceframe_get_pc): Adjust to get current trace frame's
7210 description and pass it down.
7211 (gdb_collect): Adjust to get the register cache size from the
7212 IPA's description.
7213 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7214 (gdbserver_xmltarget): Delete.
7215 (initialize_low_tracepoint): Set the ipa's target description.
7216 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7217 (initialize_low_tracepoint): Set the ipa's target description.
7218 * linux-x86-low.c: Include tdesc.h.
7219 [__x86_64__] (is_64bit_tdesc): New.
7220 (ps_get_thread_area, x86_get_thread_area): Use it.
7221 (i386_cannot_store_register): Rename to ...
7222 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7223 (i386_cannot_fetch_register): Rename to ...
7224 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7225 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7226 to new interface.
7227 (target_regsets): Rename to ...
7228 (x86_regsets): ... this.
7229 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7230 interface.
7231 (x86_siginfo_fixup): Use is_64bit_tdesc.
7232 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7233 (tdesc_x32_avx_linux, tdesc_x32_linux)
7234 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7235 Declare.
7236 (x86_linux_update_xmltarget): Delete.
7237 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7238 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7239 (AMD64_LINUX_USER64_CS): New.
7240 (x86_linux_read_description): New, based on
7241 x86_linux_update_xmltarget.
7242 (same_process_callback): New.
7243 (x86_arch_setup_process_callback): New.
7244 (x86_linux_update_xmltarget): New.
7245 (x86_regsets_info): New.
7246 (amd64_linux_regs_info): New.
7247 (i386_linux_usrregs_info): New.
7248 (i386_linux_regs_info): New.
7249 (x86_linux_regs_info): New.
7250 (x86_arch_setup): Reimplement.
7251 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7252 (x86_emit_ops): Ditto.
7253 (the_low_target): Adjust. Install x86_linux_regs_info,
7254 x86_cannot_fetch_register, and x86_cannot_store_register.
7255 (initialize_low_arch): New.
7256 * linux-ia64-low.c (tdesc_ia64): Declare.
7257 (ia64_fetch_register): Adjust.
7258 (ia64_usrregs_info, regs_info): New globals.
7259 (ia64_regs_info): New function.
7260 (the_low_target): Adjust.
7261 (initialize_low_arch): New function.
7262 * linux-sparc-low.c (tdesc_sparc64): Declare.
7263 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7264 Adjust.
7265 (sparc_arch_setup): New function.
7266 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7267 (the_low_target): Adjust.
7268 (initialize_low_arch): New function.
7269 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7270 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7271 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7272 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7273 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7274 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7275 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7276 (tdesc_powerpc_isa205_vsx64l): Declare.
7277 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7278 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7279 (ppc_set_pc, ppc_get_hwcap): Adjust.
7280 (ppc_usrregs_info): Forward declare.
7281 (!__powerpc64__) ppc_regmap_adjusted: New global.
7282 (ppc_arch_setup): Adjust to the current process'es target
7283 description.
7284 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7285 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7286 (ppc_store_evrregset): Adjust.
7287 (target_regsets): Rename to ...
7288 (ppc_regsets): ... this, and make static.
7289 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7290 (ppc_regs_info): New function.
7291 (the_low_target): Adjust.
7292 (initialize_low_arch): New function.
7293 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7294 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7295 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7296 (tdesc_s390x_linux64v2): Declare.
7297 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7298 (s390_fill_gregset, s390_store_last_break): Adjust.
7299 (target_regsets): Rename to ...
7300 (s390_regsets): ... this, and make static.
7301 (s390_get_pc, s390_set_pc): Adjust.
7302 (s390_get_hwcap): New target_desc parameter, and use it.
7303 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7304 (s390_arch_setup): Adjust to set the current process'es target
7305 description. Don't adjust the regmap.
7306 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7307 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7308 (regs_info_3264): New globals.
7309 (s390_regs_info): New function.
7310 (the_low_target): Adjust.
7311 (initialize_low_arch): New function.
7312 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7313 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7314 [__mips64] (init_registers_mips_linux)
7315 (init_registers_mips_dsp_linux): Delete defines.
7316 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7317 (have_dsp): New global.
7318 (mips_read_description): New, based on mips_arch_setup.
7319 (mips_arch_setup): Reimplement.
7320 (get_usrregs_info): New function.
7321 (mips_cannot_fetch_register, mips_cannot_store_register)
7322 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7323 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7324 (target_regsets): Rename to ...
7325 (mips_regsets): ... this, and make static.
7326 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7327 (dsp_regs_info, regs_info): New globals.
7328 (mips_regs_info): New function.
7329 (the_low_target): Adjust.
7330 (initialize_low_arch): New function.
7331 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7332 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7333 Declare.
7334 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7335 (arm_read_description): New, with bits factored from
7336 arm_arch_setup.
7337 (arm_arch_setup): Reimplement.
7338 (target_regsets): Rename to ...
7339 (arm_regsets): ... this, and make static.
7340 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7341 (arm_regs_info): New function.
7342 (the_low_target): Adjust.
7343 (initialize_low_arch): New function.
7344 * linux-m68k-low.c (tdesc_m68k): Declare.
7345 (target_regsets): Rename to ...
7346 (m68k_regsets): ... this, and make static.
7347 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7348 (m68k_regs_info): New function.
7349 (m68k_arch_setup): New function.
7350 (the_low_target): Adjust.
7351 (initialize_low_arch): New function.
7352 * linux-sh-low.c (tdesc_sharch): Declare.
7353 (target_regsets): Rename to ...
7354 (sh_regsets): ... this, and make static.
7355 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7356 (sh_regs_info, sh_arch_setup): New functions.
7357 (the_low_target): Adjust.
7358 (initialize_low_arch): New function.
7359 * linux-bfin-low.c (tdesc_bfin): Declare.
7360 (bfin_arch_setup): New function.
7361 (bfin_usrregs_info, regs_info): New globals.
7362 (bfin_regs_info): New function.
7363 (the_low_target): Adjust.
7364 (initialize_low_arch): New function.
7365 * linux-cris-low.c (tdesc_cris): Declare.
7366 (cris_arch_setup): New function.
7367 (cris_usrregs_info, regs_info): New globals.
7368 (cris_regs_info): New function.
7369 (the_low_target): Adjust.
7370 (initialize_low_arch): New function.
7371 * linux-cris-low.c (tdesc_crisv32): Declare.
7372 (cris_arch_setup): New function.
7373 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7374 (cris_regs_info): New function.
7375 (the_low_target): Adjust.
7376 (initialize_low_arch): New function.
7377 * linux-m32r-low.c (tdesc_m32r): Declare.
7378 (m32r_arch_setup): New function.
7379 (m32r_usrregs_info, regs_info): New globals.
7380 (m32r_regs_info): Adjust.
7381 (initialize_low_arch): New function.
7382 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7383 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7384 (tic6x_usrregs_info): Forward declare.
7385 (tic6x_read_description): New function, based on ...
7386 (tic6x_arch_setup): ... this. Reimplement.
7387 (target_regsets): Rename to ...
7388 (tic6x_regsets): ... this, and make static.
7389 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7390 (tic6x_regs_info): New function.
7391 (the_low_target): Adjust.
7392 (initialize_low_arch): New function.
7393 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7394 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7395 (target_regsets): Rename to ...
7396 (xtensa_regsets): ... this, and make static.
7397 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7398 globals.
7399 (xtensa_arch_setup, xtensa_regs_info): New functions.
7400 (the_low_target): Adjust.
7401 (initialize_low_arch): New function.
7402 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7403 (nios2_arch_setup): Set the current process'es tdesc.
7404 (target_regsets): Rename to ...
7405 (nios2_regsets): ... this.
7406 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7407 (nios2_regs_info): New function.
7408 (the_low_target): Adjust.
7409 (initialize_low_arch): New function.
7410 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7411 (aarch64_arch_setup): Set the current process'es tdesc.
7412 (target_regsets): Rename to ...
7413 (aarch64_regsets): ... this.
7414 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7415 (aarch64_regs_info): New function.
7416 (the_low_target): Adjust.
7417 (initialize_low_arch): New function.
7418 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7419 globals.
7420 (target_regsets): Rename to ...
7421 (tile_regsets): ... this.
7422 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7423 (tile_regs_info): New function.
7424 (tile_arch_setup): Set the current process'es tdesc.
7425 (the_low_target): Adjust.
7426 (initialize_low_arch): New function.
7427 * spu-low.c (tdesc_spu): Declare.
7428 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7429 * win32-arm-low.c (tdesc_arm): Declare.
7430 (arm_arch_setup): New function.
7431 (the_low_target): Install arm_arch_setup instead of
7432 init_registers_arm.
7433 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7434 (init_windows_x86): Rename to ...
7435 (i386_arch_setup): ... this. Set `win32_tdesc'.
7436 (the_low_target): Adjust.
7437 * win32-low.c (win32_tdesc): New global.
7438 (child_add_thread): Don't create the thread cache here.
7439 (do_initial_child_stuff): Set the new process'es tdesc.
7440 * win32-low.h (struct target_desc): Forward declare.
7441 (win32_tdesc): Declare.
7442 * lynx-i386-low.c (tdesc_i386): Declare global.
7443 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7444 * lynx-low.c (lynx_tdesc): New global.
7445 (lynx_add_process): Set the new process'es tdesc.
7446 * lynx-low.h (struct target_desc): Forward declare.
7447 (lynx_tdesc): Declare global.
7448 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7449 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7450 * nto-low.c (nto_tdesc): New global.
7451 (do_attach): Set the new process'es tdesc.
7452 * nto-low.h (struct target_desc): Forward declare.
7453 (nto_tdesc): Declare.
7454 * nto-x86-low.c (tdesc_i386): Declare.
7455 (nto_x86_arch_setup): Set `nto_tdesc'.
7456
7457 2013-06-04 Gary Benson <gbenson@redhat.com>
7458
7459 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7460 to qSupported response when appropriate.
7461 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7462 with nonzero-length annex.
7463 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7464 arguments supplied in annex.
7465
7466 2013-05-31 Doug Evans <dje@google.com>
7467
7468 PR server/15594
7469 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7470 64 bits in 64-cross-32 environment.
7471
7472 2013-05-28 Pedro Alves <palves@redhat.com>
7473
7474 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7475 (aarch64-without-fpu.c): Delete rule.
7476 * configure.srv (aarch64*-*-linux*): Remove references to
7477 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7478 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7479 declaration.
7480
7481 2013-05-24 Pedro Alves <palves@redhat.com>
7482
7483 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7484 instead of strchr/decode_address. Error if the range isn't split
7485 with a ','. Don't assume there's be a ':' in the action.
7486
7487 2013-05-23 Yao Qi <yao@codesourcery.com>
7488 Pedro Alves <palves@redhat.com>
7489
7490 * linux-low.c (lwp_in_step_range): New function.
7491 (linux_wait_1): If the thread was range stepping and stopped
7492 outside the stepping range, report the stop to GDB. Otherwise,
7493 continue stepping. Add range stepping debug output.
7494 (linux_set_resume_request): Copy the step range from the resume
7495 request to the lwp.
7496 (linux_supports_range_stepping): New.
7497 (linux_target_ops) <supports_range_stepping>: Set to
7498 linux_supports_range_stepping.
7499 * linux-low.h (struct linux_target_ops)
7500 <supports_range_stepping>: New field.
7501 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7502 * linux-x86-low.c (x86_supports_range_stepping): New.
7503 (the_low_target) <supports_range_stepping>: Set to
7504 x86_supports_range_stepping.
7505 * server.c (handle_v_cont): Handle 'r' action.
7506 (handle_v_requests): Append ";r" if the target supports range
7507 stepping.
7508 * target.h (struct thread_resume) <step_range_start,
7509 step_range_end>: New fields.
7510 (struct target_ops) <supports_range_stepping>:
7511 New field.
7512 (target_supports_range_stepping): New macro.
7513
7514 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7515
7516 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7517 confusion in comment.
7518
7519 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7520
7521 * lynx-low.c (struct process_info_private): New type.
7522 (lynx_add_process): New function.
7523 (lynx_create_inferior, lynx_attach): Replace calls to
7524 add_process by calls to lynx_add_process.
7525 (lynx_resume): If PTID is null, then try using
7526 current_process()->private->last_wait_event_ptid.
7527 Add comments.
7528 (lynx_clear_inferiors): Delete. The contents of that function
7529 has been inlined in lynx_mourn;
7530 (lynx_wait_1): Save the ptid in the process's private data.
7531 (lynx_mourn): Free the process' private data. Replace call
7532 to lynx_clear_inferiors by call to clear_inferiors.
7533
7534 2013-05-17 Yao Qi <yao@codesourcery.com>
7535
7536 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7537 the right place.
7538
7539 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7540
7541 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7542 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7543 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7544 PT_TEXT_END_ADDR guards. Update comments.
7545 (linux_target_op) <read_offsets>: Conditionally define to
7546 linux_read_offsets if the target is UCLIBC and if it defines
7547 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7548
7549 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7550 Andrew Jenner <andrew@codesourcery.com>
7551
7552 * Makefile.in (SFILES): Add linux-nios2-low.c.
7553 (clean): Add action to delete nios2-linux.c.
7554 (nios2-linux.c): New rule.
7555 * configure.srv: Add nios2*-*-linux*.
7556 * linux-nios2-low.c: New.
7557
7558 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7559
7560 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7561
7562 2013-04-25 Hui Zhu <hui@codesourcery.com>
7563
7564 PR gdb/15186
7565 * ax.c (ax_printf): Add fflush.
7566
7567 2013-04-22 Tom Tromey <tromey@redhat.com>
7568
7569 * Makefile.in (SFILES): Add filestuff.c.
7570 (OBS): Add filestuff.o.
7571 (filestuff.o): New target.
7572 * config.in, configure: Rebuild.
7573 * configure.ac: Check for fdwalk, pipe2.
7574
7575 2013-04-17 Pedro Alves <palves@redhat.com>
7576
7577 * configure.ac (USE_THREAD_DB): Delete variable.
7578 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7579 Don't AC_SUBST USE_THREAD_DB.
7580 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7581 * config.in, configure: Regenerate.
7582
7583 2013-04-16 Pedro Alves <palves@redhat.com>
7584
7585 * linux-low.h (struct lwp_info) <thread_known>: Move under
7586 the USE_THREAD_DB #ifdef.
7587
7588 2013-04-16 Pedro Alves <palves@redhat.com>
7589
7590 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7591 (linux-low.o): Delete rule.
7592 * linux-low.h: Always include "gdb_thread_db.h" instead of
7593 conditionally including thread_db.h.
7594 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7595 HAVE_THREAD_DB_H.
7596
7597 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7598
7599 * Makefile.in (install-only): Fix make install regression.
7600
7601 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7602
7603 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7604 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7605 installation.
7606 * gdbserver.1: Remove.
7607
7608 2013-03-22 Pedro Alves <palves@redhat.com>
7609
7610 * linux-low.c (handle_extended_wait): Don't call
7611 linux_enable_event_reporting.
7612
7613 2013-03-15 Tony Theodore <tonyt@logyst.com>
7614
7615 PR build/9098:
7616 * Makefile.in (SHELL): Use @SHELL@.
7617
7618 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7619
7620 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7621 compiler warning.
7622
7623 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7624
7625 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7626 Remove extraneous NULL element.
7627
7628 2013-03-13 Yao Qi <yao@codesourcery.com>
7629
7630 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7631 'V' block in trace frame.
7632
7633 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7634
7635 * target.h (struct target_ops): Add btrace ops.
7636 (target_supports_btrace): New macro.
7637 (target_enable_btrace): New macro.
7638 (target_disable_btrace): New macro.
7639 (target_read_btrace): New macro.
7640 * gdbthread.h (struct thread_info): Add btrace field.
7641 * server.c: Include btrace-common.h.
7642 (handle_btrace_general_set): New function.
7643 (handle_btrace_enable): New function.
7644 (handle_btrace_disable): New function.
7645 (handle_general_set): Call handle_btrace_general_set.
7646 (handle_qxfer_btrace): New function.
7647 (struct qxfer qxfer_packets[]): Add btrace entry.
7648 * inferiors.c (remove_thread): Disable btrace.
7649 * linux-low: Include linux-btrace.h.
7650 (linux_low_enable_btrace): New function.
7651 (linux_low_read_btrace): New function.
7652 (linux_target_ops): Add btrace ops.
7653 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7654 Add srv_linux_btrace=yes.
7655 (x86_64-*-linux*): Add linux-btrace.o.
7656 Add srv_linux_btrace=yes.
7657 * configure.ac: Define HAVE_LINUX_BTRACE.
7658 * config.in: Regenerated.
7659 * configure: Regenerated.
7660
7661 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7662
7663 * server.c (handle_qxfer): Preserve error message if -3 is
7664 returned.
7665 (qxfer): Document the -3 return value.
7666
7667 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7668
7669 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7670 (linux_btrace_h): New variable.
7671 (linux-btrace.o): New rule.
7672
7673 2013-03-08 Stan Shebs <stan@codesourcery.com>
7674 Hafiz Abid Qadeer <abidh@codesourcery.com>
7675
7676 * tracepoint.c (trace_buffer_size): New global.
7677 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7678 (init_trace_buffer): Change to one-argument function. Allocate
7679 trace buffer memory.
7680 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7681 handle QTBuffer:size packet.
7682 (cmd_bigqtbuffer_size): New function.
7683 (initialize_tracepoint): Call init_trace_buffer with
7684 DEFAULT_TRACE_BUFFER_SIZE.
7685 * server.c (handle_query): Add QTBuffer:size in the
7686 supported packets.
7687
7688 2013-03-07 Yao Qi <yao@codesourcery.com>
7689
7690 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7691 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7692 of -1.
7693 (cmd_qtsp): Adjust condition. Do post increment.
7694 Set cur_action and cur_step_action back to 0.
7695
7696 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7697
7698 PR server/15236
7699 * linux-low.c (linux_write_memory): Return early success if LEN is
7700 zero.
7701
7702 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7703
7704 * configure.srv: Add x86_64-*-cygwin* as target.
7705
7706 2013-02-28 Tom Tromey <tromey@redhat.com>
7707
7708 * configure.ac: Invoke AC_SYS_LARGEFILE.
7709 * configure, config.in: Rebuild.
7710
7711 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7712
7713 * win32-low.c: Throughout, fix format strings and casts of
7714 printf-like functions to avoid type related warnings on all
7715 platforms.
7716 (get_child_debug_event): Print dwDebugEventCode as hex since
7717 that's how it's usually documented.
7718
7719 2013-02-28 Yao Qi <yao@codesourcery.com>
7720
7721 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7722 pulongest.
7723
7724 2013-02-27 Jiong Wang <jiwang@tilera.com>
7725
7726 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7727 (reg-tilegx32.c): New rule.
7728 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7729 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7730 different register info initializer according to elf class.
7731 (init_registers_tilgx32): New function. The tilegx32 register info
7732 initializer.
7733 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7734 (tile_store_gregset): Likewise.
7735
7736 2013-02-27 Yao Qi <yao@codesourcery.com>
7737
7738 * server.c (process_point_options): Print debug message when
7739 debug_threads is true.
7740
7741 2013-02-26 Yao Qi <yao@codesourcery.com>
7742
7743 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7744
7745 2013-02-19 Pedro Alves <palves@redhat.com>
7746 Kai Tietz <ktietz@redhat.com>
7747
7748 PR gdb/15161
7749
7750 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7751 instead of strtoul to extract address from packet.
7752 (process_serial_event) <'z'>: Likewise.
7753
7754 2013-02-18 Yao Qi <yao@codesourcery.com>
7755
7756 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7757
7758 2013-02-14 Pedro Alves <palves@redhat.com>
7759
7760 Plug memory leak.
7761
7762 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7763 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7764
7765 2013-02-14 Pedro Alves <palves@redhat.com>
7766
7767 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7768
7769 2013-02-14 Pedro Alves <palves@redhat.com>
7770
7771 * tracepoint.c (save_string): Delete.
7772 (add_tracepoint_action): Use savestring instead of save_string.
7773
7774 2013-02-12 Pedro Alves <palves@redhat.com>
7775
7776 * linux-xtensa-low.c: Ditto.
7777 * xtensa-xtregs.c: Ditto.
7778
7779 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7780
7781 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7782 thread_db.
7783
7784 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7785
7786 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7787 aarch64_num_wp_regs and aarch64_num_bp_regs to
7788 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7789
7790 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7791
7792 * linux-aarch64-low.c (ps_get_thread_area): Replace
7793 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7794
7795 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7796 Marcus Shawcroft <marcus.shawcroft@arm.com>
7797 Nigel Stephens <nigel.stephens@arm.com>
7798 Yufeng Zhang <yufeng.zhang@arm.com>
7799
7800 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7801 (aarch64.c, aarch64-without-fpu.c): New targets.
7802 * configure.srv (aarch64*-*-linux*): New.
7803 * linux-aarch64-low.c: New file.
7804
7805 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7806
7807 * linux-low.c (handle_extended_wait, linux_create_inferior)
7808 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7809 (dequeue_one_deferred_signal, linux_resume_one_thread)
7810 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7811 (linux_tracefork_grandchild, linux_test_for_tracefork)
7812 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7813 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7814 where the argument is 0.
7815
7816 2013-01-25 Yao Qi <yao@codesourcery.com>
7817
7818 * event-loop.c: Include "queue.h".
7819 (gdb_event_p): New typedef.
7820 (struct gdb_event) <next_event>: Remove.
7821 (event_queue): Change to QUEUE(gdb_event_p).
7822 (async_queue_event): Remove.
7823 (gdb_event_xfree): New.
7824 (initialize_event_loop): New.
7825 (process_event): Use API from QUEUE.
7826 (wait_for_event): Likewise.
7827 * server.c (main): Call initialize_event_loop.
7828 * server.h (initialize_event_loop): Declare.
7829
7830 2013-01-18 Yao Qi <yao@codesourcery.com>
7831
7832 * ax.h (struct eval_agent_expr_context): New.
7833 (gdb_eval_agent_expr): Update declaration.
7834 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7835 TFRAME. Add new argument CTX.
7836 * server.h (struct eval_agent_expr_context): Declare.
7837 (agent_mem_read, agent_tsv_read): Update declaration.
7838 (agent_mem_read_string): Likewise.
7839 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7840 (add_traceframe_block): Add new argument TPOINT.
7841 Increase TPOINT->traceframe_usage.
7842 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7843 eval_tracepoint_agent_expr.
7844 (condition_true_at_tracepoint): Likewise.
7845 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7846 (agent_mem_read_string, agent_tsv_read): Likewise.
7847
7848 2013-01-16 Yao Qi <yao@codesourcery.com>
7849
7850 * linux-low.c (linux_resume_one_lwp): Don't check
7851 'lwp->bp_reinsert != 0'.
7852
7853 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7854 Pedro Alves <palves@redhat.com>
7855
7856 * lynx-low.c (ptrace_request_to_str): Define a temporary
7857 macro and use it to simplify this function's implementation.
7858
7859 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7860
7861 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7862 sets errno.
7863
7864 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7865
7866 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7867
7868 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7869
7870 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7871
7872 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7873
7874 * lynx-low.c (lynx_resume): Use the resume_info parameter
7875 to determine the ptid for the lynx_ptrace call, unless
7876 it is equal to minus_one_ptid, in which case we use the
7877 ptid of the current_inferior.
7878 (lynx_wait_1): After having received a thread create/exit
7879 event, resume the inferior's execution using the signaling
7880 thread's ptid, rather than the old ptid.
7881
7882 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7883
7884 * lynx-low.c (lynx_resume): Delete variable ret.
7885
7886 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7887
7888 * gdbreplay.c (gdbreplay_version): Update copyright year.
7889 * server.c (gdbserver_version): Likewise.
7890
7891 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7892
7893 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7894 new thread.
7895
7896 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7897
7898 * lynx-low.c (ptrace_request_to_str): Add handling for
7899 PTRACE_GETTRACESIG.
7900
7901 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7902
7903 * lynx-low.c (lynx_attach): Delete variable new_process.
7904
7905 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7906
7907 * lynx-low.c (lynx_create_inferior): Delete variable
7908 new_process.
7909
7910 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7911
7912 * lynx-low.c (ptrace_request_to_str): Do not handle
7913 PTRACE_GETTHREADLIST if this macro does not exist.
7914
7915 2012-12-15 Yao Qi <yao@codesourcery.com>
7916
7917 * Makefile.in (OBS): Add notif.o.
7918 * notif.c, notif.h: New.
7919 * server.c: Include "notif.h".
7920 (struct vstop_notif) <next>: Remove.
7921 <base>: New field.
7922 (queue_stop_reply): Update.
7923 (push_event, send_next_stop_reply): Remove.
7924 (discard_queued_stop_replies): Update.
7925 (notif_stop): New variable.
7926 (handle_v_stopped): Remove.
7927 (handle_v_requests): Don't call handle_v_stopped. Call
7928 handle_ack_notif instead.
7929 (queue_stop_reply_callback): Call notif_event_enque instead
7930 of queue_stop_reply.
7931 (handle_status): Don't call send_next_stop_reply, call
7932 notif_write_event instead.
7933 (kill_inferior_callback): Likewise.
7934 (detach_or_kill_inferior_callback): Likewise.
7935 (main): Call initialize_notif.
7936 (process_serial_event): Call QUEUE_is_empty.
7937 (handle_target_event): Call notif_push instead of push event.
7938 * server.h (push_event): Remove declaration.
7939
7940 2012-12-10 Tom Tromey <tromey@redhat.com>
7941
7942 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7943 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7944 macros.
7945 (.c.o): Rewrite.
7946 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7947 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7948 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7949 (amd64-linux-ipa.o, ax.o): Rewrite.
7950 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7951 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7952 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7953 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7954 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7955 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7956 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7957 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7958 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7959 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7960 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7961 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7962 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7963 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7964 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7965 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7966 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7967 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7968 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7969 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7970 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7971 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7972 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7973 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7974 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7975 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7976 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7977 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7978 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7979 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7980 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7981 (reg-tilegx.o): Remove.
7982 (all_object_files): New macro.
7983 Include .deps files.
7984 * aclocal.m4, configure: Rebuild.
7985 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7986 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7987 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7988
7989 2012-12-05 Tom Tromey <tromey@redhat.com>
7990
7991 PR gdb/14917:
7992 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7993
7994 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7995
7996 * configure.ac: Check for linux/perf_event.h.
7997 * config.in: Regenerated.
7998 * configure: Regenerated.
7999
8000 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8001
8002 * hostio.c (handle_readlink): Decrease buffer size
8003 parameter passed to readlink by one byte.
8004
8005 2012-11-26 Yao Qi <yao@codesourcery.com>
8006
8007 * configure.ac (build_warnings): Append '-Wempty-body'.
8008 * configure: Regenerated.
8009 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8010 body.
8011
8012 2012-11-15 Pierre Muller <muller@sourceware.org>
8013
8014 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8015 * config.in: Regenerate.
8016 * configure: Regenerate.
8017 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8018 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8019 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8020 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8021 header.
8022 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8023 instead of <sys/wait.h> header.
8024 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8025
8026 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8027
8028 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8029 (various make rules): Remove -DGDBSERVER
8030
8031 2012-11-09 Yao Qi <yao@codesourcery.com>
8032
8033 * spu-low.c (current_ptid): Move it to ..
8034 * gdbthread.h: ... here. New.
8035 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8036 * server.c (myresume, process_serial_event): Likewise.
8037 * thread-db.c (thread_db_find_new_threads): Likewise.
8038 * tracepoint.c (run_inferior_command): Likewise.
8039
8040 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8041
8042 * server.c (handle_search_memory_1): Include access length in
8043 warning message.
8044
8045 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8046
8047 * linux-crisv32-low.c: Fix compile errors.
8048
8049 2012-09-04 Yao Qi <yao@codesourcery.com>
8050
8051 * tracepoint.c (cmd_qtsv): Adjust debug message.
8052 Don't check CUR_TPOINT.
8053
8054 2012-08-28 Yao Qi <yao@codesourcery.com>
8055
8056 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8057 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8058 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8059 Remove declarations of xmalloc, xreallloc, xstrdup and
8060 freeargv.
8061 * Makefile.in (libiberty_h): New.
8062 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8063 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8064
8065 2012-08-23 Yao Qi <yao@codesourcery.com>
8066
8067 * server.h: Remove declaration of 'xsnprintf'.
8068
8069 2012-08-22 Keith Seitz <keiths@redhat.com>
8070
8071 * server.h: Include build-gnulib-gbserver/config.h.
8072 * gdbreplay.c: Likewise.
8073
8074 2012-08-08 Doug Evans <dje@google.com>
8075
8076 * Makefile.in (SFILES): Add gdb_vecs.c.
8077 (OBS): Add gdb_vecs.o.
8078 (gdb_vecs_h, host_defs_h): New variables.
8079 (thread-db.o): Add $(gdb_vecs_h) dependency.
8080 (gdb_vecs.o): New rule.
8081 * thread-db.c: #include "gdb_vecs.h".
8082 (thread_db_load_search): Use a vector to iterate over path elements.
8083 Handle text appearing after "$pdir".
8084
8085 * configure.ac: Add check for strstr.
8086 * config.in: Regenerate.
8087 * configure: Regenerate.
8088
8089 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8090
8091 * hostio.c (handle_pread): If pread fails, fall back to attempting
8092 lseek/read.
8093 (handle_pwrite): Likewise for pwrite.
8094
8095 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8096
8097 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8098 between unsupported TYPE and unimplementable ADDR/LEN combination.
8099 (arm_insert_point): Act on new return value.
8100
8101 2012-07-31 Pedro Alves <palves@redhat.com>
8102
8103 * server.c (process_point_options): Only skip tokens if we find
8104 one that is unrecognized. Don't treat 'X' specially while
8105 skipping unrecognized tokens.
8106
8107 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8108
8109 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8110 to 4-byte-align HW breakpoint addresses for Thumb.
8111
8112 2012-07-27 Yao Qi <yao@codesourcery.com>
8113
8114 PR remote/14161.
8115
8116 * server.h: Declare gdb_agent_about_to_close.
8117 * target.c (kill_inferior): Include "agent.h".
8118 New. Send command 'kill'.
8119 * target.h (kill_inferior): Removed macro.
8120 * tracepoint.c (gdb_agent_about_to_close): New.
8121 (gdb_agent_helper_thread): Handle command 'close'.
8122 Wait endlessly until the inferior stops.
8123 Install gdb_agent_remove_socket to atexit hook.
8124 (agent_socket_name): New static variable.
8125 (gdb_agent_socket_init): Replace local variable 'name' with
8126 'agent_socket_name'.
8127 (gdb_agent_remove_socket): New.
8128
8129 2012-07-27 Yao Qi <yao@codesourcery.com>
8130
8131 * server.c (process_point_options): Stop at 'X' when parsing.
8132
8133 2012-07-19 Michael Eager <eager@eagercon.com>
8134
8135 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8136 to hw_execute.
8137 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8138 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8139 hardware breakpoint.
8140
8141 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8142
8143 * gdbserver/linux-low.c (initialize_low): Call
8144 linux_ptrace_init_warnings.
8145
8146 2012-07-02 Doug Evans <dje@google.com>
8147
8148 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8149 pointer to int.
8150
8151 2012-07-02 Stan Shebs <stan@codesourcery.com>
8152
8153 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8154 (ax.o): Add it to build rule.
8155 (ax-ipa.o): Ditto.
8156 (OBS): Add format.o.
8157 (IPA_OBS): Add format.o.
8158 * server.c (handle_query): Claim support for breakpoint commands.
8159 (process_point_options): Add command case.
8160 (process_serial_event): Leave running if there are printfs in
8161 effect.
8162 * mem-break.h (any_persistent_commands): Declare.
8163 (add_breakpoint_commands): Declare.
8164 (gdb_no_commands_at_breakpoint): Declare.
8165 (run_breakpoint_commands): Declare.
8166 * mem-break.c (struct point_command_list): New struct.
8167 (struct breakpoint): New field command_list.
8168 (any_persistent_commands): New function.
8169 (add_commands_to_breakpoint): New function.
8170 (add_breakpoint_commands): New function.
8171 (gdb_no_commands_at_breakpoint): New function.
8172 (run_breakpoint_commands): New function.
8173 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8174 locally.
8175 * ax.c: Include format.h.
8176 (ax_printf): New function.
8177 (gdb_eval_agent_expr): Add printf opcode.
8178
8179 2012-06-13 Yao Qi <yao@codesourcery.com>
8180
8181 * server.c (start_inferior): Remove duplicated writes to fields
8182 'last_resume_kind' and 'last_status' of 'current_inferior'.
8183
8184 2012-06-12 Yao Qi <yao@codesourcery.com>
8185 Pedro Alves <palves@redhat.com>
8186
8187 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8188 comment.
8189 * server.c (handle_v_cont): Extend comment.
8190
8191 2012-06-11 Yao Qi <yao@codesourcery.com>
8192
8193 * linux-low.c (linux_attach): Add 'static'.
8194
8195 2012-06-06 Yao Qi <yao@codesourcery.com>
8196
8197 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8198
8199 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8200
8201 Fix gcc -flto compilation warning.
8202 * server.c (main): Make variable multi_mode and attach volatile.
8203
8204 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8205
8206 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8207 if the platform doesn't know about it.
8208
8209 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8210
8211 * Makefile.in (SFILES): Add linux-tile-low.c.
8212 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8213 * configure.srv: Handle tilegx-*-linux*.
8214 * linux-tile-low.c: New file.
8215
8216 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8217
8218 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8219
8220 2012-05-24 Pedro Alves <palves@redhat.com>
8221
8222 PR gdb/7205
8223
8224 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8225
8226 2012-05-24 Pedro Alves <palves@redhat.com>
8227
8228 PR gdb/7205
8229
8230 Replace target_signal with gdb_signal throughout.
8231
8232 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8233
8234 * linux-low.c (linux_store_registers): Avoid the copying sequence
8235 when no data has been retrieved by ptrace.
8236
8237 2012-05-22 Will Deacon <will.deacon@arm.com>
8238
8239 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8240 Include asm/ptrace.h.
8241 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8242 already defined.
8243
8244 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8245
8246 * linux-low.c (linux_store_registers): Don't re-retrieve data
8247 with ptrace that has already been obtained from /proc. Always
8248 copy any data retrieved with ptrace to the buffer supplied.
8249
8250 2012-05-11 Yao Qi <yao@codesourcery.com>
8251 Pedro Alves <palves@redhat.com>
8252
8253 * linux-low.c (enum stopping_threads_kind): New.
8254 (stopping_threads): Change type to `enum stopping_threads_kind'.
8255 (handle_extended_wait): If stopping and suspending threads, leave
8256 the new_lwp suspended too.
8257 (linux_wait_for_event): Adjust.
8258 (stop_all_lwps): Set `stopping_threads' to
8259 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8260 whether we're suspending threads or just stopping them. Assert no
8261 recursion happens.
8262
8263 2012-04-29 Yao Qi <yao@codesourcery.com>
8264
8265 * server.h: Move some code to ...
8266 * gdbthread.h: ... here. New.
8267 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8268 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8269 (nto-low.o, win32-low.o): Likewise.
8270 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8271 * regcache.c, remote-utils.c, server.c: Likewise.
8272 * target.c, tracepoint.c, win32-low.c: Likewise.
8273
8274 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8275
8276 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8277 (PTRACE_ARG4_TYPE): Likewise.
8278 (PTRACE_XFER_TYPE): Likewise.
8279 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8280 ptrace to PTRACE_ARG3_TYPE.
8281 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8282 (PTRACE_ARG4_TYPE): Likewise.
8283 (PTRACE_XFER_TYPE): Likewise.
8284 (linux_detach_one_lwp): Cast fourth argument of
8285 ptrace to long then PTRACE_ARG4_TYPE.
8286 (regsets_fetch_inferior_registers): Cast third argument of
8287 ptrace to long then PTRACE_ARG3_TYPE.
8288 (regsets_store_inferior_registers): Likewise.
8289
8290 2012-04-20 Pedro Alves <palves@redhat.com>
8291
8292 * configure: Regenerate.
8293
8294 2012-04-19 Pedro Alves <palves@redhat.com>
8295
8296 * Makefile.in (GNULIB_BUILDDIR): New.
8297 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8298 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8299 (all, install-only, uninstall, clean-info, all-lib, clean): No
8300 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8301 (maintainer-clean realclean distclean): Use subdir_do.
8302 (subdir_do): New.
8303 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8304 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8305 * acinclude.m4: Include acx_configure_dir.m4.
8306 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8307 calls. Call AC_PROG_RANLIB. Configure gnulib using
8308 ACX_CONFIGURE_DIR.
8309 (GNULIB): New.
8310 (GNULIB_STDINT_H): Adjust.
8311 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8312 * gdbreplay.c: Include build-gnulib/config.h.
8313 * server.h: Likewise.
8314 * aclocal.m4: Regenerate.
8315 * config.in: Regenerate.
8316 * configure: Regenerate.
8317
8318 2012-04-19 Pedro Alves <palves@redhat.com>
8319
8320 * Makefile.in (LIBGNU, INCGNU): Adjust.
8321 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8322 (all, install-only, uninstall, clean-info, all-lib, clean)
8323 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8324 * configure.ac: Adjust AC_OUTPUT output.
8325 * aclocal.m4: Regenerate.
8326 * configure: Regenerate.
8327
8328 2012-04-19 Pedro Alves <palves@redhat.com>
8329
8330 * Makefile.in (generated_files): New.
8331 (server_h): Remove the explicit dependency on config.h, and depend
8332 on $generated_files.
8333
8334 2012-04-19 Pedro Alves <palves@redhat.com>
8335
8336 * Makefile.in (INCGNU): Add -Ignulib.
8337
8338 2012-04-19 Pedro Alves <palves@redhat.com>
8339
8340 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8341 (INCGNU): ... this, and spell out -I here.
8342 (GNULIB_LIB): Rename to ...
8343 (LIBGNU): ... this.
8344 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8345
8346 2012-04-19 Pedro Alves <palves@redhat.com>
8347
8348 * config.in: Regenerate.
8349
8350 2012-04-19 Pedro Alves <palves@redhat.com>
8351
8352 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8353 * server.h (memmem): Remove declaration.
8354 * config.in: Regenerate.
8355 * configure: Regenerate.
8356
8357 2012-04-19 Yao Qi <yao@codesourcery.com>
8358
8359 * Makefile.in (SFILES): Add common/vec.c.
8360 (OBS): Add vec.o.
8361 (vec.o): New rule.
8362
8363 2012-04-19 Yao Qi <yao@codesourcery.com>
8364
8365 * remote-utils.c (prepare_resume_reply): Replace with macro
8366 target_core_of_thread.
8367 * server.c (handle_qxfer_threads_proper): Likewise.
8368 * target.h (traget_core_of_thread): New macro.
8369
8370 2012-04-18 Pedro Alves <palves@redhat.com>
8371
8372 * aclocal.m4: Regenerate.
8373 * configure: Regenerate.
8374
8375 2012-04-16 Yao Qi <yao@codesourcery.com>
8376
8377 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8378 duplicated on address.
8379
8380 2012-04-16 Yao Qi <yao@codesourcery.com>
8381
8382 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8383 (struct tracepoint_action_ops) <send>: New field.
8384 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8385 (agent_expr_send, x_tracepoint_action_send): New.
8386 (l_tracepoint_action_send): New.
8387 (cmd_qtdp): Download and install tracepoint
8388 according to `use_agent'.
8389 (run_inferior_command): Add one more parameter `len'.
8390 Update callers.
8391 (tracepoint_send_agent): New.
8392 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8393
8394 2012-04-16 Yao Qi <yao@codesourcery.com>
8395
8396 * tracepoint.c (download_tracepoints): Moved to ...
8397 (cmd_qtstart): ... here.
8398
8399 2012-04-14 Yao Qi <yao@codesourcery.com>
8400
8401 * tracepoint.c: Include inttypes.h.
8402 (struct collect_memory_action): Use sized types.
8403 (struct tracepoint): Likewise.
8404 (cmd_qtdp, stop_tracing): Update print specifiers.
8405 (cmd_qtp, response_tracepoint): Likewise.
8406 (collect_data_at_tracepoint): Likewise.
8407 (collect_data_at_step): Likewise.
8408
8409 2012-04-14 Yao Qi <yao@codesourcery.com>
8410
8411 Import gnulib module inttypes.
8412 * aclocal.m4, config.in, configure: Regenerated.
8413
8414 2012-04-14 Yao Qi <yao@codesourcery.com>
8415
8416 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8417 Makefile and config.status at last.
8418
8419 2012-04-13 Yao Qi <yao@codesourcery.com>
8420
8421 * tracepoint.c: Include stdint.h unconditionally.
8422
8423 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8424
8425 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8426 on BFD_HAVE_SYS_PROCFS_TYPE.
8427 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8428 * configure: Regenerate.
8429 * config.in: Likewise.
8430
8431 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8432
8433 * Makefile.in (clean): Also remove x32.c x32-linux.c
8434 x32-avx.c x32-avx-linux.c.
8435 (x32.o): New target.
8436 (x32.c): Likewise.
8437 (x32-linux.o): Likewise.
8438 (x32-linux.c): Likewise.
8439 (x32-avx.o): Likewise.
8440 (x32-avx.c): Likewise.
8441 (x32-avx-linux.o): Likewise.
8442 (x32-avx-linux.c): Likewise.
8443
8444 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8445 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8446 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8447 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8448 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8449 i386/x32-avx-linux.xml.
8450
8451 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8452 (init_registers_x32_avx_linux): Likwise.
8453 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8454 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8455
8456 2012-04-13 Pedro Alves <palves@redhat.com>
8457
8458 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8459 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8460 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8461 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8462 the sub-make.
8463
8464 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8465
8466 * linux-x86-low.c (compat_x32_clock_t): New.
8467 (compat_x32_siginfo_t): Likewise.
8468 (compat_x32_siginfo_from_siginfo): Likewise.
8469 (siginfo_from_compat_x32_siginfo): Likewise.
8470 (linux_is_elf64): Likewise.
8471 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8472 and siginfo_from_compat_x32_siginfo for x32.
8473 (x86_arch_setup): Set linux_is_elf64.
8474
8475 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8476
8477 PR gdb/13969
8478 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8479 e_machine field.
8480 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8481 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8482 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8483 compatible with process.
8484
8485 2012-04-12 Yao Qi <yao@codesourcery.com>
8486
8487 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8488 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8489 (install-only, install-info, clean): Handle sub dir gnulib.
8490 (all-lib, am--refresh): New targets.
8491 (memmem.o): Remove target.
8492 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8493 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8494 (AC_REPLACE_FUNCS): Remove memmem.
8495 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8496 (AC_OUTPUT): Generate Makefile in gnulib/.
8497 * aclocal.m4, config.in, configure: Regenerated.
8498
8499 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8500
8501 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8502
8503 2012-04-05 Pedro Alves <palves@redhat.com>
8504
8505 -Werror=strict-aliasing
8506
8507 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8508 pointer.
8509
8510 2012-04-04 Pedro Alves <palves@redhat.com>
8511
8512 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8513 (sparc_store_gregset_from_stack, sparc_store_gregset)
8514 (sparc_breakpoint_at): Fix formatting.
8515
8516 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8517
8518 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8519 are available.
8520 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8521 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8522 * config.in: Regenerate.
8523 * configure: Likewise.
8524
8525 2012-03-29 Pedro Alves <palves@redhat.com>
8526
8527 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8528 Correct ptrace arguments.
8529
8530 2012-03-28 Pedro Alves <palves@redhat.com>
8531
8532 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8533 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8534 (IA64_FR1_REGNUM): New defines.
8535 (ia64_fetch_register): New.
8536 (the_low_target): Install it.
8537 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8538 field.
8539 * linux-low.c (linux_fetch_registers): Try the
8540 the_low_target.fetch_register hook first.
8541
8542 * linux-arm-low.c (the_low_target): Adjust.
8543 * linux-bfin-low.c (the_low_target): Adjust.
8544 * linux-cris-low.c (the_low_target): Adjust.
8545 * linux-crisv32-low.c (the_low_target): Adjust.
8546 * linux-m32r-low.c (the_low_target): Adjust.
8547 * linux-m68k-low.c (the_low_target): Adjust.
8548 * linux-mips-low.c (the_low_target): Adjust.
8549 * linux-ppc-low.c (the_low_target): Adjust.
8550 * linux-s390-low.c (the_low_target): Adjust.
8551 * linux-sh-low.c (the_low_target): Adjust.
8552 * linux-sparc-low.c (the_low_target): Adjust.
8553 * linux-tic6x-low.c (the_low_target): Adjust.
8554 * linux-x86-low.c (the_low_target): Adjust.
8555 * linux-xtensa-low.c (the_low_target): Adjust.
8556
8557 2012-03-26 Pedro Alves <palves@redhat.com>
8558
8559 * server.c (handle_qxfer_libraries): Don't bail early if
8560 the_target->qxfer_libraries_svr4 is not NULL.
8561
8562 2012-03-26 Pedro Alves <palves@redhat.com>
8563
8564 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8565
8566 2012-03-23 Pedro Alves <palves@redhat.com>
8567
8568 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8569 "library-list-svr4" element's start tag when the the DSO list is
8570 empty.
8571
8572 2012-03-23 Pedro Alves <palves@redhat.com>
8573
8574 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8575 a variable whose type size is the same as the inferior's pointer
8576 size.
8577
8578 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8579
8580 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8581 struct siginfo.
8582 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8583 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8584 * linux-low.h: Include <signal.h>.
8585 (struct siginfo): Remove forward declaration.
8586 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8587 struct siginfo.
8588
8589 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8590
8591 * .gitignore: Ignore more files.
8592
8593 2012-03-19 Pedro Alves <palves@redhat.com>
8594 Jan Kratochvil <jan.kratochvil@redhat.com>
8595
8596 * server.c (cont_thread, general_thread): Add describing comments.
8597 (start_inferior): Clear `cont_thread'.
8598 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8599 of a process.
8600
8601 2012-03-15 Yao Qi <yao@codesourcery.com>
8602
8603 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8604 handling to ...
8605 (cmd_qtdp): ... here.
8606
8607 2012-03-15 Yao Qi <yao@codesourcery.com>
8608
8609 * tracepoint.c (struct tracepoint_action_ops): New.
8610 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8611 (m_tracepoint_action_download): New.
8612 (r_tracepoint_action_download): New.
8613 (x_tracepoint_action_download): New.
8614 (l_tracepoint_action_download): New.
8615 (add_tracepoint_action): Install `action->ops' according type.
8616 (download_tracepoint_1): Move code `download' function pointer
8617 of various tracepoint_action_ops.
8618
8619 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8620
8621 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8622 linux_ptrace_attach_warnings.
8623
8624 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8625
8626 * Makefile.in (linux-ptrace.o): New.
8627 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8628 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8629 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8630 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8631 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8632 of these targets.
8633 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8634
8635 2012-03-08 Yao Qi <yao@codesourcery.com>
8636 Pedro Alves <palves@redhat.com>
8637
8638 Fix PR server/13392.
8639 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8640 offset of JMP insn.
8641 * tracepoint.c (remove_tracepoint): New.
8642 (cmd_qtdp): Call remove_tracepoint when failed to install.
8643
8644 2012-03-07 Pedro Alves <palves@redhat.com>
8645
8646 * linux-low.c (get_detach_signal): New.
8647 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8648 Pass on pending signals to PTRACE_DETACH. Check the result of the
8649 ptrace call.
8650 * server.c (program_signals, program_signals_p): New.
8651 (handle_general_set): Handle QProgramSignals.
8652 * server.h (program_signals, program_signals_p): Declare.
8653
8654 2012-03-05 Pedro Alves <palves@redhat.com>
8655 Jan Kratochvil <jan.kratochvil@redhat.com>
8656
8657 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8658 New comment why.
8659
8660 2012-03-03 Yao Qi <yao@codesourcery.com>
8661
8662 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8663 agent_look_up_symbols.
8664
8665 2012-03-03 Yao Qi <yao@codesourcery.com>
8666
8667 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8668 (linux-x86-low.o): Likewise.
8669 * server.h: Remove in_process_agent_loaded.
8670 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8671 common/agent.c.
8672 Update callers.
8673
8674 2012-03-03 Yao Qi <yao@codesourcery.com>
8675
8676 * tracepoint.c (gdb_agent_capability): New global.
8677 (in_process_agent_loaded_ust): Renamed to
8678 `in_process_agent_supports_ust'.
8679 Update callers.
8680 (in_process_agent_supports_ust): Call agent_capability_check.
8681 (clear_installed_tracepoints): Assert that agent supports
8682 agent.
8683
8684 2012-03-03 Yao Qi <yao@codesourcery.com>
8685
8686 * linux-low.c (linux_supports_agent): New.
8687 (linux_target_ops): Initialize field `supports_agent' with
8688 linux_supports_agent.
8689 * target.h (struct target_ops) <supports_agent>: New.
8690 (target_supports_agent): New macro.
8691 * server.c (handle_general_set): Handle packet 'QAgent'.
8692 (handle_query): Send `QAgent+'.
8693 * Makefile.in (server.o): Depends on agent.h.
8694
8695 2012-03-03 Yao Qi <yao@codesourcery.com>
8696
8697 * Makefile.in (OBS): Add agent.o.
8698 Add new rule for agent.o.
8699 Track dependence of tracepoint.c on agent.h.
8700 * tracepoint.c (run_inferior_command_1):
8701 (run_inferior_command): Call agent_run_command.
8702 (gdb_ust_connect_sync_socket): Deleted. Move it to
8703 common/agent.c.
8704 (resume_thread, stop_thread): Likewise.
8705 (gdb_ust_socket_init): Renamed to ...
8706 (gdb_agent_socket_init): ... New.
8707 (gdb_ust_thread): Renamed to ...
8708 (gdb_agent_helper_thread): ... New.
8709 (gdb_ust_init): Move some code to ...
8710 (gdb_agent_init): ... here. New.
8711 [HAVE_UST]: Call gdb_ust_init.
8712 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8713 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8714 * config.in, configure: Regenerated.
8715
8716 2012-03-02 Pedro Alves <palves@redhat.com>
8717
8718 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8719 * linux-low.c (struct simple_pid_list): New.
8720 (stopped_pids): New a struct simple_pid_list pointer.
8721 (add_to_pid_list, pull_pid_from_list): New.
8722 (handle_extended_wait): Don't assume the first signal new children
8723 report is SIGSTOP. Adjust call to pull_pid_from_list.
8724 (linux_wait_for_lwp): Adjust.
8725
8726 2012-03-02 Yao Qi <yao@codesourcery.com>
8727
8728 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8729 debug log.
8730
8731 2012-03-02 Yao Qi <yao@codesourcery.com>
8732
8733 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8734 `stop_pc' and `tpoint'. Update caller.
8735
8736 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8737
8738 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8739 * linux-low.c (use_linux_regsets): New macro.
8740 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8741 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8742 (linux_register_in_regsets): New function.
8743 (usr_fetch_inferior_registers): Skip registers covered by
8744 regsets.
8745 (usr_store_inferior_registers): Likewise.
8746 (usr_fetch_inferior_registers): New macro.
8747 (usr_store_inferior_registers): Likewise.
8748 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8749 (linux_store_registers): Likewise.
8750 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8751 prototype.
8752 (init_registers_mips64_dsp_linux): Likewise.
8753 (init_registers_mips_linux): New macro.
8754 (init_registers_mips_dsp_linux): Likewise.
8755 (mips_dsp_num_regs): Likewise.
8756 (DSP_BASE, DSP_CONTROL): New fallback macros.
8757 (mips_base_regs): New macro.
8758 (mips_regmap): Use it. Fix the size.
8759 (mips_dsp_regmap): New variable.
8760 (mips_dsp_regset_bitmap): Likewise.
8761 (mips_arch_setup): New function.
8762 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8763 than mips_regmap.
8764 (mips_cannot_store_register): Likewise.
8765 (the_low_target): Update .arch_setup, .num_regs and .regmap
8766 initializers. Add .regset_bitmap initializer.
8767 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8768 initializer.
8769 * linux-bfin-low.c (the_low_target): Likewise.
8770 * linux-cris-low.c (the_low_target): Likewise.
8771 * linux-crisv32-low.c (the_low_target): Likewise.
8772 * linux-ia64-low.c (the_low_target): Likewise.
8773 * linux-m32r-low.c (the_low_target): Likewise.
8774 * linux-m68k-low.c (the_low_target): Likewise.
8775 * linux-ppc-low.c (the_low_target): Likewise.
8776 * linux-s390-low.c (the_low_target): Likewise.
8777 * linux-sh-low.c (the_low_target): Likewise.
8778 * linux-sparc-low.c (the_low_target): Likewise.
8779 * linux-tic6x-low.c (the_low_target): Likewise.
8780 * linux-x86-low.c (the_low_target): Likewise.
8781 * linux-xtensa-low.c (the_low_target): Likewise.
8782 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8783 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8784 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8785 srv_xmlfiles.
8786 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8787 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8788
8789 2012-02-29 Yao Qi <yao@codesourcery.com>
8790 Pedro Alves <palves@redhat.com>
8791
8792 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8793 `step_over_finished' is true.
8794
8795 2012-02-27 Pedro Alves <palves@redhat.com>
8796
8797 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8798 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8799
8800 2012-02-27 Pedro Alves <palves@redhat.com>
8801
8802 PR server/9684
8803 * linux-low.c (pid_is_stopped): New.
8804 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8805
8806 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8807
8808 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8809 of conditions.
8810
8811 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8812
8813 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8814
8815 2012-02-24 Luis Machado <lgustavo@codesourcery>
8816
8817 * server.c (handle_query): Advertise support for target-side
8818 breakpoint condition evaluation.
8819 (process_point_options): New function.
8820 (process_serial_event): When inserting a breakpoint, check for
8821 a target-side condition that should be evaluated.
8822
8823 * mem-break.c: Include regcache.h and ax.h.
8824 (point_cond_list_t): New data structure.
8825 (breakpoint) <cond_list>: New field.
8826 (find_gdb_breakpoint_at): Make non-static.
8827 (delete_gdb_breakpoint_at): Clear any target-side
8828 conditions.
8829 (clear_gdb_breakpoint_conditions): New function.
8830 (add_condition_to_breakpoint): Likewise.
8831 (add_breakpoint_condition): Likewise.
8832 (gdb_condition_true_at_breakpoint): Likewise.
8833 (gdb_breakpoint_here): Return result directly instead
8834 of going through a local variable.
8835
8836 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8837 (clear_gdb_breakpoint_conditions): Likewise.
8838 (add_breakpoint_condition): Likewise.
8839 (gdb_condition_true_at_breakpoint): Likewise.
8840
8841 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8842 (need_step_over_p): Take target-side breakpoint condition into
8843 consideration.
8844
8845 2012-02-24 Luis Machado <lgustavo@codesourcery>
8846
8847 * server.h: Include tracepoint.h.
8848 (agent_mem_read, agent_get_trace_state_variable_value,
8849 agent_set_trace_state_variable_value,
8850 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8851 get_set_tsv_func_addr): New prototypes.
8852
8853 * ax.h: New include file.
8854 * ax.c: New source file.
8855
8856 * tracepoint.c: Include ax.h.
8857 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8858 agent_expr, eval_result_type): Move to ax.h.
8859 (parse_agent_expr): Rename to ...
8860 (gdb_parse_agent_expr): ... this, make it non-static and move
8861 to ax.h.
8862 (unparse_agent_expr) Rename to ...
8863 (gdb_unparse_agent_expr): ... this, make it non-static and move
8864 to ax.h.
8865 (eval_agent_expr): Rename to ...
8866 (eval_tracepoint_agent_expr): ... this.
8867 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8868 forward declarations.
8869 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8870 (agent_get_trace_state_variable_value): New function.
8871 (agent_set_trace_state_variable_value): New function.
8872 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8873 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8874 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8875 (condition_true_at_tracepoint): Likewise.
8876 (parse_agent_expr): Rename to ...
8877 (gdb_parse_agent_expr): ... this and move to ax.c.
8878 (unparse_agent_expr): Rename to ...
8879 (gdb_unparse_agent_expr): ... this and move to ax.c.
8880 (gdb_agent_op_name): Move to ax.c.
8881 (eval_agent_expr): Rename to ...
8882 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8883 and move to ax.c.
8884 (eval_tracepoint_agent_expr): New function.
8885 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8886 non-static.
8887 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8888 ax.c.
8889 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8890 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8891 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8892 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8893 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8894 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8895 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8896 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8897 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8898 (compile_bytecodes): Remove forward declaration.
8899 (is_goto_target): Move to ax.c.
8900 (compile_bytecodes): Move to ax.c and call
8901 agent_get_trace_state_variable_value (...) and
8902 agent_set_trace_state_variable_value (...).
8903
8904 * Makefile.in: Update ax.c and IPA dependencies.
8905
8906 2012-02-24 Pedro Alves <palves@redhat.com>
8907
8908 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8909 (cmd_bigqtbuffer_circular): ... this. Only handle
8910 'QTBuffer:circular:'.
8911 (handle_tracepoint_general_set): Adjust.
8912
8913 2012-02-16 Yao Qi <yao@codesourcery.com>
8914
8915 * inferiors.c: Move code to ...
8916 * dll.c: .... here. New.
8917 * server.h: Declare clear_dlls.
8918 * Makefile.in (SFILES): Add dll.c.
8919 (OBS): Add dll.o
8920 (dll.o): New rule.
8921
8922 2012-02-11 Yao Qi <yao@codesourcery.com>
8923
8924 * server.c: (handle_monitor_command): Add a new parameter
8925 `own_buf'.
8926 (handle_query): Update caller.
8927
8928 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8929
8930 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8931 * configure, config.in: Regenerate.
8932 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8933 is not defined.
8934
8935 2012-02-02 Pedro Alves <palves@redhat.com>
8936
8937 Try SIGKILL first, then PTRACE_KILL.
8938 * linux-low.c (linux_kill_one_lwp): New.
8939 (linux_kill_one_lwp): Rename to ...
8940 (kill_one_lwp_callback): ... this. Use the new
8941 linux_kill_one_lwp.
8942
8943 2012-02-02 Pedro Alves <palves@redhat.com>
8944
8945 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8946 inferior.
8947
8948 2012-01-27 Pedro Alves <palves@redhat.com>
8949
8950 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8951 (elf_64_file_p): Make static.
8952 (linux_pid_exe_is_elf_64_file): New.
8953 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8954 Delete declarations.
8955 (linux_pid_exe_is_elf_64_file): Declare.
8956 * linux-x86-low.c (x86_arch_setup): Use
8957 linux_pid_exe_is_elf_64_file.
8958
8959 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8960
8961 * linux-low.c (linux_wait_for_event_1): Rename to ...
8962 (linux_wait_for_event): ... here and merge it with former
8963 linux_wait_for_event - new variable wait_ptid, use it.
8964 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8965
8966 2012-01-23 Pedro Alves <palves@redhat.com>
8967
8968 * server.c (main): Avoid yet another case of infinite loop while
8969 detaching/killing after a longjmp.
8970
8971 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8972
8973 Code cleanup.
8974 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8975
8976 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8977
8978 * hostio.c (handle_readlink): New function.
8979 (handle_vFile): Call it to handle "vFile:readlink" packets.
8980
8981 2012-01-20 Pedro Alves <palves@redhat.com>
8982 Ulrich Weigand <ulrich.weigand@linaro.org>
8983
8984 * server.c (handle_v_requests): Only support vAttach and vRun to
8985 start multiple processes when in extended protocol mode.
8986
8987 2012-01-17 Pedro Alves <palves@redhat.com>
8988
8989 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8990 memalign plus mprotect to allocate the scratch buffer.
8991
8992 2012-01-13 Pedro Alves <palves@redhat.com>
8993
8994 * server.c (attach_inferior): Clear `cont_thread'.
8995
8996 2012-01-13 Pedro Alves <palves@redhat.com>
8997
8998 * server.c (main): Avoid infinite loop while detaching/killing
8999 after a longjmp.
9000
9001 2012-01-09 Doug Evans <dje@google.com>
9002
9003 * server.c (start_inferior): Set last_ptid in --wrapper case.
9004
9005 2012-01-06 Yao Qi <yao@codesourcery.com>
9006
9007 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9008 defined.
9009 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9010
9011 2012-01-04 Yao Qi <yao@codesourcery.com>
9012
9013 * tracepoint.c (cmd_qtdp): Print debug message
9014 for static tracepoint.
9015
9016 2012-01-04 Yao Qi <yao@codesourcery.com>
9017
9018 * tracepoint.c (trace_vdebug): Differentiate debug message
9019 between gdbserver and IPA.
9020
9021 2012-01-03 Yao Qi <yao@codesourcery.com>
9022
9023 * tracepoint.c (tracepoint_was_hit): Don't collect for
9024 static tracepoint.
9025
9026 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9027
9028 * terminal.h: Reformat copyright header.
9029
9030 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9031
9032 * server.c (gdbserver_version): Update copyright year.
9033 * gdbreplay.c (gdbreplay_version): Likewise.
9034
9035 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9036
9037 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9038
9039 Revert:
9040 2011-12-18 Hui Zhu <teawater@gmail.com>
9041 * linux-low.c (linux_create_inferior): Save return value to ret.
9042
9043 2011-12-18 Hui Zhu <teawater@gmail.com>
9044
9045 * linux-low.c (linux_create_inferior): Save return value to ret.
9046
9047 2011-12-16 Doug Evans <dje@google.com>
9048
9049 * linux-low.c (linux_create_inferior): If stdio connection,
9050 redirect stdin from /dev/null, stdout to stderr.
9051 * remote-utils.c (remote_is_stdio): New static global.
9052 (remote_connection_is_stdio): New function.
9053 (remote_prepare): Handle stdio connection.
9054 (remote_open): Ditto.
9055 (remote_close): Don't close stdin for stdio connections.
9056 (read_prim,write_prim): New functions. Replace all calls to
9057 read/write to these.
9058 * server.c (main): Watch for "-" argument. Move call to
9059 remote_prepare before start_inferior.
9060 * server.h (STDIO_CONNECTION_NAME): New macro.
9061 (remote_connection_is_stdio): Declare.
9062
9063 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9064 in debugging output.
9065
9066 2011-12-15 Yao Qi <yao@codesourcery.com>
9067
9068 * tracepoint.c: Include sys/syscall.h.
9069 (gdb_ust_thread): Remove preprocessor conditional.
9070
9071 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9072
9073 * linux-low.c (linux_detach_one_lwp): Call
9074 the_low_target.prepare_to_resume before detaching.
9075
9076 2011-12-14 Yao Qi <yao@codesourcery.com>
9077
9078 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9079 of write.
9080
9081 2011-12-14 Yao Qi <yao@codesourcery.com>
9082
9083 * i386-low.c (i386_low_stopped_data_address): Initialize local
9084 variable `control'.
9085
9086 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9087
9088 PR remote/13492
9089
9090 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9091 DR_CONTROL unless necessary. Extend comments.
9092 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9093 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9094
9095 2011-12-13 Yao Qi <yao@codesourcery.com>
9096
9097 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9098 macros.
9099 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9100
9101 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9102
9103 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9104 Print new debug message for such case.
9105
9106 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9107
9108 Fix overlapping memcpy.
9109 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9110 the read_inferior_memory transfer.
9111 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9112 write_inferior_memory transfer.
9113 (set_fast_tracepoint_jump): New variable buf. Use it for the
9114 read_inferior_memory and write_inferior_memory transfers.
9115 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9116 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9117 Use it for the write_inferior_memory transfer.
9118 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9119 buffers.
9120
9121 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9122
9123 * linux-low.c (fetch_register, store_register): Make code
9124 consistent, fix formatting.
9125
9126 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9127
9128 * linux-low.c (usr_store_inferior_registers): Factor out code
9129 to handle individual registers into...
9130 (store_register): ... this new function.
9131
9132 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9133
9134 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9135 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9136 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9137 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9138 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9139 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9140 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9141 (srv_xmlfiles): Add new XML files.
9142
9143 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9144 and <sys/uio.h>.
9145 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9146 (init_registers_s390_linux32v1): Add prototype.
9147 (init_registers_s390_linux32v2): Likewise.
9148 (init_registers_s390_linux64v1): Likewise.
9149 (init_registers_s390_linux64v2): Likewise.
9150 (init_registers_s390x_linux64v1): Likewise.
9151 (init_registers_s390x_linux64v2): Likewise.
9152 (s390_num_regs): Increment to 52.
9153 (s390_regmap): Add orig_r2 register.
9154 (s390_num_regs_3264): Increment to 68.
9155 (s390_regmap_3264): Add orig_r2 register.
9156 (s390_collect_ptrace_register): Handle orig_r2 register.
9157 (s390_supply_ptrace_register): Likewise.
9158 (s390_fill_last_break): New function.
9159 (s390_store_last_break): Likewise.
9160 (s390_fill_system_call): New function.
9161 (s390_store_system_call): Likewise.
9162 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9163 register sets.
9164 (s390_check_regset): New function.
9165 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9166 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9167 Update target_regsets for available register sets.
9168
9169 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9170 Jan Kratochvil <jan.kratochvil@redhat.com>
9171
9172 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9173 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9174 New.
9175 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9176 * linux-low.h (struct process_info_private): New member r_debug.
9177 * server.c (handle_qxfer_libraries): Call
9178 the_target->qxfer_libraries_svr4.
9179 (handle_qxfer_libraries_svr4): New function.
9180 (qxfer_packets): New entry "libraries-svr4".
9181 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9182 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9183 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9184 PACKET_qXfer_libraries_svr4.
9185
9186 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9187
9188 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9189 PSW address/mask between 8-byte and 16-byte formats.
9190 (s390_supply_ptrace_register): Likewise.
9191 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9192 basic addressing mode bit.
9193
9194 2011-11-24 Stan Shebs <stan@codesourcery.com>
9195
9196 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9197
9198 2011-11-17 Stan Shebs <stan@codesourcery.com>
9199
9200 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9201 (tracing_start_time): New global.
9202 (tracing_stop_time): New global.
9203 (tracing_user_name): New global.
9204 (tracing_notes): New global.
9205 (tracing_stop_note): New global.
9206 (cmd_qtstart): Set traceframe_usage, start_time.
9207 (stop_tracing): Set stop_time.
9208 (cmd_qtstatus): Report additional status.
9209 (cmd_qtp): New function.
9210 (handle_tracepoint_query): Call it.
9211 (cmd_qtnotes): New function.
9212 (handle_tracepoint_general_set): Call it.
9213 (get_timestamp): Rename from tsv_get_timestamp.
9214
9215 2011-11-14 Stan Shebs <stan@codesourcery.com>
9216 Kwok Cheung Yeung <kcy@codesourcery.com>
9217
9218 * linux-x86-low.c (small_jump_insn): New.
9219 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9220 trampoline and error message, build a trampoline and issue a small
9221 jump instruction to it.
9222 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9223 trampoline and error message.
9224 (x86_get_min_fast_tracepoint_insn_len): New.
9225 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9226 * linux-low.h (struct linux_target_ops): Add arguments to
9227 install_fast_tracepoint_jump_pad operation, add new operation.
9228 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9229 arguments.
9230 (linux_get_min_fast_tracepoint_insn_len): New function.
9231 (linux_target_op): Add new operation.
9232 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9233 (gdb_trampoline_buffer_end): Ditto.
9234 (gdb_trampoline_buffer_error): Ditto.
9235 (struct ipa_sym_addresses): Add fields for new IPA variables.
9236 (symbol_list): Add entries for new IPA variables.
9237 (struct tracepoint): Add fields to hold the address range of the
9238 trampoline used by the tracepoint.
9239 (trampoline_buffer_head): New static variable.
9240 (trampoline_buffer_tail): Ditto.
9241 (claim_trampoline_space): New function.
9242 (have_fast_tracepoint_trampoline_buffer): New function.
9243 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9244 structure.
9245 (install_fast_tracepoint): Ditto, also add error buffer argument.
9246 (cmd_qtminftpilen): New function.
9247 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9248 (fast_tracepoint_from_trampoline_address): New function.
9249 (fast_tracepoint_collecting): Handle trampoline as part of jump
9250 pad space.
9251 (set_trampoline_buffer_space): New function.
9252 (initialize_tracepoint): Initialize new IPA variables.
9253 * target.h (struct target_ops): Add arguments to
9254 install_fast_tracepoint_jump_pad operation, add new
9255 get_min_fast_tracepoint_insn_len operation.
9256 (target_get_min_fast_tracepoint_insn_len): New.
9257 (install_fast_tracepoint_jump_pad): Add arguments.
9258 * server.h (IPA_BUFSIZ): Define.
9259 * linux-i386-ipa.c: Include extra header files.
9260 (initialize_fast_tracepoint_trampoline_buffer): New function.
9261 (initialize_low_tracepoint): Call it.
9262 * server.h (set_trampoline_buffer_space): Declare.
9263 (claim_trampoline_space): Ditto.
9264 (have_fast_tracepoint_trampoline_buffer): Ditto.
9265
9266 2011-11-14 Yao Qi <yao@codesourcery.com>
9267
9268 * server.c (handle_query): Handle InstallInTrace for qSupported.
9269 * tracepoint.c (add_tracepoint): Sort list.
9270 (install_tracepoint, download_tracepoint): New.
9271 (cmd_qtdp): Call them to install and download tracepoints.
9272 (sort_tracepoints): Removed.
9273 (cmd_qtstart): Update.
9274
9275 2011-11-14 Yao Qi <yao@codesourcery.com>
9276
9277 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9278 * mem-break.h: Declare.
9279 * tracepoint.c (cmd_qtstart): Move some code to ...
9280 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9281 New.
9282 (download_tracepoints): Move some code to ...
9283 (download_tracepoint_1): ... here. New.
9284
9285 2011-11-08 Yao Qi <yao@codesourcery.com>
9286
9287 * remote-utils.c (relocate_instruction): A comment fix.
9288
9289 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9290
9291 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9292 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9293 dr_status_mirror and dr_control_mirror from debug_reg_state.
9294 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9295 (i386_initial_stuff): Remove use of deleted globals.
9296 (i386_get_thread_context, i386_set_thread_context,
9297 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9298 from debug_reg_state.
9299
9300 2011-11-05 Yao Qi <yao@codesourcery.com>
9301
9302 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9303 address as TPOINT's.
9304
9305 2011-11-02 Stan Shebs <stan@codesourcery.com>
9306
9307 * tracepoint.c (agent_mem_read_string): New function.
9308 (eval_agent_expr): Call it for tracenz.
9309 * server.c (handle_query): Report support for tracenz.
9310
9311 2011-11-02 Yao Qi <yao@codesourcery.com>
9312
9313 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9314
9315 2011-11-02 Yao Qi <yao@codesourcery.com>
9316
9317 * target.h: Fix a typo in comment.
9318
9319 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9320
9321 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9322 clobber the breakpoints' shadows with fast tracepoint jumps.
9323 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9324 * target.c (write_inferior_memory): Also pass MYADDR down to
9325 check_mem_write.
9326
9327 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9328
9329 * configure.ac: Check support for personality routine.
9330 * configure: Regenerate.
9331 * config.in: Likewise.
9332 * linux-low.c: Include <sys/personality.h>.
9333 Define ADDR_NO_RANDOMIZE if necessary.
9334 (linux_create_inferior): Disable address space randomization when
9335 forking inferior, if requested.
9336 (linux_supports_disable_randomization): New function.
9337 (linux_target_ops): Install it.
9338 * server.h (disable_randomization): Declare.
9339 * server.c (disable_randomization): New global variable.
9340 (handle_general_set): Handle QDisableRandomization.
9341 (handle_query): Likewise for qSupported.
9342 (main): Support --disable-randomization and --no-disable-randomization
9343 command line arguments.
9344 * target.h (struct target_ops): Add supports_disable_randomization.
9345 (target_supports_disable_randomization): New macro.
9346
9347 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9348
9349 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9350 ifdef check.
9351 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9352 [!PT_GETDSBT] (target_loadmap): New definition.
9353 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9354 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9355 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9356 and PT_GETDSBT to LINUX_LOADMAP.
9357 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9358 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9359
9360 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9361
9362 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9363 (arm_linux_hwbp_cap): New static variable.
9364 (arm_linux_get_hwbp_cap): Replace by ...
9365 (arm_linux_init_hwbp_cap): ... this new function.
9366 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9367 (arm_linux_get_hw_watchpoint_count): Likewise.
9368 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9369 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9370 (arm_prepare_to_resume): Use perror_with_name instead of error.
9371
9372 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9373
9374 * linux-arm-low.c: Include <signal.h>.
9375 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9376 (struct arm_linux_hwbp_cap): New data type.
9377 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9378 (struct arm_linux_hw_breakpoint): New data type.
9379 (MAX_BPTS, MAX_WPTS): Define.
9380 (struct arch_process_info, struct arch_lwp_info): New data types.
9381 (arm_linux_get_hwbp_cap): New function.
9382 (arm_linux_get_hw_breakpoint_count): Likewise.
9383 (arm_linux_get_hw_watchpoint_count): Likewise.
9384 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9385 (arm_hwbp_control_initialize): Likewise.
9386 (arm_hwbp_control_is_enabled): Likewise.
9387 (arm_hwbp_control_is_initialized): Likewise.
9388 (arm_hwbp_control_disable): Likewise.
9389 (arm_linux_hw_breakpoint_equal): Likewise.
9390 (arm_linux_hw_point_initialize): Likewise.
9391 (struct update_registers_data): New data structure.
9392 (update_registers_callback: New function.
9393 (arm_insert_point): Likewise.
9394 (arm_remove_point): Likewise.
9395 (arm_stopped_by_watchpoint): Likewise.
9396 (arm_stopped_data_address): Likewise.
9397 (arm_new_process): Likewise.
9398 (arm_new_thread): Likewise.
9399 (arm_prepare_to_resume): Likewise.
9400 (the_low_target): Register arm_insert_point, arm_remove_point,
9401 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9402 arm_new_thread, and arm_prepare_to_resume.
9403
9404 2011-09-15 Stan Shebs <stan@codesourcery.com>
9405
9406 * server.h (struct emit_ops): Add compare-goto fields.
9407 * tracepoint.c (gdb_agent_op_sizes): New table.
9408 (emit_eq_goto): New function.
9409 (emit_ne_goto): New function.
9410 (emit_lt_goto): New function.
9411 (emit_le_goto): New function.
9412 (emit_gt_goto): New function.
9413 (emit_ge_goto): New function.
9414 (is_goto_target): New function.
9415 (compile_bytecodes): Recognize special cases of compare-goto
9416 combinations and call specialized emitters for them.
9417 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9418 (amd64_emit_ne_goto): New function.
9419 (amd64_emit_lt_goto): New function.
9420 (amd64_emit_le_goto): New function.
9421 (amd64_emit_gt_goto): New function.
9422 (amd64_emit_ge_goto): New function.
9423 (amd64_emit_ops): Add the new functions.
9424 (i386_emit_eq_goto): New function.
9425 (i386_emit_ne_goto): New function.
9426 (i386_emit_lt_goto): New function.
9427 (i386_emit_le_goto): New function.
9428 (i386_emit_gt_goto): New function.
9429 (i386_emit_ge_goto): New function.
9430 (i386_emit_ops): Add the new functions.
9431
9432 2011-09-08 Stan Shebs <stan@codesourcery.com>
9433
9434 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9435 (i386_emit_epilogue): Restore %ebx.
9436
9437 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9438
9439 * server.c (step_thread): Remove definition.
9440 (process_serial_event): Don't handle Hs.
9441 * server.h (step_thread): Remove declaration.
9442 * target.c (set_desired_inferior): Remove use of step_thread.
9443
9444 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9445
9446 * linux-low.c: Include linux-procfs.h.
9447 (linux_attach_lwp_1): Update comments.
9448 (linux_attach): Scan for existing threads when attaching to a
9449 process that is the tgid.
9450 * Makefile.in: Update dependencies.
9451
9452 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9453
9454 * configure.srv: Add linux-procfs.o dependencies.
9455
9456 2011-08-14 Yao Qi <yao@codesourcery.com>
9457
9458 * target.h (struct target_ops): Fix indent.
9459 * win32-low.c (win32_target_ops): Fix comment.
9460
9461 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9462 Yao Qi <yao@codesourcery.com>
9463
9464 * Makefile.in (clean): Remove tic6x-*.c files.
9465 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9466 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9467 (tic6x-c64xp-linux.c): Likewise.
9468 * configure.srv: Add support for tic6x-*-uclinux.
9469 * linux-tic6x-low.c: New.
9470 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9471
9472 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9473 Yao Qi <yao@codesourcery.com>
9474
9475 * target.h (struct target_ops): Add read_loadmap.
9476 * linux-low.c (struct target_loadseg): New type.
9477 (struct target_loadmap): New type.
9478 (linux_read_loadmap): New function.
9479 (linux_target_ops): Add linux_read_loadmap.
9480 * server.c (handle_query): Support qXfer:fdpic:read packet.
9481 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9482 to NULL.
9483
9484 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9485
9486 * win32-low.c: Include <stdint.h>.
9487
9488 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9489
9490 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9491 to the inferior here.
9492 (i386_remove_aligned_watchpoint): Ditto.
9493 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9494 fit part of the watchpoint in the debug registers.
9495 (i386_update_inferior_debug_regs): New.
9496 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9497 registers, and only update the inferior on success.
9498 (i386_low_remove_watchpoint): Ditto.
9499
9500 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9501
9502 * linux-low.c (compare_ints, unique, list_threads, show_process,
9503 linux_core_of_thread): Delete.
9504 (linux_target_ops): Change linux_core_of_thread to
9505 linux_common_core_of_thread.
9506 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9507 * utils.c (malloc_failure): Change type of argument.
9508 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9509 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9510 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9511 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9512 (IPA_OBJS): Add common-utils-ipa.o.
9513 (ptid_h, linux_osdata_h): New macros.
9514 (server_h): Add common/common-utils.h, common/xml-utils.h,
9515 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9516 common/ptid.h.
9517 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9518 ptid.o, buffer.o): New rules.
9519 (linux-low.o): Add common/linux-osdata.h as a dependency.
9520 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9521 * configure.ac: Add AC_HEADER_DIRENT check.
9522 * config.in: Regenerate.
9523 * configure: Regenerate.
9524 * remote-utils.c (xml_escape_text): Delete.
9525 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9526 buffer_xml_printf): Move to common/buffer.c.
9527 * server.c (main): Remove call to initialize_inferiors.
9528 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9529 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9530 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9531 internal_error, gdb_assert, gdb_assert_fail): Delete.
9532 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9533 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9534 common/buffer.h.
9535 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9536 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9537 initialize_inferiors): Delete.
9538
9539 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9540
9541 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9542 symbol error.
9543
9544 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9545
9546 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9547 assertion.
9548 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9549
9550 2011-05-26 Yao Qi <yao@codesourcery.com>
9551
9552 * Makefile.in (thread-db.o): Track dependence to
9553 common/gdb_thread_db.h.
9554 * thread-db.c: include gdb_thread_db.h from right place.
9555
9556 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9557
9558 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9559 __FILE__ and __LINE__ to internal_error.
9560
9561 2011-05-13 Doug Evans <dje@google.com>
9562
9563 * thread-db.c (try_thread_db_load_from_sdir): New function.
9564 (try_thread_db_load_from_dir): New function.
9565 (thread_db_load_search): Handle $sdir, ignore $pdir.
9566 Remove trying of system directories if search of
9567 libthread-db-search-path fails, that is now done via $sdir.
9568
9569 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9570
9571 * server.c (handle_query): Add EnableDisableTracepoints to the list
9572 of supported features.
9573 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9574 tracepoints.
9575 (cmd_qtenable_disable): New.
9576 (cmd_qtstart): Install tracepoints even if disabled.
9577 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9578 receiving a QTEnable or QTDisable packet.
9579 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9580 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9581 tracepoints.
9582 (gdb_probe): Skip data collection if static tracepoint is disabled.
9583
9584 2011-05-10 Doug Evans <dje@google.com>
9585
9586 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9587
9588 2011-05-04 Doug Evans <dje@google.com>
9589
9590 * linux-low.c (linux_join): Skip process lookup.
9591 * spu-low.c (spu_join): Ditto.
9592 * server.c (join_inferiors_callback): Delete.
9593 (process_serial_event): For 'D' packet (detach) call join_inferior
9594 directly.
9595
9596 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9597
9598 * README: Don't mention xscale*-*-linux*.
9599 * configure.srv (xscale*-*-linux*): Don't handle target.
9600
9601 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9602
9603 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9604 casting pointers.
9605 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9606 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9607 (i386_emit_void_call_2): Likewise.
9608
9609 2011-04-26 Yao Qi <yao@codesourcery.com>
9610
9611 * linux-low.c: Move common macros to linux-ptrace.h.
9612 Include linux-ptrace.h.
9613 * Makefile.in (linux_ptrace_h): New.
9614 (linux-low.o): Depends on linux-ptrace.h.
9615
9616 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9617
9618 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9619 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9620 (remote_prepare): New function with most of the TCP code from ...
9621 (remote_open): ... here. Detect PORT here unconditionally. Move also
9622 setting transport_is_reliable.
9623 * server.c (run_once): New variable.
9624 (gdbserver_usage): Document it.
9625 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9626 the first run if RUN_ONCE.
9627 * server.h (run_once, remote_prepare): New declarations.
9628
9629 2011-04-19 Tom Tromey <tromey@redhat.com>
9630
9631 * win32-low.c (handle_load_dll): Remove duplicate "the".
9632
9633 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9634
9635 Remove support for old Cygwin 1.5 versions.
9636 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9637 function to avoid warning.
9638 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9639 warning.
9640
9641 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9642
9643 * gdbserver/server.h (Macro _): Define it if not available.
9644
9645 2011-03-14 Michael Snyder <msnyder@vmware.com>
9646
9647 * hostio.c (handle_close): Remove unnecessary null test.
9648
9649 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9650
9651 * Makefile.in (maintainer-clean realclean distclean): Remove
9652 "make ... subdir_do" command.
9653
9654 2011-03-10 Michael Snyder <msnyder@vmware.com>
9655
9656 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9657
9658 * server.c (handle_v_run): Free alloced buffer on early return.
9659
9660 2011-03-09 Yao Qi <yao@codesourcery.com>
9661
9662 Revert:
9663 2011-03-04 Yao Qi <yao@codesourcery.com>
9664
9665 * Makefile.in: Remove GNU make feature --directory.
9666
9667 2011-03-05 Yao Qi <yao@codesourcery.com>
9668
9669 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9670 (subdir_do): New make target. Copied from gdb/Makefile.
9671 (maintainer-clean, realclean, distclean, clean): Call corresponding
9672 make targets in common/Makefile.
9673
9674 2011-02-11 Yao Qi <yao@codesourcery.com>
9675
9676 * configure.ac: Call AC_PROG_RANLIB.
9677 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9678 * configure: Regenerate.
9679
9680 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9681
9682 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9683
9684 2011-03-06 Yao Qi <yao@codesourcery.com>
9685
9686 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9687
9688 2011-03-05 Yao Qi <yao@codesourcery.com>
9689
9690 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9691 (subdir_do): New make target. Copied from gdb/Makefile.
9692 (maintainer-clean, realclean, distclean, clean): Call corresponding
9693 make targets in common/Makefile.
9694
9695 2011-03-04 Yao Qi <yao@codesourcery.com>
9696
9697 * Makefile.in: Remove GNU make feature --directory.
9698
9699 2011-03-04 Michael Snyder <msnyder@vmware.com>
9700
9701 * server.c (queue_stop_reply): Call xmalloc not malloc.
9702
9703 2011-03-02 Michael Snyder <msnyder@vmware.com>
9704
9705 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9706
9707 2011-02-28 Michael Snyder <msnyder@vmware.com>
9708
9709 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9710 (cmd_qtframe): Ditto.
9711 (cmd_qtbuffer): Ditto.
9712 (cmd_bigqtbuffer): Ditto.
9713
9714 * utils.c (decimal2str): Initialize 'width' to nine, then
9715 don't mess with it.
9716
9717 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9718
9719 * hostio.c (require_data): Free *data, not data.
9720
9721 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9722
9723 * hostio.c (require_data): Use free, not xfree.
9724
9725 2011-02-27 Michael Snyder <msnyder@vmware.com>
9726
9727 * server.c (handle_query): Discard unused value.
9728
9729 * hostio.c (require_data): Free malloc memory before returning
9730 error.
9731
9732 2011-02-26 Michael Snyder <msnyder@vmware.com>
9733
9734 * linux-low.c (list_threads): Call closedir for dirent.
9735
9736 2011-02-27 Michael Snyder <msnyder@vmware.com>
9737
9738 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9739 a case statement falls through.
9740
9741 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9742
9743 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9744 in comparison.
9745
9746 2011-02-26 Michael Snyder <msnyder@vmware.com>
9747
9748 * utils.c (decimal2str): Eliminate dead code and dead param.
9749 (pulongest): Drop dead param from call to decimal2str.
9750 (plongest): Ditto.
9751
9752 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9753
9754 Revert the following patch (not approved yet):
9755 2011-02-21 Hui Zhu <teawater@gmail.com>
9756 * tracepoint.c (tp_printf): New function.
9757 (eval_agent_expr): Handle gdb_agent_op_printf.
9758
9759 2011-02-21 Hui Zhu <teawater@gmail.com>
9760
9761 * tracepoint.c (tp_printf): New function.
9762 (eval_agent_expr): Handle gdb_agent_op_printf.
9763
9764 2011-02-18 Tom Tromey <tromey@redhat.com>
9765
9766 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9767 (tracepoint.o): Likewise.
9768 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9769 (gdb_agent_op_names): Likewise.
9770
9771 2011-02-18 Tom Tromey <tromey@redhat.com>
9772
9773 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9774 gdb_agent_op_rot>: New constants.
9775 (gdb_agent_op_names): Add pick and roll.
9776 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9777 cases.
9778
9779 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9780
9781 * aclocal.m4: Regenerated with aclocal-1.11.1.
9782
9783 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9784
9785 * server.c (handle_qxfer_traceframe_info): New.
9786 (qxfer_packets): Register "traceframe-info".
9787 (handle_query): Report support for qXfer:traceframe-info:read+.
9788 * tracepoint.c (match_blocktype): New.
9789 (traceframe_find_block_type): Rename to ...
9790 (traceframe_walk_blocks): ... this. Add callback filter argument,
9791 and use it.
9792 (traceframe_find_block_type): New, reimplemented on top of
9793 traceframe_walk_blocks.
9794 (build_traceframe_info_xml): New.
9795 (traceframe_read_info): New.
9796 * server.h (traceframe_read_info): Declare.
9797
9798 2011-02-11 Yao Qi <yao@codesourcery.com>
9799
9800 * configure.ac: Call AC_PROG_RANLIB.
9801 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9802 * configure: Regenerate.
9803
9804 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9805
9806 * server.c (gdb_read_memory): Change return semantics to allow
9807 partial transfers.
9808 (handle_search_memory_1): Adjust.
9809 (process_serial_event) <'m' packet>: Handle partial transfers.
9810 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9811
9812 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9813
9814 * regcache.c (init_register_cache): Initialize
9815 regcache->register_status.
9816 (free_register_cache): Release regcache->register_status.
9817 (regcache_cpy): Copy register_status.
9818 (registers_to_string): Print 'x's for unavailable registers.
9819 (supply_register): Mark the register's status valid or
9820 unavailable, depending on whether a buffer was passed in or not.
9821 (supply_register_zeroed): New.
9822 (supply_regblock): Mark the registers' status valid or
9823 unavailable, depending on whether a buffer was passed in or not.
9824 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9825 (struct regcache): New `register_status' field.
9826 (supply_register_zeroed): Declare.
9827 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9828 supply_register_zeroed, rather than passing a NULL buffer to
9829 supply_register.
9830 * tracepoint.c (fetch_traceframe_registers): Update comment.
9831
9832 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9833
9834 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9835 buffer explicit.
9836
9837 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9838
9839 * server.h (decode_xfer_write): Change prototype.
9840 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9841 and don't extract the annex here.
9842 * server.c (decode_xfer_read): Remove `annex' parameter,
9843 and don't extract the annex here.
9844 (decode_xfer): New.
9845 (struct qxfer): New.
9846 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9847 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9848 (handle_qxfer_statictrace): New functions, abstracted out from
9849 handle_query, and made to use the struct qxfer interface.
9850 (handle_threads_qxfer_proper): Rename to ...
9851 (handle_qxfer_threads_proper): ... this.
9852 (handle_threads_qxfer): Rename to ...
9853 (handle_qxfer_threads): ... this. Adjust.
9854 (qxfer_packets): New array.
9855 (handle_qxfer): New function.
9856 (handle_query): Use handle_qxfer.
9857
9858 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9859
9860 * gdbreplay.c: Shorten lines of >= 80 columns.
9861 * linux-low.c: Ditto.
9862 * linux-ppc-low.c: Ditto.
9863 * linux-s390-low.c: Ditto.
9864 * linux-sparc-low.c: Ditto.
9865 * linux-x86-low.c: Ditto.
9866 * linux-xtensa-low.c: Ditto.
9867 * mem-break.c: Ditto.
9868 * nto-low.c: Ditto.
9869 * regcache.h: Ditto.
9870 * remote-utils.c: Ditto.
9871 * server.c: Ditto.
9872 * server.h: Ditto.
9873 * thread-db.c: Ditto.
9874 * tracepoint.c: Ditto.
9875 * utils.c: Ditto.
9876 * win32-low.h: Ditto.
9877
9878 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9879
9880 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9881 update.
9882
9883 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9884
9885 * server.c (gdbserver_version): Update copyright year in version
9886 output.
9887 * gdbreplay.c (gdbreplay_version): Ditto.
9888
9889 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9890
9891 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9892 * linux-bfin-low.c: New file.
9893 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9894 PT_DATA_ADDR for BFIN targets.
9895 * Makefile.in (SFILES): Add linux-bfin-low.c.
9896 (clean): Remove reg-bfin.c.
9897 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9898 * README: Mention supported Blackfin targets.
9899
9900 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9901
9902 * .gitignore: New file.
9903
9904 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9905
9906 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9907
9908 2010-10-22 Jie Zhang <jie@codesourcery.com>
9909
9910 * Makefile.in: Add FLAGS_TO_PASS variable.
9911 (install): Remove dependency of install-only and recursively
9912 invoke make for install-only.
9913
9914 2010-10-04 Doug Evans <dje@google.com>
9915
9916 * Makefile.in (uninstall): Use $(DESTDIR).
9917
9918 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9919
9920 PR gdb/11842
9921
9922 * linux-x86-low.c (compat_siginfo_from_siginfo)
9923 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9924 si_code is < 0. Check for si_code == SI_TIMER before checking for
9925 si_code < 0.
9926
9927 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9928
9929 * lynx-i386-low.c: New file.
9930 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9931
9932 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9933
9934 * lynx-low.c (ptrace_request_to_str): Remove handling for
9935 request values that have been removed in LynxOS 5.x.
9936
9937 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9938
9939 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9940 <ptrace.h>
9941
9942 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9943
9944 * configure.ac: Add --enable-inprocess-agent option.
9945 * configure: Rebuilt.
9946
9947 2010-09-06 Yao Qi <yao@codesourcery.com>
9948
9949 * linux-low.c (linux_kill): Remove unused variable.
9950 (linux_stabilize_threads): Likewise.
9951 * server.c (start_inferior): Likewise.
9952 (queue_stop_reply_callback): Likewise.
9953 * tracepoint.c (do_action_at_tracepoint): Likewise.
9954
9955 2010-09-06 Yao Qi <yao@codesourcery.com>
9956
9957 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9958 on return.
9959
9960 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9961
9962 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9963
9964 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9965
9966 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9967 "$(IPA_DEPFILES)".
9968
9969 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9970
9971 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9972 gdbserver/lynx-ppc-low.c: New files.
9973 * Makefile.in (lynx_low_h): New variable.
9974 (lynx-low.o, lynx-ppc-low.o): New rules.
9975 * configure.ac: On LynxOS, link with -lnetinet.
9976 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9977 * configure: regenerate.
9978
9979 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9980
9981 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9982 * configure.ac: Add check for vasprintf and vsnprintf.
9983 * configure, config.in: Regenerate.
9984 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9985
9986 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9987
9988 * gdbreplay.c: Move include of alloca.h up, next to include of
9989 malloc.h.
9990 * server.h: Add include of malloc.h.
9991 * mem-break.c: Remove include of malloc.h.
9992 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9993
9994 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9995
9996 * Makefile.in (memmem.o): Build with -Wno-error.
9997
9998 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9999
10000 * utils.c (xsnprintf): Make non-static.
10001 * server.h: Add xsnprintf declaration.
10002 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10003 replace calls to snprintf by calls to xsnprintf throughout.
10004
10005 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10006
10007 * configure.ac: Add configure check for alloca.
10008 * configure, config.in: Regenerate.
10009 * server.h: Include alloca.h if it exists.
10010 * gdbreplay.c: Include alloca.h if it exists.
10011
10012 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10013
10014 * linux-low.c (__SIGRTMIN): Define if not already defined.
10015 (linux_create_inferior): Check for __ANDROID__ rather than
10016 __SIGRTMIN.
10017 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10018 are already deferred.
10019 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10020 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10021 stopped and already has a pending signal to report.
10022 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10023 a pending signal to report or is moving out of a jump pad.
10024 (linux_init_signals): Check for __ANDROID__ rather than
10025 __SIGRTMIN.
10026
10027 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10028
10029 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10030 debug_threads check. Avoid a linear search when not doing debug
10031 output.
10032
10033 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10034
10035 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10036 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10037 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10038 (process_event): Change local fd's type to gdb_fildes_t.
10039 (create_file_handler): Adjust prototype.
10040 (delete_file_handler): Adjust prototype.
10041 (handle_file_event): Adjust prototype. Use pfildes.
10042 (create_file_event): Adjsut prototype.
10043 * remote-utils.c (remote_desc, listen_desc): Change type to
10044 gdb_fildes_t.
10045 * server.h: New gdb_fildes_t typedef.
10046 [USE_WIN32API]: Include winsock2.h.
10047 (delete_file_handler, add_file_handler): Adjust prototypes.
10048 (pfildes): Declare.
10049 * utils.c (pfildes): New.
10050
10051 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10052
10053 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10054 * configure: Regenerate.
10055
10056 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10057
10058 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10059 (linux_done_accessing_memory): ... this.
10060 (linux_target_ops): Adjust.
10061 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10062 * nto-low.c (nto_target_ops): Adjust comment.
10063 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10064 * spu-low.c (spu_target_ops): Adjust comment.
10065 * target.h (target_ops): Rename unprepare_to_access_memory field
10066 to done_accessing_memory.
10067 (unprepare_to_access_memory): Rename to ...
10068 (done_accessing_memory): ... this.
10069
10070 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10071
10072 * linux-low.c (linux_prepare_to_access_memory): New.
10073 (linux_unprepare_to_access_memory): New.
10074 (linux_target_ops): Install them.
10075 * server.c (read_memory): Rename to ...
10076 (gdb_read_memory): ... this. Use
10077 prepare_to_access_memory/prepare_to_access_memory.
10078 (write_memory): Rename to ...
10079 (gdb_write_memory): ... this. Use
10080 prepare_to_access_memory/prepare_to_access_memory.
10081 (handle_search_memory_1): Adjust.
10082 (process_serial_event): Adjust.
10083 * target.h (struct target_ops): New fields
10084 prepare_to_access_memory and unprepare_to_access_memory.
10085 (prepare_to_access_memory, unprepare_to_access_memory): New.
10086 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10087 prepare_to_access_memory/prepare_to_access_memory.
10088 * nto-low.c (nto_target_ops): Adjust.
10089 * spu-low.c (spu_target_ops): Adjust.
10090 * win32-low.c (win32_target_ops): Adjust.
10091
10092 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10093
10094 * Makefile.in (WARN_CFLAGS): Get it from configure.
10095 (WERROR_CFLAGS): New.
10096 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10097 * configure.ac: Introduce --enable-werror, which adds -Werror to
10098 the compiler command line. Enabled by default. Disable with
10099 --disable-werror. Add -Wdeclaration-after-statement
10100 Wpointer-arith and -Wformat-nonliteral to warning flags.
10101 * configure: Regenerate.
10102
10103 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10104
10105 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10106
10107 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10108
10109 * gdbreplay.c (remote_error): New.
10110 (gdbchar): New.
10111 (expect): Use gdbchar. Check for error reading from GDB.
10112 Clarify sync error output.
10113 (play): Check for errors writing to GDB.
10114 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10115 * remote-utils.c (getpkt): Check for errors writing to the remote
10116 descriptor.
10117
10118 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10119
10120 * linux-low.c (linux_wait_1): Move non-debugging code out of
10121 `debug_threads' control.
10122
10123 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10124
10125 * linux-low.c (linux_wait_1): Don't set last_status here.
10126 * server.c (push_event, queue_stop_reply_callback): Assert we're
10127 not pushing a TARGET_WAITKIND_IGNORE event.
10128 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10129 (myresume, handle_target_event): Set the thread's last_resume_kind
10130 and last_status from the target returned status.
10131
10132 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10133
10134 PR threads/10729
10135
10136 * linux-x86-low.c (update_debug_registers_callback): New.
10137 (i386_dr_low_set_addr): Use it.
10138 (i386_dr_low_get_addr): New.
10139 (i386_dr_low_set_control): Use update_debug_registers_callback.
10140 (i386_dr_low_get_control): New.
10141 (i386_dr_low_get_status): Adjust.
10142 * linux-low.c (linux_stop_lwp): New.
10143 * linux-low.h (linux_stop_lwp): Declare.
10144
10145 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10146 argument instead of a i386_debug_reg_state.
10147 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10148 a i386_debug_reg_state.
10149 (i386_insert_aligned_watchpoint): Adjust.
10150 (i386_remove_aligned_watchpoint): Adjust.
10151 (i386_low_stopped_data_address): Read the debug registers from the
10152 inferior instead of from the mirrors.
10153 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10154 (i386_dr_low_get_addr): Declare.
10155 (i386_dr_low_get_control): Declare.
10156 (i386_dr_low_get_status): Change prototype.
10157
10158 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10159 (i386_dr_low_get_addr): New.
10160 (i386_dr_low_get_control): New.
10161 (i386_dr_low_get_status): Adjust prototype. Return
10162 dr_status_mirror.
10163 (i386_initial_stuff): Clear dr_status_mirror and
10164 dr_control_mirror.
10165 (i386_get_thread_context): Adjust.
10166 (i386_set_thread_context): Adjust.
10167 (i386_thread_added): Adjust.
10168
10169 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10170
10171 * linux-low.h (linux_thread_area): Delete declaration.
10172
10173 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10174
10175 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10176 after its termination.
10177
10178 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10179
10180 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10181 (gdb_wants_all_stopped): Delete.
10182 (linux_wait_1): Don't call them.
10183 * server.c (handle_v_cont): Tag all threads as want-stopped.
10184 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10185 stopped as "client-wants-stopped".
10186
10187 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10188
10189 * Makefile.in (signals_h): New.
10190 (server_h): Depend on it.
10191 (server.o): Don't depend on $(signals_def).
10192 (signals.o): Depend on $(signals_def).
10193
10194 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10195
10196 * Makefile.in (signals_def): New.
10197 (server_h): Append include/gdb/signals.h and signals_def.
10198 (server.o): Append signals_def.
10199
10200 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10201
10202 * server.c (handle_target_event): Use target_signal_to_host for
10203 resume_info.sig initialization.
10204 * target.h (struct thread_resume) <sig>: New comment.
10205
10206 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10207
10208 * server.c (handle_query): strcpy() the returned string from paddress()
10209 instead of sprintf().
10210 * utils.c (paddress): Return phex_nz().
10211
10212 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10213
10214 * server.c (handle_v_cont): Call mourn_inferior if process
10215 just exited.
10216 (myresume): Likewise.
10217
10218 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10219
10220 Static tracepoints, and integration with UST.
10221
10222 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10223 * mem-break.c (uninsert_all_breakpoints)
10224 (reinsert_all_breakpoints): New.
10225 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10226 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10227 (gdb_agent_ust_loaded, helper_thread_id)
10228 (gdb_agent_helper_thread_id): New macros.
10229 (struct ipa_sym_addresses): Add addr_ust_loaded,
10230 addr_helper_thread_id, addr_cmd_buf.
10231 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10232 (in_process_agent_loaded_ust): New.
10233 (write_e_ust_not_loaded): New.
10234 (maybe_write_ipa_ust_not_loaded): New.
10235 (struct collect_static_trace_data_action): New.
10236 (enum tracepoint_type) <static_tracepoint>: New.
10237 (struct tracepoint) <handle>: Mention static tracepoints.
10238 (struct static_tracepoint_ctx): New.
10239 (CMD_BUF_SIZE): New.
10240 (add_tracepoint_action): Handle static tracepoint actions.
10241 (unprobe_marker_at): New.
10242 (clear_installed_tracepoints): Handle static tracepoints.
10243 (cmd_qtdp): Handle static tracepoints.
10244 (probe_marker_at): New.
10245 (cmd_qtstart): Handle static tracepoints.
10246 (response_tracepoint): Handle static tracepoints.
10247 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10248 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10249 (get_context_regcache): Handle static tracepoints.
10250 (do_action_at_tracepoint): Handle static tracepoint actions.
10251 (traceframe_find_block_type): Handle static trace data blocks.
10252 (traceframe_read_sdata): New.
10253 (download_tracepoints): Download static tracepoint actions.
10254 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10255 (GDB_PROBE_NAME): New.
10256 (ust_ops): New.
10257 (GET_UST_SYM): New.
10258 (USTF): New.
10259 (dlsym_ust): New.
10260 (ust_marker_to_static_tracepoint): New.
10261 (gdb_probe): New.
10262 (collect_ust_data_at_tracepoint): New.
10263 (gdb_ust_probe): New.
10264 (UNIX_PATH_MAX, SOCK_DIR): New.
10265 (gdb_ust_connect_sync_socket): New.
10266 (resume_thread, stop_thread): New.
10267 (run_inferior_command): New.
10268 (init_named_socket): New.
10269 (gdb_ust_socket_init): New.
10270 (cstr_to_hexstr): New.
10271 (next_st): New.
10272 (first_marker, next_marker): New.
10273 (response_ust_marker): New.
10274 (cmd_qtfstm, cmd_qtsstm): New.
10275 (unprobe_marker_at, probe_marker_at): New.
10276 (cmd_qtstmat, gdb_ust_thread): New.
10277 (gdb_ust_init): New.
10278 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10279 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10280 (ST_REGENTRY): New.
10281 (x86_64_st_collect_regmap): New.
10282 (X86_64_NUM_ST_COLLECT_GREGS): New.
10283 (AMD64_RIP_REGNUM): New.
10284 (supply_static_tracepoint_registers): New.
10285 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10286 (ST_REGENTRY): New.
10287 (i386_st_collect_regmap): New.
10288 (i386_NUM_ST_COLLECT_GREGS): New.
10289 (supply_static_tracepoint_registers): New.
10290 * server.c (handle_query): Handle qXfer:statictrace:read.
10291 <qSupported>: Report support for StaticTracepoints, and
10292 qXfer:statictrace:read features.
10293 * server.h (traceframe_read_sdata)
10294 (supply_static_tracepoint_registers): Declare.
10295 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10296 (unpack_varlen_hex): Include in IPA build.
10297 * Makefile.in (ustlibs, ustinc): New.
10298 (IPA_OBJS): Add remote-utils-ipa.o.
10299 ($(IPA_LIB)): Link -ldl and -lpthread.
10300 (UST_CFLAGS): New.
10301 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10302 * config.in, configure: Regenerate.
10303
10304 2010-06-20 Ian Lance Taylor <iant@google.com>
10305 Pedro Alves <pedro@codesourcery.com>
10306
10307 * linux-x86-low.c (always_true): Delete.
10308 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10309 trying to fool the compiler with always_true.
10310
10311 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10312
10313 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10314 conditions in gdbserver.
10315
10316 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10317
10318 * spu-low.c (spu_read_memory): Wrap around local store limit.
10319 (spu_write_memory): Likewise.
10320
10321 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10322
10323 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10324 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10325 LONGEST uses.
10326 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10327 uses.
10328 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10329 uses with LONGEST uses.
10330
10331 2010-06-14 Stan Shebs <stan@codesourcery.com>
10332 Pedro Alves <pedro@codesourcery.com>
10333
10334 Bytecode compiler.
10335
10336 * linux-x86-low.c: Include limits.h.
10337 (add_insns): New.
10338 (always_true): New.
10339 (EMIT_ASM): New.
10340 (EMIT_ASM32): New.
10341 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10342 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10343 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10344 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10345 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10346 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10347 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10348 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10349 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10350 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10351 (amd64_emit_void_call_2): New.
10352 (amd64_emit_ops): New.
10353 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10354 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10355 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10356 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10357 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10358 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10359 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10360 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10361 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10362 (i386_emit_stack_adjust, i386_emit_int_call_1)
10363 (i386_emit_void_call_2): New.
10364 (i386_emit_ops): New.
10365 (x86_emit_ops): New.
10366 (the_low_target): Install x86_emit_ops.
10367 * server.h (struct emit_ops): New.
10368 (get_raw_reg_func_addr): Declare.
10369 (current_insn_ptr, emit_error): Declare.
10370 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10371 (set_trace_state_variable_value): New defines.
10372 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10373 addr_get_trace_state_variable_value and
10374 addr_set_trace_state_variable_value.
10375 (symbol_list): New fields for get_raw_reg,
10376 get_trace_state_variable_value and set_trace_state_variable_value.
10377 (condfn): New typedef.
10378 (struct tracepoint): New field `compiled_cond'.
10379 (do_action_at_tracepoint): Clear compiled_cond.
10380 (get_trace_state_variable_value, set_trace_state_variable_value):
10381 Export in the IPA.
10382 (condition_true_at_tracepoint): If there's a compiled condition,
10383 run that.
10384 (current_insn_ptr, emit_error): New globals.
10385 (struct bytecode_address): New.
10386 (get_raw_reg_func_addr): New.
10387 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10388 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10389 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10390 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10391 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10392 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10393 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10394 (compile_tracepoint_condition, compile_bytecodes): New.
10395 * target.h (emit_ops): Forward declare.
10396 (struct target_ops): New field emit_ops.
10397 (target_emit_ops): New.
10398 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10399 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10400 * linux-low.c (linux_emit_ops): New.
10401 (linux_target_ops): Install it.
10402 * linux-low.h (struct linux_target_ops): New field emit_ops.
10403
10404 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10405
10406 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10407 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10408
10409 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10410 Stan Shebs <stan@codesourcery.com>
10411
10412 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10413 (all): Depend on $(extra_libraries).
10414 (install-only): Install the IPA.
10415 (IPA_OBJS, IPA_LIB): New.
10416 (clean): Remove the IPA lib.
10417 (IPAGENT_CFLAGS): New.
10418 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10419 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10420 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10421 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10422 * configure.ac: Check for atomic builtins support in the compiler.
10423 (IPA_DEPFILES, extra_libraries): Define.
10424 * configure.srv (ipa_obj): Add description.
10425 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10426 (i[34567]86-*-linux*): Set ipa_obj.
10427 (x86_64-*-linux*): Set ipa_obj.
10428 * linux-low.c (stabilizing_threads): New.
10429 (supports_fast_tracepoints): New.
10430 (linux_detach): Stabilize threads before detaching.
10431 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10432 the lwp is either not stabilizing, or is moving out of a jump pad.
10433 (linux_fast_tracepoint_collecting): New.
10434 (maybe_move_out_of_jump_pad): New.
10435 (enqueue_one_deferred_signal): New.
10436 (dequeue_one_deferred_signal): New.
10437 (linux_wait_for_event_1): If moving out of a jump pad, defer
10438 pending signals to later.
10439 (linux_stabilize_threads): New.
10440 (linux_wait_1): Check if threads need moving out of jump pads, and
10441 do it if so.
10442 (stuck_in_jump_pad_callback): New.
10443 (move_out_of_jump_pad_callback): New.
10444 (lwp_running): New.
10445 (linux_resume_one_lwp): Handle moving out of jump pads.
10446 (linux_set_resume_request): Dequeue deferred signals.
10447 (need_step_over_p): Also step over fast tracepoint jumps.
10448 (start_step_over): Also uninsert fast tracepoint jumps.
10449 (finish_step_over): Also reinsert fast tracepoint jumps.
10450 (linux_install_fast_tracepoint_jump): New.
10451 (linux_target_ops): Install linux_stabilize_threads and
10452 linux_install_fast_tracepoint_jump_pad.
10453 * linux-low.h (linux_target_ops) <get_thread_area,
10454 install_fast_tracepoint_jump_pad>: New fields.
10455 (struct lwp_info) <collecting_fast_tracepoint,
10456 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10457 (linux_get_thread_area): Declare.
10458 * linux-x86-low.c (jump_insn): New.
10459 (x86_get_thread_area): New.
10460 (append_insns): New.
10461 (push_opcode): New.
10462 (amd64_install_fast_tracepoint_jump_pad): New.
10463 (i386_install_fast_tracepoint_jump_pad): New.
10464 (x86_install_fast_tracepoint_jump_pad): New.
10465 (the_low_target): Install x86_get_thread_area and
10466 x86_install_fast_tracepoint_jump_pad.
10467 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10468 (struct fast_tracepoint_jump): New.
10469 (fast_tracepoint_jump_insn): New.
10470 (fast_tracepoint_jump_shadow): New.
10471 (find_fast_tracepoint_jump_at): New.
10472 (fast_tracepoint_jump_here): New.
10473 (delete_fast_tracepoint_jump): New.
10474 (set_fast_tracepoint_jump): New.
10475 (uninsert_fast_tracepoint_jumps_at): New.
10476 (reinsert_fast_tracepoint_jumps_at): New.
10477 (set_breakpoint_at): Use write_inferior_memory.
10478 (uninsert_raw_breakpoint): Use write_inferior_memory.
10479 (check_mem_read): Mask out fast tracepoint jumps.
10480 (check_mem_write): Mask out fast tracepoint jumps.
10481 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10482 (set_fast_tracepoint_jump): Declare.
10483 (delete_fast_tracepoint_jump)
10484 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10485 (reinsert_fast_tracepoint_jumps_at): Declare.
10486 * regcache.c: Don't compile many functions when building the
10487 in-process agent library.
10488 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10489 the register buffer in the heap.
10490 (free_register_cache): If the register buffer isn't owned by the
10491 regcache, don't free it.
10492 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10493 pre-existing register caches.
10494 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10495 type.
10496 (convert_ascii_to_int): : Constify `from' parameter type.
10497 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10498 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10499 the needed buffer in-place.
10500 (relocate_instruction): New.
10501 * server.c (handle_query) <qSymbols>: If the target supports
10502 tracepoints, give it a chance of looking up symbols. Report
10503 support for fast tracepoints.
10504 (handle_status): Stabilize threads.
10505 (process_serial_event): Adjust.
10506 * server.h (struct fast_tracepoint_jump): Forward declare.
10507 (struct process_info) <fast_tracepoint_jumps>: New field.
10508 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10509 (decode_X_packet, decode_M_packet): Adjust.
10510 (relocate_instruction): Declare.
10511 (in_process_agent_loaded): Declare.
10512 (tracepoint_look_up_symbols): Declare.
10513 (struct fast_tpoint_collect_status): Declare.
10514 (fast_tracepoint_collecting): Declare.
10515 (force_unlock_trace_buffer): Declare.
10516 (handle_tracepoint_bkpts): Declare.
10517 (initialize_low_tracepoint)
10518 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10519 * target.h (struct target_ops) <stabilize_threads,
10520 install_fast_tracepoint_jump_pad>: New fields.
10521 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10522 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10523 [HAVE_STDINT_H]: Include stdint.h.
10524 (trace_debug_1): Rename to ...
10525 (trace_vdebug): ... this.
10526 (trace_debug): Rename to ...
10527 (trace_debug_1): ... this. Add `level' parameter.
10528 (trace_debug): New.
10529 (ATTR_USED, ATTR_NOINLINE): New.
10530 (IP_AGENT_EXPORT): New.
10531 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10532 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10533 (about_to_request_buffer_space, trace_buffer_is_full)
10534 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10535 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10536 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10537 (traceframe_write_count, traceframes_created)
10538 (trace_state_variables)
10539 New renaming defines.
10540 (struct ipa_sym_addresses): New.
10541 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10542 (symbol_list): New.
10543 (ipa_sym_addrs): New.
10544 (all_tracepoint_symbols_looked_up): New.
10545 (in_process_agent_loaded): New.
10546 (write_e_ipa_not_loaded): New.
10547 (maybe_write_ipa_not_loaded): New.
10548 (tracepoint_look_up_symbols): New.
10549 (debug_threads) [IN_PROCESS_AGENT]: New.
10550 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10551 (UNKNOWN_SIDE_EFFECTS): New.
10552 (stop_tracing): New.
10553 (flush_trace_buffer): New.
10554 (stop_tracing_bkpt): New.
10555 (flush_trace_buffer_bkpt): New.
10556 (read_inferior_integer): New.
10557 (read_inferior_uinteger): New.
10558 (read_inferior_data_pointer): New.
10559 (write_inferior_data_pointer): New.
10560 (write_inferior_integer): New.
10561 (write_inferior_uinteger): New.
10562 (struct collect_static_trace_data_action): Delete.
10563 (enum tracepoint_type): New.
10564 (struct tracepoint) <type>: New field `type'.
10565 <actions_str, step_actions, step_actions_str>: Only include in
10566 GDBserver.
10567 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10568 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10569 (tracepoints): Use IP_AGENT_EXPORT.
10570 (last_tracepoint): Don't include in the IPA.
10571 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10572 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10573 (alloced_trace_state_variables): New.
10574 (trace_state_variables): Use IP_AGENT_EXPORT.
10575 (traceframe_t): Delete unused variable.
10576 (circular_trace_buffer): Don't include in the IPA.
10577 (trace_buffer_start): Delete.
10578 (struct trace_buffer_control): New.
10579 (trace_buffer_free): Delete.
10580 (struct ipa_trace_buffer_control): New.
10581 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10582 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10583 New.
10584 (trace_buffer_ctrl): New.
10585 (TRACE_BUFFER_CTRL_CURR): New.
10586 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10587 Reimplement as macros.
10588 (trace_buffer_wrap): Delete.
10589 (traceframe_write_count, traceframe_read_count)
10590 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10591 (struct tracepoint_hit_ctx) <type>: New field.
10592 (struct fast_tracepoint_ctx): New.
10593 (memory_barrier): New.
10594 (cmpxchg): New.
10595 (record_tracepoint_error): Update atomically in the IPA.
10596 (clear_inferior_trace_buffer): New.
10597 (about_to_request_buffer_space): New.
10598 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10599 updating the same buffer.
10600 (add_tracepoint): Default the tracepoint's type to trap
10601 tracepoint, and orig_size to -1.
10602 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10603 internal variables.
10604 (create_trace_state_variable): New parameter `gdb'. Handle it.
10605 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10606 (cmd_qtdp): Handle fast tracepoints.
10607 (cmd_qtdv): Adjust.
10608 (max_jump_pad_size): New.
10609 (gdb_jump_pad_head): New.
10610 (get_jump_space_head): New.
10611 (claim_jump_space): New.
10612 (sort_tracepoints): New.
10613 (MAX_JUMP_SIZE): New.
10614 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10615 IPA.
10616 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10617 support. Upload fast traceframes, and delete internal IPA
10618 breakpoints.
10619 (stop_tracing_handler): New.
10620 (flush_trace_buffer_handler): New.
10621 (cmd_qtstop): Upload fast tracepoints.
10622 (response_tracepoint): Handle fast tracepoints.
10623 (tracepoint_finished_step): Upload fast traceframes. Set the
10624 tracepoint hit context's tracepoint type.
10625 (handle_tracepoint_bkpts): New.
10626 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10627 type. Add comment about fast tracepoints.
10628 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10629 non-existing action_str field.
10630 (get_context_regcache): Handle fast tracepoints.
10631 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10632 to the regcache.
10633 (fast_tracepoint_from_jump_pad_address): New.
10634 (fast_tracepoint_from_ipa_tpoint_address): New.
10635 (collecting_t): New.
10636 (force_unlock_trace_buffer): New.
10637 (fast_tracepoint_collecting): New.
10638 (collecting): New.
10639 (gdb_collect): New.
10640 (write_inferior_data_ptr): New.
10641 (target_tp_heap): New.
10642 (target_malloc): New.
10643 (download_agent_expr): New.
10644 (UALIGN): New.
10645 (download_tracepoints): New.
10646 (download_trace_state_variables): New.
10647 (upload_fast_traceframes): New.
10648 (IPA_FIRST_TRACEFRAME): New.
10649 (IPA_NEXT_TRACEFRAME_1): New.
10650 (IPA_NEXT_TRACEFRAME): New.
10651 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10652 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10653 (gdb_jump_pad_buffer_end): New.
10654 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10655 (initialize_tracepoint): Adjust.
10656 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10657 buffer. Initialize the low module.
10658 * utils.c (PREFIX, TOOLNAME): New.
10659 (malloc_failure): Use PREFIX.
10660 (error): In the IPA, an error causes an exit.
10661 (fatal, warning): Use PREFIX.
10662 (internal_error): Use TOOLNAME.
10663 (NUMCELLS): Increase to 10.
10664 * configure, config.in: Regenerate.
10665
10666 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10667
10668 * server.c (handle_query) <qSupported>: Do two passes over the
10669 qSupported string to avoid nesting strtok.
10670
10671 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10672
10673 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10674 (CDEPS): New.
10675 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10676 -Wl,--dynamic-list.
10677 * configure: Regenerate.
10678 * proc-service.list: New.
10679
10680 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10681
10682 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10683 New comment.
10684
10685 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10686
10687 * gdbreplay.c (remote_open): Check error return from socket() call by
10688 its equality to -1 not by it being negative.
10689 * remote-utils.c (remote_open): Likewise.
10690
10691 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10692
10693 * config.h: Regenerate.
10694
10695 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10696
10697 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10698 doesn't provide PTRACE_GET_THREAD_AREA.
10699
10700 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10701
10702 * linux-m68k-low.c: Include <asm/ptrace.h>
10703 (ps_get_thread_area): Implement.
10704
10705 2010-05-03 Doug Evans <dje@google.com>
10706
10707 * event-loop.c (struct callback_event): New struct.
10708 (callback_list): New global.
10709 (append_callback_event, delete_callback_event): New functions.
10710 (process_callback): New function.
10711 (start_event_loop): Call it.
10712 * remote-utils.c (NOT_SCHEDULED): Define.
10713 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10714 moved out of readchar.
10715 (readchar): Rewrite. Call reschedule before returning.
10716 (reset_readchar): New function.
10717 (remote_close): Call it.
10718 (process_remaining, reschedule): New functions.
10719 * server.h (callback_handler_func): New typedef.
10720 (append_callback_event, delete_callback_event): Declare.
10721
10722 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10723
10724 * proc-service.c (ps_pglobal_lookup): Use
10725 thread_db_look_up_one_symbol.
10726 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10727 parameter. Use it instead of all_symbols_looked_up.
10728 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10729 field.
10730 (all_symbols_looked_up): Don't declare.
10731 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10732 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10733 field.
10734 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10735 Set all_symbols_looked_up here.
10736 (thread_db_look_up_one_symbol): New.
10737 (thread_db_get_tls_address): Adjust.
10738 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10739 thread_db object on the heap, and tentatively set it in the
10740 process structure.
10741 (thread_db_init): Don't set all_symbols_looked_up here.
10742 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10743
10744 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10745
10746 * linux-low.c (linux_kill, linux_detach): Adjust.
10747 (status_pending_p_callback): Remove redundant statement. Check
10748 for !TARGET_WAITIKIND_IGNORE, instead of
10749 TARGET_WAITKIND_STOPPED.
10750 (handle_tracepoints): Make sure LWP is locked. Adjust.
10751 (linux_wait_for_event_1): Adjust.
10752 (linux_cancel_breakpoints): New.
10753 (unsuspend_one_lwp): New.
10754 (unsuspend_all_lwps): New.
10755 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10756 (send_sigstop_callback): Change return type to int, add new
10757 `except' parameter and handle it.
10758 (suspend_and_send_sigstop_callback): New.
10759 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10760 pass them down. If SUSPEND, also increment the lwp's suspend
10761 count.
10762 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10763 (need_step_over_p): Don't consider suspended LWPs.
10764 (start_step_over): Adjust.
10765 (proceed_one_lwp): Change return type to int, add new `except'
10766 parameter and handle it.
10767 (unsuspend_and_proceed_one_lwp): New.
10768 (proceed_all_lwps): Use find_inferior instead of
10769 for_each_inferior.
10770 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10771 also decrement the suspend count of LWPs. Pass `except' down,
10772 instead of hacking its suspend count.
10773 (linux_pause_all): Add `freeze' parameter. Adjust.
10774 (linux_unpause_all): New.
10775 (linux_target_ops): Install linux_unpause_all.
10776 * server.c (handle_status): Adjust.
10777 * target.h (struct target_ops): New fields `unpause_all' and
10778 `cancel_breakpoints'. Add new parameter to `pause_all'.
10779 (pause_all): Add new `freeze' parameter.
10780 (unpause_all): New.
10781 (cancel_breakpoints): New.
10782 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10783 cancel breakpoints.
10784 (cmd_qtstart): Pause threads.
10785 (stop_tracing): Pause threads, and cancel breakpoints.
10786 * win32-low.c (win32_target_ops): Adjust.
10787
10788 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10789
10790 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10791 the inferior right away from here...
10792 (linux_wait_1): ... to here, and adjust to check the thread's
10793 last_resume_kind instead of the lwp's step or stop_expected flags.
10794
10795 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10796
10797 * README: Use consistent `GDB' and `GDBserver' spellings.
10798
10799 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10800
10801 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10802 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10803 (linux_detach_one_lwp): Assume the lwp is stopped.
10804 (any_thread_of): Delete.
10805 (linux_detach): Stop all lwps here. Don't blindly delete all
10806 breakpoints.
10807 (delete_lwp_callback): New.
10808 (linux_mourn): Delete all lwps of the process that is gone.
10809 (linux_wait_1): Don't delete the last lwp of the process here.
10810 * mem-break.h (mark_breakpoints_out): Declare.
10811 * mem-break.c (mark_breakpoints_out): New.
10812 (free_all_breakpoints): Use it.
10813 * server.c (handle_target_event): If the process is gone, mark
10814 breakpoints out.
10815 * thread-db.c (struct thread_db) <create_bp>: New field.
10816 (thread_db_enable_reporting): Fix prototype. Store a thread event
10817 breakpoint reference in the thread_db struct.
10818 (thread_db_load_search): Clear the thread_db object.
10819 (try_thread_db_load_1): Ditto.
10820 (switch_to_process): New.
10821 (disable_thread_event_reporting): Use it.
10822 (remove_thread_event_breakpoints): New.
10823 (thread_db_detach, thread_db_mourn): Use it.
10824
10825 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10826
10827 * linux-low.c (linux_enable_event_reporting): New.
10828 (linux_wait_for_event_1, handle_extended_wait): Use it.
10829
10830 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10831
10832 * linux-low.c (linux_kill_one_lwp, linux_kill)
10833 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10834 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10835 SIGSTOP even if the LWP is stopped.
10836 (send_sigstop_callback): New.
10837 (stop_all_lwps): Use send_sigstop_callback instead.
10838 (linux_resume_one_thread): Adjust.
10839 (proceed_one_lwp): Still proceed an LWP that the client has
10840 requested to stop, if we haven't reported it as stopped yet. Make
10841 sure that LWPs the client want stopped, have a pending SIGSTOP.
10842
10843 2010-04-26 Doug Evans <dje@google.com>
10844
10845 * server.c (handle_general_set): Make static.
10846
10847 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10848 Print received char after testing for error/eof instead of before.
10849 (input_interrupt): Tweak comment.
10850
10851 2010-04-23 Doug Evans <dje@google.com>
10852
10853 * server.c (start_inferior): Print inferior argv if --debug.
10854
10855 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10856
10857 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10858 * nto-x86-low.c: Include server.h
10859
10860 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10861
10862 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10863 be consistent with other sources of this directory.
10864 (init_registers_amd64): Correct name of source file of this function
10865 in the comment.
10866
10867 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10868
10869 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10870 64-bit executables.
10871
10872 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10873
10874 * win32-i386-low.c: Add 64-bit support.
10875 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10876 (init_registers_amd64): Declare.
10877 (mappings): Add 64-bit version of array.
10878 (init_windows_x86): New function.
10879 (the_low_target): Change init_arch field to init_windows_x86.
10880
10881 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10882
10883 * win32-low.c: Adapt to support also 64-bit architecture.
10884 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10885 (get_image_name): Use SIZE_T type for local variable `done'.
10886 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10887 (toolhelp_get_dll_name): Idem.
10888 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10889 Use uintptr_t typecast to avoid warning.
10890 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10891 (handle_exception): Use phex_nz to avoid warning.
10892 (win32_wait): Remove unused local variable `process'.
10893
10894 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10895
10896 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10897 `amd64-avx.o'.
10898
10899 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10900
10901 * configure.ac: Use `ws2_32' library for srv_mingw.
10902 * configure: Regenerate.
10903 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10904 * remote-utils.c: Likewise.
10905
10906 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10907
10908 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10909 if __x86_64__ is defined.
10910
10911 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10912
10913 * configure: Regenerate.
10914
10915 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10916
10917 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10918 * target.h (target_ops): New get_tib_address field.
10919 * win32-low.h (win32_thread_info): Add thread_local_base field.
10920 * win32-low.c (child_add_thread): Add tlb argument.
10921 Set thread_local_base field to TLB.
10922 (get_child_debug_event): Adapt to child_add_thread change.
10923 (win32_get_tib_address): New function.
10924 (win32_target_ops): Set get_tib_address field to
10925 win32_get_tib_address.
10926 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10927
10928 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10929
10930 * linux-low.c (linux_mourn): Also remove the process.
10931 * server.c (handle_target_event): Don't remove the process here.
10932 * nto-low.c (nto_mourn): New.
10933 (nto_target_ops): Install it.
10934 * spu-low.c (spu_mourn): New.
10935 (spu_target_ops): Install it.
10936 * win32-low.c (win32_mourn): New.
10937 (win32_target_ops): Install it.
10938
10939 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10940
10941 * server.h (buffer_xml_printf): Remove redundant `;'.
10942
10943 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10944
10945 * regcache.c (set_register_cache): Invalidate regcaches before
10946 changing the register cache layout.
10947 (regcache_invalidate_one): Allow a NULL regcache.
10948 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10949 regcaches before changing the register cache layout or the target
10950 regsets.
10951
10952 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10953
10954 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10955 variable warning on Linux/x86-64.
10956
10957 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10958
10959 GDBserver disconnected tracing support.
10960
10961 * linux-low.c (linux_remove_process): Delete.
10962 (add_lwp): Don't set last_resume_kind here.
10963 (linux_kill): Use `mourn'.
10964 (linux_detach): Use `thread_db_detach', and `mourn'.
10965 (linux_mourn): New.
10966 (linux_attach_lwp_1): Adjust comment.
10967 (linux_attach): last_resume_kind moved the thread_info; adjust.
10968 (status_pending_p_callback): Adjust.
10969 (linux_wait_for_event_1): Adjust.
10970 (count_events_callback, select_singlestep_lwp_callback)
10971 (select_event_lwp_callback, cancel_breakpoints_callback)
10972 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10973 (proceed_one_lwp): Adjust.
10974 (linux_async): Add debug output.
10975 (linux_thread_stopped): New.
10976 (linux_pause_all): New.
10977 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10978 linux_pause_all.
10979 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10980 (thread_db_free): Delete declaration.
10981 (thread_db_detach, thread_db_mourn): Declare.
10982 * thread-db.c (thread_db_init): Use thread_db_mourn.
10983 (thread_db_free): Delete, split in two.
10984 (disable_thread_event_reporting): New.
10985 (thread_db_detach): New.
10986 (thread_db_mourn): New.
10987
10988 * server.h (struct thread_info) <last_resume_kind>: New field.
10989 <attached>: Add comment.
10990 <gdb_detached>: New field.
10991 (handler_func): Change return type to int.
10992 (handle_serial_event, handle_target_event): Ditto.
10993 (gdb_connected): Declare.
10994 (tracing): Delete.
10995 (disconnected_tracing): Declare.
10996 (stop_tracing): Declare.
10997
10998 * server.c (handle_query) <qSupported>: Report support for
10999 disconnected tracing.
11000 (queue_stop_reply_callback): Account for running threads.
11001 (gdb_wants_thread_stopped): New.
11002 (gdb_wants_all_threads_stopped): New.
11003 (gdb_reattached_process): New.
11004 (handle_status): Clear the `gdb_detached' flag of all processes.
11005 In all-stop, stop all threads.
11006 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11007 (process_serial_event): If the remote connection breaks, or if an
11008 exit was forced with "monitor exit", force an event loop exit.
11009 Handle disconnected tracing on detach.
11010 (handle_serial_event): Adjust.
11011 (handle_target_event): If GDB isn't connected, forward events back
11012 to the inferior, unless the last process exited, in which case,
11013 exit gdbserver. Adjust interface.
11014
11015 * remote-utils.c (remote_open): Don't block in accept. Instead
11016 register an event loop source on the listen socket file
11017 descriptor. Refactor bits into ...
11018 (listen_desc): ... this new global.
11019 (gdb_connected): ... this new function.
11020 (enable_async_notification): ... this new function.
11021 (handle_accept_event): ... this new function.
11022 (remote_close): Clear remote_desc.
11023
11024 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11025
11026 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11027 New fields.
11028 (mourn_inferior): Define.
11029 (target_process_qsupported): Avoid the dangling else problem.
11030 (thread_stopped): Define.
11031 (pause_all): Define.
11032 (target_waitstatus_to_string): Declare.
11033 * target.c (target_waitstatus_to_string): New.
11034
11035 * tracepoint.c (tracing): Make extern.
11036 (disconnected_tracing): New.
11037 (stop_tracing): Make extern. Handle tracing stops due to GDB
11038 disconnecting.
11039 (cmd_qtdisconnected): New.
11040 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11041 (handle_tracepoint_general_set): Handle QTDisconnected.
11042
11043 * event-loop.c (event_handler_func): Change return type to int.
11044 (process_event): Bail out if the event handler wants the event
11045 loop to stop.
11046 (handle_file_event): Ditto.
11047 (start_event_loop): Bail out if the event handler wants the event
11048 loop to stop.
11049
11050 * nto-low.c (nto_target_ops): Adjust.
11051 * spu-low.c (spu_wait): Don't remove the process here.
11052 (spu_target_ops): Adjust.
11053 * win32-low.c (win32_wait): Don't remove the process here.
11054 (win32_target_ops): Adjust.
11055
11056 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11057
11058 * regcache.c (realloc_register_cache): Invalidate inferior's
11059 regcache before recreating it.
11060
11061 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11062
11063 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11064
11065 2010-04-09 Stan Shebs <stan@codesourcery.com>
11066 Pedro Alves <pedro@codesourcery.com>
11067
11068 * server.h (LONGEST): New.
11069 (struct thread_info) <while_stepping>: New field.
11070 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11071 Declare.
11072 (initialize_tracepoint, handle_tracepoint_general_set)
11073 (handle_tracepoint_query, tracepoint_finished_step)
11074 (tracepoint_was_hit, release_while_stepping_state_list):
11075 (current_traceframe): Declare.
11076 * server.c (handle_general_set): Handle tracepoint packets.
11077 (read_memory): New.
11078 (write_memory): New.
11079 (handle_search_memory_1): Use read_memory.
11080 (handle_query): Report support for conditional tracepoints, trace
11081 state variables, and tracepoint sources. Handle tracepoint
11082 queries.
11083 (main): Initialize the tracepoints module.
11084 (process_serial_event): Handle traceframe reads/writes.
11085
11086 * linux-low.c (handle_tracepoints): New.
11087 (linux_wait_1): Call it.
11088 (linux_resume_one_lwp): Handle while-stepping.
11089 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11090 (linux_target_ops): Install them.
11091 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11092 New field.
11093 * linux-x86-low.c (x86_supports_tracepoints): New.
11094 (the_low_target). Install it.
11095
11096 * mem-break.h (delete_breakpoint): Declare.
11097 * mem-break.c (delete_breakpoint): Make external.
11098
11099 * target.h (struct target_ops): Add `supports_tracepoints',
11100 `read_pc', and `write_pc' fields.
11101 (target_supports_tracepoints): Define.
11102 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11103 (phex_nz): New.
11104
11105 * regcache.h (struct regcache) <registers_owned>: New field.
11106 (init_register_cache, regcache_cpy): Declare.
11107 (regcache_read_pc, regcache_write_pc): Declare.
11108 (register_cache_size): Declare.
11109 (supply_regblock): Declare.
11110 * regcache.c (init_register_cache): New.
11111 (new_register_cache): Use it.
11112 (regcache_cpy): New.
11113 (register_cache_size): New.
11114 (supply_regblock): New.
11115 (regcache_read_pc, regcache_write_pc): New.
11116
11117 * tracepoint.c: New.
11118
11119 * Makefile.in (OBS): Add tracepoint.o.
11120 (tracepoint.o): New rule.
11121
11122 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11123
11124 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11125 (i386-mmx.o): New.
11126 (i386-mmx.c): Likewise.
11127 (i386-mmx-linux.o): Likewise.
11128 (i386-mmx-linux.c): Likewise.
11129
11130 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11131 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11132 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11133 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11134
11135 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11136 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11137 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11138
11139 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11140
11141 * Makefile.in (clean): Updated.
11142 (i386-avx.o): New.
11143 (i386-avx.c): Likewise.
11144 (i386-avx-linux.o): Likewise.
11145 (i386-avx-linux.c): Likewise.
11146 (amd64-avx.o): Likewise.
11147 (amd64-avx.c): Likewise.
11148 (amd64-avx-linux.o): Likewise.
11149 (amd64-avx-linux.c): Likewise.
11150
11151 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11152 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11153 (srv_amd64_regobj): Add amd64-avx.o.
11154 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11155 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11156 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11157 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11158 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11159 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11160 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11161
11162 * i387-fp.c: Include "i386-xstate.h".
11163 (i387_xsave): New.
11164 (i387_cache_to_xsave): Likewise.
11165 (i387_xsave_to_cache): Likewise.
11166 (x86_xcr0): Likewise.
11167
11168 * i387-fp.h (i387_cache_to_xsave): Likewise.
11169 (i387_xsave_to_cache): Likewise.
11170 (x86_xcr0): Likewise.
11171
11172 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11173 * linux-crisv32-low.c (target_regsets): Likewise.
11174 * linux-m68k-low.c (target_regsets): Likewise.
11175 * linux-mips-low.c (target_regsets): Likewise.
11176 * linux-ppc-low.c (target_regsets): Likewise.
11177 * linux-s390-low.c (target_regsets): Likewise.
11178 * linux-sh-low.c (target_regsets): Likewise.
11179 * linux-sparc-low.c (target_regsets): Likewise.
11180 * linux-xtensa-low.c (target_regsets): Likewise.
11181
11182 * linux-low.c: Include <sys/uio.h>.
11183 (regsets_fetch_inferior_registers): Support nt_type.
11184 (regsets_store_inferior_registers): Likewise.
11185 (linux_process_qsupported): New.
11186 (linux_target_ops): Add linux_process_qsupported.
11187
11188 * linux-low.h (regset_info): Add nt_type.
11189 (linux_target_ops): Add process_qsupported.
11190
11191 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11192 and <sys/uio.h>.
11193 (init_registers_i386_avx_linux): New.
11194 (init_registers_amd64_avx_linux): Likewise.
11195 (xmltarget_i386_linux_no_xml): Likewise.
11196 (xmltarget_amd64_linux_no_xml): Likewise.
11197 (PTRACE_GETREGSET): Likewise.
11198 (PTRACE_SETREGSET): Likewise.
11199 (x86_fill_xstateregset): Likewise.
11200 (x86_store_xstateregset): Likewise.
11201 (use_xml): Likewise.
11202 (x86_linux_update_xmltarget): Likewise.
11203 (x86_linux_process_qsupported): Likewise.
11204 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11205 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11206 init_registers_i386_linux here. Call
11207 x86_linux_update_xmltarget.
11208 (the_low_target): Add x86_linux_process_qsupported.
11209
11210 * server.c (handle_query): Call target_process_qsupported.
11211
11212 * target.h (target_ops): Add process_qsupported.
11213 (target_process_qsupported): New.
11214
11215 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11216
11217 * inferiors.c (add_thread): Set last_status kind to
11218 TARGET_WAITKIND_IGNORE.
11219 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11220 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11221 (linux_wait_1): Move `thread' local definition to block that uses
11222 it. Don't NULL initialize `event_child'.
11223 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11224 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11225 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11226
11227 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11228
11229 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11230 an extended waitstatus, or by a watchpoint.
11231 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11232 thread was stepping or has been stopped by a watchpoint.
11233
11234 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11235
11236 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11237 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11238 of another, then delete the previous, and validate all
11239 breakpoints.
11240 (validate_inserted_breakpoint): New.
11241 (delete_disabled_breakpoints): New.
11242 (validate_breakpoints): New.
11243 (check_mem_read): Validate breakpoints before trusting their
11244 shadow. Delete disabled breakpoints.
11245 (check_mem_write): Validate breakpoints before trusting they
11246 should be inserted. Delete disabled breakpoints.
11247 * mem-break.h (validate_breakpoints):
11248 * server.c (handle_query): Validate breakpoints when we see a
11249 qSymbol query.
11250
11251 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11252
11253 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11254 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11255 if we could tell there's a GDB breakpoint at stop_pc.
11256 (need_step_over_p): Don't do a step over if we find a GDB
11257 breakpoint at the resume PC.
11258
11259 * mem-break.c (struct raw_breakpoint): New.
11260 (enum bkpt_type): New type `gdb_breakpoint'.
11261 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11262 fields. New field `raw'.
11263 (find_raw_breakpoint_at): New.
11264 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11265 breakpoint instead.
11266 (set_breakpoint_at): Adjust.
11267 (delete_raw_breakpoint): New.
11268 (release_breakpoint): New.
11269 (delete_breakpoint): Rename to...
11270 (delete_breakpoint_1): ... this. Add proc parameter. Use
11271 release_breakpoint. Return ENOENT.
11272 (delete_breakpoint): Reimplement.
11273 (find_breakpoint_at): Delete.
11274 (find_gdb_breakpoint_at): New.
11275 (delete_breakpoint_at): Delete.
11276 (set_gdb_breakpoint_at): New.
11277 (delete_gdb_breakpoint_at): New.
11278 (gdb_breakpoint_here): New.
11279 (set_reinsert_breakpoint): Use release_breakpoint.
11280 (uninsert_breakpoint): Rename to ...
11281 (uninsert_raw_breakpoint): ... this.
11282 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11283 (reinsert_raw_breakpoint): Change parameter type to
11284 raw_breakpoint.
11285 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11286 instead.
11287 (check_breakpoints): Adjust. Use release_breakpoint.
11288 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11289 (breakpoint_inserted_here): Ditto.
11290 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11291 Don't trust the breakpoint's shadow if it is not inserted.
11292 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11293 (delete_all_breakpoints): Adjust.
11294 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11295 use delete_breakpoint_1.
11296
11297 * mem-break.h (breakpoints_supported): Delete declaration.
11298 (set_gdb_breakpoint_at): Declare.
11299 (gdb_breakpoint_here): Declare.
11300 (delete_breakpoint_at): Delete.
11301 (delete_gdb_breakpoint_at): Declare.
11302
11303 * server.h (struct raw_breakpoint): Forward declare.
11304 (struct process_info): New field `raw_breakpoints'.
11305
11306 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11307 breakpoints.
11308
11309 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11310
11311 * linux-low.c (status_pending_p_callback): Fix comment.
11312 (linux_wait_for_event_1): Move most of the internal breakpoint
11313 handling from here...
11314 (linux_wait_1): ... to here.
11315 (count_events_callback): New.
11316 (select_singlestep_lwp_callback): New.
11317 (select_event_lwp_callback): New.
11318 (cancel_breakpoints_callback): New.
11319 (select_event_lwp): New.
11320 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11321 priority to all LWPs that have had events that should be reported
11322 to the client. Cancel breakpoints when about to reporting the
11323 event to the client, not while stopping lwps. No longer cancel
11324 finished single-steps here.
11325 (cancel_finished_single_step): Delete.
11326 (cancel_finished_single_steps): Delete.
11327
11328 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11329
11330 * mem-break.c (enum bkpt_type): New.
11331 (struct breakpoint): New field `type'.
11332 (set_breakpoint_at): Change return type to struct breakpoint
11333 pointer. Set type to `other_breakpoint' by default.
11334 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11335 in the breakpoint list.
11336 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11337 (reinsert_breakpoint): Rename to ...
11338 (reinsert_raw_breakpoint): ... this.
11339 (reinsert_breakpoints_at): Adjust.
11340 * mem-break.h (struct breakpoint): Declare.
11341 (set_breakpoint_at): Change return type to struct breakpoint
11342 pointer.
11343
11344 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11345
11346 * server.c (handle_query): Assign, not compare.
11347
11348 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11349
11350 Teach linux gdbserver to step-over-breakpoints.
11351
11352 * linux-low.c (can_hardware_single_step): New.
11353 (supports_breakpoints): New.
11354 (handle_extended_wait): If stopping threads, read the stop pc of
11355 the new cloned LWP.
11356 (get_pc): New.
11357 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11358 low target doesn't support retrieving the PC.
11359 (add_lwp): Set last_resume_kind to resume_continue.
11360 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11361 (linux_attach): Don't clear stop_expected. Set the lwp's
11362 last_resume_kind to resume_stop.
11363 (linux_detach_one_lwp): Don't check for removed breakpoints.
11364 (check_removed_breakpoint): Delete.
11365 (status_pending_p): Rename to ...
11366 (status_pending_p_callback): ... this. Don't check for removed
11367 breakpoints. Don't consider threads that are stopped from GDB's
11368 perspective.
11369 (linux_wait_for_lwp): Always read the stop_pc here.
11370 (cancel_breakpoint): New.
11371 (step_over_bkpt): New global.
11372 (linux_wait_for_event_1): Implement stepping over breakpoints.
11373 (gdb_wants_lwp_stopped): New.
11374 (gdb_wants_all_stopped): New.
11375 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11376 single-step traps here. Store the thread's last reported target
11377 wait status.
11378 (send_sigstop): Don't clear stop_expected. Always set it,
11379 instead.
11380 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11381 (cancel_finished_single_step): New.
11382 (cancel_finished_single_steps): New.
11383 (wait_for_sigstop): Don't cancel finished single-step traps here.
11384 (linux_resume_one_lwp): Don't check for removed breakpoints.
11385 Don't set `step' on non-hardware step archs.
11386 (linux_set_resume_request): Ignore resume_stop requests if already
11387 stopping or stopped. Set the lwp's last_resume_kind.
11388 (resume_status_pending_p): Don't check for removed breakpoints.
11389 (need_step_over_p): New.
11390 (start_step_over): New.
11391 (finish_step_over): New.
11392 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11393 requests. Clear the thread's last reported target waitstatus.
11394 Don't use the `suspended' flag. Don't consider pending breakpoints.
11395 (linux_resume): Start a step-over if necessary.
11396 (proceed_one_lwp): New.
11397 (proceed_all_lwps): New.
11398 (unstop_all_lwps): New.
11399 * linux-low.h (struct lwp_info): Rewrite comment for the
11400 `suspended' flag. Add the `stop_pc' field. Delete the
11401 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11402 Add `'last_resume_kind' and `need_step_over' fields.
11403 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11404 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11405 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11406 (set_raw_breakpoint_at): New.
11407 (set_breakpoint_at): Rewrite to use it.
11408 (reinsert_breakpoint_handler): Delete.
11409 (set_reinsert_breakpoint): New.
11410 (reinsert_breakpoint_by_bp): Delete.
11411 (delete_reinsert_breakpoints): New.
11412 (uninsert_breakpoint): Rewrite.
11413 (uninsert_breakpoints_at): New.
11414 (reinsert_breakpoint): Rewrite.
11415 (reinsert_breakpoints_at): New.
11416 (check_breakpoints): Rewrite.
11417 (breakpoint_here): New.
11418 (breakpoint_inserted_here): New.
11419 (check_mem_read): Adjust.
11420 * mem-break.h (breakpoints_supported, breakpoint_here)
11421 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11422 (reinsert_breakpoint_by_bp): Delete declaration.
11423 (delete_reinsert_breakpoints): Declare.
11424 (reinsert_breakpoint): Delete declaration.
11425 (reinsert_breakpoints_at): Declare.
11426 (uninsert_breakpoint): Delete declaration.
11427 (uninsert_breakpoints_at): Declare.
11428 (check_breakpoints): Adjust prototype.
11429 * server.h: Adjust include order.
11430 (struct thread_info): Declare here. Add a `last_status' field.
11431
11432 2010-03-23 Michael Snyder <msnyder@vmware.com>
11433
11434 * server.c (crc32): New function.
11435 (handle_query): Add handling for 'qCRC:' request.
11436
11437 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11438
11439 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11440 lwp had been stopped by a watchpoint.
11441
11442 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11443
11444 * server.h (internal_error): Declare.
11445 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11446 * utils.c (internal_error): New function.
11447
11448 2010-03-15 Andreas Schwab <schwab@redhat.com>
11449
11450 * configure.srv: Fix typo setting srv_regobj.
11451
11452 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11453
11454 * linux-low.c (fetch_register): Avoid passing a non string literal
11455 format to `error'.
11456 (usr_store_inferior_registers): Ditto.
11457
11458 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11459
11460 * linux-low.c (linux_write_memory): Bail out early if peeking
11461 memory failed.
11462
11463 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11464
11465 * linux-low.h (struct lwp_info): New fields
11466 `stopped_by_watchpoint' and `stopped_data_address'.
11467 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11468 here, and cache them in the lwp object.
11469 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11470 directly.
11471 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11472 field.
11473 (linux_stopped_by_watchpoint): Rewrite.
11474 (linux_stopped_data_address): Rewrite.
11475
11476 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11477
11478 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11479 switching the current inferior, not before.
11480
11481 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11482
11483 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11484 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11485 i386-linux.c and amd64-linux.c.
11486 (reg-i386.o): Removed.
11487 (reg-i386.c): Likewise.
11488 (reg-i386-linux.o): Likewise.
11489 (reg-i386-linux.c): Likewise.
11490 (reg-x86-64.o): Likewise.
11491 (reg-x86-64.c): Likewise.
11492 (reg-x86-64-linux.o): Likewise.
11493 (reg-x86-64-linux.c): Likewise.
11494 (i386.o): New.
11495 (i386.c): Likewise.
11496 (i386-linux.o): Likewise.
11497 (i386-linux.c): Likewise.
11498 (amd64.o): Likewise.
11499 (amd64.c): Likewise.
11500 (amd64-linux.o): Likewise.
11501 (amd64-linux.c): Likewise.
11502
11503 * configure.srv (srv_i386_regobj): New.
11504 (srv_i386_linux_regobj): Likewise.
11505 (srv_amd64_regobj): Likewise.
11506 (srv_amd64_linux_regobj): Likewise.
11507 (srv_i386_32bit_xmlfiles): Likewise.
11508 (srv_i386_64bit_xmlfiles): Likewise.
11509 (srv_i386_xmlfiles): Likewise.
11510 (srv_amd64_xmlfiles): Likewise.
11511 (srv_i386_linux_xmlfiles): Likewise.
11512 (srv_amd64_linux_xmlfiles): Likewise.
11513 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11514 srv_xmlfiles to $srv_i386_xmlfiles.
11515 (i[34567]86-*-mingw32ce*): Likewise.
11516 (i[34567]86-*-mingw*): Likewise.
11517 (i[34567]86-*-nto*): Likewise.
11518 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11519 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11520 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11521 (x86_64-*-linux*): Likewise.
11522
11523 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11524 (init_registers_amd64_linux): New.
11525 (x86_arch_setup): Replace init_registers_x86_64_linux with
11526 init_registers_amd64_linux.
11527
11528 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11529
11530 * configure.ac: Check for libdl. If it is not available link against
11531 static libthread_db.
11532 * configure: Regenerate.
11533
11534 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11535
11536 PR9605
11537
11538 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11539 handing a read watchpoint.
11540 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11541
11542 2010-02-12 Doug Evans <dje@google.com>
11543
11544 * linux-low.c (linux_supports_tracefork_flag): Document.
11545 (linux_look_up_symbols): Add comment.
11546
11547 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11548
11549 * regcache.c (supply_register): Clear regcache if buf is NULL.
11550
11551 2010-02-02 Nicolas Roche <roche@sourceware.org>
11552 Joel Brobecker <brobecker@adacore.com>
11553
11554 * inferiors.c (find_inferior): Add function documentation.
11555 (unloaded_dll): Handle the case where the unloaded dll has not
11556 been previously registered in the dll list.
11557
11558 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11559
11560 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11561 (thumb2_breakpoint): New.
11562 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11563
11564 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11565
11566 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11567 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11568 breakpoints.
11569
11570 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11571
11572 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11573
11574 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11575
11576 * linux-s390-low.c (s390_collect_ptrace_register)
11577 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11578
11579 2010-01-21 Doug Evans <dje@google.com>
11580
11581 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11582 (PTRACE_ARG4_TYPE): New macro.
11583 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11584 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11585 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11586 (usr_store_inferior_registers): Ditto.
11587 (linux_read_memory, linux_write_memory): Ditto.
11588 (linux_test_for_tracefork): Ditto.
11589
11590 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11591 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11592
11593 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11594
11595 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11596 target.
11597
11598 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11599
11600 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11601 prototype to take a regcache. Adjust.
11602
11603 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11604
11605 * regcache.h (struct thread_info): Forward declare.
11606 (struct regcache): New.
11607 (new_register_cache): Adjust prototype.
11608 (get_thread_regcache): Declare.
11609 (free_register_cache): Adjust prototype.
11610 (registers_to_string, registers_from_string): Ditto.
11611 (supply_register, supply_register_by_name, collect_register)
11612 (collect_register_as_string, collect_register_by_name): Ditto.
11613 * regcache.c (struct inferior_regcache_data): Delete.
11614 (get_regcache): Rename to ...
11615 (get_thread_regcache): ... this. Adjust. Switch inferior before
11616 fetching registers.
11617 (regcache_invalidate_one): Adjust.
11618 (regcache_invalidate): Fix prototype.
11619 (new_register_cache): Return the new register cache.
11620 (free_register_cache): Change prototype.
11621 (realloc_register_cache): Adjust.
11622 (registers_to_string): Change prototype to take a regcache. Adjust.
11623 (registers_from_string): Ditto.
11624 (register_data): Ditto.
11625 (supply_register): Ditto.
11626 (supply_register_by_name): Ditto.
11627 (collect_register): Ditto.
11628 (collect_register_as_string): Ditto.
11629 (collect_register_by_name): Ditto.
11630 * server.c (process_serial_event): Adjust.
11631 * linux-low.h (regset_fill_func, regset_store_func): Change
11632 prototype.
11633 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11634 Change prototype.
11635 * linux-low.c (get_stop_pc): Adjust.
11636 (check_removed_breakpoint): Adjust.
11637 (linux_wait_for_event): Adjust.
11638 (linux_resume_one_lwp): Adjust.
11639 (fetch_register): Add regcache parameter. Adjust.
11640 (usr_store_inferior_registers): Ditto.
11641 (regsets_fetch_inferior_registers): Ditto.
11642 (regsets_store_inferior_registers): Ditto.
11643 (linux_fetch_registers, linux_store_registers): Ditto.
11644 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11645 regcache. Adjust.
11646 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11647 Ditto.
11648 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11649 prototype to take a regcache.
11650 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11651 * remote-utils.c (convert_ascii_to_int, outreg)
11652 (prepare_resume_reply): Change prototype to take a regcache.
11653 Adjust.
11654 * target.h (struct target_ops) <fetch_registers, store_registers>:
11655 Change prototype to take a regcache.
11656 (fetch_inferior_registers, store_inferior_registers): Change
11657 prototype to take a regcache. Adjust.
11658 * proc-service.c (ps_lgetregs): Adjust.
11659 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11660 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11661 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11662 take a regcache. Adjust.
11663 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11664 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11665 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11666 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11667 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11668 (cris_cannot_fetch_register):
11669 (cris_breakpoint_at): Change prototype to take a regcache.
11670 Adjust.
11671 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11672 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11673 to take a regcache. Adjust.
11674 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11675 Adjust.
11676 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11677 take a regcache. Adjust.
11678 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11679 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11680 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11681 * linux-mips-low.c (mips_get_pc):
11682 (mips_set_pc): Change prototype to take a regcache. Adjust.
11683 (mips_reinsert_addr): Adjust.
11684 (mips_collect_register): Change prototype to take a regcache.
11685 Adjust.
11686 (mips_supply_register):
11687 (mips_collect_register_32bit, mips_supply_register_32bit)
11688 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11689 (mips_store_fpregset): Ditto.
11690 * linux-ppc-low.c (ppc_supply_ptrace_register)
11691 (ppc_supply_ptrace_register): Ditto.
11692 (parse_spufs_run): Adjust.
11693 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11694 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11695 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11696 take a regcache. Adjust.
11697 * linux-s390-low.c (s390_collect_ptrace_register)
11698 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11699 (s390_set_pc): Change prototype to take a regcache. Adjust.
11700 (s390_arch_setup): Adjust.
11701 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11702 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11703 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11704 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11705 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11706 regcache. Adjust.
11707 (sparc_breakpoint_at): Adjust.
11708 * linux-xtensa-low.c (xtensa_fill_gregset):
11709 (xtensa_store_gregset):
11710 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11711 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11712 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11713 prototype to take a regcache. Adjust.
11714 * win32-arm-low.c (arm_fetch_inferior_register)
11715 (arm_store_inferior_register): Change prototype to take a
11716 regcache. Adjust.
11717 * win32-i386-low.c (i386_fetch_inferior_register)
11718 (i386_store_inferior_register): Change prototype to take a
11719 regcache. Adjust.
11720 * win32-low.c (child_fetch_inferior_registers)
11721 (child_store_inferior_registers): Change prototype to take a
11722 regcache. Adjust.
11723 (win32_wait): Adjust.
11724 (win32_fetch_inferior_registers): Change prototype to take a
11725 regcache. Adjust.
11726 (win32_store_inferior_registers): Adjust.
11727 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11728 store_inferior_register>: Change prototype to take a regcache.
11729
11730 2010-01-20 Doug Evans <dje@google.com>
11731
11732 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11733 #ifdef.
11734 (linux_wait_for_event1, linux_init_signals): Ditto.
11735 (W_STOPCODE): Provide definition if missing.
11736
11737 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11738
11739 * linux-low.c (linux_core_of_thread): New.
11740 (compare_ints, show_process, list_threads): New.
11741 (linux_qxfer_osdata): Report threads and cores.
11742 (linux_target_op): Register linux_core_of_thread.
11743 * remote-utils.c (prepare_resume_reply): Report the core.
11744 (buffer_xml_printf): Support %d specifier.
11745 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11746 New.
11747 (handle_query): Handle qXfer:threads. Announce availability
11748 thereof.
11749 * target.h (struct target_ops): New field core_of_thread.
11750
11751 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11752
11753 * Makefile.in (clean): Remove new generated files.
11754 (reg-s390.o, reg-s390.c): Remove rules.
11755 (reg-s390x.o, reg-s390x.c): Likewise.
11756 (s390-linux32.o, s390-linux32.c): Add rules.
11757 (s390-linux64.o, s390-linux64.c): Likewise.
11758 (s390x-linux64.o, s390x-linux64.c): Likewise.
11759 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11760 * linux-s390-low.c: Include <elf.h>.
11761 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11762 (init_registers_s390): Remove prototype.
11763 (init_registers_s390x): Likewise.
11764 (init_registers_s390_linux32): Add prototype.
11765 (init_registers_s390_linux64): Likewise.
11766 (init_registers_s390x_linux64): Likewise.
11767 (s390_num_regs_3264): New define.
11768 (s390_regmap_3264): New global variable.
11769 (s390_cannot_fetch_register): Remove obsolete check.
11770 (s390_cannot_store_register): Likewise.
11771 (s390_collect_ptrace_register): Handle upper/lower register halves.
11772 (s390_supply_ptrace_register): Likewise.
11773 (s390_fill_gregset): Update to register number changes.
11774 (s390_get_hwcap): New routine.
11775 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11776 Install appropriate regmap and register set.
11777
11778 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11779
11780 * server.c (gdbserver_version): Update copyright year to 2010.
11781 * gdbreplay.c (gdbreplay_version): Likewise.
11782
11783 2009-12-28 Doug Evans <dje@google.com>
11784
11785 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11786 elf/external.h. Include <elf.h> instead but only if necessary.
11787
11788 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11789
11790 * linux-low.c (linux_remove_process): Remove `detaching'
11791 parameter. Don't release/detach from thread_db here.
11792 (linux_kill): Release/detach from thread_db here, ...
11793 (linux_detach): ... and here, before actually detaching.
11794 (linux_wait_1): ... and here, when a process exits.
11795 * thread-db.c (any_thread_of): New.
11796 (thread_db_free): Switch the current inferior to a thread of the
11797 passed in process.
11798
11799 2009-12-21 Doug Evans <dje@google.com>
11800
11801 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11802
11803 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11804 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11805 warning ifndef __NR_tkill. Move setting of errno there too.
11806 Delete unnecessary resetting of errno after syscall.
11807 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11808
11809 * configure.ac: Check for dladdr.
11810 * config.in: Regenerate.
11811 * configure: Regenerate.
11812 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11813 (try_thread_db_load): Update.
11814
11815 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11816
11817 2009-12-18 Doug Evans <dje@google.com>
11818
11819 * event-loop.c: Include unistd.h if it exists.
11820
11821 * linux-low.c (my_waitpid): Move definition away from being in
11822 between linux_tracefork_child/linux_test_for_tracefork.
11823
11824 * gdb_proc_service.h (psaddr_t): Fix type.
11825 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11826 signature to match glibc.
11827
11828 2009-12-16 Doug Evans <dje@google.com>
11829
11830 * linux-low.c (linux_read_memory): Fix argument to read.
11831
11832 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11833
11834 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11835 events, don't leave current_inferior pointing at null.
11836
11837 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11838
11839 * win32-low.c (LOG): Delete.
11840 (OUTMSG): Output to stderr.
11841 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11842 on compile time LOG macro.
11843 (win32_wait): Fix debug output.
11844
11845 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11846
11847 * win32-low.c (win32_add_one_solib): If the dll name is
11848 "ntdll.dll", prepend the system directory to the dll path.
11849
11850 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11851
11852 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11853
11854 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11855 Vladimir Prus <vladimir@codesourcery.com>
11856
11857 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11858 * configure.ac: Check for __mcoldfire__ and set
11859 gdb_cv_m68k_is_coldfire.
11860 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11861 reg-cf.o and reg-m68k.o.
11862 * configure: Regenerated.
11863
11864 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11865
11866 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11867 Pass it to thread_db_free.
11868 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11869 proper `detaching' argument to linux_remove_process.
11870 * linux-low.h (thread_db_free): Add `detaching' parameter.
11871 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11872 to thread_db_free.
11873 (thread_db_free): Add `detaching' parameter. Only
11874 call td_ta_clear_event if detaching from process.
11875
11876 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11877
11878 * thread-db.c (thread_db_free): Fix typo.
11879
11880 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11881
11882 PR gdb/10838
11883 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11884
11885 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11886
11887 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11888 with an i686 compiler.
11889 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11890 needed.
11891 * configure: Rebuilt.
11892
11893 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11894
11895 PR gdb/10783
11896
11897 * server.c (handle_search_memory_1): Correct read_addr initialization
11898 in loop for searching subsequent chunks.
11899
11900 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11901
11902 * configure.ac: New --with-libthread-db option.
11903 * thread-db.c: Allow direct dependence on libthread_db.
11904 (thread_db_free): Adjust.
11905 * config.in: Regenerate.
11906 * configure: Likewise.
11907
11908 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11909
11910 PR gdb/10757
11911 * thread-db.c (attach_thread): New function.
11912 (maybe_attach_thread): Return success/failure.
11913 (find_new_threads_callback): Adjust.
11914 (thread_db_find_new_threads): Loop until no new threads.
11915
11916 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11917
11918 * proc-service.c (ps_lgetregs): Formatting.
11919
11920 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11921
11922 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11923 * configure.ac: Adjust.
11924 * linux-low.h (struct process_info_private): Move members to struct
11925 thread_db.
11926 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11927 * linux-low.c (linux_remove_process): Adjust.
11928 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11929 * server.c (handle_query): Move code ...
11930 (handle_monitor_command): ... here. New function.
11931 * target.h (struct target_ops): New member.
11932 * thread-db.c (struct thread_db): New.
11933 (libthread_db_search_path): New variable.
11934 (thread_db_create_event, thread_db_enable_reporting)
11935 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11936 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11937 (try_thread_db_load_1, dladdr_to_soname): New functions.
11938 (try_thread_db_load, thread_db_load_search): New functions.
11939 (thread_db_init): Search for libthread_db.
11940 (thread_db_free): New function.
11941 (thread_db_handle_monitor_command): Likewise.
11942 * config.in: Regenerate.
11943 * configure: Regenerate.
11944
11945 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11946
11947 * spu-low.c (spu_kill): Wait for inferior to terminate.
11948 Call clear_inferiors.
11949 (spu_detach): Call clear_inferiors.
11950
11951 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11952
11953 * aclocal.m4: Regenerate.
11954 * config.in: Likewise.
11955 * configure: Likewise.
11956
11957 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11958
11959 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11960 (parse_spufs_run): New function.
11961 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11962 (ppc_breakpoint_at): Handle SPU breakpoints.
11963
11964 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11965
11966 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11967 (SPUFS_MAGIC): Define.
11968 (spu_enumerate_spu_ids): New function.
11969 (linux_qxfer_spu): New function.
11970 (linux_target_ops): Install linux_qxfer_spu.
11971
11972 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11973
11974 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11975 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11976 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11977 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11978 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11979 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11980 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11981 (init_registers_powerpc_cell32l): Add prototype.
11982 (init_registers_powerpc_cell64l): Likewise.
11983 (ppc_arch_setup): Detect Cell/B.E. architecture.
11984
11985 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11986
11987 * Makefile.in (datarootdir): New variable.
11988
11989 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11990
11991 * linux-low.c (linux_write_memory): Update debugging output.
11992 * Makefile.in (clean): Add new descriptions.
11993 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11994 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11995 * configure.srv: Add new files for arm*-*-linux*.
11996 * linux-arm-low.c: Add new declarations.
11997 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11998 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11999 (HWCAP_VFPv3D16): New.
12000 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12001 instead of __IWMMXT__.
12002 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12003 (arm_arch_setup): New.
12004 (target_regsets): Remove #ifdef. Add VFP regset.
12005 (the_low_target): Use arm_arch_setup.
12006
12007 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12008
12009 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12010 the main thread again.
12011
12012 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12013
12014 Adding Neutrino gdbserver.
12015 * configure: Regenerated.
12016 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12017 * configure.srv (i[34567]86-*-nto*): New target.
12018 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12019 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12020 (nto_comctrl) [__QNX__]: New function.
12021 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12022
12023 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12024
12025 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12026 srv_tgtobj.
12027
12028 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12029 Pedro Alves <pedro@codesourcery.com>
12030
12031 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12032 don't support CONTEXT_EXTENDED_REGISTERS.
12033 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12034 (the_low_target): Install them.
12035 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12036 failing with ERROR_PIPE_NOT_CONNECTED.
12037
12038 2009-06-30 Doug Evans <dje@google.com>
12039 Pierre Muller <muller@ics.u-strasbg.fr>
12040
12041 Add h/w watchpoint support to x86-linux, win32-i386.
12042 * Makefile.in (SFILES): Add i386-low.c
12043 (i386_low_h): Define.
12044 (i386-low.o): Add dependencies.
12045 (linux-x86-low.o): Add i386-low.h dependency.
12046 (win32-i386-low.o): Ditto.
12047 * i386-low.c: New file.
12048 * i386-low.h: New file.
12049 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12050 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12051 * linux-low.c (linux_add_process): Initialize arch_private.
12052 (linux_remove_process): Free arch_private.
12053 (add_lwp): Initialize arch_private.
12054 (delete_lwp): Free arch_private.
12055 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12056 provided.
12057 * linux-low.h (process_info_private): New member arch_private.
12058 (lwp_info): New member arch_private.
12059 (linux_target_ops): New members new_process, new_thread,
12060 prepare_to_resume.
12061 (ptid_of): New macro.
12062 * linux-x86-low.c: Include stddef.h, i386-low.h.
12063 (arch_process_info): New struct.
12064 (arch_lwp_info): New struct.
12065 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12066 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12067 (i386_dr_low_get_status): New function.
12068 (x86_insert_point, x86_remove_point): New functions.
12069 (x86_stopped_by_watchpoint): New function.
12070 (x86_stopped_data_address): New function.
12071 (x86_linux_new_process, x86_linux_new_thread): New functions.
12072 (x86_linux_prepare_to_resume): New function.
12073 (the_low_target): Add entries for insert_point, remove_point,
12074 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12075 prepare_to_resume.
12076 * server.c (debug_hw_points): New global.
12077 (monitor_show_help): Document set debug-hw-points.
12078 (handle_query): Process "set debug-hw-points".
12079 * server.h (debug_hw_points): Declare.
12080 (paddress): Declare.
12081 * utils.c (NUMCELLS, CELLSIZE): New macros.
12082 (get_sell, xsnprintf, paddress): New functions.
12083 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12084 remove_point, stopped_by_watchpoint, stopped_data_address.
12085 * win32-i386-low.c: Include i386-low.h.
12086 (debug_reg_state): Replaces dr.
12087 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12088 (i386_dr_low_get_status): New function.
12089 (i386_insert_point, i386_remove_point): New functions.
12090 (i386_stopped_by_watchpoint): New function.
12091 (i386_stopped_data_address): New function.
12092 (i386_initial_stuff): Update.
12093 (get_thread_context,set_thread_context,i386_thread_added): Update.
12094 (the_low_target): Add entries for insert_point,
12095 remove_point, stopped_by_watchpoint, stopped_data_address.
12096 * win32-low.c (win32_insert_watchpoint): New function.
12097 (win32_remove_watchpoint): New function.
12098 (win32_stopped_by_watchpoint): New function.
12099 (win32_stopped_data_address): New function.
12100 (win32_target_ops): Add entries for insert_watchpoint,
12101 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12102 * win32-low.h (win32_target_ops): New members insert_point,
12103 remove_point, stopped_by_watchpoint, stopped_data_address.
12104
12105 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12106
12107 * server.c (process_serial_event): Re-return unsupported, not
12108 error, if the type isn't recognized. Re-allow supporting only
12109 insert or remove packets. Also call require_running for
12110 breakpoints. Add missing break statement to default case. Tidy.
12111 * target.h (struct target_ops): Rename insert_watchpoint to
12112 insert_point, and remove_watchpoint to remove_point.
12113
12114 * linux-low.h (struct linux_target_ops): Likewise.
12115 * linux-low.c (linux_insert_watchpoint): Rename to ...
12116 (linux_insert_point): ... this. Adjust.
12117 (linux_remove_watchpoint): Rename to ...
12118 (linux_remove_point): ... this. Adjust.
12119 (linux_target_ops): Adjust.
12120 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12121 (cris_insert_point): ... this.
12122 (cris_remove_watchpoint): Rename to ...
12123 (cris_remove_point): ... this.
12124 (the_low_target): Adjust.
12125
12126 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12127
12128 * server.c (handle_v_kill): Pass signal_pid to
12129 kill_inferior if multi_process is zero.
12130
12131 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12132
12133 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12134 * target.h (target_ops): Comment for *_watchpoint to make it clear
12135 the functions can get types '0' and '1'.
12136
12137 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12138
12139 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12140 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12141 * regcache.c (get_regcache): Likewise.
12142 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12143 * win32-low.c (child_fetch_inferior_registers): Remove check for
12144 regno 0.
12145
12146 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12147 Pedro Alves <pedro@codesourcery.com>
12148
12149 * target.h (struct target_ops) <supports_multi_process>: New
12150 callback.
12151 (target_supports_multi_process): New.
12152 * server.c (handle_query): Even if GDB reports support, only
12153 enable multi-process if the target also supports it. Report
12154 multi-process support only if the target backend supports it.
12155 * linux-low.c (linux_supports_multi_process): New function.
12156 (linux_target_ops): Install it as target_supports_multi_process
12157 callback.
12158
12159 2009-05-24 Doug Evans <dje@google.com>
12160
12161 Global renaming of find_thread_pid to find_thread_ptid.
12162 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12163 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12164 All callers updated.
12165
12166 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12167 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12168 directly.
12169
12170 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12171 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12172 (linux_resume_one_lwp): Ditto.
12173
12174 2009-05-23 Doug Evans <dje@google.com>
12175
12176 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12177 from struct inferior_list_entry * to struct lwp_info *.
12178 All callers updated.
12179
12180 2009-05-13 Doug Evans <dje@google.com>
12181
12182 * linux-x86-low.c: Don't include assert.h.
12183 (x86_siginfo_fixup): Use fatal, not assert.
12184 (x86_arch_setup): Fix comment.
12185
12186 2009-05-12 Doug Evans <dje@google.com>
12187
12188 Biarch support for i386/amd64 gdbserver.
12189 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12190 Add linux-x86-low.c.
12191 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12192 (linux-x86-low.o): Add.
12193 * linux-x86-64-low.c: Delete.
12194 * linux-i386-low.c: Delete.
12195 * linux-x86-low.c: New file.
12196 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12197 linux-x86-low.o.
12198 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12199 linux-x86-low.o.
12200 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12201 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12202 (linux_child_pid_to_exec_file): New function.
12203 (elf_64_header_p, elf_64_file_p): New functions.
12204 (siginfo_fixup): New function.
12205 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12206 give target a chance to convert layout.
12207 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12208 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12209
12210 2009-05-07 Doug Evans <dje@google.com>
12211
12212 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12213 (regsets_store_inferior_registers): Ditto.
12214
12215 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12216
12217 PR server/10048
12218
12219 * linux-low.c (must_set_ptrace_flags): Delete.
12220 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12221 of the global.
12222 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12223 `lwp->must_set_ptrace_flags' instead.
12224 (linux_wait_for_event_1): Set ptrace options here.
12225 (linux_wait_1): ... not here.
12226
12227 2009-04-30 Doug Evans <dje@google.com>
12228
12229 * inferiors.c (started_inferior_callback): New function.
12230 (attached_inferior_callback): New function.
12231 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12232 * server.c (print_started_pid, print_attached_pid): New functions.
12233 (detach_or_kill_for_exit): New function.
12234 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12235 * server.h (have_started_inferiors_p): Declare.
12236 (have_attached_inferiors_p): Declare.
12237
12238 * inferiors.c (remove_process): Fix memory leak, free process.
12239 * linux-low.c (linux_remove_process): New function.
12240 (linux_kill): Call it instead of remove_process.
12241 (linux_detach, linux_wait_1): Ditto.
12242
12243 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12244
12245 * configure.srv: Add x86 Windows CE target.
12246
12247 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12248
12249 * inferiors.c (get_thread_process): Make global.
12250 * server.h (get_thread_process): Add prototype.
12251 * thread-db.c (find_one_thread): Use get_thread_process
12252 instead of current_process.
12253 (thread_db_get_tls_address): Do not crash if called when
12254 thread layer is not yet initialized.
12255
12256 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12257
12258 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12259 * spu-low.c (current_tid): Rename to ...
12260 (current_ptid): ... this.
12261 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12262 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12263 ptid_get_lwp (current_ptid) instead of current_tid.
12264 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12265 instead of current_tid. Use find_process_pid to verify pid
12266 argument is valid. Pass proper argument to remove_process.
12267 (spu_thread_alive): Compare current_ptid instead of current_tid.
12268 (spu_resume): Likewise.
12269
12270 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12271
12272 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12273 variable.
12274
12275 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12276
12277 Implement the multiprocess extensions, and add linux multiprocess
12278 support.
12279
12280 * server.h (ULONGEST): Declare.
12281 (struct ptid, ptid_t): New.
12282 (minus_one_ptid, null_ptid): Declare.
12283 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12284 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12285 (struct inferior_list_entry): Change `id' type from unsigned from
12286 to ptid_t.
12287 (struct sym_cache, struct breakpoint, struct
12288 process_info_private): Forward declare.
12289 (struct process_info): Declare.
12290 (current_process): Declare.
12291 (all_processes): Declare.
12292 (initialize_inferiors): Declare.
12293 (add_thread): Adjust to use ptid_t.
12294 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12295 (add_process, remove_process, find_thread_pid): Declare.
12296 (find_inferior_id): Adjust to use ptid_t.
12297 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12298 (multi_process): Declare.
12299 (push_event): Adjust to use ptid_t.
12300 (read_ptid, write_ptid): Declare.
12301 (prepare_resume_reply): Adjust to use ptid_t.
12302 (clear_symbol_cache): Declare.
12303 * inferiors.c (all_processes): New.
12304 (null_ptid, minus_one_ptid): New.
12305 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12306 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12307 (add_thread): Change unsigned long to ptid. Remove gdb_id
12308 parameter. Adjust.
12309 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12310 (gdb_id_to_thread): Rename to ...
12311 (find_thread_pid): ... this. Change unsigned long to ptid.
12312 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12313 (loaded_dll, pull_pid_from_list): Adjust.
12314 (add_process, remove_process, find_process_pid)
12315 (get_thread_process, current_process, initialize_inferiors): New.
12316 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12317 (struct target_waitstatus) <related_pid>: Ditto.
12318 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12319 return type to int.
12320 (struct target_ops) <join>: Add `pid' argument.
12321 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12322 (struct target_ops) <wait>: Add `ptid' field. Change return type
12323 to ptid.
12324 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12325 (mywait): Add `ptid' argument. Change return type to ptid_t.
12326 (target_pid_to_str): Declare.
12327 * target.c (set_desired_inferior): Adjust to use ptids.
12328 (mywait): Add new `ptid' argument. Adjust.
12329 (target_pid_to_str): New.
12330 * mem-break.h (free_all_breakpoints): Declare.
12331 * mem-break.c (breakpoints): Delelete.
12332 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12333 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12334 to use per-process breakpoint list.
12335 (free_all_breakpoints): New.
12336 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12337 (symbol_cache, all_symbols_looked_up): Delete.
12338 (hexchars): New.
12339 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12340 read_ptid): New.
12341 (prepare_resume_reply): Change ptid argument's type from unsigned
12342 long to ptid_t. Adjust. Implement W;process and X;process.
12343 (free_sym_cache, clear_symbol_cache): New.
12344 (look_up_one_symbol): Adjust to per-process symbol cache. *
12345 * server.c (cont_thread, general_thread, step_thread): Change type
12346 to ptid_t.
12347 (attached): Delete.
12348 (multi_process): New.
12349 (last_ptid): Change type to ptid_t.
12350 (struct vstop_notif) <ptid>: Change type to ptid_t.
12351 (queue_stop_reply, push_event): Change `ptid' argument's type to
12352 ptid_t.
12353 (discard_queued_stop_replies): Add `pid' argument.
12354 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12355 changes. Don't reference the `attached' global.
12356 (attach_inferior): Adjust to mywait interface changes.
12357 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12358 features. Handle and report "multiprocess+". Handle
12359 "qAttached:PID".
12360 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12361 changes.
12362 (handle_v_kill): New.
12363 (handle_v_stopped): Adjust to use target_pid_to_str.
12364 (handle_v_requests): Allow multiple attaches and runs when
12365 multiprocess extensions are in effect. Handle "vKill".
12366 (myresume): Adjust to use ptids.
12367 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12368 (handle_status): Adjust to discard_queued_stop_replies interface
12369 change.
12370 (first_thread_of, kill_inferior_callback)
12371 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12372 (main): Call initialize_inferiors. Adjust to use ptids, killing
12373 and detaching from all inferiors. Handle multiprocess packet
12374 variants.
12375 * linux-low.h: Include gdb_proc_service.h.
12376 (struct process_info_private): New.
12377 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12378 <lwpid_of>: Use ptid_get_lwp.
12379 (get_lwp_thread): Adjust.
12380 (struct lwp_info): Add `dead' member.
12381 (find_lwp_pid): Declare.
12382 * linux-low.c (thread_db_active): Delete.
12383 (new_inferior): Adjust comment.
12384 (inferior_pid): Delete.
12385 (linux_add_process): New.
12386 (handle_extended_wait): Adjust.
12387 (add_lwp): Change unsigned long to ptid.
12388 (linux_create_inferior): Add process to processes table. Adjust
12389 to use ptids. Don't set new_inferior here.
12390 (linux_attach_lwp): Rename to ...
12391 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12392 it. Adjust to use ptids.
12393 (linux_attach_lwp): New.
12394 (linux_attach): Add process to processes table. Don't set
12395 new_inferior here.
12396 (struct counter): New.
12397 (second_thread_of_pid_p, last_thread_of_process_p): New.
12398 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12399 multiple processes.
12400 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12401 processes. Remove process from process table.
12402 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12403 to multiple processes.
12404 (any_thread_of): New.
12405 (linux_detach): Add `pid' argument, and handle it. Remove process
12406 from processes table.
12407 (linux_join): Add `pid' argument. Handle it.
12408 (linux_thread_alive): Change unsighed long argument to ptid_t.
12409 Consider dead lwps as not being alive.
12410 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12411 threads we're not interested in.
12412 (same_lwp, find_lwp_pid): New.
12413 (linux_wait_for_lwp): Change `pid' argument's type from int to
12414 ptid_t. Adjust.
12415 (linux_wait_for_event): Rename to ...
12416 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12417 from int to ptid_t. Adjust.
12418 (linux_wait_for_event): New.
12419 (linux_wait_1): Add `ptid' argument. Change return type to
12420 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12421 that exit from the process table.
12422 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12423 Adjust.
12424 (mark_lwp_dead): New.
12425 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12426 stopping all threads, mark its main lwp as dead.
12427 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12428 ptids.
12429 (fetch_register, usr_store_inferior_registers)
12430 (regsets_fetch_inferior_registers)
12431 (regsets_store_inferior_registers, linux_read_memory)
12432 (linux_write_memory): Inline `inferior_pid'.
12433 (linux_look_up_symbols): Adjust to use per-process
12434 `thread_db_active'.
12435 (linux_request_interrupt): Adjust to use ptids.
12436 (linux_read_auxv): Inline `inferior_pid'.
12437 (initialize_low): Don't reference thread_db_active.
12438 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12439 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12440 (ps_getpid): Return the pid of the current inferior.
12441 * thread-db.c (proc_handle, thread_agent): Delete.
12442 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12443 per-process data.
12444 (find_one_thread): Change argument type to ptid_t. Adjust to
12445 per-process data.
12446 (maybe_attach_thread): Adjust to per-process data and ptids.
12447 (thread_db_find_new_threads): Ditto.
12448 (thread_db_init): Ditto.
12449 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12450 processes table. Adjust to use ptids.
12451 (spu_kill, spu_detach): Adjust interface. Remove process from
12452 processes table.
12453 (spu_join, spu_thread_alive): Adjust interface.
12454 (spu_wait): Adjust interface. Remove process from processes
12455 table. Adjust to use ptids.
12456 * win32-low.c (current_inferior_tid): Delete.
12457 (current_inferior_ptid): New.
12458 (debug_event_ptid): New.
12459 (thread_rec): Take a ptid. Adjust.
12460 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12461 (child_delete_thread): Ditto.
12462 (do_initial_child_stuff): Add `attached' argument. Add process to
12463 processes table.
12464 (child_fetch_inferior_registers, child_store_inferior_registers):
12465 Adjust.
12466 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12467 (win32_attach): Pass 1 to do_initial_child_stuff.
12468 (win32_kill): Adjust interface. Remove process from processes
12469 table.
12470 (win32_detach): Ditto.
12471 (win32_join): Adjust interface.
12472 (win32_thread_alive): Take a ptid.
12473 (win32_resume): Adjust to use ptids.
12474 (get_child_debug_event): Ditto.
12475 (win32_wait): Adjust interface. Remove exiting process from
12476 processes table.
12477
12478 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12479
12480 Non-stop mode support.
12481
12482 * server.h (non_stop): Declare.
12483 (gdb_client_data, handler_func): Declare.
12484 (delete_file_handler, add_file_handler, start_event_loop):
12485 Declare.
12486 (handle_serial_event, handle_target_event, push_event)
12487 (putpkt_notif): Declare.
12488 * target.h (enum resume_kind): New.
12489 (struct thread_resume): Replace `step' field by `kind' field.
12490 (TARGET_WNOHANG): Define.
12491 (struct target_ops) <wait>: Add `options' argument.
12492 <supports_non_stop, async, start_non_stop>: New fields.
12493 (target_supports_non_stop, target_async): New.
12494 (start_non_stop): Declare.
12495 (mywait): Add `options' argument.
12496 * target.c (mywait): Add `options' argument. Print child exit
12497 notifications here.
12498 (start_non_stop): New.
12499 * server.c (non_stop, own_buf, mem_buf): New globals.
12500 (struct vstop_notif): New.
12501 (notif_queue): New global.
12502 (queue_stop_reply, push_event, discard_queued_stop_replies)
12503 (send_next_stop_reply): New.
12504 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12505 interface changes.
12506 (attach_inferior): In non-stop mode, don't wait for the target
12507 here.
12508 (handle_general_set): Handle QNonStop.
12509 (handle_query): When handling qC, return the current general
12510 thread, instead of the first thread of the list.
12511 (handle_query): If the backend supports non-stop mode, include
12512 QNonStop+ in the qSupported query response.
12513 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12514 and non-stop mode.
12515 (handle_v_attach, handle_v_run): Handle non-stop mode.
12516 (handle_v_stopped): New.
12517 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12518 (myresume): Adjust to use resume_kind. Handle non-stop.
12519 (queue_stop_reply_callback): New.
12520 (handle_status): Handle non-stop mode.
12521 (main): Clear non_stop flag on reconnection. Use the event-loop.
12522 Refactor serial protocol handling from here ...
12523 (process_serial_event): ... to this new function. When GDB
12524 selects any thread, select one here. In non-stop mode, wait until
12525 GDB acks all pending events before exiting.
12526 (handle_serial_event, handle_target_event): New.
12527 * remote-utils.c (remote_open): Install remote_desc in the event
12528 loop.
12529 (remote_close): Remove remote_desc from the event loop.
12530 (putpkt_binary): Rename to...
12531 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12532 (putpkt_binary): New as wrapper around putpkt_binary_1.
12533 (putpkt_notif): New.
12534 (prepare_resume_reply): In non-stop mode, don't change the
12535 general_thread.
12536 * event-loop.c: New.
12537 * Makefile.in (OBJ): Add event-loop.o.
12538 (event-loop.o): New rule.
12539
12540 * linux-low.h (pid_of): Moved here.
12541 (lwpid_of): New.
12542 (get_lwp_thread): Use lwpid_of.
12543 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12544 * linux-low.c (pid_of): Delete.
12545 (inferior_pid): Use lwpid_of.
12546 (linux_event_pipe): New.
12547 (target_is_async_p): New.
12548 (delete_lwp): New.
12549 (handle_extended_wait): Use lwpid_of.
12550 (add_lwp): Don't set lwpid field.
12551 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12552 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12553 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12554 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12555 first. Adjust to linux_wait_for_event interface changes. Use
12556 lwpid_of.
12557 (linux_detach): Don't delete the main lwp here.
12558 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12559 (status_pending_p): Don't consider explicitly suspended lwps.
12560 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12561 pointer. Add OPTIONS argument. Change return type to int. Use
12562 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12563 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12564 pointer. Add status pointer argument. Return a pid instead of a
12565 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12566 changes. In non-stop mode, don't switch to a random thread.
12567 (linux_wait): Rename to...
12568 (linux_wait_1): ... this. Add target_options argument, and handle
12569 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12570 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12571 clean exit and signal exit code. Don't stop all threads in
12572 non-stop mode. In all-stop mode, only stop all threads when
12573 reporting a stop to GDB. Handle explicit thread stop requests.
12574 (async_file_flush, async_file_mark): New.
12575 (linux_wait): New.
12576 (send_sigstop): Use lwpid_of.
12577 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12578 interface changes. In non-stop mode, don't switch to a random
12579 thread.
12580 (linux_resume_one_lwp): Use lwpid_of.
12581 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12582 (linux_resume_one_thread): ... this. Handle resume_stop. In
12583 non-stop mode, don't look for pending flag in all threads.
12584 (resume_status_pending_p): Don't consider explicitly suspended
12585 threads.
12586 (my_waitpid): Reimplement. Emulate __WALL.
12587 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12588 Use lwpid_of.
12589 (sigchld_handler, linux_supports_non_stop, linux_async)
12590 (linux_start_non_stop): New.
12591 (linux_target_ops): Register linux_supports_non_stop, linux_async
12592 and linux_start_non_stop.
12593 (initialize_low): Install SIGCHLD handler.
12594 * thread-db.c (thread_db_create_event, find_one_thread)
12595 (thread_db_get_tls_address): Use lwpid_of.
12596 * win32-low.c (win32_detach): Adjust to use resume_kind.
12597 (win32_wait): Add `options' argument.
12598 * spu-low.c (spu_resume): Adjust to use resume_kind.
12599 (spu_wait): Add `options' argument.
12600
12601 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12602
12603 Decouple target code from remote protocol.
12604
12605 * target.h (enum target_waitkind): New.
12606 (struct target_waitstatus): New.
12607 (struct target_ops) <wait>: Return an unsigned long. Take a
12608 target_waitstatus pointer instead of a char pointer.
12609 (mywait): Likewise.
12610 * target.c (mywait): Change prototype to return an unsigned long.
12611 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12612 * server.h (thread_from_wait, old_thread_from_wait): Delete
12613 declarations.
12614 (prepare_resume_reply): Change prototype to take a
12615 target_waitstatus.
12616 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12617 (last_status, last_ptid): New.
12618 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12619 pid instead of a signal.
12620 (attach_inferior): Remove "status" and "signal" parameters.
12621 Adjust.
12622 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12623 not as an address.
12624 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12625 (handle_v_requests, myresume): Remove "status" and "signal"
12626 parameters. Adjust.
12627 (handle_status): New.
12628 (main): Delete local `status'. Adjust.
12629 * remote-utils.c: Include target.h.
12630 (prepare_resume_reply): Change prototype to take a
12631 target_waitstatus. Adjust.
12632
12633 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12634 interface.
12635 * spu-low.c (spu_wait): Adjust.
12636 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12637 Delete.
12638 (win32_wait): Adjust.
12639
12640 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12641
12642 * target.h (struct thread_resume): Delete leave_stopped member.
12643 (struct target_ops): Add a `n' argument to the `resume' callback.
12644 * server.c (start_inferior): Adjust.
12645 (handle_v_cont, myresume): Adjust.
12646 * linux-low.c (check_removed_breakpoint): Adjust to resume
12647 interface change, and to removed leave_stopped field.
12648 (resume_ptr): Delete.
12649 (struct thread_resume_array): New.
12650 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12651 resume interface change.
12652 (linux_continue_one_thread, linux_queue_one_thread)
12653 (resume_status_pending_p): Check if the resume field is NULL
12654 instead of checking the leave_stopped member.
12655 (linux_resume): Adjust to the target resume interface change.
12656 * spu-low.c (spu_resume): Adjust to the target resume interface
12657 change.
12658 * win32-low.c (win32_detach, win32_resume): Ditto.
12659
12660 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12661
12662 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12663 flag.
12664 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12665 pending.
12666 (linux_continue_one_thread): Only preserve the stepping flag if
12667 there's a pending breakpoint.
12668
12669 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12670
12671 * server.c (main): After the inferior having exited, call
12672 remote_close before exiting gdbserver.
12673
12674 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12675
12676 Fix size of FPSCR in Power 7 processors.
12677 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12678 (PPC_FEATURE_HAS_DFP): New #define.
12679 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12680 size of the FPSCR.
12681
12682 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12683
12684 * server.c (handle_query) Whitespace and formatting.
12685
12686 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12687
12688 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12689 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12690 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12691 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12692 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12693 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12694 Makefile.in, configure.ac: Fix whitespace throughout.
12695 * configure: Regenerate.
12696
12697 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12698
12699 * inferiors.c (find_inferior): Make it safe for the callback
12700 function to delete the currently iterated inferior.
12701
12702 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12703
12704 * Makefile.in (linuw_low_h): Move higher.
12705 (thread-db.o): Depend on $(linux_low_h).
12706
12707 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12708
12709 Rename "process" to "lwp" throughout.
12710
12711 * linux-low.c (all_processes): Rename to...
12712 (all_lwps): ... this.
12713 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12714 (add_process): Rename to ...
12715 (add_lwp): ... this. Adjust.
12716 (linux_create_inferior): Adjust.
12717 (linux_attach_lwp): Adjust.
12718 (linux_attach): Adjust.
12719 (linux_kill_one_process): Rename to ...
12720 (linux_kill_one_lwp): ... this. Adjust.
12721 (linux_kill): Adjust.
12722 (linux_detach_one_process): Rename to ...
12723 (linux_detach_one_lwp): ... this. Adjust.
12724 (linux_detach): Adjust.
12725 (check_removed_breakpoint): Adjust.
12726 (status_pending_p): Adjust.
12727 (linux_wait_for_process): Rename to ...
12728 (linux_wait_for_lwp): ... this. Adjust.
12729 (linux_wait_for_event): Adjust.
12730 (send_sigstop): Adjust.
12731 (wait_for_sigstop): Adjust.
12732 (stop_all_processes): Rename to ...
12733 (stop_all_lwps): ... this.
12734 (linux_resume_one_process): Rename to ...
12735 (linux_resume_one_lwp): ... this. Adjust.
12736 (linux_set_resume_request, linux_continue_one_thread)
12737 (linux_queue_one_thread, resume_status_pending_p)
12738 (usr_store_inferior_registers, regsets_store_inferior_registers)
12739 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12740 Adjust.
12741 * linux-low.h (get_process): Rename to ...
12742 (get_lwp): ... this. Adjust.
12743 (get_thread_process): Rename to ...
12744 (get_thread_lwp): ... this. Adjust.
12745 (get_process_thread): Rename to ...
12746 (get_lwp_thread): ... this. Adjust.
12747 (struct process_info): Rename to ...
12748 (struct lwp_info): ... this.
12749 (all_processes): Rename to ...
12750 (all_lwps): ... this.
12751 * proc-service.c (ps_lgetregs): Adjust.
12752 * thread-db.c (thread_db_create_event, find_one_thread)
12753 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12754
12755 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12756
12757 * server.c (handle_query): Handle "qAttached".
12758
12759 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12760
12761 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12762 GPLv3, update license URL.
12763
12764 2009-03-01 Doug Evans <dje@google.com>
12765
12766 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12767 (server_h): Add gdb_signals.h.
12768 (signals.o): Update.
12769 * server.h (target_signal_from_host,target_signal_to_host_p)
12770 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12771
12772 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12773
12774 * remote-utils.c (getpkt): Also generate remote-debug
12775 information if noack_mode is set.
12776
12777 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12778
12779 * server.c (handle_query): Report qXfer:siginfo:read and
12780 qXfer:siginfo:write as supported and handle them.
12781 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12782 * linux-low.c (linux_xfer_siginfo): New.
12783 (linux_target_ops): Set it.
12784
12785 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12786
12787 * server.c (gdbserver_usage): Mention --remote-debug.
12788 (main): Accept '--remote-debug' switch.
12789
12790 2009-01-18 Doug Evans <dje@google.com>
12791
12792 * regcache.c (new_register_cache): No need to check result of xcalloc.
12793 * server.c (handle_search_memory): Back out calls to xmalloc,
12794 result is checked and error is returned to user upon failure.
12795 (handle_query): Ditto. Add more checks for result of malloc.
12796 (handle_v_cont): Check result of malloc, report error back to
12797 user upon failure.
12798 (handle_v_run): Ditto. Call freeargv.
12799 * server.h (freeargv): Declare.
12800 * utils.c (freeargv): New fn.
12801
12802 2009-01-15 Doug Evans <dje@google.com>
12803
12804 * gdbreplay.c (perror_with_name): Make arg const char *.
12805 * server.h (target_signal_to_name): Make return type const char *.
12806 * thread-db.c (thread_db_err_str): Make return type const char *.
12807 * utils.c (perror_with_name): Make arg const char *.
12808
12809 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12810
12811 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12812 when handling a EXIT_PROCESS_DEBUG_EVENT.
12813
12814 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12815
12816 * gdbreplay.c (gdbreplay_version): Update copyright year.
12817 * server.c (gdbserver_version): Likewise.
12818
12819 2009-01-05 Doug Evans <dje@google.com>
12820
12821 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12822 (handle_extended_wait): Improve comment.
12823
12824 2008-12-13 Doug Evans <dje@google.com>
12825
12826 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12827 * server.h (ATTR_MALLOC): New macro.
12828 (xmalloc,xcalloc,xstrdup): Declare.
12829 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12830 * inferiors.c: Ditto.
12831 * linux-low.c: Ditto.
12832 * mem-break.c: Ditto.
12833 * regcache.c: Ditto.
12834 * remote-utils.c: Ditto.
12835 * server.c: Ditto.
12836 * target.c: Ditto.
12837 * win32-low.c: Ditto.
12838
12839 2008-12-12 Doug Evans <dje@google.com>
12840
12841 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12842 in debugging printf.
12843
12844 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12845
12846 2008-12-09 Doug Evans <dje@google.com>
12847
12848 * linux-low.h (struct process_info): Delete member tid, unused.
12849 * thread-db.c (find_one_thread): Update.
12850 (maybe_attach_thread): Update.
12851
12852 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12853
12854 * target.h (struct target_ops): Add qxfer_osdata member.
12855 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12856 and dirent.h.
12857 (linux_qxfer_osdata): New functions.
12858 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12859 callback.
12860 * server.c (handle_query): Handle "qXfer:osdata:read:".
12861 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12862 (buffer_xml_printf): New functions.
12863 * server.h (struct buffer): New.
12864 (buffer_grow_str, buffer_grow_str0): New macros.
12865 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12866 (buffer_xml_printf): Declare.
12867
12868 2008-11-24 Doug Evans <dje@google.com>
12869
12870 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12871
12872 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12873
12874 * server.c (handle_v_run): Always use the supplied argument list.
12875
12876 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12877
12878 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12879 (xtensa_regmap_table): Add entry for scompare1.
12880
12881 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12882
12883 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12884 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12885 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12886 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12887 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12888 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12889 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12890 XML target descriptions.
12891 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12892 when inferior is running on an ISA 2.05 or later processor. Add
12893 special case to return offset for full 64-bit slot of FPSCR when
12894 in 32-bits.
12895
12896 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12897
12898 * Makefile.in (SFILES, clean): Added sparc64 files.
12899 (reg-sparc64.o, reg-sparc64.c): New.
12900 * configure.srv (sparc*-*-linux*): New configuration.
12901 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12902 syscall arguments for SPARC.
12903 (regsets_store_inferior_registers): Likewise.
12904 * linux-sparc-low.c: New file.
12905
12906 2008-10-21 Doug Evans <dje@google.com>
12907
12908 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12909 (READLINE_DIR,READLINE_DEP): Delete.
12910 (INTERNAL_CFLAGS): Update.
12911 (LINTFLAGS): Update.
12912
12913 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12914
12915 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12916 whole argv from the last run, not just argv[0].
12917
12918 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12919
12920 * regcache.c (new_register_cache): Return NULL if the register
12921 cache size isn't known yet.
12922 (free_register_cache): Avoid dereferencing a NULL regcache.
12923
12924 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12925
12926 * configure.srv: Merge MIPS and MIPS64.
12927
12928 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12929
12930 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12931
12932 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12933
12934 * Makefile.in: Add required vsx dependencies.
12935
12936 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12937 Declare init_registers_powerpc_vsx32l.
12938 Declare init_registers_powerpc_vsx64l.
12939 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12940 (ppc_arch_setup): Check for VSX in hwcap.
12941 (ppc_fill_vsxregset): New function.
12942 (ppc_store_vsxregset): New function.
12943 Add new VSX entry in regset_info target_regsets.
12944
12945 * configure.srv: Add new VSX dependencies.
12946
12947 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12948
12949 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12950 (remote_open): Set or clear transport_is_reliable.
12951 (putpkt_binary): Don't expect acks in noack mode.
12952 (getpkt): Don't send ack/nac in noack mode.
12953 * server.c (handle_general_set): Handle QStartNoAckMode.
12954 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12955 qSupported.
12956 (main): Reset noack_mode on every connection.
12957 * server.h (noack_mode): Declare.
12958
12959 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12960
12961 * Makefile.in (GDBREPLAY_OBS): New variable.
12962 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12963
12964 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12965 Daniel Jacobowitz <dan@codesourcery.com>
12966
12967 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12968 (usr_store_inferior_registers): Likewise.
12969 (regsets_store_inferior_registers): Likewise.
12970
12971 2008-07-31 Rolf Jansen <rj@surtec.com>
12972 Pedro Alves <pedro@codesourcery.com>
12973
12974 * configure.ac: Check for memmem declaration.
12975 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12976 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12977 (disable_packet_qfThreadInfo): Unconditionally compile.
12978 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12979 * configure, config.in: Regenerate.
12980
12981 2008-07-28 Doug Kwan <dougkwan@google.com>
12982
12983 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12984 (linux_write_memory): Remove declaration of errno.
12985
12986 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12987
12988 * linux-low.c (handle_extended_wait): Do not use "status"
12989 variable uninitialized.
12990
12991 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12992
12993 * server.c (handle_v_attach): Inhibit reporting dll changes.
12994
12995 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12996
12997 * remote-utils.c (prepare_resume_reply): If requested, don't
12998 output "thread:TID" in the T stop reply.
12999
13000 * server.c (disable_packet_vCont, disable_packet_Tthread)
13001 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13002 (handle_query): If requested, disable support for qC, qfThreadInfo
13003 and qsThreadInfo.
13004 (handle_v_requests): If requested, disable support for vCont.
13005 (gdbserver_show_disableable): New.
13006 (main): Handle --disable-packet and --disable-packet=LIST.
13007
13008 * server.h (disable_packet_vCont, disable_packet_Tthread)
13009 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13010
13011 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13012
13013 * server.c (gdbserver_usage): Mention --version.
13014
13015 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13016
13017 * Makefile.in (gdbreplay.o): New rule.
13018
13019 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13020
13021 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13022 message, not gdbserver.
13023
13024 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13025 Nathan Sidwell <nathan@codesourcery.com>
13026 Joseph Myers <joseph@codesourcery.com>
13027
13028 * acinclude.m4: Include ../../config/acx.m4.
13029 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13030 * configure, config.in: Regenerate.
13031 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13032 * server.c (gdbserver_version): Print PKGVERSION.
13033 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13034 (main): Adjust gdbserver_usage calls.
13035 * gdbreplay.c (version, host_name): Add declarations.
13036 (gdbreplay_version, gdbreplay_usage): New.
13037 (main): Accept --version and --help options.
13038
13039 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13040
13041 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13042 (arm_breakpoint_at): Handle Thumb.
13043 (the_low_target): Add comment.
13044
13045 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13046
13047 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13048
13049 2008-05-09 Doug Evans <dje@google.com>
13050
13051 * server.h (decode_search_memory_packet): Declare.
13052 * remote-utils.c (decode_search_memory_packet): New fn.
13053 * server.c (handle_search_memory_1): New fn.
13054 (handle_search_memory): New fn.
13055 (handle_query): Process qSearch:memory packets.
13056
13057 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13058
13059 * regcache.c (registers_length): Remove.
13060 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13061 full register packet.
13062 * regcache.h (registers_length): Remove prototype.
13063 * server.h (PBUFSIZ): Define to 16384.
13064
13065 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13066
13067 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13068 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13069 powerpc-64l.o, and powerpc-altivec64l.o.
13070 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13071 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13072 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13073 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13074 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13075 to srv_xmlfiles.
13076
13077 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13078 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13079 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13080 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13081 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13082 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13083 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13084 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13085 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13086 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13087 (clean): Update.
13088
13089 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13090 (init_registers_powerpc_32l): ... this new prototype.
13091 (init_registers_powerpc_32): Remove, replace by ...
13092 (init_registers_powerpc_altivec32l): ... this new prototype.
13093 (init_registers_powerpc_e500): Remove, replace by ...
13094 (init_registers_powerpc_e500l): ... this new prototype.
13095 (init_registers_ppc64): Remove, replace by ...
13096 (init_registers_powerpc_64l): ... this new prototype.
13097 (init_registers_powerpc_64): Remove, replace by ...
13098 (init_registers_powerpc_altivec64l): ... this new prototype.
13099 (ppc_num_regs): Set to 73.
13100 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13101 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13102 (ppc_cannot_store_register): Handle orig_r3 and trap.
13103 (ppc_arch_setup): Update init_registers_... calls.
13104 (ppc_fill_gregset): Handle orig_r3 and trap.
13105
13106 * inferiors.c (clear_inferiors): Reset current_inferior.
13107
13108 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13109
13110 * acinclude.m4: Add override.m4.
13111 * configure: Regenerate.
13112
13113 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13114
13115 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13116 initial call to init_register_ppc64.
13117
13118 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13119
13120 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13121 single powerpc*-*-linux* case.
13122 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13123
13124 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13125
13126 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13127 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13128 from reg_xmlfiles.
13129 * linux-ppc-low.c: Include <elf.h>.
13130 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13131 (ppc_hwcap): New global variable.
13132 (ppc_regmap): Remove __SPE__ #ifdef sections.
13133 (ppc_regmap_e500): New global variable.
13134 (ppc_cannot_store_register): Update __SPE__ special case.
13135 (ppc_get_hwcap): New function.
13136 (ppc_arch_setup): Use it to determine whether inferior supports
13137 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13138 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13139 Do not access registers if target does not support AltiVec.
13140 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13141 Do not access registers if target does not support SPE.
13142 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13143
13144 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13145
13146 * linux-low.c (disabled_regsets, num_regsets): New.
13147 (use_regsets_p): Delete.
13148 (linux_wait_for_process): Clear disabled_regsets.
13149 (regsets_fetch_inferior_registers): Check and set it.
13150 (regsets_store_inferior_registers): Likewise.
13151 (linux_fetch_registers, linux_store_registers): Do not use
13152 use_regsets_p.
13153 (initialize_low): Allocate disabled_regsets.
13154
13155 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * Makefile.in (LIBOBJS): New.
13158 (OBS): Use LIBOBJS.
13159 (memmem.o): New rule.
13160 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13161 * configure: Regenerated.
13162
13163 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13164
13165 * server.c (handle_query): Never return "unsupported" for
13166 qXfer:features:read queries.
13167
13168 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13169
13170 * server.c (get_features_xml): Fix inverted condition.
13171 (handle_query): Always support qXfer:feature:read.
13172
13173 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13174
13175 * server.c (wrapper_argv): New.
13176 (start_inferior): Handle wrapper_argv. If set, expect an extra
13177 trap.
13178 (gdbserver_usage): Document --wrapper.
13179 (main): Parse --wrapper.
13180
13181 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13182
13183 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13184 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13185 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13186 (ppc_set_pc): Likewise.
13187 (ppc_arch_setup): New function.
13188 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13189 of collect_register.
13190 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13191
13192 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13193
13194 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13195 instead of linux-ppc64-low.o.
13196 * linux-ppc64-low.c: Remove file.
13197 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13198 (linux-ppc64-low.o): Remove rule.
13199
13200 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13201 (init_registers_powerpc_64): Likewise.
13202 (ppc_regmap): Conditionally define depending on __powerpc64__.
13203 (ppc_cannot_store_register): Do not special-case "fpscr" when
13204 compiled on __powerpc64__.
13205 (ppc_collect_ptrace_register): New function.
13206 (ppc_supply_ptrace_register): New function.
13207 (ppc_breakpoint): Change type to "unsigned int".
13208 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13209 (the_low_target): Conditionally provide initializers for the
13210 arch_setup member depending on __powerpc64__. Install
13211 collect_ptrace_register and supply_ptrace_register members.
13212
13213 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13214
13215 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13216 * server.c (gdbserver_xmltarget): Define.
13217 (get_features_xml): Use it to replace "target.xml" and arch_string.
13218
13219 * configure.srv: Remove srv_xmltarget. Add XML files that were
13220 mentioned there to srv_xmlfiles instead. Remove conditional tests
13221 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13222 srv_xmlfiles and srv_regobj to include all possible choices.
13223 * configure.ac (srv_xmltarget): Remove.
13224 (srv_xmlfiles): Do not add "target.xml".
13225 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13226 checks for supplementary target information.
13227 * configure: Regenerate.
13228 * Makefile.in (XML_TARGET): Remove.
13229 (target.xml): Remove rule.
13230 (clean): Do not clean up target.xml.
13231 (.PRECIOUS): Do not mention target.xml.
13232
13233 * target.h (struct target_ops): Remove arch_string member.
13234 * linux-low.c (linux_arch_string): Remove.
13235 (linux_target_ops): Remove arch_string initializer.
13236 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13237 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13238 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13239 * spu-low.c (spu_arch_string): Remove.
13240 (spu_target_ops): Remove arch_string initializer.
13241 * win32-low.c (win32_arch_string): Remove.
13242 (win32_target_ops): Remove arch_string initializer.
13243 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13244 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13245 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13246
13247 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13248
13249 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13250 by collect_ptrace_register and supply_ptrace_register hooks.
13251 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13252 instead of checking for the_low_target.left_pad_xfer.
13253 (usr_store_inferior_registers): Use collect_ptrace_register callback
13254 instead of checking for the_low_target.left_pad_xfer.
13255
13256 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13257 (s390_supply_ptrace_register): Likewise.
13258 (s390_fill_gregset): Call s390_collect_ptrace_register.
13259 (the_low_target): Update.
13260
13261 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13262 (ppc_supply_ptrace_register): Likewise.
13263 (the_low_target): Update.
13264
13265 * linux-i386-low.c (the_low_target): Update.
13266 * linux-x86-64-low.c (the_low_target): Update.
13267
13268 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13269
13270 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13271 reg-s390.o and reg-s390x.o.
13272
13273 * linux-low.c (new_inferior): New global variable.
13274 (linux_create_inferior, linux_attach): Set it.
13275 (linux_wait_for_process): Call the_low_target.arch_setup after the
13276 target has stopped for the first time.
13277 (initialize_low): Do not call the_low_target.arch_setup.
13278
13279 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13280 (s390_set_pc): Likewise.
13281 (s390_arch_setup): New function.
13282 (the_low_target): Use s390_arch_setup as arch_setup routine.
13283
13284 * regcache.c (realloc_register_cache): New function.
13285 (set_register_cache): Call it for each existing regcache.
13286
13287 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13288
13289 * server.h (init_registers): Remove prototype.
13290
13291 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13292 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13293 instead of init_registers ().
13294 * linux-arm-low.c (init_registers_arm): Add prototype.
13295 (init_registers_arm_with_iwmmxt): Likewise.
13296 (the_low_target): Add initializer for arch_setup field.
13297 * linux-cris-low.c (init_registers_cris): Add prototype.
13298 (the_low_target): Add initializer for arch_setup field.
13299 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13300 (the_low_target): Add initializer for arch_setup field.
13301 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13302 (the_low_target): Add initializer for arch_setup field.
13303 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13304 (the_low_target): Add initializer for arch_setup field.
13305 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13306 (the_low_target): Add initializer for arch_setup field.
13307 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13308 (the_low_target): Add initializer for arch_setup field.
13309 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13310 (init_registers_mips64_linux): Likewise.
13311 (the_low_target): Add initializer for arch_setup field.
13312 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13313 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13314 (the_low_target): Add initializer for arch_setup field.
13315 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13316 (init_registers_powerpc_64): Likewise.
13317 (the_low_target): Add initializer for arch_setup field.
13318 * linux-s390-low.c (init_registers_s390): Add prototype.
13319 (init_registers_s390x): Likewise.
13320 (the_low_target): Add initializer for arch_setup field.
13321 * linux-sh-low.c (init_registers_sh): Add prototype.
13322 (the_low_target): Add initializer for arch_setup field.
13323 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13324 (the_low_target): Add initializer for arch_setup field.
13325 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13326 (the_low_target): Add initializer for arch_setup field.
13327
13328 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13329 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13330 instead of init_registers ().
13331 * win32-arm-low.c (init_registers_arm): Add prototype.
13332 (the_low_target): Add initializer for arch_setup field.
13333 * win32-i386-low.c (init_registers_i386): Add prototype.
13334 (the_low_target): Add initializer for arch_setup field.
13335
13336 * spu-low.c (init_registers_spu): Add prototype.
13337 (initialize_low): Call initialie_registers_spu () instead of
13338 initialize_registers ().
13339
13340 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13341
13342 * server.c (handle_v_requests): When handling the vRun and vAttach
13343 packets, if already debugging a process, don't kill it. Return an
13344 error instead.
13345
13346 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13347
13348 * server.c (handle_query): Correct length check.
13349
13350 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13351
13352 * win32-low.c (do_initial_child_stuff): Add process handle
13353 parameter. Set current_process_handle and current_process_id from the
13354 parameters. Clear globals.
13355 (win32_create_inferior): Don't set current_process_handle and
13356 current_process_id here. Instead pass them on the call to
13357 do_initial_child_stuff.
13358 (win32_attach): Likewise.
13359 (win32_clear_inferiors): New.
13360 (win32_kill): Don't close the current process handle or the
13361 current thread handle here. Instead call win32_clear_inferiors.
13362 (win32_detach): Don't open a new handle to the process. Call
13363 win32_clear_inferiors.
13364 (win32_join): Don't rely on current_process_handle; open a new
13365 handle using the process id.
13366 (win32_wait): Call win32_clear_inferiors when the inferior process
13367 has exited.
13368
13369 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13370
13371 * server.c (monitor_show_help): Add "exit".
13372
13373 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13374
13375 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13376 (clean): Add reg-xtensa.c.
13377 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13378 * configure.srv (xtensa*-*-linux*) New target.
13379 * linux-xtensa-low.c: New.
13380 * xtensa-xtregs.c: New.
13381
13382 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13383
13384 * hostio.c: Don't include errno.h.
13385 (errno_to_fileio_errno): Move to hostio-errno.
13386 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13387 error number outputting to the target->hostio_last_error callback.
13388 (hostio_packet_error): Use FILEIO_EINVAL directly.
13389 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13390 calls to hostio_error.
13391 * hostio-errno.c: New.
13392 * server.h (hostio_last_error_from_errno): Declare.
13393 * target.h (target_ops): Add hostio_last_error member.
13394 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13395 as hostio_last_error handler.
13396 * spu-low.c (spu_target_ops): Likewise.
13397 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13398 (wince_hostio_last_error): New functions.
13399 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13400 as hostio_last_error handler.
13401 (win32_target_ops) [!_WIN32_WCE]: Register
13402 hostio_last_error_from_errno as hostio_last_error handler.
13403 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13404 (hostio-errno.o): New rule.
13405 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13406 * configure.srv (srv_hostio_err_objs): New variable. Default to
13407 hostio-errno.o.
13408 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13409 * configure: Regenerate.
13410
13411 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13412
13413 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13414 (linux_kill, linux_detach): Clean up the process list.
13415 * remote-utils.c (remote_open): Improve port number parsing.
13416 (putpkt_binary, input_interrupt): Only send interrupts if the target
13417 is running.
13418 * server.c (extended_protocol): Make static.
13419 (attached): Define earlier.
13420 (exit_requested, response_needed, program_argv): New variables.
13421 (target_running): New.
13422 (start_inferior): Clear attached here.
13423 (attach_inferior): Set attached here.
13424 (require_running): Define.
13425 (handle_query): Use require_running and target_running. Implement
13426 "monitor exit".
13427 (handle_v_attach, handle_v_run): New.
13428 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13429 (gdbserver_usage): Update.
13430 (main): Redo argument parsing. Handle --debug and --multi. Handle
13431 --attach along with other options or after the port. Save
13432 program_argv. Support no initial program. Resynchronize
13433 communication with GDB after an error. Handle "monitor exit".
13434 Use require_running and target_running. Always allow the extended
13435 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13436 restart in extended mode.
13437 * README: Refer to the GDB manual. Update --attach usage.
13438
13439 2007-12-20 Andreas Schwab <schwab@suse.de>
13440
13441 * linux-low.c (STACK_SIZE): Define.
13442 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13443 (linux_test_for_tracefork): Likewise.
13444
13445 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13446
13447 * linux-low.c (linux_wait_for_event): Update messages. Do not
13448 reinsert auto-delete breakpoints.
13449 * mem-break.c (struct breakpoint): Change return type of handler to
13450 int.
13451 (set_breakpoint_at): Update handler type.
13452 (reinsert_breakpoint_handler): Return 1 instead of calling
13453 delete_breakpoint.
13454 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13455 setting a new one.
13456 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13457 * mem-break.h (set_breakpoint_at): Update handler type.
13458 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13459 * win32-low.c (auto_delete_breakpoint): New.
13460 (get_child_debug_event): Use it.
13461
13462 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13463
13464 * configure.ac: Check for pread and pwrite.
13465 * hostio.c (handle_pread): Fall back to lseek and read.
13466 (handle_pwrite): Fall back to lseek and write.
13467 * config.in, configure: Regenerated.
13468
13469 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * server.c (myresume): Add own_buf argument.
13472 (main): Update calls.
13473
13474 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13477 * remote-utils.c (remote_open): Do not call disable_async_io.
13478 (block_async_io): Delete.
13479 (unblock_async_io): Make static.
13480 (initialize_async_io): New.
13481 * server.c (handle_v_cont): Handle async I/O here.
13482 (myresume): Likewise. Move other common resume tasks here...
13483 (main): ... from here. Call initialize_async_io. Disable async
13484 I/O before the main loop.
13485 * server.h (initialize_async_io): Declare.
13486 (block_async_io, unblock_async_io): Delete prototypes.
13487 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13488
13489 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13490
13491 * remote-utils.c (readchar): Allow binary data in received messages.
13492
13493 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13494
13495 * win32-low.c (attaching): New global.
13496 (win32_create_inferior): Clear the `attaching' global.
13497 (win32_attach): Set the `attaching' global.
13498 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13499 attaching. Only set a breakpoint at the entry point if not
13500 attaching.
13501
13502 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13503
13504 * server.c (main): Don't report dll events on the initial
13505 connection on attaches.
13506
13507 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13508
13509 * server.c (main): Relax numerical bases supported for the pid of
13510 the --attach command line argument.
13511
13512 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13513
13514 * win32-low.c (win32_attach): Call OpenProcess before
13515 DebugActiveProcess, not after. Add last error output to error
13516 call.
13517
13518 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13519
13520 * win32-low.c (win32_get_thread_context)
13521 (win32_set_thread_context): New functions.
13522 (thread_rec): Use win32_get_thread_context.
13523 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13524 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13525 field.
13526
13527 2007-12-03 Leo Zayas
13528 Pedro Alves <pedro_alves@portugalmail.pt>
13529
13530 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13531 global variables.
13532 (child_add_thread): Minor cleanup.
13533 (child_continue): Resume artificially suspended threads before
13534 calling ContinueDebugEvent.
13535 (suspend_one_thread): New.
13536 (fake_breakpoint_event): New.
13537 (get_child_debug_event): Change return type to int. Check here if
13538 gdb sent an interrupt request. If a soft interrupt was requested,
13539 fake a breakpoint event. Return 0 if there is no event to handle,
13540 and 1 otherwise.
13541 (win32_wait): Don't check here if gdb sent an interrupt request.
13542 Ensure there is a valid event to handle.
13543 (win32_request_interrupt): Add soft interruption method as last
13544 resort.
13545
13546 2007-12-03 Leo Zayas
13547 Pedro Alves <pedro_alves@portugalmail.pt>
13548
13549 * win32-low.h (win32_thread_info): Add descriptions to the
13550 structure members. Replace `suspend_count' counter by a
13551 `suspended' flag.
13552 * win32-low.c (thread_rec): Update condition of when to get the
13553 context from the inferior. Rely on ContextFlags being set if it
13554 has already been retrieved. Only suspend the inferior thread if
13555 we haven't already. Warn if that fails.
13556 (continue_one_thread): s/suspend_count/suspended/. Only call
13557 ResumeThread once. Warn if that fails.
13558
13559 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13560
13561 * win32-low.c (win32_wait): Don't read from the inferior when it
13562 has already exited.
13563
13564 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13565
13566 * Makefile.in (win32_low_h): New variable.
13567 (win32-low.o): Add dependency on $(win32_low_h).
13568 (win32-arm-low.o, win32-i386-low.o): New rules.
13569
13570 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13571
13572 * hostio.c: Correct copyright year.
13573
13574 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * Makefile.in (OBS): Add hostio.o.
13577 (hostio.o): New rule.
13578 * server.h (handle_vFile): Declare.
13579 * hostio.c: New file.
13580 * server.c (handle_v_requests): Take packet_len and new_packet_len
13581 for binary packets. Call handle_vFile.
13582 (main): Update call to handle_v_requests.
13583
13584 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-low.c: Include <sched.h>.
13587
13588 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13589
13590 * linux-low.c (linux_tracefork_grandchild): New.
13591 (linux_tracefork_child): Use clone.
13592 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13593
13594 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13595
13596 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13597
13598 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13601
13602 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13603
13604 * inferiors.c (change_inferior_id): Delete.
13605 (add_pid_to_list, pull_pid_from_list): New.
13606 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13607 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13608 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13609 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13610 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13611 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13612 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13613 (using_threads): Always set to 1.
13614 (handle_extended_wait): New.
13615 (add_process): Do not set TID.
13616 (linux_create_inferior): Set must_set_ptrace_flags.
13617 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13618 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13619 (linux_thread_alive): Rename TID argument to LWPID.
13620 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13621 (linux_wait_for_event): Do not use TID or check using_threads. Update
13622 call to dead_thread_notify. Call handle_extended_wait.
13623 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13624 (send_sigstop): Delete sigstop_sent.
13625 (wait_for_sigstop): Avoid TID.
13626 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13627 (linux_test_for_tracefork): New.
13628 (linux_lookup_signals): Use thread_db_active and
13629 linux_supports_tracefork_flag.
13630 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13631 * linux-low.h (get_process_thread): Avoid TID.
13632 (struct process_ifo): Move thread_known and tid to the end. Remove
13633 sigstop_sent.
13634 (linux_attach_lwp, thread_db_init): Update prototypes.
13635 * server.h (change_inferior_id): Delete prototype.
13636 (add_pid_to_list, pull_pid_from_list): New prototypes.
13637 * thread-db.c (thread_db_use_events): New.
13638 (find_first_thread): Rename to...
13639 (find_one_thread): ...this. Update callers and messages. Do not
13640 call fatal. Check thread_db_use_events. Do not call
13641 change_inferior_id or new_thread_notify.
13642 (maybe_attach_thread): Update. Do not call new_thread_notify.
13643 (thread_db_init): Set thread_db_use_events. Check use_events.
13644 * utils.c (fatal, warning): Correct message prefix.
13645
13646 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13647
13648 * Makefile.in (clean): Remove new files.
13649 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13650 (powerpc-64.o, powerpc-64.c): New rules.
13651 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13652 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13653 with SPE.
13654 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13655 SPE targets.
13656 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13657 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13658 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13659 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13660 (target_regsets): Add AltiVec and SPE register sets.
13661 * configure.ac: Check for AltiVec and SPE.
13662 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13663 (ppc_fill_vrregset, ppc_store_vrregset): New.
13664 (target_regsets): Add AltiVec register set.
13665 * configure: Regenerated.
13666
13667 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13668
13669 * linux-low.c (O_LARGEFILE): Define.
13670 (linux_read_memory): Use /proc/PID/mem.
13671 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13672 * configure, config.in: Regenerated.
13673
13674 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13675
13676 * linux-low.c (linux_wait_for_event): Do not pass signals while
13677 single-stepping.
13678
13679 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13680
13681 * win32-low.c (create_process): New.
13682 (win32_create_inferior): Use create_process instead of
13683 CreateProcess. If create_process failed retry appending an ".exe"
13684 suffix. Store the GetLastError result immediatelly after
13685 create_process calls and use it on the call to error.
13686
13687 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13688
13689 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13690
13691 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13692
13693 * configure.ac: Switch license to GPLv3.
13694
13695 2007-08-01 Michael Snyder <msnyder@access-company.com>
13696
13697 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13698
13699 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13700
13701 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13702 typedef.
13703 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13704 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13705 CloseToolhelp32Snapshot.
13706 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13707 CloseToolhelp32Snapshot.
13708
13709 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13710
13711 * server.c (main): Check for inferior exit before main loop.
13712
13713 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13714
13715 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13716 instead of on tmp_desc.
13717
13718 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13719 Daniel Jacobowitz <dan@codesourcery.com>
13720
13721 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13722 (add_thread): Minor cleanups.
13723 (clear_inferiors): Move lower in the file. Clear the DLL
13724 list.
13725 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13726 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13727 (xml_escape_text): New.
13728 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13729 for qSupported.
13730 (handle_v_cont): Report errors.
13731 (gdbserver_version): Update.
13732 (main): Correct size of own_buf. Do not report initial DLL events.
13733 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13734 (unloaded_dll, xml_escape_text): New.
13735 * win32-low.c (enum target_waitkind): Update comments.
13736 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13737 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13738 (win32_EnumProcessModules, win32_GetModuleInformation)
13739 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13740 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13741 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13742 (win32_Module32First, win32_Module32Next, load_toolhelp)
13743 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13744 (get_child_debug_event): Handle DLL events.
13745 (win32_wait): Likewise.
13746
13747 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13750 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13751
13752 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13753
13754 * win32-low.c (handle_output_debug_string): Ignore event if not
13755 waiting.
13756
13757 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13758
13759 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13760
13761 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13764
13765 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * inferiors.c (change_inferior_id): Add comment.
13768 * linux-low.c (check_removed_breakpoint): Add an early
13769 prototype. Improve debug output.
13770 (linux_attach): Doc update.
13771 (linux_detach_one_process, linux_detach): Clean up before releasing
13772 each process.
13773 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13774 * linux-low.h (struct process_info): Doc improvement.
13775 * mem-break.c (delete_all_breakpoints): New.
13776 * mem-break.h (delete_all_breakpoints): New prototype.
13777 * thread-db.c (find_first_thread): New.
13778 (thread_db_create_event): Call it instead of
13779 thread_db_find_new_threads. Clean up unused variables.
13780 (maybe_attach_thread): Remove first thread handling.
13781 (thread_db_find_new_threads): Use find_first_thread.
13782 (thread_db_get_tls_address): Likewise.
13783
13784 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13785
13786 * thread-db.c (thread_db_find_new_threads): Add prototype.
13787 (thread_db_create_event): Check for the main thread before adding
13788 a new thread.
13789 (maybe_attach_thread): Only enable event reporting if TID == 0.
13790 (thread_db_get_tls_address): Check for new threads.
13791
13792 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13793
13794 * linux-low.c (linux_create_inferior): Try execv before execvp.
13795 * spu-low.c (spu_create_inferior): Likewise.
13796
13797 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13798
13799 * linux-low.c (linux_create_inferior): Change execv to execvp.
13800 * spu-low.c (spu_create_inferior): Likewies.
13801
13802 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13803
13804 * Makefile.in (clean): Clean new files instead of deleted ones.
13805 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13806 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13807 rules.
13808 * configure.srv: Specify XML files and new regformats for MIPS and
13809 MIPS64 GNU/Linux.
13810 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13811 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13812 an entry for the restart register.
13813 (mips_cannot_fetch_register, mips_cannot_store_register)
13814 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13815 register names to match the XML descriptions.
13816 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13817 restart register instead of $0.
13818
13819 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13820 Markus Deuling <deuling@de.ibm.com>
13821
13822 * remote-utils.c (decode_xfer_write): New function.
13823 * server.h (decode_xfer_write): Add prototype.
13824 * server.c (handle_query): Add PACKET_LEN argument. Support
13825 qXfer:spu:read and qXfer:spu:write packets.
13826 (main): Pass packet_len to handle_query.
13827 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13828 * target.h (target_ops): Add qxfer_spu.
13829
13830 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13831
13832 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13833 accessing non-seekable spufs files.
13834
13835 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13836
13837 * server.c (handle_query): Add reply for qC packet.
13838
13839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13840 Leo Zayas <lerele@champenstudios@com>
13841
13842 * server.h (check_remote_input_interrupt_request): New function.
13843 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13844 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13845 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13846 (check_remote_input_interrupt_request): New function.
13847 * server.h (check_remote_input_interrupt_request): Declare.
13848 * win32-low.c (winapi_DebugBreakProcess,
13849 winapi_GenerateConsoleCtrlEvent): New typedefs.
13850 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13851 to 250 ms.
13852 (win32_wait): Check for remote interrupt request
13853 with check_remote_input_interrupt_request.
13854 (win32_request_interrupt): New function.
13855 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13856
13857 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13858
13859 * win32-low.c (debug_registers_changed,
13860 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13861 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13862 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13863 (thread_rec): Get context using the low target.
13864 (child_add_thread): Call thread_added on the low target,
13865 which does the same thing.
13866 (regptr): Delete.
13867 (do_initial_child_stuff): Remove debug registers references.
13868 Set context using the low target. Resume threads after
13869 setting the contexts.
13870 (child_continue): Remove dead variable. Remove debug
13871 registers references.
13872 (child_fetch_inferior_registers): Go through the low target.
13873 (do_child_store_inferior_registers): Remove.
13874 (child_store_inferior_registers): Go through the low target.
13875 (win32_resume): Remove debug registers references.
13876 Set context using the low target.
13877 (handle_exception): Change return type to void. Don't record
13878 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13879 first chance exception.
13880 (get_child_debug_event): Change return type to void. Remove
13881 goto loop. Always return after waiting for debug event.
13882 (win32_wait): Convert to switch statement. Handle spurious
13883 events.
13884
13885 * win32-i386-low.c (debug_registers_changed,
13886 debug_registers_used): New.
13887 (initial_stuff): Rename to ...
13888 (i386_initial_stuff): ... this. Clear debug registers
13889 state variables.
13890 (store_debug_registers): Delete.
13891 (i386_get_thread_context): New.
13892 (load_debug_registers): Delete.
13893 (i386_set_thread_context): New.
13894 (i386_thread_added): New.
13895 (single_step): Rename to ...
13896 (i386_single_step): ... this.
13897 (do_fetch_inferior_registers): Rename to ...
13898 (i386_fetch_inferior_register): ... this.
13899 (i386_store_inferior_register): New.
13900 (the_low_target): Adapt to new interface.
13901
13902 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13903 (arm_get_thread_context): New.
13904 (arm_set_thread_context): New.
13905 (regptr): New.
13906 (do_fetch_inferior_registers): Rename to ...
13907 (arm_fetch_inferior_register): ... this.
13908 (arm_store_inferior_register): New.
13909 (arm_wince_breakpoint): Reimplement as unsigned long.
13910 (arm_wince_breakpoint_len): Define.
13911 (the_low_target): Adapt to new interface.
13912
13913 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13914 load_debug_registers. Add get_thread_context, set_thread_context,
13915 thread_added and store_inferior_register. Rename
13916 fetch_inferior_registers to fetch_inferior_register.
13917 (regptr): Remove declaration.
13918
13919 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13920
13921 * linux-low.c (linux_detach): Change return type to int. Return 0.
13922 * spu-low.c (spu_detach): Likewise.
13923
13924 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13925
13926 * target.h (target_ops): Change return type of detach to int.
13927 Add join.
13928 (join_inferior): New.
13929 * server.c (main): Don't skip detach support on mingw32.
13930 If the inferior doesn't support detaching return error.
13931 Call join_inferior instead of using waitpid.
13932 * linux-low.c (linux_join): New.
13933 (linux_target_op): Add linux_join.
13934 * spu-low.c (spu_join): New.
13935 (spu_target_ops): Add spu_join.
13936 * win32-low.c (win32_detach): Adapt to new interface.
13937 Reopen current_process_handle before detaching. Issue a child
13938 resume before detaching.
13939 (win32_join): New.
13940 (win32_target_op): Add win32_join.
13941
13942 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13943
13944 * win32-low.c (win32-attach): Fix return value.
13945 * target.h (target_ops): Describe ATTACH return values.
13946
13947 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13948
13949 * win32-low.c (GETPROCADDRESS): Define.
13950 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13951 (winapi_DebugSetProcessKillOnExit): Likewise.
13952 (win32_create_inferior): Force usage of ansi CreateProcessA.
13953 (win32_attach): Use GETPROCADDRESS.
13954 (win32_detach): Likewise.
13955
13956 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13957
13958 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13959
13960 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13961
13962 * win32-low.c: Commit leftover changes from 2007-03-29.
13963
13964 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13965
13966 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13967 fields short instead of int. Add explicit padding.
13968 (i387_cache_to_fsave): Remove unnecessary casts.
13969 (i387_fsave_to_cache): Doc fix.
13970 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13971
13972 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13973
13974 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13975 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13976
13977 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13978
13979 * configure.srv (arm*-*-mingw32ce*): Move near the other
13980 arm targets.
13981
13982 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13983
13984 * configure.ac: Add errno checking.
13985 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13986 sys/file.h and malloc.h.
13987 (AC_CHECK_DECLS): Add perror.
13988 (srv_mingwce): Handle.
13989 * configure.srv (i[34567]86-*-cygwin*): Add
13990 win32-i386-low.o to srv_tgtobj.
13991 (i[34567]86-*-mingw*): Likewise.
13992 (arm*-*-mingw32ce*): Add case.
13993 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13994 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13995 [__MINGW32CE__] (strerror): New function.
13996 [__MINGW32CE__] (errno): Define to GetLastError.
13997 [__MINGW32CE__] (COUNTOF): New macro.
13998 (remote_open): Remove extra close call.
13999 * mem-break.c (delete_breakpoint_at): New function.
14000 * mem-break.h (delete_breakpoint_at): Declare.
14001 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14002 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14003 [USE_WIN32API] (read, write): Add char* casts.
14004 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14005 * server.h: Include wincecompat.h on Windows CE.
14006 [HAVE_ERRNO_H]: Check.
14007 (perror): Declare if not declared.
14008 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14009 (perror_with_name): Remove errno declaration.
14010 * wincecompat.h: New.
14011 * wincecompat.c: New.
14012 * win32-low.h: New.
14013 * win32-arm-low.c: New.
14014 * win32-i386-low.c: New.
14015 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14016 (OUTMSG2): Make it safe.
14017 (_T): New macro.
14018 (COUNTOF): New macro.
14019 (NUM_REGS): Get it from the low target.
14020 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14021 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14022 (thread_rec): Let low target handle debug registers.
14023 (child_add_thread): Likewise.
14024 (child_init_thread_list): Likewise.
14025 (continue_one_thread): Likewise.
14026 (regptr): New.
14027 (do_child_fetch_inferior_registers): Move to ...
14028 * win32-i386-low.c: ... here, and rename to ...
14029 (do_fetch_inferior_registers): ... this.
14030 * win32-low.c (child_fetch_inferior_registers):
14031 Go through the low target.
14032 (do_child_store_inferior_registers): Use regptr.
14033 (strwinerror): New function.
14034 (win32_create_inferior): Handle Windows CE.
14035 Use strwinerror instead of strerror on Windows error
14036 codes. Add program to the error output.
14037 Don't close the main thread handle on Windows CE.
14038 (win32_attach): Use coredll.dll on Windows CE.
14039 (win32_kill): Close current process and current
14040 thread handles.
14041 (win32_detach): Use coredll.dll on Windows CE.
14042 (win32_resume): Let low target handle debug registers, and
14043 step request.
14044 (handle_exception): Add/Remove initial breakpoint. Avoid
14045 non-existant WSTOPSIG on Windows CE.
14046 (win32_read_inferior_memory): Cast to remove warning.
14047 (win32_arch_string): Go through the low target.
14048 (initialize_low): Call set_breakpoint_data with the low
14049 target's breakpoint.
14050 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14051 FOP_REGNUM, mappings): Move to ...
14052 * win32-i386-low.c: ... here.
14053 * win32-low.c (win32_thread_info): Move to ...
14054 * win32-low.h: ... here.
14055 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14056 win32-arm-low.c and wincecompat.c.
14057 (all:): Add $EXEEXT.
14058 (install-only:): Likewise.
14059 (gdbserver:): Likewise.
14060 (gdbreplay:): Likewise.
14061 * config.in: Regenerate.
14062 * configure: Regenerate.
14063
14064 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14065
14066 * win32-low.c: Rename typedef thread_info to
14067 win32_thread_info throughout.
14068
14069 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14070
14071 * win32-i386-low.c: Rename to ...
14072 * win32-low.c: ... this.
14073 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14074 * Makefile.in: Likewise.
14075
14076 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14077
14078 * remote-utils.c (monitor_output): Constify msg parameter.
14079 * server.h (monitor_output): Likewise.
14080 * win32-i386-low.c (handle_output_debug_string): New.
14081 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14082 handle_output_debug_string.
14083 (get_child_debug_event): Likewise.
14084
14085 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14086
14087 * server.c (main): Correct strtoul check.
14088
14089 2007-03-27 Jon Ringle <jon@ringle.org>
14090
14091 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14092
14093 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14094
14095 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14096
14097 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14098
14099 * terminal.h: Check HAVE_SGTTY_H.
14100
14101 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14102
14103 * remote-utils.c (remote_open): Print out the assigned port number.
14104
14105 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14106
14107 * remote-utils.c (monitor_output): New function.
14108 * server.c (debug_threads): Define here.
14109 (monitor_show_help): New function.
14110 (handle_query): Handle qRcmd.
14111 (main): Do not handle 'd' packet.
14112 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14113 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14114 of debug_threads.
14115
14116 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14117
14118 * Makefile.in (EXEEXT): New.
14119 (clean): Use $(EXEEXT).
14120
14121 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14122
14123 * target.h (target_ops): Rename send_signal to request_interrupt,
14124 and remove enum target_signal parameter.
14125 * linux-low.c (linux_request_interrupt): Rename from
14126 linux_send_signal, and always send SIGINT.
14127 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14128 and always send SIGINT.
14129 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14130 of send_signal.
14131 (input_interrupt): Likewise.
14132
14133 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14134
14135 * server.c (get_features_xml): Check if target implemented
14136 arch_string.
14137 * win32-i386-low.c (win32_arch_string): New.
14138 (win32_target_ops): Add win32_arch_string as arch_string member.
14139
14140 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14141
14142 * spu-low.c (spu_arch_string): New.
14143 (spu_target_ops): Add spu_arch_string.
14144
14145 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14148 * configure.ac: Do not check for terminal.h.
14149 * configure, config.in: Regenerated.
14150
14151 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14152
14153 * Makefile.in (OBS): Add $(XML_BUILTIN).
14154 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14155 (clean): Update.
14156 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14157 (arm-with-iwmmxt.c): New.
14158 * config.in, configure: Regenerate.
14159 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14160 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14161 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14162 (arm*-*-linux*): Add iWMMXt and regset support.
14163 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14164 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14165 (arm_store_wmmxregset, target_regsets): New.
14166 * server.c (get_features_xml): Take annex argument. Check builtin
14167 XML documents.
14168 (handle_query): Handle multiple annexes.
14169
14170 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14171
14172 * remote-utils.c [USE_WIN32API] (read, write): Define.
14173 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14174 write.
14175
14176 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * linux-i386-low.c (the_low_target): Set arch_string.
14179 * linux-x86-64-low.c (the_low_target): Likewise.
14180 * linux-low.c (linux_arch_string): New.
14181 (linux_target_ops): Add it.
14182 * linux-low.h (struct linux_target_ops): Add arch_string.
14183 * server.c (write_qxfer_response): Use const void * for DATA.
14184 (get_features_xml): New.
14185 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14186 * target.h (struct target_ops): Add arch_string method.
14187
14188 2007-01-03 Denis Pilat <denis.pilat@st.com>
14189 Daniel Jacobowitz <dan@codesourcery.com>
14190
14191 * linux-low.c (linux_kill): Handle being called with no threads.
14192 * win32-i386-low.c (win32_kill): Likewise.
14193 (get_child_debug_event): Clear current_process_handle.
14194
14195 2006-12-30 Denis PILAT <denis.pilat@st.com>
14196 Daniel Jacobowitz <dan@codesourcery.com>
14197
14198 * remote-utils.c (remote_open): Check the type of specified
14199 serial port devices before opening them.
14200 * server.c (main): Kill the inferior if an error occurs during
14201 the first remote_open.
14202
14203 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14204
14205 * README: Update supported targets.
14206
14207 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14208
14209 * Makefile.in (clean): Remove reg-mips64.c.
14210 (reg-mips64.c, reg-mips64.o): New rules.
14211 * configure.srv: Handle mips64. Include regset support for mips.
14212 * linux-mips-low.c (union mips_register): New.
14213 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14214 (mips_breakpoint, mips_breakpoint_at): Use int.
14215 (mips_collect_register, mips_supply_register)
14216 (mips_collect_register_32bit, mips_supply_register_32bit)
14217 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14218 (mips_store_fpregset, target_regsets): New.
14219 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14220
14221 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14222
14223 * configure.srv: Add target "spu*-*-*".
14224 * Makefile.in (clean): Remove reg-spu.c.
14225 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14226 * spu-low.c: New file.
14227
14228 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14229
14230 * configure.ac: Correct td_thr_tls_get_addr test.
14231 * configure: Regenerated.
14232
14233 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14234
14235 * linux-low.c (linux_wait_for_event): Reformat. Use the
14236 pass_signals array.
14237 * remote-utils.c (decode_address_to_semicolon): New.
14238 * server.c (pass_signals, handle_general_set): New.
14239 (handle_query): Mention QPassSignals for qSupported.
14240 (main): Call handle_general_set.
14241 * server.h (pass_signals, decode_address_to_semicolon): New.
14242
14243 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * server.c (handle_query): Correct error handling for read_auxv.
14246
14247 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14248
14249 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14250 and srv_linux_thread_db to yes.
14251 * linux-s390-low.c (s390_fill_gregset): New function.
14252 (target_regsets): Define data structure.
14253
14254 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14255
14256 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14257 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14258 * config.in, configure: Regenerated.
14259 * inferiors.c (gdb_id_to_thread): New function.
14260 (gdb_id_to_thread_id): Use it.
14261 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14262 * linux-low.h (struct process_info): Add th member.
14263 (thread_db_get_tls_address): New prototype.
14264 * remote-utils.c (decode_address): Make non-static.
14265 * server.c (handle_query): Handle qGetTLSAddr.
14266 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14267 * target.h (struct target_ops): Add get_tls_address.
14268 * thread-db.c (maybe_attach_thread): Save the thread handle.
14269 (thread_db_get_tls_address): New.
14270
14271 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14272
14273 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14274 (linux_resume_one_process): Take a siginfo_t *. Update all
14275 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14276 (struct pending_signals): Add a siginfo_t.
14277 (linux_wait_for_process): Always set last_status.
14278 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14279 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14280 * linux-low.h (struct process_info): Add last_status.
14281
14282 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14283
14284 * remote-utils.c (try_rle): New function.
14285 (putpkt_binary): Use it.
14286
14287 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14290 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14291 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14292 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14293 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14294 point registers.
14295
14296 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14297
14298 * server.c (terminal_fd): New variable.
14299 (old_foreground_pgrp): Likewise.
14300 (restore_old_foreground_pgrp): New function.
14301 (start_inferior): Record the terminal file descriptor in terminal_fd
14302 and its original foreground group in old_foreground_pgrp. Register
14303 restore_old_foreground_pgrp with atexit().
14304
14305 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14306
14307 * server.c (handle_query): Correct qPart to qXfer.
14308
14309 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14310
14311 * configure.ac: Check for more headers which are missing on
14312 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14313 * configure.srv: Add Cygwin and mingw32.
14314 * remote-utils.c: Don't include headers unconditionally which
14315 are missing on mingw32. Include <winsock.h> for mingw32.
14316 (remote_open): Adjust for mingw32 support. Flush
14317 standard error after writing to it.
14318 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14319 (unblock_async_io, enable_async_io, disable_async_io)
14320 (readchar, getpkt): Update for Winsock support.
14321 (prepare_resume_reply): Expect a protocol signal number.
14322 * server.c: Disable <sys/wait.h> on mingw32.
14323 (start_inferior): Adjust for mingw32 support. Flush
14324 standard error after writing to it.
14325 (attach_inferior): Likewise. Use protocol signal
14326 numbers.
14327 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14328 and names.
14329 * win32-i386-low.c: New file.
14330 * Makefile.in (XM_CLIBS): Set.
14331 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14332 (win32-i386-low.o): New dependency rule.
14333 * linux-low.c (linux_wait): Use target signal numbers.
14334 * target.h (struct target_ops): Doc fix.
14335 * server.h (target_signal_to_name): New prototype.
14336 * gdbreplay.c: Don't include headers unconditionally which
14337 are missing on mingw32. Include <winsock.h> for mingw32.
14338 (remote_close, remote_open): Adjust for Winsock support.
14339 * configure, config.in: Regenerated.
14340
14341 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * server.c (decode_xfer_read, write_qxfer_response): New.
14344 (handle_query): Take a packet length argument. Handle
14345 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14346 the qSupported response.
14347 (main): Update call to handle_query.
14348
14349 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14350
14351 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14352 (putpkt_binary): Renamed from putpkt and adjusted for binary
14353 data.
14354 (putpkt): New wrapper for putpkt_binary.
14355 (readchar): Don't mask off the high bit.
14356 (decode_X_packet): New function.
14357 * server.c (main): Call putpkt_binary if a handler sets the packet
14358 length. Save the length of the incoming packet. Handle 'X'.
14359 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14360
14361 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * server.c (handle_query): Handle qSupported.
14364
14365 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * remote-utils.c (all_symbols_looked_up): New variable.
14368 (look_up_one_symbol): Check it.
14369 * server.h (look_up_one_symbol): New declaration.
14370 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14371
14372 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14373
14374 * Makefile.in (linux-arm-low.o): Update dependencies.
14375 * linux-arm-low.c: Include "gdb_proc_service.h".
14376 (PTRACE_GET_THREAD_AREA): Define.
14377 (ps_get_thread_area): New function.
14378
14379 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14380
14381 * configure.srv (m68k*-*-uclinux*): New target.
14382 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14383 (linux_resume_one_process): Remove extraneous cast.
14384 (linux_read_offsets): New.
14385 (linux_target_op): Add linux_read_offsets on mmuless systems.
14386 * server.c (handle_query): Add qOffsets logic.
14387 * target.h (struct target_ops): Add read_offsets.
14388
14389 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14392 (PTRACE_GET_THREAD_AREA): Define.
14393 (ps_get_thread_area): New function.
14394 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14395 (linux-x86-64-low.o): Update.
14396
14397 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * configure.ac: Remove checks for prfpregset_t.
14400 * gdb_proc_service.h: New file.
14401 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14402 new "gdb_proc_service.h".
14403 * proc-service.c: Likewise.
14404 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14405 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14406 * Makefile.in (gdb_proc_service_h): Updated.
14407 * configure, config.in: Regenerated.
14408
14409 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14410
14411 * remote-utils.c (prepare_resume_reply): Move declaration
14412 of gdb_id_from_wait to the top of the block.
14413
14414 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14415
14416 * linux-low.c (regsets_store_inferior_registers): Read the regset
14417 from the target before filling it.
14418
14419 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14420
14421 * server.c (attach_inferior): Return SIGTRAP for a successful
14422 attach.
14423
14424 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14425
14426 * Makefile.in (OBS): Add version.o.
14427 (STAGESTUFF): Delete.
14428 (version.o): Add dependencies.
14429 (version.c): Replace rule.
14430 (clean): Remove version.c.
14431 * server.c (gdbserver_version): New.
14432 (gdbserver_usage): Use printf.
14433 (main): Handle --version and --help.
14434 * server.h (version, host_name): Add declarations.
14435
14436 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14437
14438 * linux-arm-low.c:
14439 * linux-arm-low.c:
14440 * inferiors.c:
14441 * i387-fp.h:
14442 * i387-fp.c:
14443 * gdbreplay.c:
14444 * regcache.c:
14445 * proc-service.c:
14446 * mem-break.h:
14447 * mem-break.c:
14448 * linux-x86-64-low.c:
14449 * linux-sh-low.c:
14450 * linux-s390-low.c:
14451 * linux-ppc64-low.c:
14452 * linux-ppc-low.c:
14453 * linux-mips-low.c:
14454 * linux-m68k-low.c:
14455 * linux-m32r-low.c:
14456 * linux-low.h:
14457 * linux-low.c:
14458 * linux-ia64-low.c:
14459 * linux-i386-low.c:
14460 * linux-crisv32-low.c:
14461 * thread-db.c:
14462 * terminal.h:
14463 * target.h:
14464 * target.c:
14465 * server.h:
14466 * server.c:
14467 * remote-utils.c:
14468 * regcache.h:
14469 * utils.c:
14470 * Makefile.in:
14471 * configure.ac:
14472 * gdbserver.1: Add (C) after Copyright. Update the FSF
14473 address.
14474
14475 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14478 (arm_breakpoint_at): Recognize both breakpoints.
14479 (the_low_target): Use the correct breakpoint instruction.
14480
14481 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14482
14483 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14484 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14485 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14486 (the_low_target): Update.
14487
14488 2005-10-25 Andreas Schwab <schwab@suse.de>
14489
14490 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14491
14492 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14493 (ia64_num_regs): Reduce to 462.
14494
14495 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14496
14497 * acinclude.m4: Correct quoting.
14498 * aclocal.m4: Regenerated.
14499
14500 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14501 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14502 (thread_db_init): Call thread_db_err_str.
14503 * configure.ac: Check for TD_VERSION.
14504 * config.in, configure: Regenerated.
14505
14506 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14507
14508 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14509
14510 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14511
14512 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14513 is not available. Define HAVE_PTRACE_GETREGS if it is.
14514 * config.in, configure: Regenerated.
14515 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14516 * linux-i386-low.c, linux-m68k-low.c: Update to use
14517 HAVE_PTRACE_GETREGS.
14518 * linux-low.c (regsets_fetch_inferior_registers)
14519 (regsets_store_inferior_registers): Only return 0 if we processed
14520 GENERAL_REGS.
14521 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14522 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14523
14524 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14525
14526 * inferiors.c (struct thread_info): Add gdb_id.
14527 (add_thread): Add gdb_id argument.
14528 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14529 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14530 calls to add_thread.
14531 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14532 * server.c (handle_query): Use thread_to_gdb_id.
14533 (handle_v_cont, main): Use gdb_id_to_thread_id.
14534 * server.h (add_thread): Update prototype.
14535 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14536 prototypes.
14537
14538 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14541 left-padded registers.
14542 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14543 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14544
14545 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14546
14547 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14548 * configure: Regenerate.
14549 * config.in: Regenerate.
14550 * server.h (NEED_DECLARATION_STRERROR):
14551 Replace with !HAVE_DECL_STRERROR.
14552
14553 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14554
14555 * linux-low.c (linux_wait, linux_send_signal): Don't test
14556 an unsigned long variable for > 0 if it could be MAX_ULONG.
14557 * server.c (myresume): Likewise.
14558 * target.c (set_desired_inferior): Likewise.
14559
14560 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14561
14562 * configure.ac: Simplify and improve check for socklen_t.
14563 * configure, config.in: Regenerate.
14564
14565 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14566
14567 * acconfig.h: Remove.
14568 * configure.ac: Add a test for socklen_t. Use three-argument
14569 AC_DEFINE throughout.
14570 * config.in: Regenerated using autoheader 2.59.
14571 * configure: Regenerated.
14572
14573 * gdbreplay.c (socklen_t): Provide a default.
14574 (remote_open): Use socklen_t.
14575 * remote-utils.c (socklen_t): Provide a default.
14576 (remote_open): Use socklen_t.
14577 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14578 unsigned char.
14579
14580 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14581 char for buffers.
14582 * linux-low.c (linux_read_memory, linux_write_memory)
14583 (linux_read_auxv): Likewise.
14584 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14585 (check_mem_write): Likewise.
14586 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14587 Likewise.
14588 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14589 (registers_from_string, register_data): Likewise.
14590 * server.c (handle_query, main): Likewise.
14591 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14592 (decode_M_packet): Likewise.
14593 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14594 * target.h (struct target_ops): Update read_memory, write_memory,
14595 and read_auxv.
14596 (read_inferior_memory, write_inferior_memory): Update.
14597 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14598 to unsigned char *.
14599 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14600 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14601 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14602 linux-s390-low.c, linux-sh-low.c: Update for changes in
14603 read_inferior_memory and the_low_target->breakpoint.
14604
14605 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14606
14607 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14608 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14609 * configure.srv: Add powerpc64-*-linux*.
14610 * linux-ppc64-low.c: New file.
14611
14612 2005-05-23 Orjan Friberg <orjanf@axis.com>
14613
14614 * linux-cris-low.c: New file with support for CRIS.
14615 * linux-crisv32-low.c: Ditto for CRISv32.
14616 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14617 (clean): Add reg-cris.c and reg-crisv32.c.
14618 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14619 reg-crisv32.o, and reg-crisv32.c to make rules.
14620 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14621 recognized targets.
14622
14623 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14624
14625 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14626 of sizeof (PTRACE_XFER_TYPE).
14627 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14628
14629 2005-05-12 Orjan Friberg <orjanf@axis.com>
14630
14631 * target.h (struct target_ops): Add insert_watchpoint,
14632 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14633 pointers for hardware watchpoint support.
14634 * linux-low.h (struct linux_target_ops): Ditto.
14635 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14636 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14637 to linux_target_ops.
14638 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14639 reply packet.
14640 * server.c (main): Recognize 'Z' and 'z' packets.
14641
14642 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14643
14644 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14645 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14646 (the_low_target): Add new members.
14647
14648 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * proc-service.c (ps_lgetregs): Search all_processes instead of
14651 all_threads.
14652
14653 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14654
14655 * server.c (start_inferior): Change return type to int.
14656 (attach_inferior): Change sigptr to int *.
14657 (handle_v_cont, handle_v_requests): Change signal to int *.
14658 (main): Change signal to int.
14659
14660 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14661
14662 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14663 * configure.srv: Add m32r*-*-linux*.
14664 * linux-m32r-low.c: New file.
14665
14666 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14667
14668 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14669
14670 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14671
14672 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14673 Take unsigned long arguments for PIDs.
14674 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14675 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14676 (wait_for_sigstop, linux_resume_one_process)
14677 (regsets_fetch_inferior_registers, linux_send_signal)
14678 (linux_read_auxv): Likewise. Update the types of variables holding
14679 PIDs. Update format string specifiers.
14680 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14681 * remote-utils.c (prepare_resume_reply): Likewise.
14682 * server.c (cont_thread, general_thread, step_thread)
14683 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14684 unsigned long.
14685 (handle_query): Update format specifiers.
14686 (handle_v_cont, main): Use strtoul for thread IDs.
14687 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14688 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14689 (general_thread, step_thread, thread_from_wait)
14690 (old_thread_from_wait): Update.
14691 * target.h (struct thread_resume): Use unsigned long for THREAD.
14692 (struct target_ops): Use unsigned long for arguments to attach and
14693 thread_alive.
14694
14695 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14696
14697 * acinclude.m4: Include bfd/bfd.m4 directly.
14698 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14699 <agriffis@toolchain.org>.
14700 * aclocal.m4, configure: Regenerated.
14701
14702 2005-01-07 Andrew Cagney <cagney@gnu.org>
14703
14704 * configure.ac: Rename configure.in, require autoconf 2.59.
14705 * configure: Re-generate.
14706
14707 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14708
14709 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14710 LIBS when finished.
14711 * aclocal.m4: Regenerated.
14712 * configure: Regenerated.
14713
14714 2004-11-21 Andreas Schwab <schwab@suse.de>
14715
14716 * linux-m68k-low.c (m68k_num_gregs): Define.
14717 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14718 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14719 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14720 (m68k_breakpoint_at): New. Add to the_low_target.
14721
14722 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14723 srv_linux_thread_db to yes.
14724
14725 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14726
14727 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14728 (ARCH_SET_FS): Likewise.
14729 (ARCH_GET_FS): Likewise.
14730 (ARCH_GET_GS): Likewise.
14731
14732 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14733
14734 * linux-i386-low.c (ps_get_thread_area): New.
14735 * linux-x86-64-low.c (ps_get_thread_area): New.
14736 * linux-low.c: Include <sys/syscall.h>.
14737 (linux_kill_one_process): Don't kill the first thread here.
14738 (linux_kill): Kill the first thread here.
14739 (kill_lwp): New function.
14740 (send_sigstop, linux_send_signal): Use it.
14741 * proc-service.c: Clean up #ifdefs.
14742 (fpregset_info): Delete.
14743 (ps_lgetregs): Update and enable implementation.
14744 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14745 implementations.
14746 * remote-utils.c (struct sym_cache, symbol_cache): New.
14747 (input_interrupt): Print a clearer message.
14748 (async_io_enabled): New variable.
14749 (enable_async_io, disable_async_io): Use it. Update comments.
14750 (look_up_one_symbol): Use the symbol cache.
14751 * thread-db.c (thread_db_look_up_symbols): New function.
14752 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14753
14754 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14755
14756 * configure.in: Test for -rdynamic.
14757 * configure: Regenerated.
14758 * Makefile (INTERNAL_LDFLAGS): New.
14759 (gdbserver, gdbreplay): Use it.
14760
14761 2004-09-02 Andrew Cagney <cagney@gnu.org>
14762
14763 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14764
14765 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14766
14767 * linux-low.c (linux_wait): Clear all_processes list also.
14768
14769 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14770
14771 * linux-low.c: Include <errno.h>. Remove extern declaration of
14772 errno.
14773
14774 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14775
14776 * gdbreplay.c, server.h, utils.c: Update copyright years.
14777
14778 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14779
14780 * server.c (main): Print child status or termination signal from
14781 variable 'signal', not 'sig'.
14782
14783 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14784
14785 * linux-low.c (linux_read_memory): Change return type to
14786 int. Check for and return error from ptrace().
14787 * target.c (read_inferior_memory): Change return type to int. Pass
14788 back return status from the_target->read_memory().
14789 * target.h (struct target_ops): Adapt *read_memory() prototype.
14790 Update comment.
14791 (read_inferior_memory): Adapt prototype.
14792 * server.c (main): Return an error packet if
14793 read_inferior_memory() returns an error.
14794
14795 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14796
14797 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14798 Unify with other clean targets.
14799
14800 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14801
14802 * server.c (handle_v_cont): Call set_desired_inferior.
14803
14804 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14805
14806 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14807
14808 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14809
14810 * linux-low.c (linux_wait): Unblock async I/O.
14811 (linux_resume): Block and enable async I/O.
14812 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14813 * server.h (block_async_io, unblock_async_io): Add prototypes.
14814
14815 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14816
14817 * remote-utils.c (remote_open): Print a status notice after
14818 opening a TCP port.
14819 * server.c (attach_inferior): Print a status notice after
14820 attaching.
14821
14822 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14823
14824 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14825
14826 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14827
14828 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14829 error packet.
14830 * server.c, target.h: Update copyright years.
14831
14832 2004-02-25 Roland McGrath <roland@redhat.com>
14833
14834 * target.h (struct target_ops): New member `read_auxv'.
14835 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14836 * linux-low.c (linux_read_auxv): New function.
14837 (linux_target_ops): Initialize `read_auxv' member to that.
14838
14839 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14840
14841 Committed by Jim Blandy <jimb@redhat.com>.
14842
14843 * linux-s390-low.c (s390_num_regs): Update.
14844 (s390_regmap): Remove control registers. Use __s390x__ predefine
14845 instead of GPR_SIZE to distiguish s390 and s390x targets.
14846
14847 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14848
14849 * linux-low.c: Update copyright year.
14850 (check_removed_breakpoint): Clear pending_is_breakpoint.
14851 (linux_set_resume_request, linux_queue_one_thread)
14852 (resume_status_pending_p): New functions.
14853 (linux_continue_one_thread): Use process->resume.
14854 (linux_resume): Only resume threads if there are no pending events.
14855 * linux-low.h (struct process_info): Add resume request
14856 pointer.
14857
14858 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14859
14860 * regcache.c (new_register_cache): Clear the allocated register
14861 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14862
14863 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14864
14865 * linux-low.c (linux_resume): Take a struct thread_resume *
14866 argument.
14867 (linux_wait): Update call.
14868 (resume_ptr): New static variable.
14869 (linux_continue_one_thread): Renamed from
14870 linux_continue_one_process. Use resume_ptr.
14871 (linux_resume): Use linux_continue_one_thread.
14872 * server.c (handle_v_cont, handle_v_requests): New functions.
14873 (myresume): New function.
14874 (main): Handle 'v' case.
14875 * target.h (struct thread_resume): New type.
14876 (struct target_ops): Change argument of "resume" to struct
14877 thread_resume *.
14878 (myresume): Delete macro.
14879
14880 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14881
14882 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14883 (uninstall): Support DESTDIR.
14884
14885 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14886
14887 * configure.srv: Add xscale*linux copy of arm*linux entry.
14888
14889 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14890
14891 * linux-arm-low.c (arm_reinsert_addr): New function.
14892 (the_low_target): Add arm_reinsert_addr.
14893
14894 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14895
14896 * mem-break.c: Remove whitespace at end of file.
14897
14898 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14899
14900 * configure.in: Check whether we need to prototype strerror.
14901 * server.h: Optionally prototype strerror.
14902 * gdbreplay.c (perror_with_name): Use strerror.
14903 * linux-low.c (linux_attach_lwp): Use strerror.
14904 * utils.c (perror_with_name): Use strerror.
14905 * config.in, configure: Regenerated.
14906
14907 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14908
14909 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14910 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14911
14912 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14913
14914 * Makefile.in (SFILES): Update.
14915 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14916 low-sun3.c: Remove files.
14917
14918 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14919
14920 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14921 (linux_detach_one_process, linux_detach): New functions.
14922 (linux_target_ops): Add linux_detach.
14923 * server.c (main): Handle 'D' packet.
14924 * target.h (struct target_ops): Add "detach" member.
14925 (detach_inferior): Define.
14926
14927 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14928
14929 From Kelley Cook <kelleycook@wideopenwest.com>:
14930 * configure.srv: Accept i[34567]86 variants.
14931
14932 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14933
14934 * linux-low.c (linux_wait_for_event): Correct comment typos.
14935 (linux_resume_one_process): Call check_removed_breakpoint.
14936 (linux_send_signal): New function.
14937 (linux_target_ops): Add linux_send_signal.
14938 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14939 of kill.
14940 * target.h (struct target_ops): Add send_signal.
14941
14942 2003-05-29 Jim Blandy <jimb@redhat.com>
14943
14944 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14945 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14946 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14947 away part of the register's value.
14948
14949 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14950
14951 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14952 (linux_wait_for_event, linux_init_signals): Likewise.
14953
14954 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14955
14956 * configure.in: Check for stdlib.h.
14957 * configure: Regenerated.
14958 * config.in: Regenerated.
14959
14960 2003-01-04 Andreas Schwab <schwab@suse.de>
14961
14962 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14963
14964 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14965
14966 * Makefile.in: Remove obsolete code.
14967
14968 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14969
14970 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14971 defined(PT_FPR0_HI).
14972
14973 2002-11-17 Stuart Hughes <seh@zee2.com>
14974
14975 * linux-arm-low.c (arm_num_regs): Increase.
14976 (arm_regmap): Include status register.
14977
14978 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14979
14980 * linux-low.c (register_addr): Remove incorrect -1 check.
14981
14982 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14983
14984 * linux-low.c (linux_create_inferior): Call setpgid. Return
14985 the new PID.
14986 (unstopped_p, linux_signal_pid): Remove.
14987 (linux_target_ops): Remove linux_signal_pid.
14988 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14989 global instead of target method.
14990 * target.h (struct target_ops): Remove signal_pid. Update comment
14991 for create_inferior.
14992 * server.c (signal_pid): New variable.
14993 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14994 gdbserver. Set the child to be the foreground process group.
14995 (attach_inferior): Set signal_pid.
14996
14997 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14998
14999 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15000
15001 2002-08-20 Jim Blandy <jimb@redhat.com>
15002
15003 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15004 default for this.
15005
15006 2002-08-01 Andrew Cagney <cagney@redhat.com>
15007
15008 * Makefile.in: Make chill references obsolete.
15009
15010 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15011
15012 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15013 * configure: Regenerate.
15014 * config.in: Regenerate.
15015
15016 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15017
15018 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15019 (perror_with_name, remote_close, remote_open, expect, play): Static.
15020
15021 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15022
15023 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15024 byte offsets instead of an array of indexes.
15025 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15026
15027 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15028
15029 * regcache.c: Add comment.
15030
15031 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15032
15033 * thread-db.c: New file.
15034 * proc-service.c: New file.
15035 * acinclude.m4: New file.
15036 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15037 proc-service.o, and thread-db.o.
15038 (linux-low.o): Add USE_THREAD_DB.
15039 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15040 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15041 * aclocal.m4: Regenerated.
15042 * config.in: Regenerated.
15043 * configure: Regenerated.
15044 * configure.in: Check for proc_service.h, sys/procfs.h,
15045 thread_db.h, and linux/elf.h headrs.
15046 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15047 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15048 Check for -lthread_db and thread support.
15049 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15050 PowerPC, and SuperH.
15051 * i387-fp.c: Constify arguments.
15052 * i387-fp.h: Likewise.
15053 * inferiors.c: (struct thread_info): Renamed from
15054 `struct inferior_info'. Remove PID member. Use generic inferior
15055 list header. All uses updated.
15056 (inferiors, signal_pid): Removed.
15057 (all_threads): New variable.
15058 (get_thread): Define.
15059 (add_inferior_to_list): New function.
15060 (for_each_inferior): New function.
15061 (change_inferior_id): New function.
15062 (add_inferior): Removed.
15063 (remove_inferior): New function.
15064 (add_thread): New function.
15065 (free_one_thread): New function.
15066 (remove_thread): New function.
15067 (clear_inferiors): Use for_each_inferior and free_one_thread.
15068 (find_inferior): New function.
15069 (find_inferior_id): New function.
15070 (inferior_target_data): Update argument type.
15071 (set_inferior_target_data): Likewise.
15072 (inferior_regcache_data): Likewise.
15073 (set_inferior_regcache_data): Likewise.
15074 * linux-low.c (linux_bp_reinsert): Remove.
15075 (all_processes, stopping_threads, using_thrads)
15076 (struct pending_signals, debug_threads, pid_of): New.
15077 (inferior_pid): Replace with macro.
15078 (struct inferior_linux_data): Remove.
15079 (get_stop_pc, add_process): New functions.
15080 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15081 Use add_process and add_thread.
15082 (linux_attach_lwp): New function, based on old linux_attach. Use
15083 add_process and add_thread. Set stop_expected for new threads.
15084 (linux_attach): New function.
15085 (linux_kill_one_process): New function.
15086 (linux_kill): Kill all LWPs.
15087 (linux_thread_alive): Use find_inferior_id.
15088 (check_removed_breakpoints, status_pending_p): New functions.
15089 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15090 Update. Use WNOHANG. Wait for cloned processes also. Update process
15091 struct for the found process.
15092 (linux_wait_for_event): New function.
15093 (linux_wait): Use it. Support LWPs.
15094 (send_sigstop, wait_for_sigstop, stop_all_processes)
15095 (linux_resume_one_process, linux_continue_one_process): New functions.
15096 (linux_resume): Support LWPs.
15097 (REGISTER_RAW_SIZE): Remove.
15098 (fetch_register): Use register_size instead. Call supply_register.
15099 (usr_store_inferior_registers): Likewise. Call collect_register.
15100 Fix recursive case.
15101 (regsets_fetch_inferior_registers): Improve error message.
15102 (regsets_store_inferior_registers): Add debugging.
15103 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15104 (unstopped_p, linux_signal_pid): New functions.
15105 (linux_target_ops): Add linux_signal_pid.
15106 (linux_init_signals): New function.
15107 (initialize_low): Call it. Initialize using_threads.
15108 * regcache.c (inferior_regcache_data): Add valid
15109 flag.
15110 (get_regcache): Fetch registers lazily. Add fetch argument
15111 and update all callers.
15112 (regcache_invalidate_one, regcache_invalidate): New
15113 functions.
15114 (new_register_cache): Renamed from create_register_cache.
15115 Return the new regcache.
15116 (free_register_cache): Change argument to a void *.
15117 (registers_to_string, registers_from_string): Call get_regcache
15118 with fetch flag set.
15119 (register_data): Make static. Pass fetch flag to get_regcache.
15120 (supply_register): Call get_regcache with fetch flag clear.
15121 (collect_register): Call get_regcache with fetch flag set.
15122 (collect_register_as_string): New function.
15123 * regcache.h: Update.
15124 * remote-utils.c (putpkt): Flush after debug output and use
15125 stderr.
15126 Handle input interrupts while waiting for an ACK.
15127 (input_interrupt): Use signal_pid method.
15128 (getpkt): Flush after debug output and use stderr.
15129 (outreg): Use collect_register_as_string.
15130 (new_thread_notify, dead_thread_notify): New functions.
15131 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15132 and general_thread.
15133 (look_up_one_symbol): Flush after debug output.
15134 * server.c (step_thread, server_waiting): New variables.
15135 (start_inferior): Don't use signal_pid. Update call to mywait.
15136 (attach_inferior): Update call to mywait.
15137 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15138 (main): Don't fetch/store registers explicitly. Use
15139 set_desired_inferior. Support proposed ``Hs'' packet. Update
15140 calls to mywait.
15141 * server.h: Update.
15142 (struct inferior_list, struct_inferior_list_entry): New.
15143 * target.c (set_desired_inferior): New.
15144 (write_inferior_memory): Constify.
15145 (mywait): New function.
15146 * target.h: Update.
15147 (struct target_ops): New signal_pid method.
15148 (mywait): Removed macro, added prototype.
15149
15150 * linux-low.h (regset_func): Removed.
15151 (regset_fill_func, regset_store_func): New.
15152 (enum regset_type): New.
15153 (struct regset_info): Add type field. Use new operation types.
15154 (struct linux_target_ops): stop_pc renamed to get_pc.
15155 Add decr_pc_after_break and breakpoint_at.
15156 (get_process, get_thread_proess, get_process_thread)
15157 (strut process_info, all_processes, linux_attach_lwp)
15158 (thread_db_init): New.
15159
15160 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15161 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15162 (the_low_target): Add new members.
15163 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15164 (i386_store_fpxregset): Constify.
15165 (target_regsets): Add new kind identifier.
15166 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15167 (i386_set_pc): Add debugging.
15168 (i386_breakpoint_at): New function.
15169 (the_low_target): Add new members.
15170 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15171 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15172 (mips_breakpoint_at): New.
15173 (the_low_target): Add new members.
15174 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15175 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15176 (the_low_target): Add new members.
15177 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15178 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15179 (the_low_target): Add new members.
15180 * linux-x86-64-low.c (target_regsets): Add new kind
15181 identifier.
15182
15183 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15184
15185 From Martin Pool <mbp@samba.org>:
15186 * server.c (gdbserver_usage): New function.
15187 (main): Call it.
15188
15189 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15190
15191 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15192 stop_at -> stop_pc.
15193
15194 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15195
15196 * Makefile.in: Remove obsolete code.
15197
15198 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15199
15200 * linux-low.c (regsets_fetch_inferior_registers),
15201 (regsets_store_inferior_registers): Removed cast to int from
15202 ptrace() calls.
15203 * regcache.h: Added declaration of struct inferior_info.
15204
15205 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15206
15207 * inferiors.c (struct inferior_info): Add regcache_data.
15208 (add_inferior): Call create_register_cache.
15209 (clear_inferiors): Call free_register_cache.
15210 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15211 * regcache.c (struct inferior_regcache_data): New.
15212 (registers): Remove.
15213 (get_regcache): New function.
15214 (create_register_cache, free_register_cache): New functions.
15215 (set_register_cache): Don't initialize the register cache here.
15216 (registers_to_string, registers_from_string, register_data): Call
15217 get_regcache.
15218 * regcache.h: Add prototypes.
15219 * server.h: Likewise.
15220
15221 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15222
15223 * mem-break.c: New file.
15224 * mem-break.h: New file.
15225 * Makefile.in: Add mem-break.o rule; update server.h
15226 dependencies.
15227 * inferiors.c (struct inferior_info): Add target_data
15228 member.
15229 (clear_inferiors): Free target_data member if set.
15230 (inferior_target_data, set_inferior_target_data): New functions.
15231 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15232 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15233 * linux-low.c (linux_bp_reinsert): New variable.
15234 (struct inferior_linux_data): New.
15235 (linux_create_inferior): Use set_inferior_target_data.
15236 (linux_attach): Likewise. Call add_inferior.
15237 (linux_wait_for_one_inferior): New function.
15238 (linux_wait): Call it.
15239 (linux_write_memory): Add const.
15240 (initialize_low): Call set_breakpoint_data.
15241 * linux-low.h (struct linux_target_ops): Add breakpoint
15242 handling members.
15243 * server.c (attach_inferior): Remove extra add_inferior
15244 call.
15245 * server.h: Include mem-break.h. Update inferior.c
15246 prototypes.
15247 * target.c (read_inferior_memory)
15248 (write_inferior_memory): New functions.
15249 * target.h (read_inferior_memory)
15250 (write_inferior_memory): Change macros to prototypes.
15251 (struct target_ops): Update comments. Add const to write_memory
15252 definition.
15253
15254 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15255
15256 * linux-low.c (usr_store_inferior_registers): Support
15257 registers which are allowed to fail to store.
15258 * linux-low.h (linux_target_ops): Likewise.
15259 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15260 (ppc_cannot_store_register): FPSCR may not be storable.
15261
15262 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15263
15264 * server.h: Include <string.h> if HAVE_STRING_H.
15265 * ChangeLog: Correct paths in last ChangeLog entry.
15266
15267 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15268
15269 * linux-low.h: Remove obsolete prototypes.
15270 (struct linux_target_ops): New.
15271 (extern the_low_target): New.
15272 * linux-low.c (num_regs, regmap): Remove declarations.
15273 (register_addr): Use the_low_target explicitly.
15274 (fetch_register): Likewise.
15275 (usr_fetch_inferior_registers): Likewise.
15276 (usr_store_inferior_registers): Likewise.
15277 * linux-arm-low.c (num_regs): Remove.
15278 (arm_num_regs): Define.
15279 (arm_regmap): Renamed from regmap, made static.
15280 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15281 made static.
15282 (arm_cannot_store_register): Renamed from cannot_store_register,
15283 made static.
15284 (the_low_target): New.
15285 * linux-i386-low.c (num_regs): Remove.
15286 (i386_num_regs): Define.
15287 (i386_regmap): Renamed from regmap, made static.
15288 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15289 made static.
15290 (i386_cannot_store_register): Renamed from cannot_store_register,
15291 made static.
15292 (the_low_target): New.
15293 * linux-ia64-low.c (num_regs): Remove.
15294 (ia64_num_regs): Define.
15295 (ia64_regmap): Renamed from regmap, made static.
15296 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15297 made static.
15298 (ia64_cannot_store_register): Renamed from cannot_store_register,
15299 made static.
15300 (the_low_target): New.
15301 * linux-m68k-low.c (num_regs): Remove.
15302 (m68k_num_regs): Define.
15303 (m68k_regmap): Renamed from regmap, made static.
15304 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15305 made static.
15306 (m68k_cannot_store_register): Renamed from cannot_store_register,
15307 made static.
15308 (the_low_target): New.
15309 * linux-mips-low.c (num_regs): Remove.
15310 (mips_num_regs): Define.
15311 (mips_regmap): Renamed from regmap, made static.
15312 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15313 made static.
15314 (mips_cannot_store_register): Renamed from cannot_store_register,
15315 made static.
15316 (the_low_target): New.
15317 * linux-ppc-low.c (num_regs): Remove.
15318 (ppc_num_regs): Define.
15319 (ppc_regmap): Renamed from regmap, made static.
15320 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15321 made static.
15322 (ppc_cannot_store_register): Renamed from cannot_store_register,
15323 made static.
15324 (the_low_target): New.
15325 * linux-s390-low.c (num_regs): Remove.
15326 (s390_num_regs): Define.
15327 (s390_regmap): Renamed from regmap, made static.
15328 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15329 made static.
15330 (s390_cannot_store_register): Renamed from cannot_store_register,
15331 made static.
15332 (the_low_target): New.
15333 * linux-sh-low.c (num_regs): Remove.
15334 (sh_num_regs): Define.
15335 (sh_regmap): Renamed from regmap, made static.
15336 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15337 made static.
15338 (sh_cannot_store_register): Renamed from cannot_store_register,
15339 made static.
15340 (the_low_target): New.
15341 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15342 (the_low_target): New.
15343
15344 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15345
15346 * Makefile.in: Add stamp-h target.
15347 * configure.in: Create stamp-h.
15348 * configure: Regenerated.
15349
15350 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15351
15352 * inferiors.c: New file.
15353 * target.c: New file.
15354 * target.h: New file.
15355 * Makefile.in: Add target.o and inferiors.o. Update
15356 dependencies.
15357 * linux-low.c (inferior_pid): New static variable,
15358 moved from server.c.
15359 (linux_create_inferior): Renamed from create_inferior.
15360 Call add_inferior. Return 0 on success instead of a PID.
15361 (linux_attach): Renamed from myattach.
15362 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15363 (linux_thread_alive): Renamed from mythread_alive.
15364 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15365 child dies.
15366 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15367 (regsets_store_inferior_registers): Correct error message.
15368 Add missing ``return 0''.
15369 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15370 (linux_store_registers): Renamed from store_inferior_registers.
15371 (linux_read_memory): Renamed from read_inferior_memory.
15372 (linux_write_memory): Renamed from write_inferior_memory.
15373 (linux_target_ops): New structure.
15374 (initialize_low): Call set_target_ops ().
15375 * remote-utils.c (unhexify): New function.
15376 (hexify): New function.
15377 (input_interrupt): Send signals to ``signal_pid''.
15378 * server.c (inferior_pid): Remove.
15379 (start_inferior): Update create_inferior call.
15380 (attach_inferior): Call add_inferior.
15381 (handle_query): New function.
15382 (main): Call handle_query for `q' packets.
15383 * server.h: Include "target.h". Remove obsolete prototypes.
15384 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15385
15386 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15387
15388 * Makefile.in: Add WARN_CFLAGS. Update configury
15389 dependencies.
15390 * configure.in: Check for <string.h>
15391 * configure: Regenerate.
15392 * config.in: Regenerate.
15393 * gdbreplay.c: Include needed system headers.
15394 (remote_open): Remove strchr prototype.
15395 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15396 * regcache.c (supply_register): Change buf argument to const void *.
15397 (supply_register_by_name): Likewise.
15398 (collect_register): Change buf argument to void *.
15399 (collect_register_by_name): Likewise.
15400 * regcache.h: Add missing prototypes.
15401 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15402 * server.c (handle_query): New function.
15403 (attached): New static variable, moved out of main.
15404 (main): Quiet longjmp clobber warnings.
15405 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15406 * utils.c (error): Remove NORETURN.
15407 (fatal): Likewise.