gdbserver: Move detach code to its own function
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2
3 * server.c (handle_detach): New function.
4 (process_serial_event): Move code out, call handle_detach.
5
6 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7
8 * server.c (require_running): Rename to ...
9 (require_running_or_return): ... this ...
10 (require_running_or_break): ... and this.
11 (handle_query, process_serial_event): Adjust.
12
13 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
14
15 * linux-low.c (linux_set_resume_request): Remove unused
16 variables.
17
18 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
19
20 * server.c (first_thread_of): Remove.
21 (process_serial_event): Replace usage of first_thread_of with
22 find_any_thread_of_pid.
23 * tracepoint.c (same_process_p): Remove.
24 (gdb_agent_about_to_close): Replace usage of same_process_p with
25 find_any_thread_of_pid.
26 * linux-x86-low.c (same_process_callback): Remove.
27 (x86_arch_setup_process_callback): Replace usage of
28 same_process_callback with find_any_thread_of_pid.
29 * thread-db.c (any_thread_of): Remove.
30 (switch_to_process): Replace usage of any_thread_of with
31 find_any_thread_of_pid.
32 * inferiors.c (thread_pid_matches_callback): Remove.
33 (find_thread_process): Adjust to use find_any_thread_of_pid.
34
35 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
36
37 * regcache.c (get_thread_regcache): Guard calls to "memset"
38 with "!VEC_empty".
39
40 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
41
42 * linux-low.c (handle_extended_wait): Use
43 "allocate_target_description" instead of "XNEW".
44 * linux-x86-low.c (initialize_low_arch): Likewise.
45
46 2017-09-05 Yao Qi <yao.qi@linaro.org>
47
48 * configure.srv (srv_i386_regobj): Remove.
49 (srv_amd64_regobj): Remove.
50 (srv_regobj): Set it to "" for x86 non-linux targets.
51 * linux-x86-tdesc.c (i386_linux_read_description):
52 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
53 (init_registers_i386): Remove the declaration.
54 (tdesc_i386): Remove the declaration.
55 (lynx_i386_arch_setup): Call i386_create_target_description.
56 * nto-x86-low.c: Likewise.
57 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
58 [!__x86_64__]: include arch/i386.h.
59 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
60
61 2017-09-05 Yao Qi <yao.qi@linaro.org>
62
63 * configure.srv (srv_amd64_linux_xmlfiles): Remove
64 i386/amd64-XXX-linux from it.
65
66 2017-09-05 Yao Qi <yao.qi@linaro.org>
67
68 * configure.srv: Empty srv_amd64_linux_regobj if $development is
69 false.
70 (ipa_amd64_linux_regobj): Remove.
71 (ipa_x32_linux_regobj): Remove.
72
73 2017-09-05 Yao Qi <yao.qi@linaro.org>
74
75 * Makefile.in (arch-amd64.o): New rule.
76 * configure.srv: Append arch-amd64.o.
77 * linux-amd64-ipa.c: Include common/x86-xstate.h.
78 (get_ipa_tdesc): Call amd64_linux_read_description.
79 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
80 and init_registers_amd64_XXX.
81 * linux-x86-low.c (x86_linux_read_description): Call
82 amd64_linux_read_description.
83 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
84 (initialize_low_arch): Don't call init_registers_x32_XXX and
85 init_registers_amd64_XXX.
86 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
87 and tdesc_amd64_XXX.
88 [__x86_64__] (amd64_tdesc_test): New function.
89 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
90 and init_registers_amd64_XXX.
91 * linux-x86-tdesc.c: Include arch/amd64.h.
92 (xcr0_to_tdesc_idx): New function.
93 (i386_linux_read_description): New function.
94 (amd64_get_ipa_tdesc_idx): New function.
95 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
96 (amd64_get_ipa_tdesc): Declare.
97
98 2017-09-05 Yao Qi <yao.qi@linaro.org>
99
100 * configure.srv (srv_i386_linux_xmlfiles): Remove
101 i386/i386-XXX-linux.xml from it.
102
103 2017-09-05 Yao Qi <yao.qi@linaro.org>
104
105 * configure.srv: Set srv_i386_linux_regobj empty if $development
106 is false.
107 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
108 initialize_low_tdesc.
109 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
110 with #if initialize_low_tdesc.
111 * linux-x86-tdesc-selftest.c: New file.
112 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
113
114 2017-09-05 Yao Qi <yao.qi@linaro.org>
115
116 * Makefile.in (arch-i386.o): New rule.
117 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
118 (x86_64-*-linux*): Likewise.
119 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
120 include arch/i386.h.
121 (i386_linux_read_description): Remove code and call
122 i386_create_target_description.
123 * tdesc.c (allocate_target_description): New function.
124 * tdesc.h (set_tdesc_architecture): Remove declaration.
125 (set_tdesc_osabi): Likewise.
126
127 2017-09-05 Yao Qi <yao.qi@linaro.org>
128
129 * linux-x86-tdesc.c: Don't include <inttypes.h>.
130 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
131 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
132 .xmltarget.
133 * server.c (get_features_xml): Call tdesc_get_features_xml.
134 * tdesc.c (set_tdesc_architecture): New function.
135 (set_tdesc_osabi): New function.
136 (tdesc_get_features_xml): New function.
137 (tdesc_create_feature): Add an argument.
138 * tdesc.h (struct target_desc) <features>: New field.
139 <arch, osabi>: New field.
140 (~target_desc): xfree features, arch, and osabi.
141 (target_desc::oerator==): Don't compare .xmltarget.
142 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
143 (set_tdesc_osabi): Likewise.
144 (tdesc_get_features_xml): Likewise.
145
146 2017-09-05 Yao Qi <yao.qi@linaro.org>
147
148 * linux-x86-tdesc.c: Include selftest.h.
149 (i386_tdesc_test): New function.
150 (initialize_low_tdesc): Call selftests::register_test.
151 * tdesc.h: Include regdef.h.
152 (target_desc): Override operator == and !=.
153
154 2017-09-05 Yao Qi <yao.qi@linaro.org>
155
156 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
157 (ipa_obj): Likewise.
158 * linux-i386-ipa.c: Include common/x86-xstate.h
159 (get_ipa_tdesc): Call i386_linux_read_description.
160 (initialize_low_tracepoint): Don't call init_registers_XXX
161 functions, call initialize_low_tdesc instead.
162 * linux-x86-low.c (x86_linux_read_description): Call
163 i386_linux_read_description.
164 (initialize_low_arch): Don't call init_registers_i386_XXX
165 functions, call initialize_low_tdesc.
166 * linux-x86-tdesc.c: New file.
167 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
168 (i386_get_ipa_tdesc_idx): Declare.
169 (i386_get_ipa_tdesc): Declare.
170 (initialize_low_tdesc): Declare.
171
172 2017-09-05 Yao Qi <yao.qi@linaro.org>
173
174 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
175 instead of 0.
176
177 2017-09-05 Yao Qi <yao.qi@linaro.org>
178
179 * Makefile.in (IPA_OBJS): Add vec-ipa.o
180 * regcache.c (get_thread_regcache): Use VEC_length.
181 (init_register_cache): Likewise.
182 (regcache_cpy): Likewise.
183 (registers_to_string): Iterate reg_defs via VEC_iterate.
184 (find_regno): Likewise.
185 (find_register_by_number): Use VEC_index.
186 (register_size): Call find_register_by_number.
187 (register_data): Call find_register_by_number.
188 (supply_regblock): Use VEC_length.
189 (regcache_raw_read_unsigned): Likewise.
190 * tdesc.c (init_target_desc): Iterate reg_defs via
191 VEC_iterate.
192 (default_description): Update initializer.
193 (copy_target_description): Don't update field num_registers.
194 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
195 <num_registers>: Remove.
196
197 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
198
199 * Makefile.in (.SECONDARY): Define target.
200
201 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
202
203 * linux-low.c (linux_wait_1): Adjust.
204 * server.c (queue_stop_reply_callback): Adjust.
205
206 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
207
208 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
209 QEnvironmentUnset and QEnvironmentReset packets.
210 (handle_query): Inform remote that QEnvironmentHexEncoded,
211 QEnvironmentUnset and QEnvironmentReset are supported.
212
213 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
214
215 * inferiors.h (inferior_target_data): Rename to ...
216 (thread_target_data): ... this.
217 (inferior_regcache_data): Rename to ...
218 (thread_regcache_data): ... this.
219 (set_inferior_regcache_data): Rename to ...
220 (set_thread_regcache_data): ... this.
221 * inferiors.c (inferior_target_data): Rename to ...
222 (thread_target_data): ... this.
223 (inferior_regcache_data): Rename to ...
224 (thread_regcache_data): ... this.
225 (set_inferior_regcache_data): Rename to ...
226 (set_thread_regcache_data): ... this.
227 (free_one_thread): Update.
228 * linux-low.h (get_thread_lwp): Update.
229 * regcache.c (get_thread_regcache): Update.
230 (regcache_invalidate_thread): Update.
231 (free_register_cache_thread): Update.
232 * win32-i386-low.c (update_debug_registers_callback): Update.
233 (win32_get_current_dr): Update.
234 * win32-low.c (thread_rec): Update.
235 (delete_thread_info): Update.
236 (continue_one_thread): Update.
237 (suspend_one_thread): Update.
238
239 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
240
241 * inferiors.c (set_inferior_target_data): Remove.
242 * inferiors.h (set_inferior_target_data): Remove.
243
244 2017-08-18 Yao Qi <yao.qi@linaro.org>
245
246 * Makefile.in (OBS): Add selftest.o.
247 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
248 * configure, config.in: Re-generated.
249 * server.c: Include common/sefltest.h.
250 (captured_main): Handle option --selftest.
251
252 2017-08-09 Yao Qi <yao.qi@linaro.org>
253
254 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
255 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
256 i386-avx-mpx.o and i386-mmx.o.
257 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
258 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
259 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
260 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
261 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
262 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
263 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
264 i386/amd64-avx-mpx.xml.
265
266 2017-08-09 Yao Qi <yao.qi@linaro.org>
267
268 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
269 and x32-avx-avx512.o.
270 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
271 i386/x32-avx-avx512.xml.
272
273 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
274
275 * tracepoint.h (enum class fast_tpoint_collect_result): New
276 enumeration.
277 (fast_tracepoint_collecting): Change return type to
278 fast_tpoint_collect_result.
279 * tracepoint.c (fast_tracepoint_collecting): Likewise.
280 * linux-low.h: Include tracepoint.h.
281 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
282 fast_tpoint_collect_result.
283 * linux-low.c (handle_tracepoints): Adjust.
284 (linux_fast_tracepoint_collecting): Change return type to
285 fast_tpoint_collect_result.
286 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
287 linux_wait_1, stuck_in_jump_pad_callback,
288 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
289 proceed_one_lwp): Adjust to type change.
290
291 2017-07-10 Yao Qi <yao.qi@linaro.org>
292
293 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
294
295 2017-06-29 Yao Qi <yao.qi@linaro.org>
296
297 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
298 Remove.
299 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
300
301 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
302
303 * Makefile.in (IPA_OBJS): Sort and format one item per line.
304
305 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
306
307 * linux-low.c (linux_create_inferior): Adjust code to access the
308 environment information via 'gdb_environ' class.
309 * lynx-low.c (lynx_create_inferior): Likewise.
310 * server.c (our_environ): Make it an instance of 'gdb_environ'.
311 (get_environ): Return a pointer to 'our_environ'.
312 (captured_main): Initialize 'our_environ'.
313 * server.h (get_environ): Adjust prototype.
314 * spu-low.c (spu_create_inferior): Adjust code to access the
315 environment information via 'gdb_environ' class.
316
317 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
318
319 * linux-low.c (linux_read_memory, linux_write_memory): Remove
320 usage of "register" keyword.
321
322 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
323
324 * configure: Re-generate.
325
326 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
327
328 * configure: Re-generate.
329
330 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
331
332 * Makefile.in (COMPILE.pre): Add "-x c++".
333
334 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
335
336 * fork-child.c: Conditionally include <signal.h>.
337
338 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
339
340 * server.c (handle_general_set): Handle new packet
341 "QStartupWithShell".
342 (handle_query): Add "QStartupWithShell" to the list of supported
343 packets.
344 (gdbserver_usage): Add help text explaining the
345 new "--startup-with-shell" and "--no-startup-with-shell" CLI
346 options.
347 (captured_main): Recognize and act upon the presence of the new
348 CLI options.
349
350 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
351 Pedro Alves <palves@redhat.com>
352
353 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
354 * configure: Regenerate.
355 * configure.srv (srv_linux_obj): Add "fork-child.o" and
356 "fork-inferior.o".
357 (i[34567]86-*-lynxos*): Likewise.
358 (spu*-*-*): Likewise.
359 * fork-child.c: New file.
360 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
361 and "environ.h".
362 (linux_ptrace_fun): New function.
363 (linux_create_inferior): Adjust function prototype to reflect
364 change on "target.h". Adjust function code to use
365 "fork_inferior".
366 (linux_request_interrupt): Delete "signal_pid".
367 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
368 (lynx_ptrace_fun): New function.
369 (lynx_create_inferior): Adjust function prototype to reflect
370 change on "target.h". Adjust function code to use
371 "fork_inferior".
372 * nto-low.c (nto_create_inferior): Adjust function prototype and
373 code to reflect change on "target.h". Update comments.
374 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
375 "common-terminal.h" and "environ.h".
376 (terminal_fd): Moved to fork-child.c.
377 (old_foreground_pgrp): Likewise.
378 (restore_old_foreground_pgrp): Likewise.
379 (last_status): Make it global.
380 (last_ptid): Likewise.
381 (our_environ): New variable.
382 (startup_with_shell): Likewise.
383 (program_name): Likewise.
384 (program_argv): Rename to...
385 (program_args): ...this.
386 (wrapper_argv): New variable.
387 (start_inferior): Delete function.
388 (get_exec_wrapper): New function.
389 (get_exec_file): Likewise.
390 (get_environ): Likewise.
391 (prefork_hook): Likewise.
392 (post_fork_inferior): Likewise.
393 (postfork_hook): Likewise.
394 (postfork_child_hook): Likewise.
395 (handle_v_run): Update code to deal with arguments coming from the
396 remote host. Update calls from "start_inferior" to
397 "create_inferior".
398 (captured_main): Likewise. Initialize environment variable. Call
399 "have_job_control".
400 * server.h (post_fork_inferior): New prototype.
401 (get_environ): Likewise.
402 (last_status): Declare.
403 (last_ptid): Likewise.
404 (signal_pid): Likewise.
405 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
406 (spu_ptrace_fun): New function.
407 (spu_create_inferior): Adjust function prototype to reflect change
408 on "target.h". Adjust function code to use "fork_inferior".
409 * target.c (target_terminal_init): New function.
410 (target_terminal_inferior): Likewise.
411 (target_terminal_ours): Likewise.
412 * target.h: Include <vector>.
413 (struct target_ops) <create_inferior>: Update prototype.
414 (create_inferior): Update macro.
415 * utils.c (gdb_flush_out_err): New function.
416 * win32-low.c (win32_create_inferior): Adjust function prototype
417 and code to reflect change on "target.h".
418
419 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
420
421 * inferiors.c (switch_to_thread): New function.
422
423 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
424
425 * Makefile.in (SFILE): Add "common/job-control.c".
426 (OBS): Add "job-control.o".
427
428 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
429
430 * Makefile: Remove "@host_makefile_frag@".
431
432 2017-05-05 Pedro Alves <palves@redhat.com>
433
434 * configure: Regenerate.
435
436 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
437
438 * configure: Regenerate.
439
440 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
441
442 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
443 software_single_step change of return type to
444 std::vector<CORE_ADDR>.
445 * linux-low.c (install_software_single_step_breakpoints):
446 Likewise.
447 * linux-low.h (install_software_single_step_breakpoints):
448 Likewise.
449
450 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
451
452 * remote-utils.c: Include "gdb_termios.h" instead of
453 "terminal.h".
454 * terminal.h: Delete file.
455
456 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
457
458 * server.c: Include <vector>.
459 <program_argv, wrapper_argv>: Convert to std::vector.
460 (start_inferior): Rewrite function to use C++.
461 (handle_v_run): Likewise. Update code that calculates the argv
462 based on the vRun packet; use C++.
463 (captured_main): Likewise.
464
465 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
466
467 * server.c (handle_v_cont): Initialize thread_resume::thread
468 with null_ptid.
469
470 2017-04-05 Pedro Alves <palves@redhat.com>
471
472 * configure: Regenerate.
473
474 2017-04-05 Pedro Alves <palves@redhat.com>
475
476 * gdbreplay.c (sync_error): Constify.
477 * linux-x86-low.c (push_opcode): Constify.
478
479 2017-04-05 Pedro Alves <palves@redhat.com>
480
481 * win32-low.c (get_child_debug_event)
482 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
483 Report TARGET_WAITKIND_SPURIOUS instead.
484
485 2017-04-05 Pedro Alves <palves@redhat.com>
486
487 * remote-utils.c (remote_prepare, remote_open): Constify.
488 * remote-utils.h (remote_prepare, remote_open): Constify.
489 * server.c (captured_main): Constify 'port' handling.
490
491 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
492
493 * Makefile.in (clean): Clear .deps.
494
495 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
496
497 * .gitignore: Remove generated files, replace with wildcard.
498 * (clean): Replace removal of generated files with wildcard.
499 (version.c): Replace with...
500 (version-generated.c): ...this.
501 (xml-builtin.c): Replace with...
502 (xml-builtin-generated.c): ...this.
503 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
504 (%.c: *regformats*): Replace with...
505 (%-generated.c: *regformats*): ...this.
506
507 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
508
509 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
510 (xtensa_fill_gregset): Call collect_register_by_name for
511 threadptr register.
512 (xtensa_store_gregset): Call supply_register_by_name for
513 threadptr register.
514
515 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
516
517 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
518 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
519 (xtensa_store_gregset): Call supply_register for all registers in
520 a0_regnum..a0_regnum + C0_NREGS range.
521
522 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
523
524 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
525 (ax-ipa.o: ax.c): Remove.
526 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
527 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
528 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
529 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
530 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
531
532 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
533
534 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
535 (print-utils-ipa.o: ../common/print-utils.c): Remove.
536 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
537 (errors-ipa.o: ../common/errors.c): Remove.
538 (format-ipa.o: ../common/format.c): Remove.
539 (common-utils-ipa.o: ../common/common-utils.c): Remove.
540
541 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * Makefile.in (%-ipa.o: %.c): New rule.
544 (tracepoint-ipa.o: tracepoint.c): Remove.
545 (utils-ipa.o: utils.c): Remove.
546 (remote-utils-ipa.o: remote-utils.c): Remove.
547 (regcache-ipa.o: regcache.c): Remove.
548 (i386-linux-ipa.o: i386-linux.c): Remove.
549 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
550 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
551 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
552 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
553 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
554 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
555 (amd64-linux-ipa.o: amd64-linux.c): Remove.
556 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
557 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
558 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
559 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
560 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
561 (aarch64-ipa.o: aarch64.c): Remove.
562 (s390-linux32-ipa.o: s390-linux32.c): Remove.
563 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
564 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
565 (s390-linux64-ipa.o: s390-linux64.c): Remove.
566 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
567 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
568 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
569 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
570 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
571 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
572 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
573 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
574 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
575 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
576 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
577 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
578 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
579 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
580 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
581 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
582 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
583 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
584 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
585 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
586 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
587 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
588 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
589 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
590 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
591 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
592 (tdesc-ipa.o: tdesc.c): Remove.
593 (x32-linux-ipa.o: x32-linux.c): Remove.
594 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
595 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
596
597 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * Makefile.in (%.o: ../arch/%.c): New rule.
600 (arm.o: ../arch/arm.c): Remove.
601 (arm-linux.o: ../arch/arm-linux.c): Remove.
602 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
603 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
604
605 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
606
607 * Makefile.in (%.o: ../nat/%.c): New rule.
608 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
609 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
610 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
611 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
612 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
613 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
614 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
615 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
616 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
617 (linux-personality.o: ../nat/linux-personality.c): Remove.
618 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
619 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
620 (x86-linux.o: ../nat/x86-linux.c): Remove.
621 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
622 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
623
624 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
625
626 * Makefile.in (%.o: ../common/%.c): New rule.
627 (signals.o: ../common/signals.c): Remove.
628 (print-utils.o: ../common/print-utils.c): Remove.
629 (rsp-low.o: ../common/rsp-low.c): Remove.
630 (common-utils.o: ../common/common-utils.c): Remove.
631 (posix-strerror.o: ../common/posix-strerror.c): Remove.
632 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
633 (vec.o: ../common/vec.c): Remove.
634 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
635 (xml-utils.o: ../common/xml-utils.c): Remove.
636 (ptid.o: ../common/ptid.c): Remove.
637 (buffer.o: ../common/buffer.c): Remove.
638 (format.o: ../common/format.c): Remove.
639 (filestuff.o: ../common/filestuff.c): Remove.
640 (agent.o: ../common/agent.c): Remove.
641 (errors.o: ../common/errors.c): Remove.
642 (environ.o: ../common/environ.c): Remove.
643 (common-debug.o: ../common/common-debug.c): Remove.
644 (cleanups.o: ../common/cleanups.c): Remove.
645 (common-exceptions.o: ../common/common-exceptions.c): Remove.
646 (fileio.o: ../common/fileio.c): Remove.
647 (common-regcache.o: ../common/common-regcache.c): Remove.
648 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
649 (new-op.o: ../common/new-op.c): Remove.
650 (btrace-common.o: ../common/btrace-common.c): Remove.
651
652 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
653
654 * Makefile.in (%.o: ../target/%.c): New rule.
655 (waitstatus.o: ../target/waitstatus.c): Remove.
656
657 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
658
659 * Makefile.in
660 (%.c: ../regformats/%.dat,
661 (%.c: ../regformats/arm/%.dat,
662 (%.c: ../regformats/i386/%.dat,
663 (%.c: ../regformats/rs6000/%.dat): New rules.
664 (aarch64.c): Remove.
665 (reg-arm.c): Remove.
666 (arm-with-iwmmxt.c): Remove.
667 (arm-with-vfpv2.c): Remove.
668 (arm-with-vfpv3.c): Remove.
669 (arm-with-neon.c): Remove.
670 (reg-bfin.c): Remove.
671 (reg-cris.c): Remove.
672 (reg-crisv32.c): Remove.
673 (i386.c): Remove.
674 (i386-linux.c): Remove.
675 (i386-avx.c): Remove.
676 (i386-avx-linux.c): Remove.
677 (i386-avx-avx512.c): Remove.
678 (i386-avx-avx512-linux.c): Remove.
679 (i386-mpx.c): Remove.
680 (i386-mpx-linux.c): Remove.
681 (i386-avx-mpx-avx512-pku.c): Remove.
682 (i386-avx-mpx-avx512-pku-linux.c): Remove.
683 (i386-avx-mpx.c): Remove.
684 (i386-avx-mpx-linux.c): Remove.
685 (i386-mmx.c): Remove.
686 (i386-mmx-linux.c): Remove.
687 (reg-ia64.c): Remove.
688 (reg-m32r.c): Remove.
689 (reg-m68k.c): Remove.
690 (reg-cf.c): Remove.
691 (mips-linux.c): Remove.
692 (mips-dsp-linux.c): Remove.
693 (mips64-linux.c): Remove.
694 (mips64-dsp-linux.c): Remove.
695 (nios2-linux.c): Remove.
696 (powerpc-32.c): Remove.
697 (powerpc-32l.c): Remove.
698 (powerpc-altivec32l.c): Remove.
699 (powerpc-cell32l.c): Remove.
700 (powerpc-vsx32l.c): Remove.
701 (powerpc-isa205-32l.c): Remove.
702 (powerpc-isa205-altivec32l.c): Remove.
703 (powerpc-isa205-vsx32l.c): Remove.
704 (powerpc-e500l.c): Remove.
705 (powerpc-64l.c): Remove.
706 (powerpc-altivec64l.c): Remove.
707 (powerpc-cell64l.c): Remove.
708 (powerpc-vsx64l.c): Remove.
709 (powerpc-isa205-64l.c): Remove.
710 (powerpc-isa205-altivec64l.c): Remove.
711 (powerpc-isa205-vsx64l.c): Remove.
712 (s390-linux32.c): Remove.
713 (s390-linux32v1.c): Remove.
714 (s390-linux32v2.c): Remove.
715 (s390-linux64.c): Remove.
716 (s390-linux64v1.c): Remove.
717 (s390-linux64v2.c): Remove.
718 (s390-te-linux64.c): Remove.
719 (s390-vx-linux64.c): Remove.
720 (s390-tevx-linux64.c): Remove.
721 (s390x-linux64.c): Remove.
722 (s390x-linux64v1.c): Remove.
723 (s390x-linux64v2.c): Remove.
724 (s390x-te-linux64.c): Remove.
725 (s390x-vx-linux64.c): Remove.
726 (s390x-tevx-linux64.c): Remove.
727 (tic6x-c64xp-linux.c): Remove.
728 (tic6x-c64x-linux.c): Remove.
729 (tic6x-c62x-linux.c): Remove.
730 (reg-sh.c): Remove.
731 (reg-sparc64.c): Remove.
732 (reg-spu.c): Remove.
733 (amd64.c): Remove.
734 (amd64-linux.c): Remove.
735 (amd64-avx.c): Remove.
736 (amd64-avx-linux.c): Remove.
737 (amd64-avx-avx512.c): Remove.
738 (amd64-avx-avx512-linux.c): Remove.
739 (amd64-mpx.c): Remove.
740 (amd64-mpx-linux.c): Remove.
741 (amd64-avx-mpx-avx512-pku.c): Remove.
742 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
743 (amd64-avx-mpx.c): Remove.
744 (amd64-avx-mpx-linux.c): Remove.
745 (x32.c): Remove.
746 (x32-linux.c): Remove.
747 (x32-avx.c): Remove.
748 (x32-avx-linux.c): Remove.
749 (x32-avx-avx512.c): Remove.
750 (x32-avx-avx512-linux.c): Remove.
751 (reg-xtensa.c): Remove.
752 (reg-tilegx.c): Remove.
753 (reg-tilegx32.c): Remove.
754
755 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
756
757 * Makefile.in (SFILES): Add "common/environ.c".
758 (OBJS): Add "common/environ.h".
759
760 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
761
762 * configure.ac: Check if the fs_base and gs_base members of
763 `struct user_regs_struct' exist.
764 * config.in: Regenerated.
765 * configure: Likewise.
766
767 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
768
769 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
770 target_read_memory.
771 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
772 (get_next_pcs_syscall_next_pc): Likewise.
773
774 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
775
776 * win32-i386-low.c: Fix incorrect reference to a couple source files.
777 * nto-x86-low.c: Likewise.
778
779 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
780
781 * Makefile.in: Include disable-implicit-rules.mk.
782
783 2016-11-23 Pedro Alves <palves@redhat.com>
784
785 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
786 (debug_vprintf): Use std::chrono::steady_clock instead of
787 gettimeofday. Use '.' instead of ':'.
788 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
789 (get_timestamp): Use std::chrono::steady_clock instead of
790 gettimeofday.
791
792 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
793
794 * Makefile.in: Fix whitespace formatting.
795
796 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
797
798 * Makefile.in (SFILES, OBS): Flatten list and order
799 alphabetically.
800
801 2016-11-23 Pedro Alves <palves@redhat.com>
802
803 * event-loop.c (handle_file_event): Use warning.
804 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
805 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
806 Use warning.
807
808 2016-11-23 Pedro Alves <palves@redhat.com>
809
810 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
811 output.
812 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
813 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
814 debug_printf and debug_flush for debug output.
815 * server.c (handle_general_set): Likewise.
816 * thread-db.c (try_thread_db_load): Use debug_printf for debug
817 output.
818
819 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
820
821 * Makefile.in (.c.o): Replace rule with ...
822 (%.o: %.c): ... this one.
823
824 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
825
826 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
827 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
828 make.
829 * configure.ac: Remove checks for the make program.
830 * configure: Re-generate.
831
832 2016-10-28 Pedro Alves <palves@redhat.com>
833
834 * Makefile.in (CXX_DIALECT): Get from configure.
835 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
836 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
837 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
838 * config.in: Regenerate.
839 * configure: Regenerate.
840
841 2016-10-27 Yao Qi <yao.qi@linaro.org>
842
843 * linux-low.c (linux_supports_range_stepping): Return true if
844 can_software_single_step return true.
845
846 2016-10-27 Yao Qi <yao.qi@linaro.org>
847
848 * inferiors.c (find_inferior_in_random): New function.
849 * inferiors.h (find_inferior_in_random): Declare.
850 * linux-low.c (linux_wait_for_event_filtered): Call
851 find_inferior_in_random instead of find_inferior.
852
853 2016-10-27 Yao Qi <yao.qi@linaro.org>
854
855 * linux-low.c (linux_wait_1): If single-step breakpoints are
856 inserted, remove them.
857
858 2016-10-26 Pedro Alves <palves@redhat.com>
859
860 * linux-low.c (handle_extended_wait): Link parent/child fork
861 threads.
862 (linux_wait_1): Unlink them.
863 (linux_set_resume_request): Ignore resume requests for
864 already-resumed and unhandled fork child threads.
865 * linux-low.h (struct lwp_info) <fork_relative>: New field.
866 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
867 New functions.
868 (handle_v_requests) <vCont>: Don't call require_running.
869 * server.h (in_queued_stop_replies): New declaration.
870
871 2016-10-24 Yao Qi <yao.qi@linaro.org>
872
873 PR server/20733
874 * linux-aarch64-low.c (append_insns): Cast the return value to
875 'uint32_t *'.
876
877 2016-10-10 Yao Qi <yao.qi@linaro.org>
878
879 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
880
881 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
882
883 * target.c (target_supports_multi_process): New function, moved
884 from...
885 * target.h (target_supports_multi_process): ... here. Remove
886 macro.
887
888 2016-10-05 Tom Tromey <tom@tromey.com>
889
890 PR remote/20655:
891 * tracepoint.c (handle_tracepoint_bkpts): Check
892 ipa_error_tracepoint, not ipa_stopping_tracepoint.
893
894 2016-10-05 Yao Qi <yao.qi@linaro.org>
895
896 * configure.srv: Update the path of arm-*.xml files.
897
898 2016-10-05 Terry Guo <terry.guo@arm.com>
899 Yao Qi <yao.qi@linaro.org>
900
901 * Makefile.in: Adjust the path of rules.
902 * configure.srv: Update the path of xml files.
903 * regformats/arm-with-iwmmxt.dat: Regenerated.
904 * regformats/arm-with-neon.dat: Likewise.
905 * regformats/arm-with-vfpv2.dat: Likewise.
906 * regformats/arm-with-vfpv3.dat Likewise.
907
908 2016-09-30 Yao Qi <yao.qi@linaro.org>
909
910 PR gdbserver/20627
911 * target.c (target_stop_and_wait): Don't call
912 target_continue_no_signal, use resume_stop instead.
913
914 2016-09-26 Yao Qi <yao.qi@linaro.org>
915
916 * linux-low.c (linux_wait_1): Call debug_exit.
917
918 2016-09-23 Pedro Alves <palves@redhat.com>
919
920 * Makefile.in (SFILES): Add common/new-op.c.
921 (OBS): Add common/new-op.o.
922 (new-op.o): New rule.
923
924 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
925
926 * .gitinore: Ignore more files.
927
928 2016-09-21 Yao Qi <yao.qi@linaro.org>
929
930 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
931 23.
932
933 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
934
935 * server.c (start_inferior): Call target_mourn_inferior instead of
936 mourn_inferior; pass ptid_t argument to it.
937 (resume): Likewise.
938 (handle_target_event): Likewise.
939 * target.c (target_mourn_inferior): New function.
940 * target.h (mourn_inferior): Delete macro.
941
942 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
943
944 * linux-low.c (lwp_is_stepping): New function.
945
946 2016-09-06 Carl Love <cel@us.ibm.com>
947
948 * server.c (start_inferior): Fixed comment, requested comment change
949 didn't get updated correctly. Removed reference to ptrace () call as
950 it is only true on Linux systems.
951
952 2016-09-06 Carl Love <cel@us.ibm.com>
953
954 * server.c (start_inferior): Do not call
955 function target_post_create_inferior () if the
956 inferior process has already exited.
957
958 2016-09-05 Pedro Alves <palves@redhat.com>
959
960 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
961 (COMPILE.pre, CC_LD): Use CXX directly.
962 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
963 * acinclude.m4: Don't include build-with-cxx.m4.
964 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
965 * configure: Regenerate.
966
967 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
968
969 PR gdb/19495
970 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
971 call writing data to own_buf.
972
973 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
974
975 * target.c (mywait): Call target_wait instead of
976 the_target->wait.
977 (target_wait): New function.
978
979 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
980
981 * server.c (start_inferior): New variable 'ptid'. Replace calls
982 to the_target->resume by target_continue{,_no_signal}, depending
983 on the case.
984 * target.c (target_stop_and_wait): Call target_continue_no_signal
985 instead of the_target->resume.
986 (target_continue): New function.
987
988 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
989
990 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
991
992 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
993
994 PR server/20491
995 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
996 ps_prochandle.
997 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
998 * linux-arm-low.c (ps_get_thread_area): Likewise.
999 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1000 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1001 * linux-mips-low.c (ps_get_thread_area): Likewise.
1002 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1003 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1004 * linux-x86-low.c (ps_get_thread_area): Likewise.
1005 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1006
1007 2016-08-19 Pedro Alves <palves@redhat.com>
1008
1009 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1010
1011 2016-08-19 Pedro Alves <palves@redhat.com>
1012
1013 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1014 comment. Use memcpy instead of casting through unsigned long.
1015
1016 2016-08-19 Pedro Alves <palves@redhat.com>
1017
1018 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1019 allocating around 0x80000000.
1020
1021 2016-08-19 Pedro Alves <palves@redhat.com>
1022
1023 PR gdb/20415
1024 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1025 (x32-avx512-linux-ipa.o): New rules.
1026 * configure.ac (x86_64-*-linux*): New x32 check.
1027 * configure.srv (ipa_x32_linux_regobj): New.
1028 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1029 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1030 descriptions.
1031 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1032 descriptions.
1033 * configure: Regenerate.
1034
1035 2016-08-09 Pedro Alves <palves@redhat.com>
1036
1037 PR gdb/18653
1038 * Makefile.in (OBS): Add signals-state-save-restore.o.
1039 (signals-state-save-restore.o): New rule.
1040 * config.in: Regenerate.
1041 * configure: Regenerate.
1042 * linux-low.c: Include "signals-state-save-restore.h".
1043 (linux_create_inferior): Call
1044 restore_original_signals_state.
1045 * server.c: Include "dispositions-save-restore.h".
1046 (captured_main): Call save_original_signals_state.
1047
1048 2016-08-05 Pedro Alves <palves@redhat.com>
1049
1050 * configure: Regenerate.
1051
1052 2016-08-04 Yao Qi <yao.qi@linaro.org>
1053
1054 * linux-low.c (regsets_fetch_inferior_registers): Check
1055 errno is ESRCH or not.
1056
1057 2016-08-02 Yao Qi <yao.qi@linaro.org>
1058
1059 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1060 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1061 (thread_db_load_search): Update.
1062 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1063 td_ta_set_event and td_ta_event_getmsg.
1064
1065 2016-07-26 Pedro Alves <palves@redhat.com>
1066
1067 PR server/20414
1068 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1069 of unsigned long for 64-bit registers and use uint32_t instead of
1070 unsigned int for 32-bit registers.
1071
1072 2016-07-26 Pedro Alves <palves@redhat.com>
1073
1074 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1075 to 'ptrace'.
1076
1077 2016-07-21 Tom Tromey <tom@tromey.com>
1078
1079 * configure: Rebuild.
1080
1081 2016-07-21 Yao Qi <yao.qi@linaro.org>
1082
1083 * mem-break.c (find_gdb_breakpoint): Cast bp to
1084 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1085
1086 2016-07-21 Yao Qi <yao.qi@linaro.org>
1087
1088 * server.c (handle_v_requests): Support s and S actions
1089 if target_supports_software_single_step return true.
1090
1091 2016-07-21 Yao Qi <yao.qi@linaro.org>
1092
1093 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1094 is resume_step, call maybe_hw_step.
1095 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1096 and unstop them.
1097 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1098 breakpoints or not.
1099 (proceed_one_lwp): If resume request is resume_step, install
1100 reinsert breakpoints and call maybe_hw_step.
1101
1102 2016-07-21 Yao Qi <yao.qi@linaro.org>
1103
1104 * linux-low.c (proceed_one_lwp): Declare.
1105 (linux_resume_one_thread): Remove local variable 'step'.
1106 Lift code enqueue signal. Call proceed_one_lwp instead of
1107 linux_resume_one_lwp.
1108
1109 2016-07-21 Yao Qi <yao.qi@linaro.org>
1110
1111 * linux-low.c (linux_resume_one_thread): Call
1112 enqueue_pending_signal.
1113
1114 2016-07-21 Yao Qi <yao.qi@linaro.org>
1115
1116 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1117 * inferiors.c (do_restore_current_thread_cleanup): New function.
1118 (make_cleanup_restore_current_thread): Likewise.
1119 * linux-low.c (install_software_single_step_breakpoints): Call
1120 make_cleanup_restore_current_thread. Switch current_thread to
1121 thread.
1122
1123 2016-07-21 Yao Qi <yao.qi@linaro.org>
1124
1125 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1126 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1127 (clone_one_breakpoint): Likewise.
1128 (delete_reinsert_breakpoints): Change parameter to thread.
1129 Callers updated.
1130 (has_reinsert_breakpoints): Likewise.
1131 (uninsert_reinsert_breakpoints): Likewise.
1132 (reinsert_reinsert_breakpoints): Likewise.
1133 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1134 (delete_reinsert_breakpoints): Likewise.
1135 (reinsert_reinsert_breakpoints): Likewise.
1136 (uninsert_reinsert_breakpoints): Likewise.
1137 (has_reinsert_breakpoints): Likewise.
1138
1139 2016-07-21 Yao Qi <yao.qi@linaro.org>
1140
1141 * inferiors.c (get_thread_process): Make parameter const.
1142 * inferiors.h (get_thread_process): Update declaration.
1143 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1144 Add new parameters child_thread and parent_thread. Callers
1145 updated.
1146 * mem-break.h (clone_all_breakpoints): Update declaration.
1147
1148 2016-07-21 Yao Qi <yao.qi@linaro.org>
1149
1150 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1151 <command_list, handler>: Remove.
1152 (struct gdb_breakpoint): New.
1153 (struct other_breakpoint): New.
1154 (struct reinsert_breakpoint): New.
1155 (is_gdb_breakpoint): New function.
1156 (any_persistent_commands): Update command_list if
1157 is_gdb_breakpoint returns true.
1158 (set_breakpoint): Create breakpoints according to their types.
1159 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1160 (set_gdb_breakpoint_1): Likewise.
1161 (set_gdb_breakpoint): Likewise.
1162 (clear_breakpoint_conditions): Change parameter type to
1163 'struct gdb_breakpoint *'.
1164 (clear_breakpoint_commands): Likewise.
1165 (clear_breakpoint_conditions_and_commands): Likewise.
1166 (add_condition_to_breakpoint): Likewise.
1167 (add_breakpoint_condition): Likewise.
1168 (add_commands_to_breakpoint): Likewise.
1169 (check_breakpoints): Check other_breakpoint.
1170 (clone_one_breakpoint): Clone breakpopint according to its type.
1171 * mem-break.h (struct gdb_breakpoint): Declare.
1172 (set_gdb_breakpoint): Update declaration.
1173 (clear_breakpoint_conditions_and_commands): Likewise.
1174 (add_breakpoint_condition): Likewise.
1175 (add_breakpoint_commands): Likewise.
1176 * server.c (process_point_options): Change parameter type to
1177 'struct gdb_breakpoint *'.
1178
1179 2016-07-21 Yao Qi <yao.qi@linaro.org>
1180
1181 * mem-break.c (set_breakpoint_at): Rename it to ...
1182 (set_breakpoint_type_at): ... it.
1183 (set_breakpoint_at): Call set_breakpoint_type_at.
1184 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1185 * mem-break.h (set_breakpoint_at): Update comments.
1186
1187 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1188
1189 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1190 to buf parameter.
1191 (nios2_store_gregset): Likewise.
1192
1193 2016-07-01 Pedro Alves <palves@redhat.com>
1194 Antoine Tremblay <antoine.tremblay@ericsson.com>
1195
1196 * linux-low.c: Change interface to take the target lwp_info
1197 pointer directly and return void. Handle detaching from a zombie
1198 thread.
1199 (linux_detach_lwp_callback): New function.
1200 (linux_detach): Detach from the leader thread after detaching from
1201 the clone threads.
1202
1203 2016-06-28 Yao Qi <yao.qi@linaro.org>
1204
1205 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1206 for variable new_offset.
1207 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1208 (aarch64_ftrace_insn_reloc_cb): Likewise.
1209 (aarch64_ftrace_insn_reloc_tb): Likewise.
1210 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1211 PRIx64 instead of PRIx32.
1212
1213 2016-06-28 Yao Qi <yao.qi@linaro.org>
1214
1215 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1216 (the_low_target): Install arm_get_syscall_trapinfo.
1217
1218 2016-06-28 Yao Qi <yao.qi@linaro.org>
1219
1220 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1221 function.
1222 (the_low_target): Install aarch64_get_syscall_trapinfo.
1223
1224 2016-06-28 Yao Qi <yao.qi@linaro.org>
1225
1226 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1227 Callers updated.
1228 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1229 Remove parameter sysno.
1230 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1231 sysret.
1232
1233 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1234
1235 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1236 (s390_emit_ne_goto): Likewise.
1237 (s390_emit_lt_goto): Likewise.
1238 (s390_emit_le_goto): Likewise.
1239 (s390_emit_gt_goto): Likewise.
1240 (s390_emit_ge_goto): Likewise.
1241 (s390x_emit_eq_goto): Likewise.
1242 (s390x_emit_ne_goto): Likewise.
1243 (s390x_emit_lt_goto): Likewise.
1244 (s390x_emit_le_goto): Likewise.
1245 (s390x_emit_gt_goto): Likewise.
1246 (s390x_emit_ge_goto): Likewise.
1247 (s390_emit_ops_impl): Mark variable static.
1248 (s390x_emit_ops): Likewise.
1249
1250 2016-06-17 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-low.c (handle_extended_wait): Call
1253 uninsert_reinsert_breakpoints for the parent process. Remove
1254 reinsert breakpoints from the child process. Reinsert them to
1255 the parent process when vfork is done.
1256 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1257 (reinsert_reinsert_breakpoints): New function.
1258 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1259 (reinsert_reinsert_breakpoints): Declare.
1260
1261 2016-06-17 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-low.c (handle_extended_wait): If the parent is doing
1264 step-over, remove the reinsert breakpoints from the forked child.
1265
1266 2016-06-17 Yao Qi <yao.qi@linaro.org>
1267
1268 * linux-low.c (unsuspend_all_lwps): Declare.
1269 (linux_low_filter_event): If thread exited, call finish_step_over.
1270 If step-over is finished, unsuspend other threads.
1271
1272 2016-06-17 Yao Qi <yao.qi@linaro.org>
1273
1274 * linux-low.c (linux_resume_one_lwp_throw): Assert
1275 has_reinsert_breakpoints returns false.
1276 * mem-break.c (delete_disabled_breakpoints): Assert
1277 bp type isn't reinsert_breakpoint.
1278
1279 2016-06-17 Yao Qi <yao.qi@linaro.org>
1280
1281 * linux-low.c (maybe_hw_step): New function.
1282 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1283 (finish_step_over): Switch current_thread to lwp temporarily,
1284 and assert has_reinsert_breakpoints returns true.
1285 (proceed_one_lwp): Call maybe_hw_step.
1286 * mem-break.c (has_reinsert_breakpoints): New function.
1287 * mem-break.h (has_reinsert_breakpoints): Declare.
1288
1289 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1290
1291 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1292
1293 2016-05-17 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1296 instead of find_inferior.
1297
1298 2016-05-05 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1301 Initialize res to zero.
1302
1303 2016-05-05 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1306 to uint32_t.
1307
1308 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1309
1310 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1311 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1312 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1313
1314 2016-04-28 Par Olsson <par.olsson@windriver.com>
1315 Simon Marchi <simon.marchi@ericsson.com>
1316
1317 * tracepoint.c (write_inferior_int8): New function.
1318 (cmd_qtenable_disable): Write enable flag using
1319 write_inferior_int8.
1320
1321 2016-04-25 Yao Qi <yao.qi@linaro.org>
1322
1323 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1324 (need_step_over_p): Return zero if the LWP has pending signals
1325 can be delivered on software single step target.
1326
1327 2016-04-25 Yao Qi <yao.qi@linaro.org>
1328
1329 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1330 return instead of error.
1331
1332 2016-04-22 Yao Qi <yao.qi@linaro.org>
1333
1334 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1335 to 23.
1336
1337 2016-04-22 Yao Qi <yao.qi@linaro.org>
1338
1339 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1340 signal when stepping over breakpoint with software single
1341 step.
1342
1343 2016-04-21 Pedro Alves <palves@redhat.com>
1344
1345 * linux-s390-low.c (s390_collect_ptrace_register)
1346 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1347 add casts.
1348 (s390_check_regset): Use void * instead of gdb_byte *.
1349
1350 2016-04-20 Pedro Alves <palves@redhat.com>
1351
1352 * configure: Renegerate.
1353
1354 2016-04-20 Yao Qi <yao.qi@linaro.org>
1355
1356 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1357 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1358 number 16.
1359 (arm_store_gregset): Likewise.
1360
1361 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1362
1363 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1364 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1365 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1366 (amd64-avx-mpx-linux.c): New rules.
1367 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1368 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1369 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1370 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1371 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1372 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1373 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1374 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1375 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1376 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1377 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1378 * linux-x86-low.c (x86_linux_read_description): Add case for
1379 X86_XSTATE_AVX_MPX_MASK.
1380 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1381 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1382 init_registers_i386_avx_mpx_linux.
1383 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1384 (initialize_low_tracepoint): Call
1385 init_registers_i386_avx_mpx_linux.
1386 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1387 (initialize_low_tracepoint): Call
1388 init_registers_amd64_avx_mpx_linux.
1389 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1390 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1391 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1392 declarations.
1393
1394 2016-04-18 Pedro Alves <palves@redhat.com>
1395
1396 * configure: Regenerate.
1397
1398 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1399
1400 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1401 (aarch64_emit_sub): Likewise.
1402
1403 2016-04-12 Pedro Alves <palves@redhat.com>
1404
1405 * utils.c (prepare_to_throw_exception): Delete.
1406
1407 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1410
1411 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1412
1413 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1414
1415 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1416
1417 * linux-aarch64-ipa.c: Add <elf.h> include.
1418 * linux-ppc-ipa.c: Add <elf.h> include.
1419 * linux-s390-ipa.c: Add <elf.h> include.
1420
1421 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1422
1423 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1424 (get_raw_reg_ptr): Likewise.
1425 (get_trace_state_variable_value_ptr): Likewise.
1426 (set_trace_state_variable_value_ptr): Likewise.
1427 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1428 char *.
1429
1430 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1431 Marcin Kościelnicki <koriakin@0x04.net>
1432
1433 PR/17221
1434 * linux-ppc-low.c (emit_insns): New function.
1435 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1436 (ppc_emit_prologue): New function.
1437 (ppc_emit_epilogue): New function.
1438 (ppc_emit_add): New function.
1439 (ppc_emit_sub): New function.
1440 (ppc_emit_mul): New function.
1441 (ppc_emit_lsh): New function.
1442 (ppc_emit_rsh_signed): New function.
1443 (ppc_emit_rsh_unsigned): New function.
1444 (ppc_emit_ext): New function.
1445 (ppc_emit_zero_ext): New function.
1446 (ppc_emit_log_not): New function.
1447 (ppc_emit_bit_and): New function.
1448 (ppc_emit_bit_or): New function.
1449 (ppc_emit_bit_xor): New function.
1450 (ppc_emit_bit_not): New function.
1451 (ppc_emit_equal): New function.
1452 (ppc_emit_less_signed): New function.
1453 (ppc_emit_less_unsigned): New function.
1454 (ppc_emit_ref): New function.
1455 (ppc_emit_const): New function.
1456 (ppc_emit_reg): New function.
1457 (ppc_emit_pop): New function.
1458 (ppc_emit_stack_flush): New function.
1459 (ppc_emit_swap): New function.
1460 (ppc_emit_stack_adjust): New function.
1461 (ppc_emit_call): New function.
1462 (ppc_emit_int_call_1): New function.
1463 (ppc_emit_void_call_2): New function.
1464 (ppc_emit_if_goto): New function.
1465 (ppc_emit_goto): New function.
1466 (ppc_emit_eq_goto): New function.
1467 (ppc_emit_ne_goto): New function.
1468 (ppc_emit_lt_goto): New function.
1469 (ppc_emit_le_goto): New function.
1470 (ppc_emit_gt_goto): New function.
1471 (ppc_emit_ge_goto): New function.
1472 (ppc_write_goto_address): New function.
1473 (ppc_emit_ops_impl): New static variable.
1474 (ppc64v1_emit_prologue): New function.
1475 (ppc64v2_emit_prologue): New function.
1476 (ppc64_emit_epilogue): New function.
1477 (ppc64_emit_add): New function.
1478 (ppc64_emit_sub): New function.
1479 (ppc64_emit_mul): New function.
1480 (ppc64_emit_lsh): New function.
1481 (ppc64_emit_rsh_signed): New function.
1482 (ppc64_emit_rsh_unsigned): New function.
1483 (ppc64_emit_ext): New function.
1484 (ppc64_emit_zero_ext): New function.
1485 (ppc64_emit_log_not): New function.
1486 (ppc64_emit_bit_and): New function.
1487 (ppc64_emit_bit_or): New function.
1488 (ppc64_emit_bit_xor): New function.
1489 (ppc64_emit_bit_not): New function.
1490 (ppc64_emit_equal): New function.
1491 (ppc64_emit_less_signed): New function.
1492 (ppc64_emit_less_unsigned): New function.
1493 (ppc64_emit_ref): New function.
1494 (ppc64_emit_const): New function.
1495 (ppc64v1_emit_reg): New function.
1496 (ppc64v2_emit_reg): New function.
1497 (ppc64_emit_pop): New function.
1498 (ppc64_emit_stack_flush): New function.
1499 (ppc64_emit_swap): New function.
1500 (ppc64v1_emit_call): New function.
1501 (ppc64v2_emit_call): New function.
1502 (ppc64v1_emit_int_call_1): New function.
1503 (ppc64v2_emit_int_call_1): New function.
1504 (ppc64v1_emit_void_call_2): New function.
1505 (ppc64v2_emit_void_call_2): New function.
1506 (ppc64_emit_if_goto): New function.
1507 (ppc64_emit_eq_goto): New function.
1508 (ppc64_emit_ne_goto): New function.
1509 (ppc64_emit_lt_goto): New function.
1510 (ppc64_emit_le_goto): New function.
1511 (ppc64_emit_gt_goto): New function.
1512 (ppc64_emit_ge_goto): New function.
1513 (ppc64v1_emit_ops_impl): New static variable.
1514 (ppc64v2_emit_ops_impl): New static variable.
1515 (ppc_emit_ops): New function.
1516 (linux_low_target): Wire in ppc_emit_ops.
1517
1518 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1519 Marcin Kościelnicki <koriakin@0x04.net>
1520
1521 PR/17221
1522 * Makefile.in: Add powerpc-*-ipa.o
1523 * configure.srv: Add ipa_obj for powerpc*-linux.
1524 * linux-ppc-ipa.c: New file.
1525 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1526 includes.
1527 (PPC_FIELD): New macro.
1528 (PPC_SEXT): New macro.
1529 (PPC_OP6): New macro.
1530 (PPC_BO): New macro.
1531 (PPC_LI): New macro.
1532 (PPC_BD): New macro.
1533 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1534 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1535 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1536 (ppc_get_thread_area): New function.
1537 (is_elfv2_inferior): New function.
1538 (gen_ds_form): New function.
1539 (GEN_STD): New macro.
1540 (GEN_STDU): New macro.
1541 (GEN_LD): New macro.
1542 (GEN_LDU): New macro.
1543 (gen_d_form): New function.
1544 (GEN_ADDI): New macro.
1545 (GEN_ADDIS): New macro.
1546 (GEN_LI): New macro.
1547 (GEN_LIS): New macro.
1548 (GEN_ORI): New macro.
1549 (GEN_ORIS): New macro.
1550 (GEN_LWZ): New macro.
1551 (GEN_STW): New macro.
1552 (GEN_STWU): New macro.
1553 (gen_xfx_form): New function.
1554 (GEN_MFSPR): New macro.
1555 (GEN_MTSPR): New macro.
1556 (GEN_MFCR): New macro.
1557 (GEN_MTCR): New macro.
1558 (GEN_SYNC): New macro.
1559 (GEN_LWSYNC): New macro.
1560 (gen_x_form): New function.
1561 (GEN_OR): New macro.
1562 (GEN_MR): New macro.
1563 (GEN_LWARX): New macro.
1564 (GEN_STWCX): New macro.
1565 (GEN_CMPW): New macro.
1566 (gen_md_form): New function.
1567 (GEN_RLDICL): New macro.
1568 (GEN_RLDICR): New macro.
1569 (gen_i_form): New function.
1570 (GEN_B): New macro.
1571 (GEN_BL): New macro.
1572 (gen_b_form): New function.
1573 (GEN_BNE): New macro.
1574 (GEN_LOAD): New macro.
1575 (GEN_STORE): New macro.
1576 (gen_limm): New function.
1577 (gen_atomic_xchg): New function.
1578 (gen_call): New function.
1579 (ppc_relocate_instruction): New function.
1580 (ppc_install_fast_tracepoint_jump_pad): New function.
1581 (ppc_get_min_fast_tracepoint_insn_len): New function.
1582 (ppc_get_ipa_tdesc_idx): New function.
1583 (the_low_target): Wire in the new functions.
1584 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1585 tdescs.
1586 * linux-ppc-tdesc.h: New file.
1587
1588 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1589
1590 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1591 (alloc_jump_pad_buffer): New function.
1592 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1593 (alloc_jump_pad_buffer): New function.
1594 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1595 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1596 (alloc_jump_pad_buffer): New function.
1597 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1598 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1599 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1600 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1601
1602 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1603
1604 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1605 * linux-amd64-ipa.c: Likewise.
1606 * linux-i386-ipa.c: Likewise.
1607 * linux-s390-ipa.c: Likewise.
1608 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1609 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1610 set_trace_state_variable_value_ptr.
1611 (struct ipa_sym_addresses): Likewise.
1612 (symbol_list): Likewise.
1613 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1614 accessing gdb_collect directly.
1615 (gdb_collect_ptr_type): New typedef.
1616 (get_raw_reg_ptr_type): New typedef.
1617 (get_trace_state_variable_value_ptr_type): New typedef.
1618 (set_trace_state_variable_value_ptr_type): New typedef.
1619 (gdb_collect_ptr): New global.
1620 (get_raw_reg_ptr): New global.
1621 (get_trace_state_variable_value_ptr): New global.
1622 (set_trace_state_variable_value_ptr): New global.
1623 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1624 accessing get_raw_reg directly.
1625 (get_get_tsv_func_addr): Likewise for
1626 get_trace_state_variable_value_ptr.
1627 (get_set_tsv_func_addr): Likewise for
1628 set_trace_state_variable_value_ptr.
1629 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1630
1631 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1634
1635 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1636
1637 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1638 packets.
1639 (relocate_instruction): Remove own_buf.
1640 * server.c (own_buf): Make global.
1641 (handle_v_requests): Make global.
1642 * server.h (own_buf): New declaration.
1643 (handle_v_requests): New prototype.
1644
1645 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1646
1647 PR 18377
1648 * linux-s390-low.c (add_insns): New function.
1649 (s390_emit_prologue): New function.
1650 (s390_emit_epilogue): New function.
1651 (s390_emit_add): New function.
1652 (s390_emit_sub): New function.
1653 (s390_emit_mul): New function.
1654 (s390_emit_lsh): New function.
1655 (s390_emit_rsh_signed): New function.
1656 (s390_emit_rsh_unsigned): New function.
1657 (s390_emit_ext): New function.
1658 (s390_emit_log_not): New function.
1659 (s390_emit_bit_and): New function.
1660 (s390_emit_bit_or): New function.
1661 (s390_emit_bit_xor): New function.
1662 (s390_emit_bit_not): New function.
1663 (s390_emit_equal): New function.
1664 (s390_emit_less_signed): New function.
1665 (s390_emit_less_unsigned): New function.
1666 (s390_emit_ref): New function.
1667 (s390_emit_if_goto): New function.
1668 (s390_emit_goto): New function.
1669 (s390_write_goto_address): New function.
1670 (s390_emit_litpool): New function.
1671 (s390_emit_const): New function.
1672 (s390_emit_call): New function.
1673 (s390_emit_reg): New function.
1674 (s390_emit_pop): New function.
1675 (s390_emit_stack_flush): New function.
1676 (s390_emit_zero_ext): New function.
1677 (s390_emit_swap): New function.
1678 (s390_emit_stack_adjust): New function.
1679 (s390_emit_set_r2): New function.
1680 (s390_emit_int_call_1): New function.
1681 (s390_emit_void_call_2): New function.
1682 (s390_emit_eq_goto): New function.
1683 (s390_emit_ne_goto): New function.
1684 (s390_emit_lt_goto): New function.
1685 (s390_emit_le_goto): New function.
1686 (s390_emit_gt_goto): New function.
1687 (s390_emit_ge_goto): New function.
1688 (s390x_emit_prologue): New function.
1689 (s390x_emit_epilogue): New function.
1690 (s390x_emit_add): New function.
1691 (s390x_emit_sub): New function.
1692 (s390x_emit_mul): New function.
1693 (s390x_emit_lsh): New function.
1694 (s390x_emit_rsh_signed): New function.
1695 (s390x_emit_rsh_unsigned): New function.
1696 (s390x_emit_ext): New function.
1697 (s390x_emit_log_not): New function.
1698 (s390x_emit_bit_and): New function.
1699 (s390x_emit_bit_or): New function.
1700 (s390x_emit_bit_xor): New function.
1701 (s390x_emit_bit_not): New function.
1702 (s390x_emit_equal): New function.
1703 (s390x_emit_less_signed): New function.
1704 (s390x_emit_less_unsigned): New function.
1705 (s390x_emit_ref): New function.
1706 (s390x_emit_if_goto): New function.
1707 (s390x_emit_const): New function.
1708 (s390x_emit_call): New function.
1709 (s390x_emit_reg): New function.
1710 (s390x_emit_pop): New function.
1711 (s390x_emit_stack_flush): New function.
1712 (s390x_emit_zero_ext): New function.
1713 (s390x_emit_swap): New function.
1714 (s390x_emit_stack_adjust): New function.
1715 (s390x_emit_int_call_1): New function.
1716 (s390x_emit_void_call_2): New function.
1717 (s390x_emit_eq_goto): New function.
1718 (s390x_emit_ne_goto): New function.
1719 (s390x_emit_lt_goto): New function.
1720 (s390x_emit_le_goto): New function.
1721 (s390x_emit_gt_goto): New function.
1722 (s390x_emit_ge_goto): New function.
1723 (s390_emit_ops): New function.
1724 (struct linux_target_ops): Fill in emit_ops hook.
1725
1726 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1727
1728 PR 18377
1729 * Makefile.in: Add s390 IPA files.
1730 * configure.srv: Build IPA for s390.
1731 * linux-s390-ipa.c: New file.
1732 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1733 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1734 (tdesc_s390_linux32): Likewise.
1735 (init_registers_s390_linux32v1): Likewise.
1736 (tdesc_s390_linux32v1): Likewise.
1737 (init_registers_s390_linux32v2): Likewise.
1738 (tdesc_s390_linux32v2): Likewise.
1739 (init_registers_s390_linux64): Likewise.
1740 (tdesc_s390_linux64): Likewise.
1741 (init_registers_s390_linux64v1): Likewise.
1742 (tdesc_s390_linux64v1): Likewise.
1743 (init_registers_s390_linux64v2): Likewise.
1744 (tdesc_s390_linux64v2): Likewise.
1745 (init_registers_s390_te_linux64): Likewise.
1746 (tdesc_s390_te_linux64): Likewise.
1747 (init_registers_s390_vx_linux64): Likewise.
1748 (tdesc_s390_vx_linux64): Likewise.
1749 (init_registers_s390_tevx_linux64): Likewise.
1750 (tdesc_s390_tevx_linux64): Likewise.
1751 (init_registers_s390x_linux64): Likewise.
1752 (tdesc_s390x_linux64): Likewise.
1753 (init_registers_s390x_linux64v1): Likewise.
1754 (tdesc_s390x_linux64v1): Likewise.
1755 (init_registers_s390x_linux64v2): Likewise.
1756 (tdesc_s390x_linux64v2): Likewise.
1757 (init_registers_s390x_te_linux64): Likewise.
1758 (tdesc_s390x_te_linux64): Likewise.
1759 (init_registers_s390x_vx_linux64): Likewise.
1760 (tdesc_s390x_vx_linux64): Likewise.
1761 (init_registers_s390x_tevx_linux64): Likewise.
1762 (tdesc_s390x_tevx_linux64): Likewise.
1763 (have_hwcap_s390_vx): New static variable.
1764 (s390_arch_setup): Fill have_hwcap_s390_vx.
1765 (s390_get_thread_area): New function.
1766 (s390_ft_entry_gpr_esa): New const.
1767 (s390_ft_entry_gpr_zarch): New const.
1768 (s390_ft_entry_misc): New const.
1769 (s390_ft_entry_fr): New const.
1770 (s390_ft_entry_vr): New const.
1771 (s390_ft_main_31): New const.
1772 (s390_ft_main_64): New const.
1773 (s390_ft_exit_fr): New const.
1774 (s390_ft_exit_vr): New const.
1775 (s390_ft_exit_misc): New const.
1776 (s390_ft_exit_gpr_esa): New const.
1777 (s390_ft_exit_gpr_zarch): New const.
1778 (append_insns): New function.
1779 (s390_relocate_instruction): New function.
1780 (s390_install_fast_tracepoint_jump_pad): New function.
1781 (s390_get_min_fast_tracepoint_insn_len): New function.
1782 (s390_get_ipa_tdesc_idx): New function.
1783 (struct linux_target_ops): Wire in the above functions.
1784 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1785 * linux-s390-tdesc.h: New file.
1786
1787 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1788
1789 * linux-s390-low.c (s390_supports_tracepoints): New function.
1790 (struct linux_target_ops): Fill supports_tracepoints hook.
1791
1792 2016-03-18 Yao Qi <yao.qi@linaro.org>
1793
1794 * linux-low.c (lwp_signal_can_be_delivered): New function.
1795 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1796
1797 2016-03-18 Yao Qi <yao.qi@linaro.org>
1798
1799 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1800 0 if signal is enqueued. Remove 'signal' from one debugging
1801 message. Move one debugging message to some lines below.
1802 Remove code setting 'signal' to 0.
1803
1804 2016-03-18 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-low.c (linux_low_filter_event): Remove redundant
1807 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1808
1809 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1810
1811 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1812 (struct linux_target_ops): Wire in the above.
1813
1814 2016-03-03 Yao Qi <yao.qi@linaro.org>
1815
1816 * linux-low.c: Update comments to start_step_over.
1817
1818 2016-03-03 Yao Qi <yao.qi@linaro.org>
1819
1820 PR server/19736
1821 * linux-low.c (handle_extended_wait): Set child suspended
1822 if event_lwp->bp_reinsert isn't zero.
1823
1824 2016-03-02 Yao Qi <yao.qi@linaro.org>
1825
1826 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1827 enqueue_pending_signal.
1828
1829 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1830
1831 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1832 is actually loaded.
1833
1834 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1835
1836 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1837 (s390_regmap_3264) [!__s390x__]: New global.
1838 (s390_collect_ptrace_register): Skip map entries containing -1.
1839 (s390_supply_ptrace_register): Ditto.
1840 (s390_fill_gprs_high): New function.
1841 (s390_store_gprs_high): New function.
1842 (s390_regsets): Add NT_S390_HIGH_GPRS.
1843 (s390_get_hwcap): Enable on 31-bit.
1844 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1845 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1846 Detect NT_S390_HIGH_GPRS.
1847 (s390_usrregs_info_3264): Enable on 31-bit.
1848 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1849 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1850
1851 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1852
1853 PR gdb/13808
1854 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1855 * configure.srv: Ditto.
1856 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1857 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1858 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1859 (init_registers_amd64_linux): Remove prototype.
1860 (tdesc_amd64_linux): Remove declaration.
1861 (get_ipa_tdesc): New function.
1862 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1863 initialize remaining tdescs.
1864 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1865 (init_registers_i386_linux): Remove prototype.
1866 (tdesc_i386_linux): Remove declaration.
1867 (get_ipa_tdesc): New function.
1868 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1869 initialize remaining tdescs.
1870 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1871 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1872 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1873 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1874 (x86_get_ipa_tdesc_idx): New function.
1875 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1876 * linux-x86-tdesc.h: New file.
1877 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1878 (target_get_ipa_tdesc_idx): New macro.
1879 * tracepoint.c (ipa_tdesc_idx): New macro.
1880 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1881 (symbol_list): Add ipa_tdesc_idx.
1882 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1883 (ipa_tdesc): Remove.
1884 (ipa_tdesc_idx): New variable.
1885 (get_context_regcache): Use get_ipa_tdesc.
1886 (gdb_collect): Ditto.
1887 (gdb_probe): Ditto.
1888 * tracepoint.h (get_ipa_tdesc): New prototype.
1889 (ipa_tdesc): Remove.
1890
1891 2016-02-24 Pedro Alves <palves@redhat.com>
1892
1893 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1894 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1895 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1896 Factor out common code between the USE_SIGTRAP_SIGINFO and
1897 !USE_SIGTRAP_SIGINFO blocks.
1898 (linux_low_filter_event): Call save_stop_reason instead of
1899 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1900 Update comments.
1901 (linux_wait_1): Update comments.
1902
1903 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1904
1905 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1906 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1907 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1908 ppc_insert_point, ppc_remove_point.
1909
1910 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1911
1912 * linux-s390-low.c (s390_supports_z_point_type): New function.
1913 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1914
1915 2016-02-16 Yao Qi <yao.qi@linaro.org>
1916
1917 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1918 PC. Get pc from regcache_read_pc.
1919
1920 2016-02-12 Yao Qi <yao.qi@linaro.org>
1921
1922 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1923 or linux_get_pc_32bit.
1924 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1925
1926 2016-02-12 Yao Qi <yao.qi@linaro.org>
1927
1928 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1929 arm_linux_get_next_pcs_fixup.
1930
1931 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1932
1933 * tracepoint.c (x_tracepoint_action_download): Change
1934 write_inferior_data_ptr to write_inferior_data_pointer.
1935 (cmd_qtstart): Likewise.
1936 (write_inferior_data_ptr): Remove.
1937 (download_agent_expr): Change write_inferior_data_ptr to
1938 write_inferior_data_pointer.
1939 (download_tracepoint_1): Likewise.
1940 (download_tracepoint): Likewise.
1941 (download_trace_state_variables): Likewise.
1942
1943 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1944 Marcin Kościelnicki <koriakin@0x04.net>
1945
1946 * tracepoint.c (struct tracepoint_action_ops): Remove.
1947 (struct tracepoint_action): Remove ops.
1948 (m_tracepoint_action_download, r_tracepoint_action_download)
1949 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1950 size and offset accordingly.
1951 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1952 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1953 (tracepoint_action_send, tracepoint_action_download): New functions.
1954 Helpers for trace action handlers.
1955 (add_tracepoint_action): Remove setup actions ops.
1956 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1957
1958 2016-02-10 Yao Qi <yao.qi@linaro.org>
1959
1960 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1961
1962 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1963
1964 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1965 to AC_OUTPUT.
1966 * configure: Regenerate.
1967
1968 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1969
1970 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1971 void * to gdb_byte *.
1972 * linux-low.c (siginfo_fixup): Likewise.
1973 (linux_xfer_siginfo): Likewise.
1974 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1975 Likewise.
1976 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1977
1978 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1979
1980 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1981 to srv_tgtobj.
1982 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1983 to srv_tgtobj.
1984 * linux-x86-low.c [__x86_64__]: Include
1985 "nat/amd64-linux-siginfo.h".
1986 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1987 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1988 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1989 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1990 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1991 (cpt_si_fd, si_timerid, si_overrun): Move from
1992 nat/amd64-linux-siginfo.c.
1993 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1994
1995 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1996
1997 * server.c (skip_to_semicolon): Remove.
1998 (process_point_options): Use strchrnul instead of
1999 skip_to_semicolon.
2000
2001 2016-01-26 Yao Qi <yao.qi@linaro.org>
2002
2003 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2004 * linux-low.c (install_software_single_step_breakpoints): Don't
2005 call regcache_read_pc.
2006 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2007 argument pc.
2008
2009 2016-01-26 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-low.c (install_software_single_step_breakpoints): Call
2012 regcache_read_pc instead of get_pc.
2013
2014 2016-01-26 Yao Qi <yao.qi@linaro.org>
2015
2016 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2017 (unblock_async_io): Rename to ...
2018 (block_unblock_async_io): ... it. New function.
2019 (enable_async_io): Don't install SIGIO handler. Unblock it
2020 instead.
2021 (disable_async_io): Don't ignore SIGIO. Block it instead.
2022 (initialize_async_io): Install SIGIO handler. Don't call
2023 unblock_async_io.
2024
2025 2016-01-26 Yao Qi <yao.qi@linaro.org>
2026
2027 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2028 first character is '\003', call *the_target->request_interrupt.
2029
2030 2016-01-25 Yao Qi <yao.qi@linaro.org>
2031
2032 * remote-utils.c (new_thread_notify): Remove.
2033 (dead_thread_notify): Likewise.
2034 * remote-utils.h (new_thread_notify): Remove declaration.
2035 (dead_thread_notify): Likewise.
2036
2037 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2038
2039 * gdb.trace/pending.exp: Fix expected message on continue.
2040
2041 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2042
2043 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2044 it works properly on big-endian machines where sizeof (CORE_ADDR)
2045 != sizeof (void *).
2046
2047 2016-01-21 Pedro Alves <palves@redhat.com>
2048
2049 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2050 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2051 * configure: Regenerate.
2052
2053 2016-01-21 Yao Qi <yao.qi@linaro.org>
2054
2055 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2056 is_thumb and set it according to CPSR saved on the stack.
2057 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2058 arm_sigreturn_next_pc.
2059
2060 2016-01-18 Yao Qi <yao.qi@linaro.org>
2061
2062 * linux-low.c (linux_set_pc_64bit): New function.
2063 (linux_get_pc_64bit): New function.
2064 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2065 Declare.
2066 * linux-sparc-low.c (debug_threads): Remove declaration.
2067 (sparc_get_pc): Remove.
2068 (the_low_target): Use linux_get_pc_64bit instead of
2069 sparc_get_pc.
2070 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2071 (the_low_target): Use linux_get_pc_64bit and
2072 linux_set_pc_64bit.
2073
2074 2016-01-18 Yao Qi <yao.qi@linaro.org>
2075
2076 * linux-arm-low.c (debug_threads): Remove declaration.
2077 (arm_get_pc, arm_set_pc): Remove.
2078 (the_low_target): Use linux_get_pc_32bit and
2079 linux_set_pc_32bit.
2080 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2081 (the_low_target): Use linux_get_pc_32bit and
2082 linux_set_pc_32bit.
2083 * linux-cris-low.c (debug_threads): Remove declaration.
2084 (cris_get_pc, cris_set_pc,): Remove.
2085 (the_low_target): Use linux_get_pc_32bit and
2086 linux_set_pc_32bit.
2087 * linux-crisv32-low.c (debug_threads): Remove declaration.
2088 (cris_get_pc, cris_set_pc): Remove.
2089 (the_low_target): Use linux_get_pc_32bit and
2090 linux_set_pc_32bit.
2091 * linux-low.c: Include inttypes.h.
2092 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2093 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2094 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2095 (the_low_target): Use linux_get_pc_32bit and
2096 linux_set_pc_32bit.
2097 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2098 (the_low_target): Use linux_get_pc_32bit and
2099 linux_set_pc_32bit.
2100 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2101 (the_low_target): Use linux_get_pc_32bit and
2102 linux_set_pc_32bit.
2103 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2104 (the_low_target): Use linux_get_pc_32bit and
2105 linux_set_pc_32bit.
2106 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2107 (the_low_target): Use linux_get_pc_32bit and
2108 linux_set_pc_32bit.
2109
2110 2016-01-18 Gary Benson <gbenson@redhat.com>
2111
2112 * configure.ac (AC_FUNC_FORK): New check.
2113 * config.in: Regenerate.
2114 * configure: Likewise.
2115
2116 2016-01-14 Yao Qi <yao.qi@linaro.org>
2117
2118 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2119 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2120 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2121 arm_get_next_pcs_ctor.
2122
2123 2016-01-12 Josh Stone <jistone@redhat.com>
2124 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2125
2126 * inferiors.h: Include "gdb_vecs.h".
2127 (struct process_info): Add syscalls_to_catch.
2128 * inferiors.c (remove_process): Free syscalls_to_catch.
2129 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2130 syscall_return stops.
2131 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2132 * server.c (handle_general_set): Handle QCatchSyscalls.
2133 (handle_query): Report support for QCatchSyscalls.
2134 * target.h (struct target_ops): Add supports_catch_syscall.
2135 (target_supports_catch_syscall): New macro.
2136 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2137 (struct lwp_info): Add syscall_state.
2138 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2139 Maintain syscall_state and syscalls_to_catch across exec.
2140 (get_syscall_trapinfo): New function, proxy to the_low_target.
2141 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2142 (linux_low_filter_event): Toggle syscall_state entry/return for
2143 syscall traps, and set it ignored for all others.
2144 (gdb_catching_syscalls_p): New function.
2145 (gdb_catch_this_syscall_p): New function.
2146 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2147 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2148 (linux_supports_catch_syscall): New function.
2149 (linux_target_ops): Install it.
2150 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2151 (the_low_target): Install it.
2152
2153 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2154
2155 * acinclude.m4: Include new ../warning.m4 file.
2156 * configure: Regenerated.
2157 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2158
2159 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2160
2161 * ax.c (is_goto_target): Mark static.
2162 * linux-low.c (register_addr): Likewise.
2163 (linux_fetch_registers, linux_store_registers): Likewise.
2164 * mem-break.c (any_persistent_commands): Fix old prototype.
2165 (add_commands_to_breakpoint): Mark static.
2166 * regcache.c (find_register_by_name): Delete unused func.
2167 * remote-utils.c (hex_or_minus_one): Mark static.
2168 * server.c (monitor_show_help): Mark static.
2169 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2170 handle_v_requests): Likewise.
2171
2172 2016-01-12 Pedro Alves <palves@redhat.com>
2173
2174 Remove use of the registered trademark symbol throughout.
2175
2176 2016-01-08 Yao Qi <yao.qi@linaro.org>
2177
2178 * remote-utils.c (getpkt): If c is '\003', call target hook
2179 request_interrupt.
2180
2181 2016-01-06 Yao Qi <yao.qi@linaro.org>
2182
2183 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2184 linux-aarch32-low.c.
2185 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2186 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2187 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2188 (thumb2_breakpoint): Declare.
2189 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2190 linux-aarch32-low.h.
2191 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2192 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2193 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2194
2195 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2196
2197 * gdbreplay.c (gdbreplay_version): Change copyright year in
2198 version message.
2199 * server.c (gdbserver_version): Likewise.
2200
2201 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2202
2203 * server.c (crc32_table): Delete.
2204 (crc32): Use libiberty's xcrc32 function.
2205
2206 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2207
2208 * lynx-low.c (lynx_delete_thread_callback): New function.
2209 (lynx_mourn): Properly delete our process and all of its
2210 threads. Remove call to clear_inferiors.
2211
2212 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2213
2214 * target.c (thread_search_callback): Add check that
2215 the thread_stopped target callback is not NULL before
2216 calling it.
2217
2218 2015-12-21 Yao Qi <yao.qi@linaro.org>
2219
2220 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2221 arm breakpoint.
2222
2223 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2224
2225 * server.c (handle_query): Call target_supports_software_single_step.
2226
2227 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2228
2229 * linux-low.c (single_step): New function.
2230 (linux_resume_one_lwp_throw): Call single_step.
2231 (start_step_over): Likewise.
2232
2233 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2234
2235 * Makefile.in (SFILES): Append arch/arm-linux.c,
2236 arch/arm-get-next-pcs.c.
2237 (arm-linux.o): New rule.
2238 (arm-get-next-pcs.o): New rule.
2239 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2240 arm-linux.o.
2241 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2242 to linux-aarch32-low.c.
2243 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2244 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2245 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2246 (thumb2_breakpoint_len): Likewise.
2247 (arm_is_thumb_mode): Make non-static.
2248 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2249 from linux-aarch32-low.c.
2250 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2251 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2252 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2253 (thumb2_breakpoint_len): Likewise.
2254 (arm_is_thumb_mode): New declaration.
2255 * linux-arm-low.c: Include arch/arm-linux.h
2256 aarch/arm-get-next-pcs.h, sys/syscall.h.
2257 (get_next_pcs_ops): New struct.
2258 (get_next_pcs_addr_bits_remove): New function.
2259 (get_next_pcs_is_thumb): New function.
2260 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2261 (arm_sigreturn_next_pc): Likewise.
2262 (get_next_pcs_syscall_next_pc): Likewise.
2263 (arm_gdbserver_get_next_pcs): Likewise.
2264 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2265 Initialize.
2266 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2267 * server.h: Include gdb_vecs.h.
2268
2269 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2270
2271 * Makefile.in (SFILES): Append common/common-regcache.c.
2272 (OBS): Append common-regcache.o.
2273 (common-regcache.o): New rule.
2274 * regcache.c (init_register_cache): Initialize cache to
2275 REG_UNAVAILABLE.
2276 (regcache_raw_read_unsigned): New function.
2277 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2278 register_status enum.
2279
2280 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2281
2282 * linux-aarch64-low.c (the_low_targets): Rename
2283 breakpoint_reinsert_addr to get_next_pcs.
2284 * linux-arm-low.c (the_low_targets): Likewise.
2285 * linux-bfin-low.c (the_low_targets): Likewise.
2286 * linux-cris-low.c (the_low_targets): Likewise.
2287 * linux-crisv32-low.c (the_low_targets): Likewise.
2288 * linux-low.c (can_software_single_step): Likewise.
2289 (install_software_single_step_breakpoints): New function.
2290 (start_step_over): Use install_software_single_step_breakpoints.
2291 * linux-low.h: New CORE_ADDR vector.
2292 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2293 get_next_pcs.
2294 * linux-mips-low.c (the_low_targets): Likewise.
2295 * linux-nios2-low.c (the_low_targets): Likewise.
2296 * linux-sparc-low.c (the_low_targets): Likewise.
2297
2298 2015-12-17 Pedro Alves <palves@redhat.com>
2299
2300 * linux-low.c (linux_kill_one_lwp): Remove references to
2301 LinuxThreads.
2302 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2303 to 'kill'.
2304 (linux_init_signals): Delete.
2305 (initialize_low): Adjust.
2306 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2307
2308 2015-12-16 Pedro Alves <palves@redhat.com>
2309
2310 * configure.ac (compiler warning flags): When testing a
2311 -Wno-foo option, check whether -Wfoo works instead.
2312 * configure: Regenerate.
2313
2314 2015-12-11 Don Breazeal <donb@codesourcery.com>
2315
2316 * server.c (process_serial_event): Don't exit from gdbserver
2317 in remote mode if there are still active inferiors.
2318
2319 2015-12-11 Yao Qi <yao.qi@linaro.org>
2320
2321 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2322 arm_breakpoint_at if the process is 32-bit.
2323
2324 2015-12-11 Yao Qi <yao.qi@linaro.org>
2325
2326 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2327 arm breakpoint.
2328
2329 2015-12-07 Yao Qi <yao.qi@linaro.org>
2330
2331 * configure.srv: Append arm.o to srv_tgtobj for
2332 aarch64*-*-linux* target.
2333 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2334 from linux-arm-low.c.
2335 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2336 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2337 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2338 (thumb2_breakpoint_len): Likewise.
2339 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2340 (arm_breakpoint_kinds): Likewise.
2341 (arm_breakpoint_kind_from_pc): Likewise.
2342 (arm_sw_breakpoint_from_kind): Likewise.
2343 (arm_breakpoint_kind_from_current_state): Likewise.
2344 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2345 (arm_sw_breakpoint_from_kind): Declare.
2346 (arm_breakpoint_kind_from_current_state): Declare.
2347 (arm_breakpoint_at): Declare.
2348 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2349 arm_sw_breakpoint_from_kind if process is 32-bit.
2350 (aarch64_breakpoint_kind_from_pc): New function.
2351 (aarch64_breakpoint_kind_from_current_state): New function.
2352 (the_low_target): Initialize fields breakpoint_kind_from_pc
2353 and breakpoint_kind_from_current_state.
2354 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2355 linux-aarch32-low.c.
2356 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2357 (arm_breakpoint, arm_breakpoint_len): Likewise.
2358 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2359 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2360 (arm_is_thumb_mode): Likewise.
2361 (arm_breakpoint_at): Likewise.
2362 (arm_breakpoint_kind_from_pc): Likewise.
2363 (arm_sw_breakpoint_from_kind): Likewise.
2364 (arm_breakpoint_kind_from_current_state): Likewise.
2365
2366 Revert:
2367 2015-08-04 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2370 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2371 * server.c (extended_protocol): Remove "static".
2372 * server.h (extended_protocol): Declare it.
2373
2374 2015-12-04 Josh Stone <jistone@redhat.com>
2375
2376 * target.h (struct target_ops) <arch_setup>: Rename to ...
2377 (struct target_ops) <post_create_inferior>: ... this.
2378 (target_arch_setup): Rename to ...
2379 (target_post_create_inferior): ... this, calling post_create_inferior.
2380 * server.c (start_inferior): Update target_arch_setup calls to
2381 target_post_create_inferior.
2382 * linux-low.c (linux_low_ptrace_options): Forward declare.
2383 (linux_arch_setup): Update its comment for general use.
2384 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2385 (struct linux_target_ops): Use linux_post_create_inferior.
2386 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2387 to post_create_inferior.
2388 * nto-low.c (struct nto_target_ops): Likewise.
2389 * spu-low.c (struct spu_target_ops): Likewise.
2390 * win32-low.c (struct win32_target_ops): Likewise.
2391
2392 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2393
2394 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2395
2396 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2397
2398 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2399 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2400 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2402 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2403 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2404 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2405 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2406 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2408 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2410
2411 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2412
2413 * linux-low.c (linux_look_up_symbols): Don't call
2414 linux_supports_traceclone.
2415 * linux-low.h (thread_db_init): Remove use_events argument.
2416 * thread-db.c (thread_db_use_event): Remove global variable.
2417 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2418 (struct thread_db) <td_create_bp>: Remove field.
2419 (thread_db_create_event): Remove function.
2420 (thread_db_enable_reporting): Likewise.
2421 (find_one_thread): Don't check for thread_db_use_events.
2422 (attach_thread): Likewise.
2423 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2424 (try_thread_db_load_1): Don't check for thread_db_use_events.
2425 (thread_db_init): Remove use_events argument and thread events
2426 handling.
2427 (remove_thread_event_breakpoints): Remove function.
2428 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2429
2430 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2431
2432 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2433 New function.
2434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2435 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2436 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2437 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2438 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2439 Initialize.
2440 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2441 New function.
2442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2443 * linux-low.c (can_hardware_single_step): Use
2444 supports_hardware_single_step.
2445 (can_software_single_step): New function.
2446 (start_step_over): Call can_software_single_step.
2447 (linux_supports_hardware_single_step): New function.
2448 (struct target_ops) <supports_software_single_step>: Initialize.
2449 * linux-low.h (struct linux_target_ops)
2450 <supports_hardware_single_step>: Initialize.
2451 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2452 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2453 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2454 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2455 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2456 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2457 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2459 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2460 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2461 Initialize.
2462 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2463 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2464 Initialize.
2465 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2466 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2467 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2468 New function.
2469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2470 * target.h (struct target_ops): <supports_software_single_step>:
2471 New field.
2472 (target_supports_software_single_step): New macro.
2473
2474 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2475
2476 * linux-low.c (linux_wait_1): Fix pc advance condition.
2477 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2478 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2479
2480 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2481
2482 * linux-arm-low.c (arm_is_thumb_mode): New function.
2483 (arm_breakpoint_at): Use arm_is_thumb_mode.
2484 (arm_breakpoint_kind_from_current_state): New function.
2485 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2486 Initialize.
2487 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2488 (linux_breakpoint_kind_from_current_state): New function.
2489 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2490 * linux-low.h (struct linux_target_ops)
2491 <breakpoint_kind_from_current_state>: New field.
2492 * target.h (struct target_ops): Likewise.
2493 (target_breakpoint_kind_from_current_state): New macro.
2494
2495 2015-11-30 Pedro Alves <palves@redhat.com>
2496
2497 * linux-low.c (linux_resume): Wake up the event loop before
2498 returning.
2499
2500 2015-11-30 Pedro Alves <palves@redhat.com>
2501
2502 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2503 check.
2504 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2505 to -1.
2506 * target.c (struct thread_search): New structure.
2507 (thread_search_callback): New function.
2508 (prev_general_thread): New global.
2509 (prepare_to_access_memory, done_accessing_memory): New functions.
2510 * target.h (prepare_to_access_memory, done_accessing_memory):
2511 Replace macros with function declarations.
2512
2513 2015-11-30 Pedro Alves <palves@redhat.com>
2514
2515 PR 14618
2516 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2517 report TARGET_WAITKIND_NO_RESUMED.
2518 * remote-utils.c (prepare_resume_reply): Handle
2519 TARGET_WAITKIND_NO_RESUMED.
2520 * server.c (report_no_resumed): New global.
2521 (handle_query) <qSupported>: Handle "no-resumed+". Report
2522 "no-resumed+" support.
2523 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2524 return error if the client doesn't support no-resumed events.
2525 (push_stop_notification): New function.
2526 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2527 events if the client supports them.
2528
2529 2015-11-30 Pedro Alves <palves@redhat.com>
2530
2531 * linux-low.c (thread_still_has_status_pending_p): Don't check
2532 vCont;t here.
2533 (lwp_resumed): New function.
2534 (status_pending_p_callback): Return early if the LWP is not
2535 supposed to be resumed.
2536
2537 2015-11-30 Pedro Alves <palves@redhat.com>
2538
2539 * linux-low.c (handle_extended_wait): Assert that the LWP's
2540 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2541 thread create events, leave the new child's status pending.
2542 (linux_low_filter_event): If GDB wants to hear about thread exit
2543 events, leave the LWP marked dead and don't delete it.
2544 (linux_wait_for_event_filtered): Don't check for thread exit.
2545 (filter_exit_event): New function.
2546 (linux_wait_1): Use it, when returning an exit event.
2547 (linux_resume_one_lwp_throw): Assert that the LWP's
2548 waitstatus is TARGET_WAITKIND_IGNORE.
2549 * remote-utils.c (prepare_resume_reply): Handle
2550 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2551 * server.c (report_thread_events): New global.
2552 (handle_general_set): Handle QThreadEvents.
2553 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2554 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2555 TARGET_WAITKIND_THREAD_EXITED.
2556 * server.h (report_thread_events): Declare.
2557
2558 2015-11-30 Pedro Alves <palves@redhat.com>
2559
2560 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2561 the thread's last_resume_kind was resume_stop.
2562
2563 2015-11-30 Pedro Alves <palves@redhat.com>
2564
2565 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2566 before returning.
2567
2568 2015-11-30 Pedro Alves <palves@redhat.com>
2569
2570 * server.c (handle_v_requests): Handle vCtrlC.
2571
2572 2015-11-30 Pedro Alves <palves@redhat.com>
2573
2574 * gdbthread.h (find_any_thread_of_pid): Declare.
2575 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2576 functions.
2577 * server.c (handle_query): If current_thread is NULL, look for
2578 another thread of the selected process.
2579
2580 2015-11-26 Daniel Colascione <dancol@dancol.org>
2581 Simon Marchi <simon.marchi@ericsson.com>
2582
2583 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2584 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2585 name in reply.
2586 * target.h (struct target_ops) <thread_name>: New field.
2587 (target_thread_name): New macro.
2588
2589 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2590
2591 * regcache.h (regcache_invalidate_pid): Add declaration.
2592 * regcache.c (regcache_invalidate_pid): New function, extracted
2593 from regcache_invalidate.
2594 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2595 Add trivial documentation comment.
2596 * lynx-low.c: Use regcache_invalidate_pid instead of
2597 regcache_invalidate.
2598
2599 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2600
2601 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2602 and Elf64_auxv_t if the target is Android.
2603
2604 2015-11-22 Doug Evans <xdje42@gmail.com>
2605
2606 * target.h: #include <sys/types.h>.
2607
2608 2015-11-19 Pedro Alves <palves@redhat.com>
2609
2610 * linux-low.c (linux_process_qsupported): Change prototype.
2611 Adjust.
2612 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2613 Change prototype.
2614 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2615 and adjust to loop over all features.
2616 * server.c (handle_query) <qSupported>: Adjust to call
2617 target_process_qsupported once, passing it a vector of unprocessed
2618 features.
2619 * target.h (struct target_ops) <process_qsupported>: Change
2620 prototype.
2621 (target_process_qsupported): Adjust.
2622
2623 2015-11-19 Pedro Alves <palves@redhat.com>
2624
2625 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2626 mode.
2627 * configure: Regenerate.
2628
2629 2015-11-19 Pedro Alves <palves@redhat.com>
2630
2631 * configure: Regenerate.
2632
2633 2015-11-19 Yao Qi <yao.qi@linaro.org>
2634
2635 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2636 type to uint32_t.
2637
2638 2015-11-19 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2641 (struct aarch64_operand): Move enum out.
2642
2643 2015-11-19 Yao Qi <yao.qi@linaro.org>
2644
2645 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2646 struct user_fpsimd_state *.
2647 (aarch64_store_fpregset): Likewise.
2648
2649 2015-11-19 Yao Qi <yao.qi@linaro.org>
2650
2651 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2652 struct user_pt_regs *.
2653 (aarch64_store_gregset): Likewise.
2654
2655 2015-11-18 Pedro Alves <palves@redhat.com>
2656
2657 * Makefile.in (all_object_files): Add $IPA_OBJS.
2658
2659 2015-11-17 Pedro Alves <palves@redhat.com>
2660
2661 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2662 GDB_SIGNAL_0 and gdb_signal_to_string.
2663
2664 2015-11-17 Pedro Alves <palves@redhat.com>
2665
2666 * win32-low.c (handle_output_debug_string): Remove parameter.
2667 (win32_kill): Remove our_status local and adjust call to
2668 handle_output_debug_string.
2669 (get_child_debug_event): Adjust call to
2670 handle_output_debug_string.
2671
2672 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2673
2674 * linux-mips-low.c (mips_fill_gregset): Add cast.
2675 (mips_store_gregset): Likewise.
2676 (mips_fill_fpregset): Likewise.
2677 (mips_store_fpregset): Likewise.
2678
2679 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2680
2681 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2682 priv.
2683
2684 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2685
2686 * linux-mips-low.c (mips_linux_new_thread): Change type of
2687 watch_type to enum target_hw_bp_type.
2688
2689 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2690
2691 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2692 Change return type to arm_hwbp_type.
2693
2694 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2695
2696 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2697 (arm_store_gregset): Likewise.
2698 * linux-arm-low.c (arm_get_hwcap): Likewise.
2699 (arm_read_description): Likewise.
2700
2701 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2702
2703 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2704
2705 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2706
2707 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2708 (ppc_fill_vsxregset): Likewise.
2709 (ppc_store_vsxregset): Likewise.
2710 (ppc_fill_vrregset): Likewise.
2711 (ppc_store_vrregset): Likewise.
2712 (ppc_fill_evrregset): Likewise.
2713 (ppc_store_evrregset): Likewise.
2714
2715 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2716
2717 * linux-ppc-low.c (ppc_usrregs_info): Remove
2718 forward-declaration.
2719 (ppc_arch_setup): Move lower in file.
2720
2721 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2724 (ps_pdwrite): Likewise.
2725
2726 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2727
2728 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2729 to after assert checks.
2730
2731 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2732
2733 * proc-service.c (ps_pdread): Add/adjust casts.
2734 (ps_pdwrite): Add/adjust casts.
2735
2736 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2737
2738 * server.c (handle_search_memory_1): Cast return value of
2739 memmem.
2740
2741 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2742
2743 * server.c (write_qxfer_response): Change type of data to
2744 gdb_byte *.
2745
2746 2015-10-29 Pedro Alves <palves@redhat.com>
2747
2748 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2749
2750 2015-10-29 Pedro Alves <palves@redhat.com>
2751
2752 * tracepoint.c (clear_installed_tracepoints): Add casts.
2753
2754 2015-10-29 Pedro Alves <palves@redhat.com>
2755
2756 * server.c (handle_v_cont, process_serial_event): Add enum
2757 gdb_signal casts to signal parsing code.
2758
2759 2015-10-29 Pedro Alves <palves@redhat.com>
2760
2761 * linux-low.h (NULL_REGSET): Define.
2762 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2763 * linux-arm-low.c (arm_regsets): Likewise.
2764 * linux-crisv32-low.c (cris_regsets): Likewise.
2765 * linux-m68k-low.c (m68k_regsets): Likewise.
2766 * linux-mips-low.c (mips_regsets): Likewise.
2767 * linux-nios2-low.c (nios2_regsets): Likewise.
2768 * linux-ppc-low.c (ppc_regsets): Likewise.
2769 * linux-s390-low.c (s390_regsets): Likewise.
2770 * linux-sh-low.c (sh_regsets): Likewise.
2771 * linux-sparc-low.c (sparc_regsets): Likewise.
2772 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2773 * linux-tile-low.c (tile_regsets): Likewise.
2774 * linux-x86-low.c (x86_regsets): Likewise.
2775 * linux-xtensa-low.c (xtensa_regsets): Likewise.
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-26 Doug Evans <dje@google.com>
2796
2797 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2798
2799 2015-10-26 Doug Evans <dje@google.com>
2800
2801 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2802
2803 2015-10-26 Doug Evans <dje@google.com>
2804
2805 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2806 for debug_printf.
2807 (attach_thread, find_new_threads_callback): Ditto.
2808
2809 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2810
2811 * mem-break.h (set_breakpoint_data): Remove.
2812
2813 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2814
2815 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2816 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2817 (initialize_low): Remove set_breakpoint_data call.
2818 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2819 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2820 (initialize_low): Remove set_breakpoint_data call.
2821 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2822 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2823 (initialize_low): Remove set_breakpoint_data call.
2824
2825 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2826
2827 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2828 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2829 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2830 * target.h (target_breakpoint_kind_from_pc): New macro.
2831
2832 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2833
2834 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2835 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2836 the default breakpoint kind.
2837
2838 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2839
2840 * linux-arm-low.c (arm_supports_z_point_type): Add software
2841 breakpoint support.
2842
2843 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2844
2845 * linux-arm-low.c: Refactor breakpoint definitions.
2846 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2847 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2848
2849 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2850
2851 * Makefile.in: Add arm.c/o.
2852 * configure.srv: Likewise.
2853 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2854 (arm_breakpoint_kind_from_pc): New function.
2855 (arm_sw_breakpoint_from_kind): Return proper kind.
2856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2857
2858 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2859
2860 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2861 removal.
2862 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2863 (struct raw_breakpoint) <size>: Remove.
2864 (struct raw_breakpoint) <kind>: Add.
2865 (bp_size): New function.
2866 (bp_opcode): Likewise.
2867 (find_raw_breakpoint_at): Adjust for kind.
2868 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2869 (remove_memory_breakpoint): Adjust for kind call bp_size.
2870 (set_raw_breakpoint_at): Adjust for kind.
2871 (set_breakpoint): Likewise.
2872 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2873 (delete_raw_breakpoint): Adjust for kind.
2874 (delete_breakpoint): Likewise.
2875 (find_gdb_breakpoint): Likewise.
2876 (set_gdb_breakpoint_1): Likewise.
2877 (set_gdb_breakpoint): Likewise.
2878 (delete_gdb_breakpoint_1): Likewise.
2879 (delete_gdb_breakpoint): Likewise.
2880 (uninsert_raw_breakpoint): Likewise.
2881 (reinsert_raw_breakpoint): Likewise.
2882 (set_breakpoint_data): Remove.
2883 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2884 (check_mem_read): Adjust for kind call bp_size.
2885 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2886 (clone_one_breakpoint): Adjust for kind.
2887 * mem-break.h (set_gdb_breakpoint): Likewise.
2888 (delete_gdb_breakpoint): Likewise.
2889 * server.c (process_serial_event): Likewise.
2890
2891 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2892
2893 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2894 (struct linux_target_ops) <breakpoint>: Remove.
2895 (struct linux_target_ops) <breakpoint_len>: Remove.
2896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2898 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2899 (arm_sw_breakpoint_from_kind): New function.
2900 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2901 (struct linux_target_ops) <breakpoint>: Remove.
2902 (struct linux_target_ops) <breakpoint_len>: Remove.
2903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2905 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2906 (struct linux_target_ops) <breakpoint>: Remove.
2907 (struct linux_target_ops) <breakpoint_len>: Remove.
2908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2910 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2911 (struct linux_target_ops) <breakpoint>: Remove.
2912 (struct linux_target_ops) <breakpoint_len>: Remove.
2913 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2914 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2915 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2916 and sw_breakpoint_from_kind to increment the pc.
2917 (linux_breakpoint_kind_from_pc): New function.
2918 (linux_sw_breakpoint_from_kind): New function.
2919 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2920 (initialize_low): Call breakpoint_kind_from_pc and
2921 sw_breakpoint_from_kind to replace breakpoint_data/len.
2922 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2923 New field.
2924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2925 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2926 (struct linux_target_ops) <breakpoint>: Remove.
2927 (struct linux_target_ops) <breakpoint_len>: Remove.
2928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2930 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2931 (struct linux_target_ops) <breakpoint>: Remove.
2932 (struct linux_target_ops) <breakpoint_len>: Remove.
2933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2935 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2936 (struct linux_target_ops) <breakpoint>: Remove.
2937 (struct linux_target_ops) <breakpoint_len>: Remove.
2938 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2939 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2940 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2941 (struct linux_target_ops) <breakpoint>: Remove.
2942 (struct linux_target_ops) <breakpoint_len>: Remove.
2943 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2945 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2946 (struct linux_target_ops) <breakpoint>: Remove.
2947 (struct linux_target_ops) <breakpoint_len>: Remove.
2948 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2949 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2950 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2951 (struct linux_target_ops) <breakpoint>: Remove.
2952 (struct linux_target_ops) <breakpoint_len>: Remove.
2953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2955 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2956 (struct linux_target_ops) <breakpoint>: Remove.
2957 (struct linux_target_ops) <breakpoint_len>: Remove.
2958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2960 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2961 (struct linux_target_ops) <breakpoint>: Remove.
2962 (struct linux_target_ops) <breakpoint_len>: Remove.
2963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2965 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2966 (struct linux_target_ops) <breakpoint>: Remove.
2967 (struct linux_target_ops) <breakpoint_len>: Remove.
2968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2970 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2971 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2972 (struct linux_target_ops) <breakpoint>: Remove.
2973 (struct linux_target_ops) <breakpoint_len>: Remove.
2974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2976 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2977 (struct linux_target_ops) <breakpoint>: Remove.
2978 (struct linux_target_ops) <breakpoint_len>: Remove.
2979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2981
2982 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2983
2984 * linux-cris-low.c (cris_get_pc): Remove void arg.
2985
2986 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2987
2988 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2989 variable name.
2990
2991 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2992
2993 * inferiors.c (thread_pid_matches_callback): New function.
2994 (find_thread_process): New function.
2995 (remove_thread): Reset current_thread.
2996 (remove_process): Assert threads have been removed first.
2997
2998 2015-10-15 Yao Qi <yao.qi@linaro.org>
2999
3000 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3001 if it is 3.
3002 (aarch64_remove_point): Likewise.
3003 * regcache.c (regcache_register_size): New function.
3004
3005 2015-10-12 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-aarch64-low.c: Update all callers as emit_load_store
3008 is renamed to aarch64_emit_load_store.
3009
3010 2015-10-12 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-aarch64-low.c: Update all callers of function renaming
3013 from emit_insn to aarch64_emit_insn.
3014
3015 2015-10-12 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3018 arch/aarch64-insn.h.
3019 (struct aarch64_memory_operand): Likewise.
3020 (ENCODE): Likewise.
3021 (emit_insn): Move to arch/aarch64-insn.c.
3022 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3023 (emit_load_store): Move to arch/aarch64-insn.c.
3024 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3025 (can_encode_int32): Remove.
3026
3027 2015-10-12 Yao Qi <yao.qi@linaro.org>
3028
3029 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3030 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3031 (aarch64_relocate_instruction): Likewise.
3032 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3033 (struct aarch64_insn_visitor): Likewise.
3034
3035 2015-10-12 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3038 (struct aarch64_insn_visitor): New.
3039 (struct aarch64_insn_relocation_data): New.
3040 (aarch64_ftrace_insn_reloc_b): New function.
3041 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3042 (aarch64_ftrace_insn_reloc_cb): Likewise.
3043 (aarch64_ftrace_insn_reloc_tb): Likewise.
3044 (aarch64_ftrace_insn_reloc_adr): Likewise.
3045 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3046 (aarch64_ftrace_insn_reloc_others): Likewise.
3047 (visitor): New.
3048 (aarch64_relocate_instruction): Use visitor.
3049
3050 2015-10-12 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3053 int. Add argument buf.
3054 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3055 aarch64_relocate_instruction.
3056
3057 2015-10-12 Yao Qi <yao.qi@linaro.org>
3058
3059 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3060 argument insn. Remove local variable insn. Don't call
3061 target_read_uint32.
3062 (aarch64_install_fast_tracepoint_jump_pad): Call
3063 target_read_uint32.
3064
3065 2015-09-30 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3068 (emit_load_store_pair): Likewise.
3069
3070 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3071
3072 * dll.c (match_dll): Add cast(s).
3073 (unloaded_dll): Likewise.
3074 * linux-low.c (second_thread_of_pid_p): Likewise.
3075 (delete_lwp_callback): Likewise.
3076 (count_events_callback): Likewise.
3077 (select_event_lwp_callback): Likewise.
3078 (linux_set_resume_request): Likewise.
3079 * server.c (accumulate_file_name_length): Likewise.
3080 (emit_dll_description): Likewise.
3081 (handle_qxfer_threads_worker): Likewise.
3082 (visit_actioned_threads): Likewise.
3083 * thread-db.c (any_thread_of): Likewise.
3084 * tracepoint.c (same_process_p): Likewise.
3085 (match_blocktype): Likewise.
3086 (build_traceframe_info_xml): Likewise.
3087
3088 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3089
3090 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3091 assignment.
3092 (gdb_unparse_agent_expr): Likewise.
3093 * hostio.c (require_data): Likewise.
3094 (handle_pread): Likewise.
3095 * linux-low.c (disable_regset): Likewise.
3096 (fetch_register): Likewise.
3097 (store_register): Likewise.
3098 (get_dynamic): Likewise.
3099 (linux_qxfer_libraries_svr4): Likewise.
3100 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3101 (set_fast_tracepoint_jump): Likewise.
3102 (uninsert_fast_tracepoint_jumps_at): Likewise.
3103 (reinsert_fast_tracepoint_jumps_at): Likewise.
3104 (validate_inserted_breakpoint): Likewise.
3105 (clone_agent_expr): Likewise.
3106 * regcache.c (init_register_cache): Likewise.
3107 * remote-utils.c (putpkt_binary_1): Likewise.
3108 (decode_M_packet): Likewise.
3109 (decode_X_packet): Likewise.
3110 (look_up_one_symbol): Likewise.
3111 (relocate_instruction): Likewise.
3112 (monitor_output): Likewise.
3113 * server.c (handle_search_memory): Likewise.
3114 (handle_qxfer_exec_file): Likewise.
3115 (handle_qxfer_libraries): Likewise.
3116 (handle_qxfer): Likewise.
3117 (handle_query): Likewise.
3118 (handle_v_cont): Likewise.
3119 (handle_v_run): Likewise.
3120 (captured_main): Likewise.
3121 * target.c (write_inferior_memory): Likewise.
3122 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3123 * tracepoint.c (init_trace_buffer): Likewise.
3124 (add_tracepoint_action): Likewise.
3125 (add_traceframe): Likewise.
3126 (add_traceframe_block): Likewise.
3127 (cmd_qtdpsrc): Likewise.
3128 (cmd_qtdv): Likewise.
3129 (cmd_qtstatus): Likewise.
3130 (response_source): Likewise.
3131 (response_tsv): Likewise.
3132 (cmd_qtnotes): Likewise.
3133 (gdb_collect): Likewise.
3134 (initialize_tracepoint): Likewise.
3135
3136 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3137
3138 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3139 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3140 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3141 <NOP>: New.
3142 (enum aarch64_condition_codes): New enum.
3143 (w0): New static global.
3144 (fp): Likewise.
3145 (lr): Likewise.
3146 (struct aarch64_memory_operand) <type>: New
3147 MEMORY_OPERAND_POSTINDEX type.
3148 (postindex_memory_operand): New helper function.
3149 (emit_ret): New function.
3150 (emit_load_store_pair): New function, factored out of emit_stp
3151 with support for MEMORY_OPERAND_POSTINDEX.
3152 (emit_stp): Rewrite using emit_load_store_pair.
3153 (emit_ldp): New function.
3154 (emit_load_store): Likewise.
3155 (emit_ldr): Mention post-index instruction in comment.
3156 (emit_ldrh): New function.
3157 (emit_ldrb): New function.
3158 (emit_ldrsw): Mention post-index instruction in comment.
3159 (emit_str): Likewise.
3160 (emit_subs): New function.
3161 (emit_cmp): Likewise.
3162 (emit_and): Likewise.
3163 (emit_orr): Likewise.
3164 (emit_orn): Likewise.
3165 (emit_eor): Likewise.
3166 (emit_mvn): Likewise.
3167 (emit_lslv): Likewise.
3168 (emit_lsrv): Likewise.
3169 (emit_asrv): Likewise.
3170 (emit_mul): Likewise.
3171 (emit_sbfm): Likewise.
3172 (emit_sbfx): Likewise.
3173 (emit_ubfm): Likewise.
3174 (emit_ubfx): Likewise.
3175 (emit_csinc): Likewise.
3176 (emit_cset): Likewise.
3177 (emit_nop): Likewise.
3178 (emit_ops_insns): New helper function.
3179 (emit_pop): Likewise.
3180 (emit_push): Likewise.
3181 (aarch64_emit_prologue): New function.
3182 (aarch64_emit_epilogue): Likewise.
3183 (aarch64_emit_add): Likewise.
3184 (aarch64_emit_sub): Likewise.
3185 (aarch64_emit_mul): Likewise.
3186 (aarch64_emit_lsh): Likewise.
3187 (aarch64_emit_rsh_signed): Likewise.
3188 (aarch64_emit_rsh_unsigned): Likewise.
3189 (aarch64_emit_ext): Likewise.
3190 (aarch64_emit_log_not): Likewise.
3191 (aarch64_emit_bit_and): Likewise.
3192 (aarch64_emit_bit_or): Likewise.
3193 (aarch64_emit_bit_xor): Likewise.
3194 (aarch64_emit_bit_not): Likewise.
3195 (aarch64_emit_equal): Likewise.
3196 (aarch64_emit_less_signed): Likewise.
3197 (aarch64_emit_less_unsigned): Likewise.
3198 (aarch64_emit_ref): Likewise.
3199 (aarch64_emit_if_goto): Likewise.
3200 (aarch64_emit_goto): Likewise.
3201 (aarch64_write_goto_address): Likewise.
3202 (aarch64_emit_const): Likewise.
3203 (aarch64_emit_call): Likewise.
3204 (aarch64_emit_reg): Likewise.
3205 (aarch64_emit_pop): Likewise.
3206 (aarch64_emit_stack_flush): Likewise.
3207 (aarch64_emit_zero_ext): Likewise.
3208 (aarch64_emit_swap): Likewise.
3209 (aarch64_emit_stack_adjust): Likewise.
3210 (aarch64_emit_int_call_1): Likewise.
3211 (aarch64_emit_void_call_2): Likewise.
3212 (aarch64_emit_eq_goto): Likewise.
3213 (aarch64_emit_ne_goto): Likewise.
3214 (aarch64_emit_lt_goto): Likewise.
3215 (aarch64_emit_le_goto): Likewise.
3216 (aarch64_emit_gt_goto): Likewise.
3217 (aarch64_emit_ge_got): Likewise.
3218 (aarch64_emit_ops_impl): New static global variable.
3219 (aarch64_emit_ops): New target function, return
3220 &aarch64_emit_ops_impl.
3221 (struct linux_target_ops): Install it.
3222
3223 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3224
3225 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3226 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3227 aarch64-ipa.o.
3228 * linux-aarch64-ipa.c: New file.
3229 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3230 and endian.h.
3231 (aarch64_get_thread_area): New target method.
3232 (extract_signed_bitfield): New helper function.
3233 (aarch64_decode_ldr_literal): New function.
3234 (enum aarch64_opcodes): New enum.
3235 (struct aarch64_register): New struct.
3236 (struct aarch64_operand): New struct.
3237 (x0): New static global.
3238 (x1): Likewise.
3239 (x2): Likewise.
3240 (x3): Likewise.
3241 (x4): Likewise.
3242 (w2): Likewise.
3243 (ip0): Likewise.
3244 (sp): Likewise.
3245 (xzr): Likewise.
3246 (aarch64_register): New helper function.
3247 (register_operand): Likewise.
3248 (immediate_operand): Likewise.
3249 (struct aarch64_memory_operand): New struct.
3250 (offset_memory_operand): New helper function.
3251 (preindex_memory_operand): Likewise.
3252 (enum aarch64_system_control_registers): New enum.
3253 (ENCODE): New macro.
3254 (emit_insn): New helper function.
3255 (emit_b): New function.
3256 (emit_bcond): Likewise.
3257 (emit_cb): Likewise.
3258 (emit_tb): Likewise.
3259 (emit_blr): Likewise.
3260 (emit_stp): Likewise.
3261 (emit_ldp_q_offset): Likewise.
3262 (emit_stp_q_offset): Likewise.
3263 (emit_load_store): Likewise.
3264 (emit_ldr): Likewise.
3265 (emit_ldrsw): Likewise.
3266 (emit_str): Likewise.
3267 (emit_ldaxr): Likewise.
3268 (emit_stxr): Likewise.
3269 (emit_stlr): Likewise.
3270 (emit_data_processing_reg): Likewise.
3271 (emit_data_processing): Likewise.
3272 (emit_add): Likewise.
3273 (emit_sub): Likewise.
3274 (emit_mov): Likewise.
3275 (emit_movk): Likewise.
3276 (emit_mov_addr): Likewise.
3277 (emit_mrs): Likewise.
3278 (emit_msr): Likewise.
3279 (emit_sevl): Likewise.
3280 (emit_wfe): Likewise.
3281 (append_insns): Likewise.
3282 (can_encode_int32_in): New helper function.
3283 (aarch64_relocate_instruction): New function.
3284 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3285 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3286 (struct linux_target_ops): Install aarch64_get_thread_area,
3287 aarch64_install_fast_tracepoint_jump_pad and
3288 aarch64_get_min_fast_tracepoint_insn_len.
3289
3290 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3291
3292 * Makefile.in (aarch64-insn.o): New rule.
3293 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3294
3295 2015-09-21 Yao Qi <yao.qi@linaro.org>
3296
3297 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3298
3299 2015-09-21 Yao Qi <yao.qi@linaro.org>
3300
3301 * tracepoint.c (max_jump_pad_size): Remove.
3302
3303 2015-09-18 Yao Qi <yao.qi@linaro.org>
3304
3305 * linux-aarch64-low.c: Don't include sys/uio.h.
3306 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3307
3308 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3309
3310 * tracepoint.c (eval_result_type): Change prototype.
3311 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3312
3313 2015-09-15 Pedro Alves <palves@redhat.com>
3314
3315 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3316 Check whether to report exec events instead of checking whether
3317 multiprocess is enabled.
3318
3319 2015-09-15 Pedro Alves <palves@redhat.com>
3320
3321 PR remote/18965
3322 * remote-utils.c (prepare_resume_reply): Merge
3323 TARGET_WAITKIND_VFORK_DONE switch case with the
3324 TARGET_WAITKIND_FORKED case.
3325
3326 2015-09-15 Yao Qi <yao.qi@linaro.org>
3327
3328 * server.c (handle_query): Check string comparison using
3329 "else if" instead of "if".
3330
3331 2015-09-15 Yao Qi <yao.qi@linaro.org>
3332
3333 * server.c (vCont_supported): New global variable.
3334 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3335 matches. Append ";vContSupported+" to own_buf.
3336 (handle_v_requests): Append ";s;S" to own_buf if target supports
3337 hardware single step or vCont_supported is false.
3338 (capture_main): Set vCont_supported to zero.
3339
3340 2015-09-15 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3343 it to ...
3344 (linux_supports_hardware_single_step): ... New function.
3345 (linux_target_ops): Update.
3346 * lynx-low.c (lynx_target_ops): Set field
3347 supports_hardware_single_step to target_can_do_hardware_single_step.
3348 * nto-low.c (nto_target_ops): Likewise.
3349 * spu-low.c (spu_target_ops): Likewise.
3350 * win32-low.c (win32_target_ops): Likewise.
3351 * target.c (target_can_do_hardware_single_step): New function.
3352 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3353 Remove. <supports_hardware_single_step>: New field.
3354 (target_supports_conditional_breakpoints): Remove.
3355 (target_supports_hardware_single_step): New macro.
3356 (target_can_do_hardware_single_step): Declare.
3357 * server.c (handle_query): Use target_supports_hardware_single_step
3358 instead of target_supports_conditional_breakpoints.
3359
3360 2015-09-15 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3363 function.
3364 (struct linux_target_ops the_low_target): Install
3365 aarch64_linux_siginfo_fixup.
3366
3367 2015-09-11 Don Breazeal <donb@codesourcery.com>
3368 Luis Machado <lgustavo@codesourcery.com>
3369
3370 * linux-low.c (linux_mourn): Static declaration.
3371 (linux_arch_setup): Move in front of
3372 handle_extended_wait.
3373 (linux_arch_setup_thread): New function.
3374 (handle_extended_wait): Handle exec events. Call
3375 linux_arch_setup_thread. Make event_lwp argument a
3376 pointer-to-a-pointer.
3377 (check_zombie_leaders): Do not check stopped threads.
3378 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3379 (linux_low_filter_event): Add lwp and thread for exec'ing
3380 non-leader thread if leader thread has been deleted.
3381 Refactor code into linux_arch_setup_thread and call it.
3382 Pass child lwp pointer by reference to handle_extended_wait.
3383 (linux_wait_for_event_filtered): Update comment.
3384 (linux_wait_1): Prevent clobbering exec event status.
3385 (linux_supports_exec_events): New function.
3386 (linux_target_ops) <supports_exec_events>: Initialize new member.
3387 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3388 new member.
3389 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3390 * server.c (report_exec_events): New global variable.
3391 (handle_query): Handle qSupported query for exec-events feature.
3392 (captured_main): Initialize report_exec_events.
3393 * server.h (report_exec_events): Declare new global variable.
3394 * target.h (struct target_ops) <supports_exec_events>: New
3395 member.
3396 (target_supports_exec_events): New macro.
3397 * win32-low.c (win32_target_ops) <supports_exec_events>:
3398 Initialize new member.
3399
3400 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3401
3402 * linux-low.c (linux_low_enable_btrace): Remove.
3403 (linux_target_ops): Replace linux_low_enable_btrace with
3404 linux_enable_btrace.
3405
3406 2015-09-03 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-aarch64-low.c (aarch64_insert_point): Call
3409 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3410 returns true.
3411
3412 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3413
3414 * linux-low.c (check_stopped_by_breakpoint): Use
3415 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3416
3417 2015-08-27 Pedro Alves <palves@redhat.com>
3418
3419 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3420
3421 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3422
3423 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3424 the XNEW-family equivalent.
3425 (compile_bytecodes): Likewise.
3426 * dll.c (loaded_dll): Likewise.
3427 * event-loop.c (append_callback_event): Likewise.
3428 (create_file_handler): Likewise.
3429 (create_file_event): Likewise.
3430 * hostio.c (handle_open): Likewise.
3431 * inferiors.c (add_thread): Likewise.
3432 (add_process): Likewise.
3433 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3434 * linux-arm-low.c (arm_new_process): Likewise.
3435 (arm_new_thread): Likewise.
3436 * linux-low.c (add_to_pid_list): Likewise.
3437 (linux_add_process): Likewise.
3438 (handle_extended_wait): Likewise.
3439 (add_lwp): Likewise.
3440 (enqueue_one_deferred_signal): Likewise.
3441 (enqueue_pending_signal): Likewise.
3442 (linux_resume_one_lwp_throw): Likewise.
3443 (linux_resume_one_thread): Likewise.
3444 (linux_read_memory): Likewise.
3445 (linux_write_memory): Likewise.
3446 * linux-mips-low.c (mips_linux_new_process): Likewise.
3447 (mips_linux_new_thread): Likewise.
3448 (mips_add_watchpoint): Likewise.
3449 * linux-x86-low.c (initialize_low_arch): Likewise.
3450 * lynx-low.c (lynx_add_process): Likewise.
3451 * mem-break.c (set_raw_breakpoint_at): Likewise.
3452 (set_breakpoint): Likewise.
3453 (add_condition_to_breakpoint): Likewise.
3454 (add_commands_to_breakpoint): Likewise.
3455 (clone_agent_expr): Likewise.
3456 (clone_one_breakpoint): Likewise.
3457 * regcache.c (new_register_cache): Likewise.
3458 * remote-utils.c (look_up_one_symbol): Likewise.
3459 * server.c (queue_stop_reply): Likewise.
3460 (start_inferior): Likewise.
3461 (queue_stop_reply_callback): Likewise.
3462 (handle_target_event): Likewise.
3463 * spu-low.c (fetch_ppc_memory): Likewise.
3464 (store_ppc_memory): Likewise.
3465 * target.c (set_target_ops): Likewise.
3466 * thread-db.c (thread_db_load_search): Likewise.
3467 (try_thread_db_load_1): Likewise.
3468 * tracepoint.c (add_tracepoint): Likewise.
3469 (add_tracepoint_action): Likewise.
3470 (create_trace_state_variable): Likewise.
3471 (cmd_qtdpsrc): Likewise.
3472 (cmd_qtro): Likewise.
3473 (add_while_stepping_state): Likewise.
3474 * win32-low.c (child_add_thread): Likewise.
3475 (get_image_name): Likewise.
3476
3477 2015-08-25 Yao Qi <yao.qi@linaro.org>
3478
3479 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3480
3481 2015-08-25 Yao Qi <yao.qi@linaro.org>
3482
3483 * Makefile.in (aarch64-linux.o): New rule.
3484 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3485 srv_tgtobj.
3486 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3487 (aarch64_init_debug_reg_state): Make it extern.
3488 (aarch64_linux_prepare_to_resume): Remove.
3489
3490 2015-08-25 Yao Qi <yao.qi@linaro.org>
3491
3492 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3493 lwp_arch_private_info and ptid_of_lwp.
3494
3495 2015-08-25 Yao Qi <yao.qi@linaro.org>
3496
3497 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3498 Find proc_info by find_process_pid. All callers updated.
3499
3500 2015-08-25 Yao Qi <yao.qi@linaro.org>
3501
3502 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3503 Remove.
3504 (debug_reg_change_callback): Remove.
3505 (aarch64_notify_debug_reg_change): Remove.
3506
3507 2015-08-25 Yao Qi <yao.qi@linaro.org>
3508
3509 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3510 Call current_lwp_ptid.
3511
3512 2015-08-25 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-aarch64-low.c (debug_reg_change_callback): Use
3515 debug_printf.
3516
3517 2015-08-25 Yao Qi <yao.qi@linaro.org>
3518
3519 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3520
3521 2015-08-25 Yao Qi <yao.qi@linaro.org>
3522
3523 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3524
3525 2015-08-25 Yao Qi <yao.qi@linaro.org>
3526
3527 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3528 the code.
3529
3530 2015-08-25 Yao Qi <yao.qi@linaro.org>
3531
3532 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3533 Remove.
3534 (debug_reg_change_callback): Remove argument entry and add argument
3535 lwp. Remove local variable thread. Don't print thread id in the
3536 debugging output. Don't check whether pid of thread equals to pid.
3537 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3538 iterate_over_lwps instead find_inferior.
3539
3540 2015-08-24 Pedro Alves <palves@redhat.com>
3541
3542 * inferiors.c (get_first_process): New function.
3543 * inferiors.h (get_first_process): New declaration.
3544 * remote-utils.c (read_ptid): Default to the first process in the
3545 list, instead of to the current thread's process.
3546
3547 2015-08-24 Pedro Alves <palves@redhat.com>
3548
3549 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3550 * event-loop.c: Likewise.
3551 * remote-utils.c: Likewise.
3552 * tracepoint.c: Likewise.
3553
3554 2015-08-24 Pedro Alves <palves@redhat.com>
3555
3556 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3557 ptid_get_lwp.
3558
3559 2015-08-21 Pedro Alves <palves@redhat.com>
3560
3561 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3562 instead of literal 1.
3563
3564 2015-08-21 Pedro Alves <palves@redhat.com>
3565
3566 * tdesc.c (default_description): Explicitly zero-initialize.
3567
3568 2015-08-21 Pedro Alves <palves@redhat.com>
3569
3570 PR gdb/18749
3571 * inferiors.c (remove_thread): Discard any pending stop reply for
3572 this thread.
3573 * server.c (remove_all_on_match_pid): Rename to ...
3574 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3575 instead of a pid.
3576 (discard_queued_stop_replies): Change parameter to a ptid. Now
3577 extern.
3578 (handle_v_kill, kill_inferior_callback, captured_main)
3579 (process_serial_event): Adjust.
3580 * server.h (discard_queued_stop_replies): Declare.
3581
3582 2015-08-21 Pedro Alves <palves@redhat.com>
3583
3584 * linux-low.c (wait_for_sigstop): Always switch to no thread
3585 selected if the previously current thread dies.
3586 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3587 process instead of the current thread's.
3588 * remote-utils.c (input_interrupt): Don't check if there's no
3589 current thread.
3590 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3591 current thread to the general thread fails, error out.
3592 (handle_qxfer_auxv, handle_qxfer_libraries)
3593 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3594 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3595 (handle_query): Check if there's a thread selected instead of
3596 checking whether there's any thread in the thread list.
3597 (handle_qxfer_threads, handle_qxfer_btrace)
3598 (handle_qxfer_btrace_conf): Don't error out early if there's no
3599 thread in the thread list.
3600 (handle_v_cont, myresume): Don't set the current thread to the
3601 continue thread.
3602 (process_serial_event) <Hg handling>: Also set thread_id if the
3603 previous general thread is still alive.
3604 (process_serial_event) <g/G handling>: If setting the current
3605 thread to the general thread fails, error out.
3606 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3607 thread's lwp instead of the current thread's.
3608 * target.c (set_desired_thread): If the desired thread was not
3609 found, leave the current thread pointing to NULL. Return an int
3610 (boolean) indicating success.
3611 * target.h (set_desired_thread): Change return type to int.
3612
3613 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3614
3615 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3616 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3617 #includes.
3618 (ps_get_thread_area): New function.
3619
3620 2015-08-19 Gary Benson <gbenson@redhat.com>
3621
3622 * hostio.c (handle_pread): Do not attempt to read more data
3623 than hostio_reply_with_data can fit in a packet.
3624
3625 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3626
3627 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3628
3629 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3630
3631 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3632
3633 2015-08-06 Pedro Alves <palves@redhat.com>
3634
3635 * tracepoint.c (expr_eval_result): Now an int.
3636
3637 2015-08-06 Pedro Alves <palves@redhat.com>
3638
3639 * gdbthread.h (struct regcache): Forward declare.
3640 (struct thread_info) <regcache_data>: Now a struct regcache
3641 pointer.
3642 * inferiors.c (inferior_regcache_data)
3643 (set_inferior_regcache_data): Now work with struct regcache
3644 pointers.
3645 * inferiors.h (struct regcache): Forward declare.
3646 (inferior_regcache_data, set_inferior_regcache_data): Now work
3647 with struct regcache pointers.
3648 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3649 (free_register_cache_thread): Remove struct regcache pointer
3650 casts.
3651
3652 2015-08-06 Pedro Alves <palves@redhat.com>
3653
3654 * server.c (captured_main): On error, print the exception message
3655 to stderr, and if run_once is set, throw a quit.
3656
3657 2015-08-06 Pedro Alves <palves@redhat.com>
3658
3659 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3660 the current thread.
3661
3662 2015-08-06 Pedro Alves <palves@redhat.com>
3663
3664 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3665 reading beyond the passed in buffer length.
3666
3667 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3668
3669 * tracepoint.c (symbol_list) <required>: Remove.
3670
3671 2015-08-06 Pedro Alves <palves@redhat.com>
3672
3673 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3674 count if stopping and suspending threads.
3675 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3676 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3677 (linux_detach): Complete an ongoing step-over.
3678 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3679 throughout.
3680 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3681 (linux_wait_1): If passing a signal to the inferior after
3682 finishing a step-over, unsuspend and re-resume all lwps. If we
3683 see a single-step event but the thread should be continuing, don't
3684 pass the trap to gdb.
3685 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3686 internal_error instead of gdb_assert.
3687 (enqueue_pending_signal): New function.
3688 (check_ptrace_stopped_lwp_gone): Add debug output.
3689 (start_step_over): Use internal_error instead of gdb_assert.
3690 (complete_ongoing_step_over): New function.
3691 (linux_resume_one_thread): Don't resume a suspended thread.
3692 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3693 it stepping.
3694
3695 2015-08-06 Pedro Alves <palves@redhat.com>
3696
3697 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3698 (linux_thread_alive): Use lwp_is_marked_dead.
3699 (extended_event_reported): Delete.
3700 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3701 instead of extended_event_reported.
3702 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3703 as well.
3704 (lwp_is_marked_dead): New function.
3705 (lwp_running): Use lwp_is_marked_dead.
3706 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3707 comment.
3708
3709 2015-08-06 Pedro Alves <palves@redhat.com>
3710
3711 * linux-low.c (linux_wait_1): Move fork event output out of the
3712 !report_to_gdb check. Pass event_child->waitstatus to
3713 target_waitstatus_to_string instead of ourstatus.
3714
3715 2015-08-04 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3718 if current_thread is 32 bit.
3719
3720 2015-08-04 Yao Qi <yao.qi@linaro.org>
3721
3722 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3723 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3724 * server.c (extended_protocol): Remove "static".
3725 * server.h (extended_protocol): Declare it.
3726
3727 2015-08-04 Yao Qi <yao.qi@linaro.org>
3728
3729 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3730 both aarch64 and aarch32.
3731 (aarch64_set_pc): Likewise.
3732
3733 2015-08-04 Yao Qi <yao.qi@linaro.org>
3734
3735 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3736 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3737 arm-with-neon.xml to srv_xmlfiles.
3738 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3739 (is_64bit_tdesc): New function.
3740 (aarch64_linux_read_description): New function.
3741 (aarch64_arch_setup): Call aarch64_linux_read_description.
3742 (regs_info): Rename to regs_info_aarch64.
3743 (aarch64_regs_info): Return right regs_info.
3744 (initialize_low_arch): Call initialize_low_arch_aarch32.
3745
3746 2015-08-04 Yao Qi <yao.qi@linaro.org>
3747
3748 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3749 * linux-aarch32-low.c: New file.
3750 * linux-aarch32-low.h: New file.
3751 * linux-arm-low.c (arm_fill_gregset): Move it to
3752 linux-aarch32-low.c.
3753 (arm_store_gregset): Likewise.
3754 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3755 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3756 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3757 (regs_info): Rename to regs_info_arm.
3758 (arm_regs_info): Return regs_info_aarch32 if
3759 have_ptrace_getregset is 1 and target description is
3760 arm_with_neon or arm_with_vfpv3.
3761 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3762 Call initialize_low_arch_aarch32 instead.
3763
3764 2015-08-04 Yao Qi <yao.qi@linaro.org>
3765
3766 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3767 * linux-low.c: ... here.
3768 * linux-low.h (have_ptrace_getregset): Declare it.
3769
3770 2015-08-04 Pedro Alves <palves@redhat.com>
3771
3772 * thread-db.c (struct thread_db): Use new typedefs.
3773 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3774 CHK calls.
3775 (disable_thread_event_reporting): Cast result of dlsym to
3776 destination function pointer type.
3777 (thread_db_mourn): Use td_ta_delete_ftype.
3778
3779 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3780
3781 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3782 arch variant.
3783 (CDX_BREAKPOINT): Define for R2.
3784 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3785 (the_low_target): Add comments.
3786
3787 2015-07-30 Yao Qi <yao.qi@linaro.org>
3788
3789 * linux-arm-low.c (arm_hwcap): Remove it.
3790 (arm_read_description): New local variable arm_hwcap. Don't
3791 set arm_hwcap to zero.
3792
3793 2015-07-30 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3796 Use regcache->tdesc instead.
3797 (arm_store_wmmxregset): Likewise.
3798 (arm_fill_vfpregset): Likewise.
3799 (arm_store_vfpregset): Likewise.
3800
3801 2015-07-30 Yao Qi <yao.qi@linaro.org>
3802
3803 * linux-arm-low.c: Include arch/arm.h.
3804 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3805 (arm_store_gregset): Likewise.
3806
3807 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3808
3809 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3810 ptrace's 4th parameter.
3811
3812 2015-07-27 Yao Qi <yao.qi@linaro.org>
3813
3814 * configure.srv (case aarch64*-*-linux*): Don't set
3815 srv_linux_usrregs.
3816
3817 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3818
3819 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3820 sys/ptrace.h.
3821 * linux-arm-low.c: Likewise.
3822 * linux-cris-low.c: Likewise.
3823 * linux-crisv32-low.c: Likewise.
3824 * linux-low.c: Likewise.
3825 * linux-m68k-low.c: Likewise.
3826 * linux-mips-low.c: Likewise.
3827 * linux-nios2-low.c: Likewise.
3828 * linux-s390-low.c: Likewise.
3829 * linux-sparc-low.c: Likewise.
3830 * linux-tic6x-low.c: Likewise.
3831 * linux-tile-low.c: Likewise.
3832 * linux-x86-low.c: Likewise.
3833
3834 2015-07-24 Pedro Alves <palves@redhat.com>
3835
3836 * config.in: Regenerate.
3837 * configure: Regenerate.
3838
3839 2015-07-24 Pedro Alves <palves@redhat.com>
3840
3841 * acinclude.m4: Include ../ptrace.m4.
3842 * configure.ac: Call GDB_AC_PTRACE.
3843 * config.in, configure: Regenerate.
3844
3845 2015-07-24 Yao Qi <yao.qi@linaro.org>
3846
3847 * linux-low.c (linux_create_inferior): Remove setting to
3848 proc->priv->new_inferior.
3849 (linux_attach): Likewise.
3850 (linux_low_filter_event): Likewise.
3851 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3852
3853 2015-07-24 Yao Qi <yao.qi@linaro.org>
3854
3855 * linux-low.c (linux_arch_setup): New function.
3856 (linux_low_filter_event): If proc->tdesc is NULL and
3857 proc->attached is true, call the_low_target.arch_setup.
3858 Otherwise, keep status pending, and return.
3859 (linux_resume_one_lwp_throw): Don't call get_pc if
3860 thread->while_stepping isn't NULL. Don't call
3861 get_thread_regcache if proc->tdesc is NULL.
3862 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3863 (linux_target_ops): Install arch_setup.
3864 * server.c (start_inferior): Call the_target->arch_setup.
3865 * target.h (struct target_ops) <arch_setup>: New field.
3866 (target_arch_setup): New marco.
3867 * lynx-low.c (lynx_target_ops): Update.
3868 * nto-low.c (nto_target_ops): Update.
3869 * spu-low.c (spu_target_ops): Update.
3870 * win32-low.c (win32_target_ops): Update.
3871
3872 2015-07-24 Yao Qi <yao.qi@linaro.org>
3873
3874 * linux-low.c (linux_add_process): Don't set
3875 proc->priv->new_inferior.
3876 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3877 (linux_attach): Likewise.
3878
3879 2015-07-24 Yao Qi <yao.qi@linaro.org>
3880
3881 * server.c (start_inferior): Code refactor.
3882
3883 2015-07-24 Yao Qi <yao.qi@linaro.org>
3884
3885 * server.c (process_serial_event): Set general_thread.
3886
3887 2015-07-21 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3890 aarch64_linux_get_debug_reg_capacity.
3891
3892 2015-07-17 Yao Qi <yao.qi@linaro.org>
3893
3894 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3895 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3896 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3897 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3898 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3899 (AARCH64_HWP_ALIGNMENT): Likewise.
3900 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3901 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3902 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3903 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3904 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3905 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3906 (struct aarch64_debug_reg_state): Likewise.
3907 (struct arch_lwp_info): Likewise.
3908 (aarch64_align_watchpoint): Likewise.
3909 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3910 (aarch64_watchpoint_length): Likewise.
3911 (aarch64_point_encode_ctrl_reg): Likewise
3912 (aarch64_point_is_aligned): Likewise.
3913 (aarch64_align_watchpoint): Likewise.
3914 (aarch64_linux_set_debug_regs):
3915 (aarch64_dr_state_insert_one_point): Likewise.
3916 (aarch64_dr_state_remove_one_point): Likewise.
3917 (aarch64_handle_breakpoint): Likewise.
3918 (aarch64_handle_aligned_watchpoint): Likewise.
3919 (aarch64_handle_unaligned_watchpoint): Likewise.
3920 (aarch64_handle_watchpoint): Likewise.
3921
3922 2015-07-17 Yao Qi <yao.qi@linaro.org>
3923
3924 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3925 and don't aarch64_get_debug_reg_state. All callers update.
3926 (aarch64_handle_aligned_watchpoint): Likewise.
3927 (aarch64_handle_unaligned_watchpoint): Likewise.
3928 (aarch64_handle_watchpoint): Likewise.
3929 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3930 (aarch64_remove_point): Likewise.
3931
3932 2015-07-17 Yao Qi <yao.qi@linaro.org>
3933
3934 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3935 debug_printf.
3936 (aarch64_handle_unaligned_watchpoint): Likewise.
3937
3938 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3939
3940 Revert the previous 3 commits:
3941 Move gdb_regex* to common/
3942 Move linux_find_memory_regions_full & co.
3943 gdbserver build-id attribute generator
3944
3945 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3946 Jan Kratochvil <jan.kratochvil@redhat.com>
3947
3948 gdbserver build-id attribute generator.
3949 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3950 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3951 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3952 (find_phdr): New.
3953 (get_dynamic): Use find_pdhr to traverse program headers.
3954 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3955 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3956 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3957 (get_hex_build_id): New.
3958 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3959 to reply XML document.
3960
3961 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3962 Jan Kratochvil <jan.kratochvil@redhat.com>
3963
3964 * target.c: Include target/target-utils.h and fcntl.h.
3965 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3966 (target_fileio_read_stralloc): New functions.
3967
3968 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3969
3970 * Makefile.in (OBS): Add gdb_regex.o.
3971 (gdb_regex.o): New.
3972 * config.in: Rebuilt.
3973 * configure: Rebuilt.
3974
3975 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3976 Jan Kratochvil <jan.kratochvil@redhat.com>
3977
3978 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3979 * Makefile.in (OBS): Add target-utils.o.
3980 (linux-maps.o, target-utils.o): New.
3981 * configure.srv (srv_linux_obj): Add linux-maps.o.
3982
3983 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3984
3985 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3986 function, return 1.
3987 (the_low_target): Install it.
3988
3989 2015-07-14 Pedro Alves <palves@redhat.com>
3990
3991 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3992 Instead, ignore ECHILD, and throw an error for other errnos.
3993
3994 2015-07-10 Pedro Alves <palves@redhat.com>
3995
3996 * event-loop.c (struct callback_event) <data>: Change type to
3997 gdb_client_data instance instead of gdb_client_data pointer.
3998 (append_callback_event): Adjust.
3999
4000 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4001
4002 * linux-aarch64-low.c: Add comments for each linux_target_ops
4003 method. Remove comments already covered in target_ops and
4004 linux_target_ops definitions.
4005 (the_low_target): Add comments for each unimplemented method.
4006
4007 2015-07-09 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-aarch64-low.c (aarch64_regmap): Remove.
4010 (aarch64_usrregs_info): Remove.
4011 (regs_info): Set field usrregs to NULL.
4012
4013 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4014
4015 * linux-low.c: Include "rsp-low.h"
4016 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4017 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4018 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4019 (handle_btrace_enable_pt): New.
4020 (handle_btrace_general_set): Support "pt".
4021 (handle_btrace_conf_general_set): Support "pt:size".
4022
4023 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4024
4025 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4026 Z_PACKET_SW_BP.
4027
4028 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4029
4030 * linux-aarch64-low.c: Remove comment about endianness.
4031 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4032 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4033 memcmp.
4034
4035 2015-06-24 Gary Benson <gbenson@redhat.com>
4036
4037 * linux-i386-ipa.c (stdint.h): Do not include.
4038 * lynx-i386-low.c (stdint.h): Likewise.
4039 * lynx-ppc-low.c (stdint.h): Likewise.
4040 * mem-break.c (stdint.h): Likewise.
4041 * thread-db.c (stdint.h): Likewise.
4042 * tracepoint.c (stdint.h): Likewise.
4043 * win32-low.c (stdint.h): Likewise.
4044
4045 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4046
4047 * server.c (write_qxfer_response): Update call to
4048 remote_escape_output.
4049
4050 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4051 Jan Kratochvil <jan.kratochvil@redhat.com>
4052
4053 Merge multiple hex conversions.
4054 * gdbreplay.c (tohex): Rename to 'fromhex'.
4055 (logchar): Use fromhex.
4056
4057 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4058
4059 * server.c (handle_qxfer_libraries): Set `version' attribute for
4060 <library-list>.
4061
4062 2015-06-10 Gary Benson <gbenson@redhat.com>
4063
4064 * target.h (struct target_ops) <multifs_open>: New field.
4065 <multifs_unlink>: Likewise.
4066 <multifs_readlink>: Likewise.
4067 * linux-low.c (nat/linux-namespaces.h): New include.
4068 (linux_target_ops): Initialize the_target->multifs_open,
4069 the_target->multifs_unlink and the_target->multifs_readlink.
4070 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4071 * hostio.c (hostio_fs_pid): New static variable.
4072 (hostio_handle_new_gdb_connection): New function.
4073 (handle_setfs): Likewise.
4074 (handle_open): Use the_target->multifs_open as appropriate.
4075 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4076 (handle_readlink): Use the_target->multifs_readlink as
4077 appropriate.
4078 (handle_vFile): Handle vFile:setfs packets.
4079 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4080 after target_handle_new_gdb_connection.
4081
4082 2015-06-10 Gary Benson <gbenson@redhat.com>
4083
4084 * configure.ac (AC_CHECK_FUNCS): Add setns.
4085 * config.in: Regenerate.
4086 * configure: Likewise.
4087 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4088 (linux-namespaces.o): New rule.
4089 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4090
4091 2015-06-09 Gary Benson <gbenson@redhat.com>
4092
4093 * hostio.c (handle_open): Process mode argument with
4094 fileio_to_host_mode.
4095
4096 2015-06-01 Yao Qi <yao.qi@linaro.org>
4097
4098 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4099 * linux-x86-low.c: Likewise.
4100
4101 2015-05-28 Don Breazeal <donb@codesourcery.com>
4102
4103 * linux-low.c (handle_extended_wait): Initialize
4104 thread_info.last_resume_kind for new fork children.
4105
4106 2015-05-15 Pedro Alves <palves@redhat.com>
4107
4108 * target.h (target_handle_new_gdb_connection): Rewrite using if
4109 wrapped in do/while.
4110
4111 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4112
4113 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4114 * configure, config.in: Regenerate.
4115 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4116 Declare typedef.
4117
4118 2015-05-12 Don Breazeal <donb@codesourcery.com>
4119
4120 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4121 PTRACE_EVENT_VFORK_DONE.
4122 (linux_low_ptrace_options, extended_event_reported): Add vfork
4123 events.
4124 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4125 and "vforkdone" for RSP 'T' Stop Reply Packet.
4126 * server.h (report_vfork_events): Declare
4127 global variable.
4128
4129 2015-05-12 Don Breazeal <donb@codesourcery.com>
4130
4131 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4132 (the_low_target) <new_fork>: Initialize new member.
4133 * linux-arm-low.c (arm_new_fork): New function.
4134 (the_low_target) <new_fork>: Initialize new member.
4135 * linux-low.c (handle_extended_wait): Call new target function
4136 new_fork.
4137 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4138 * linux-mips-low.c (mips_add_watchpoint): New function
4139 extracted from mips_insert_point.
4140 (the_low_target) <new_fork>: Initialize new member.
4141 (mips_linux_new_fork): New function.
4142 (mips_insert_point): Call mips_add_watchpoint.
4143 * linux-x86-low.c (x86_linux_new_fork): New function.
4144 (the_low_target) <new_fork>: Initialize new member.
4145
4146 2015-05-12 Don Breazeal <donb@codesourcery.com>
4147
4148 * linux-low.c (handle_extended_wait): Implement return value,
4149 rename argument 'event_child' to 'event_lwp', handle
4150 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4151 (linux_low_ptrace_options): New function.
4152 (linux_low_filter_event): Call linux_low_ptrace_options,
4153 use different argument fo linux_enable_event_reporting,
4154 use return value from handle_extended_wait.
4155 (extended_event_reported): New function.
4156 (linux_wait_1): Call extended_event_reported and set
4157 status to report fork events.
4158 (linux_write_memory): Add pid to debug message.
4159 (reset_lwp_ptrace_options_callback): New function.
4160 (linux_handle_new_gdb_connection): New function.
4161 (linux_target_ops): Initialize new structure member.
4162 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4163 * lynx-low.c: Initialize new structure member.
4164 * remote-utils.c (prepare_resume_reply): Implement stop reason
4165 "fork" for "T" stop message.
4166 * server.c (handle_query): Call handle_new_gdb_connection.
4167 * server.h (report_fork_events): Declare global flag.
4168 * target.h (struct target_ops) <handle_new_gdb_connection>:
4169 New member.
4170 (target_handle_new_gdb_connection): New macro.
4171 * win32-low.c: Initialize new structure member.
4172
4173 2015-05-12 Don Breazeal <donb@codesourcery.com>
4174
4175 * mem-break.c (APPEND_TO_LIST): Define macro.
4176 (clone_agent_expr): New function.
4177 (clone_one_breakpoint): New function.
4178 (clone_all_breakpoints): New function.
4179 * mem-break.h: Declare new functions.
4180
4181 2015-05-12 Don Breazeal <donb@codesourcery.com>
4182
4183 * linux-low.c (linux_supports_fork_events): New function.
4184 (linux_supports_vfork_events): New function.
4185 (linux_target_ops): Initialize new structure members.
4186 (initialize_low): Call linux_check_ptrace_features.
4187 * lynx-low.c (lynx_target_ops): Initialize new structure
4188 members.
4189 * server.c (report_fork_events, report_vfork_events):
4190 New global flags.
4191 (handle_query): Add new features to qSupported packet and
4192 response.
4193 (captured_main): Initialize new global variables.
4194 * target.h (struct target_ops) <supports_fork_events>:
4195 New member.
4196 <supports_vfork_events>: New member.
4197 (target_supports_fork_events): New macro.
4198 (target_supports_vfork_events): New macro.
4199 * win32-low.c (win32_target_ops): Initialize new structure
4200 members.
4201
4202 2015-05-12 Gary Benson <gbenson@redhat.com>
4203
4204 * server.c (handle_qxfer_exec_file): Use current process
4205 if annex is empty.
4206
4207 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4208
4209 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4210 Remove HAVE_PTRACE_GETREGS conditionals.
4211 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4212 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4213
4214 2015-05-08 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-low.c (linux_supports_conditional_breakpoints): New
4217 function.
4218 (linux_target_ops): Install new target method.
4219 * lynx-low.c (lynx_target_ops): Install NULL hook for
4220 supports_conditional_breakpoints.
4221 * nto-low.c (nto_target_ops): Likewise.
4222 * spu-low.c (spu_target_ops): Likewise.
4223 * win32-low.c (win32_target_ops): Likewise.
4224 * server.c (handle_query): Check
4225 target_supports_conditional_breakpoints.
4226 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4227 New field.
4228 (target_supports_conditional_breakpoints): New macro.
4229
4230 2015-05-06 Pedro Alves <palves@redhat.com>
4231
4232 PR server/18081
4233 * server.c (start_inferior): If the process exits, mourn it.
4234
4235 2015-04-21 Gary Benson <gbenson@redhat.com>
4236
4237 * hostio.c (fileio_open_flags_to_host): Factored out to
4238 fileio_to_host_openflags in common/fileio.c. Single use
4239 updated.
4240
4241 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4242
4243 * linux-xtensa-low.c (xtensa_fill_gregset)
4244 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4245 XCHAL_HAVE_LOOP.
4246
4247 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4248
4249 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4250 (regs_info): Replace usrregs pointer with NULL.
4251
4252 2015-04-17 Gary Benson <gbenson@redhat.com>
4253
4254 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4255 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4256 * server.c (handle_qxfer_exec_file): New function.
4257 (qxfer_packets): Add exec-file entry.
4258 (handle_query): Report qXfer:exec-file:read as supported packet.
4259
4260 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4261
4262 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4263
4264 2015-04-09 Gary Benson <gbenson@redhat.com>
4265
4266 * hostio-errno.c (errno_to_fileio_error): Remove function.
4267 Update caller to use remote_fileio_to_fio_error.
4268
4269 2015-04-09 Yao Qi <yao.qi@linaro.org>
4270
4271 * linux-low.c (linux_insert_point): Call
4272 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4273 (linux_remove_point): Call remove_memory_breakpoint if type is
4274 raw_bkpt_type_sw.
4275 * linux-x86-low.c (x86_insert_point): Don't call
4276 insert_memory_breakpoint.
4277 (x86_remove_point): Don't call remove_memory_breakpoint.
4278
4279 2015-04-01 Pedro Alves <palves@redhat.com>
4280 Cleber Rosa <crosa@redhat.com>
4281
4282 * server.c (gdbserver_usage): Reorganize and extend the usage
4283 message.
4284
4285 2015-03-24 Pedro Alves <palves@redhat.com>
4286
4287 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4288 output. Also dump TRAP_TRACE.
4289 (linux_low_filter_event): In debug output, distinguish a
4290 resume_stop SIGSTOP from a delayed SIGSTOP.
4291
4292 2015-03-24 Gary Benson <gbenson@redhat.com>
4293
4294 * linux-x86-low.c (x86_linux_new_thread): Moved to
4295 nat/x86-linux.c.
4296 (x86_linux_prepare_to_resume): Likewise.
4297
4298 2015-03-24 Gary Benson <gbenson@redhat.com>
4299
4300 * Makefile.in (x86-linux-dregs.o): New rule.
4301 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4302 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4303 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4304 (x86_linux_dr_get): Likewise.
4305 (x86_linux_dr_set): Likewise.
4306 (update_debug_registers_callback): Likewise.
4307 (x86_linux_dr_set_addr): Likewise.
4308 (x86_linux_dr_get_addr): Likewise.
4309 (x86_linux_dr_set_control): Likewise.
4310 (x86_linux_dr_get_control): Likewise.
4311 (x86_linux_dr_get_status): Likewise.
4312 (x86_linux_update_debug_registers): Likewise.
4313
4314 2015-03-24 Gary Benson <gbenson@redhat.com>
4315
4316 * linux-x86-low.c (x86_linux_update_debug_registers):
4317 New function, factored out from...
4318 (x86_linux_prepare_to_resume): ...this.
4319
4320 2015-03-24 Gary Benson <gbenson@redhat.com>
4321
4322 * linux-x86-low.c (x86_linux_dr_get): Update comments.
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_prepare_to_resume): Likewise.
4331
4332 2015-03-24 Gary Benson <gbenson@redhat.com>
4333
4334 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4335 Use perror_with_name. Pass string through gettext.
4336 (x86_linux_dr_set): Likewise.
4337
4338 2015-03-24 Gary Benson <gbenson@redhat.com>
4339
4340 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4341 (x86_linux_dr_set_addr): ...this.
4342 (x86_dr_low_get_addr): Rename to...
4343 (x86_linux_dr_get_addr): ...this.
4344 (x86_dr_low_set_control): Rename to...
4345 (x86_linux_dr_set_control): ...this.
4346 (x86_dr_low_get_control): Rename to...
4347 (x86_linux_dr_get_control): ...this.
4348 (x86_dr_low_get_status): Rename to...
4349 (x86_linux_dr_get_status): ...this.
4350 (x86_dr_low): Update with new function names.
4351
4352 2015-03-24 Gary Benson <gbenson@redhat.com>
4353
4354 * Makefile.in (x86-linux.o): New rule.
4355 * configure.srv: Add x86-linux.o to relevant targets.
4356 * linux-low.c (lwp_set_arch_private_info): New function.
4357 (lwp_arch_private_info): Likewise.
4358 * linux-x86-low.c: Include nat/x86-linux.h.
4359 (arch_lwp_info): Removed structure.
4360 (update_debug_registers_callback):
4361 Use lwp_set_debug_registers_changed.
4362 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4363 and lwp_set_debug_registers_changed.
4364 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4365
4366 2015-03-24 Gary Benson <gbenson@redhat.com>
4367
4368 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4369 * linux-arm-low.c (arm_new_thread): Likewise.
4370 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4371 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4372 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4373 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4374
4375 2015-03-24 Gary Benson <gbenson@redhat.com>
4376
4377 * linux-low.c (ptid_of_lwp): New function.
4378 (lwp_is_stopped): Likewise.
4379 (lwp_stop_reason): Likewise.
4380 * linux-x86-low.c (update_debug_registers_callback):
4381 Use lwp_is_stopped.
4382 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4383 lwp_stop_reason.
4384
4385 2015-03-24 Gary Benson <gbenson@redhat.com>
4386
4387 * linux-low.h (linux_stop_lwp): Remove declaration.
4388
4389 2015-03-24 Gary Benson <gbenson@redhat.com>
4390
4391 * linux-low.h: Include nat/linux-nat.h.
4392 * linux-low.c (iterate_over_lwps_args): New structure.
4393 (iterate_over_lwps_filter): New function.
4394 (iterate_over_lwps): Likewise.
4395 * linux-x86-low.c (update_debug_registers_callback):
4396 Update signature to what iterate_over_lwps expects.
4397 Remove PID check that iterate_over_lwps now performs.
4398 (x86_dr_low_set_addr): Use iterate_over_lwps.
4399 (x86_dr_low_set_control): Likewise.
4400
4401 2015-03-24 Gary Benson <gbenson@redhat.com>
4402
4403 * linux-x86-low.c (x86_debug_reg_state): New function.
4404 (x86_linux_prepare_to_resume): Use the above.
4405
4406 2015-03-24 Gary Benson <gbenson@redhat.com>
4407
4408 * linux-low.c (current_lwp_ptid): New function.
4409 * linux-x86-low.c: Include nat/linux-nat.h.
4410 (x86_dr_low_get_addr): Use current_lwp_ptid.
4411 (x86_dr_low_get_control): Likewise.
4412 (x86_dr_low_get_status): Likewise.
4413
4414 2015-03-20 Pedro Alves <palves@redhat.com>
4415
4416 * tracepoint.c (cmd_qtstatus): Make "str" const.
4417
4418 2015-03-20 Pedro Alves <palves@redhat.com>
4419
4420 * server.c (handle_general_set): Make "req_str" const.
4421
4422 2015-03-19 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (linux_resume_one_lwp): Rename to ...
4425 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4426 instead call perror_with_name.
4427 (check_ptrace_stopped_lwp_gone): New function.
4428 (linux_resume_one_lwp): Reimplement as wrapper around
4429 linux_resume_one_lwp_throw that swallows errors if the LWP is
4430 gone.
4431
4432 2015-03-19 Pedro Alves <palves@redhat.com>
4433
4434 * linux-low.c (count_events_callback, select_event_lwp_callback):
4435 No longer check whether the thread has resume_stop as last resume
4436 kind.
4437
4438 2015-03-19 Pedro Alves <palves@redhat.com>
4439
4440 * linux-low.c (count_events_callback, select_event_lwp_callback):
4441 Use the lwp's status_pending_p field, not the thread's.
4442
4443 2015-03-19 Pedro Alves <palves@redhat.com>
4444
4445 * linux-low.c (select_event_lwp_callback): Update comments to
4446 no longer mention SIGTRAP.
4447
4448 2015-03-18 Gary Benson <gbenson@redhat.com>
4449
4450 * server.c (handle_query): Do not report vFile:fstat as supported.
4451
4452 2015-03-11 Gary Benson <gbenson@redhat.com>
4453
4454 * hostio.c (sys/types.h): New include.
4455 (sys/stat.h): Likewise.
4456 (common-remote-fileio.h): Likewise.
4457 (handle_fstat): New function.
4458 (handle_vFile): Handle vFile:fstat packets.
4459
4460 2015-03-11 Gary Benson <gbenson@redhat.com>
4461
4462 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4463 struct stat.st_blocks and struct stat.st_blksize.
4464 * configure: Regenerate.
4465 * config.in: Likewise.
4466 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4467 (OBS): Add common-remote-fileio.o.
4468 (common-remote-fileio.o): New rule.
4469
4470 2015-03-09 Pedro Alves <palves@redhat.com>
4471
4472 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4473 'struct sockaddr' pointer in 'accept' call.
4474
4475 2015-03-09 Pedro Alves <palves@redhat.com>
4476
4477 Revert:
4478 2015-03-07 Pedro Alves <palves@redhat.com>
4479 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4480 or <winsock2.h> here. Instead include "gdb_socket.h".
4481 (remote_open): Use union gdb_sockaddr_u.
4482 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4483 or <winsock2.h> here. Instead include "gdb_socket.h".
4484 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4485 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4486 or <sys/un.h>.
4487 (init_named_socket, gdb_agent_helper_thread): Use union
4488 gdb_sockaddr_u.
4489
4490 2015-03-07 Pedro Alves <palves@redhat.com>
4491
4492 * configure.ac (build_warnings): Move
4493 -Wdeclaration-after-statement to the C-specific set.
4494 * configure: Regenerate.
4495
4496 2015-03-07 Pedro Alves <palves@redhat.com>
4497
4498 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4499 or <winsock2.h> here. Instead include "gdb_socket.h".
4500 (remote_open): Use union gdb_sockaddr_u.
4501 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4502 or <winsock2.h> here. Instead include "gdb_socket.h".
4503 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4504 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4505 or <sys/un.h>.
4506 (init_named_socket, gdb_agent_helper_thread): Use union
4507 gdb_sockaddr_u.
4508
4509 2015-03-07 Pedro Alves <palves@redhat.com>
4510
4511 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4512 instead.
4513
4514 2015-03-06 Yao Qi <yao.qi@linaro.org>
4515
4516 * linux-aarch64-low.c (aarch64_insert_point): Use
4517 show_debug_regs as a boolean.
4518 (aarch64_remove_point): Likewise.
4519
4520 2015-03-05 Pedro Alves <palves@redhat.com>
4521
4522 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4523 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4524 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4525 * nto-low.c (nto_target_ops): Likewise.
4526 * spu-low.c (spu_target_ops): Likewise.
4527 * win32-low.c (win32_target_ops): Likewise.
4528
4529 2015-03-04 Pedro Alves <palves@redhat.com>
4530
4531 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4532 Decide whether a breakpoint triggered based on the SIGTRAP's
4533 siginfo.si_code.
4534 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4535 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4536 (linux_low_filter_event): Check for breakpoints before checking
4537 watchpoints.
4538 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4539 siginfo.si_code.
4540 (linux_stopped_by_sw_breakpoint)
4541 (linux_supports_stopped_by_sw_breakpoint)
4542 (linux_stopped_by_hw_breakpoint)
4543 (linux_supports_stopped_by_hw_breakpoint): New functions.
4544 (linux_target_ops): Install new target methods.
4545
4546 2015-03-04 Pedro Alves <palves@redhat.com>
4547
4548 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4549 * server.c (swbreak_feature, hwbreak_feature): New globals.
4550 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4551 (captured_main): Clear swbreak_feature and hwbreak_feature.
4552 * server.h (swbreak_feature, hwbreak_feature): Declare.
4553 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4554 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4555 supports_stopped_by_hw_breakpoint>: New fields.
4556 (target_supports_stopped_by_sw_breakpoint)
4557 (target_stopped_by_sw_breakpoint)
4558 (target_supports_stopped_by_hw_breakpoint)
4559 (target_stopped_by_hw_breakpoint): Declare.
4560
4561 2015-03-04 Pedro Alves <palves@redhat.com>
4562
4563 enum lwp_stop_reason -> enum target_stop_reason
4564 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4565 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4566 (linux_wait_1, stuck_in_jump_pad_callback)
4567 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4568 (linux_stopped_by_watchpoint):
4569 * linux-low.h (enum lwp_stop_reason): Delete.
4570 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4571 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4572
4573 2015-03-04 Yao Qi <yao.qi@linaro.org>
4574
4575 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4576
4577 2015-03-03 Gary Benson <gbenson@redhat.com>
4578
4579 * hostio.c (handle_vFile): Fix prefix lengths.
4580
4581 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4582
4583 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4584 ptr_bits.
4585
4586 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4587
4588 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4589 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4590 (clean): Add "rm -f" for above C files.
4591 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4592 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4593 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4594 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4595 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4596 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4597 (init_registers_s390x_vx_linux64)
4598 (init_registers_s390x_tevx_linux64)
4599 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4600 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4601 declarations.
4602 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4603 (s390_store_vxrs_high): New functions.
4604 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4605 NT_S390_VXRS_HIGH.
4606 (s390_arch_setup): Add logic for selecting one of the new target
4607 descriptions. Activate the new vector regsets if applicable.
4608 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4609 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4610 and init_registers_s390x_tevx_linux64.
4611
4612 2015-03-01 Pedro Alves <palves@redhat.com>
4613
4614 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4615 parameter.
4616
4617 2015-02-27 Pedro Alves <palves@redhat.com>
4618
4619 * linux-x86-low.c (u_debugreg_offset): New function.
4620 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4621
4622 2015-02-27 Pedro Alves <palves@redhat.com>
4623
4624 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4625 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4626 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4627 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4628 (ps_lsetfpregs, ps_getpid)
4629 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4630 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4631 (ps_lsetxregs, ps_plog): Declare.
4632
4633 2015-02-27 Pedro Alves <palves@redhat.com>
4634
4635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4636 IP_AGENT_EXPORT_FUNC.
4637 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4638 IP_AGENT_EXPORT_FUNC.
4639 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4640 (IP_AGENT_EXPORT): Delete.
4641 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4642 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4643 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4644 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4645 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4646 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4647 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4648 (traceframe_read_count, traceframe_write_count)
4649 (traceframes_created, trace_state_variables, get_raw_reg)
4650 (get_trace_state_variable_value, set_trace_state_variable_value)
4651 (ust_loaded, helper_thread_id, cmd_buf): Use
4652 IPA_SYM_EXPORTED_NAME.
4653 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4654 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4655 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4656 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4657 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4658 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4659 EXTERN_C_PUSH/EXTERN_C_POP.
4660 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4661 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4662 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4663 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4664 (traceframe_write_count, traceframe_read_count)
4665 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4666 (about_to_request_buffer_space, get_trace_state_variable_value)
4667 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4668 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4669 EXTERN_C_PUSH/EXTERN_C_POP.
4670 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4671 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4672 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4673 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4674 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4675 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4676 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4677 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4678 Define.
4679 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4680 (IP_AGENT_EXPORT_VAR_DECL): Define.
4681 (tracing): Declare.
4682 (gdb_agent_get_raw_reg): Declare.
4683
4684 2015-02-27 Tom Tromey <tromey@redhat.com>
4685 Pedro Alves <palves@redhat.com>
4686
4687 Rename symbols whose names are reserved C++ keywords throughout.
4688
4689 2015-02-27 Pedro Alves <palves@redhat.com>
4690
4691 * Makefile.in (COMPILER): New, get it from autoconf.
4692 (CXX): Get from autoconf instead.
4693 (COMPILE.pre): Use COMPILER.
4694 (CC-LD): Rename to ...
4695 (CC_LD): ... this. Use COMPILER.
4696 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4697 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4698 * acinclude.m4: Include build-with-cxx.m4.
4699 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4700 Disable -Werror by default if building in C++ mode.
4701 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4702 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4703 the C++ compiler. Save/restore CXXFLAGS too.
4704 * configure: Regenerate.
4705
4706 2015-02-27 Pedro Alves <palves@redhat.com>
4707
4708 * acinclude.m4: Include libiberty.m4.
4709 * configure.ac: Call libiberty_INIT.
4710 * config.in, configure: Regenerate.
4711
4712 2015-02-26 Pedro Alves <palves@redhat.com>
4713
4714 * linux-low.c (linux_wait_1): When incrementing the PC past a
4715 program breakpoint always use the_low_target.breakpoint_len as
4716 increment, rather than the maximum between that and
4717 the_low_target.decr_pc_after_break.
4718
4719 2015-02-23 Pedro Alves <palves@redhat.com>
4720
4721 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4722 thread was doing a step-over; always adjust the PC if
4723 we stepped over a permanent breakpoint.
4724 (linux_wait_1): If we stepped over breakpoint that was on top of a
4725 permanent breakpoint, manually advance the PC past it.
4726
4727 2015-02-23 Pedro Alves <palves@redhat.com>
4728
4729 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4730 modes.
4731 (x86_fill_gregset, x86_store_gregset): Use it when handling
4732 $orig_eax.
4733
4734 2015-02-20 Pedro Alves <palves@redhat.com>
4735
4736 * thread-db.c: Include "nat/linux-procfs.h".
4737 (thread_db_init): Skip listing new threads if the kernel supports
4738 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4739
4740 2015-02-20 Pedro Alves <palves@redhat.com>
4741
4742 * linux-low.c (status_pending_p_callback): Use ptid_match.
4743
4744 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4745
4746 PR breakpoints/16812
4747 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4748 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4749 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4750
4751 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4752
4753 PR breakpoints/15956
4754 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4755
4756 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4757
4758 * linux-low.c (linux_low_btrace_conf): Print size.
4759 * server.c (handle_btrace_conf_general_set): New.
4760 (hanle_general_set): Call handle_btrace_conf_general_set.
4761 (handle_query): Report Qbtrace-conf:bts:size as supported.
4762
4763 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4764
4765 * linux-low.c (linux_low_enable_btrace): Update parameters.
4766 (linux_low_btrace_conf): New.
4767 (linux_target_ops)<to_btrace_conf>: Initialize.
4768 * server.c (current_btrace_conf): New.
4769 (handle_btrace_enable): Rename to ...
4770 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4771 to target_enable_btrace. Update comment. Update users.
4772 (handle_qxfer_btrace_conf): New.
4773 (qxfer_packets): Add btrace-conf entry.
4774 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4775 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4776 (target_ops)<read_btrace_conf>: New.
4777 (target_enable_btrace): Update parameters.
4778 (target_read_btrace_conf): New.
4779
4780 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4781
4782 * server.c (handle_btrace_general_set): Remove call to
4783 target_supports_btrace.
4784 (supported_btrace_packets): New.
4785 (handle_query): Call supported_btrace_packets.
4786 * target.h: include btrace-common.h.
4787 (btrace_target_info): Removed.
4788 (supports_btrace, target_supports_btrace): Update parameters.
4789
4790 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4791
4792 * Makefile.in (SFILES): Add common/btrace-common.c.
4793 (OBS): Add common/btrace-common.o.
4794 (btrace-common.o): Add build rules.
4795 * linux-low: Include btrace-common.h.
4796 (linux_low_read_btrace): Use struct btrace_data. Call
4797 btrace_data_init and btrace_data_fini.
4798
4799 2015-02-06 Pedro Alves <palves@redhat.com>
4800
4801 * thread-db.c (find_new_threads_callback): Add debug output.
4802
4803 2015-02-04 Pedro Alves <palves@redhat.com>
4804
4805 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4806 (resume_stopped_resumed_lwps): New function.
4807 (linux_wait_for_event_filtered): Use it.
4808
4809 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4810
4811 * Makefile.in (SFILES): Add linux-personality.c.
4812 (linux-personality.o): New rule.
4813 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4814 list of objects to be built.
4815 * linux-low.c: Include nat/linux-personality.h.
4816 (linux_create_inferior): Remove code to disable address space
4817 randomization (moved to ../nat/linux-personality.c). Create
4818 cleanup to disable address space randomization.
4819
4820 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4821
4822 * Makefile.in (posix-strerror.o): New rule.
4823 (mingw-strerror.o): Likewise.
4824 * configure: Regenerated.
4825 * configure.ac: Source file ../common/common.host. Initialize new
4826 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4827
4828 2015-01-14 Yao Qi <yao@codesourcery.com>
4829
4830 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4831 (ppc-linux.o): New rule.
4832 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4833 * configure.ac: AC_CHECK_FUNCS(getauxval).
4834 * config.in: Re-generated.
4835 * configure: Re-generated.
4836 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4837 ppc64_64bit_inferior_p
4838
4839 2015-01-14 Yao Qi <yao@codesourcery.com>
4840
4841 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4842 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4843 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4844 (PT_ORIG_R3, PT_TRAP): Likewise.
4845 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4846 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4847 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4848
4849 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4850
4851 * i387-fp.c (i387_cache_to_xsave): In look over
4852 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4853 zmmh_low_space field by use of zmmh_high_space.
4854
4855 2015-01-09 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.c (step_over_bkpt): Move higher up in the file.
4858 (handle_extended_wait): Don't store the stop_pc here.
4859 (get_stop_pc): Adjust comments and rename to ...
4860 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4861 stopped for a software breakpoint or hardware breakpoint.
4862 (thread_still_has_status_pending_p): New function.
4863 (status_pending_p_callback): Use
4864 thread_still_has_status_pending_p. If the event is no longer
4865 interesting, resume the LWP.
4866 (handle_tracepoints): Add assert.
4867 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4868 (wstatus_maybe_breakpoint): New function.
4869 (cancel_breakpoint): Delete function.
4870 (check_stopped_by_watchpoint): New function, factored out from
4871 linux_low_filter_event.
4872 (lp_status_maybe_breakpoint): Delete function.
4873 (linux_low_filter_event): Remove filter_ptid argument.
4874 Leave thread group exits pending here. Store the LWP's stop PC.
4875 Always leave events pending.
4876 (linux_wait_for_event_filtered): Pull all events out of the
4877 kernel, and leave them all pending.
4878 (count_events_callback, select_event_lwp_callback): Consider all
4879 events.
4880 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4881 (select_event_lwp): Only give preference to the stepping LWP in
4882 all-stop mode. Adjust comments.
4883 (ignore_event): New function.
4884 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4885 references to cancel_breakpoints. Adjust to renames. Also give
4886 equal priority to all LWPs that have had events in non-stop mode.
4887 If reporting a software breakpoint event, unadjust the LWP's PC.
4888 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4889 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4890 Adjust.
4891 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4892 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4893 (linux_stopped_by_watchpoint): Adjust.
4894 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4895 * linux-low.h (enum lwp_stop_reason): New.
4896 (struct lwp_info) <stop_pc>: Adjust comment.
4897 <stopped_by_watchpoint>: Delete field.
4898 <stop_reason>: New field.
4899 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4900 * mem-break.c (software_breakpoint_inserted_here)
4901 (hardware_breakpoint_inserted_here): New function.
4902 * mem-break.h (software_breakpoint_inserted_here)
4903 (hardware_breakpoint_inserted_here): Declare.
4904 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4905 (cancel_breakpoints): Delete.
4906 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4907 (upload_fast_traceframes): Remove references to
4908 cancel_breakpoints.
4909
4910 2015-01-09 Pedro Alves <palves@redhat.com>
4911
4912 * thread-db.c (find_new_threads_callback): Ignore thread if the
4913 kernel thread ID is -1.
4914
4915 2015-01-09 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.c (linux_attach_fail_reason_string): Move to
4918 nat/linux-ptrace.c, and rename.
4919 (linux_attach_lwp): Update comment.
4920 (attach_proc_task_lwp_callback): New function.
4921 (linux_attach): Adjust to rename and use
4922 linux_proc_attach_tgid_threads.
4923 (linux_attach_fail_reason_string): Delete declaration.
4924
4925 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4926
4927 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4928 * server.c (gdbserver_version): Likewise.
4929
4930 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4931
4932 * remote-utils.c: Include ctype.h.
4933 (input_interrupt): Explicitly handle the case when the char
4934 received is the NUL byte. Improve the printing of non-ASCII
4935 characters.
4936
4937 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4938
4939 * linux-low.c (linux_low_filter_event): Update call to
4940 linux_enable_event_reporting following the addition of
4941 a new parameter to that function.
4942
4943 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4944
4945 PR server/17457
4946 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4947 (AARCH64_FPCR_REGNO): Likewise.
4948 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4949 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4950 (aarch64_store_fpregset): Likewise.
4951
4952 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4953
4954 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4955 Remove FIXME comment about assumption about N.
4956
4957 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4958
4959 * configure.ac: If large-file support is disabled in GDBserver,
4960 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4961 * configure: Regenerate.
4962
4963 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4964
4965 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4966 warning upon ENODATA from ptrace.
4967 * linux-s390-low.c (s390_store_tdb): New.
4968 (s390_regsets): Add regset for NT_S390_TDB.
4969
4970 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4971
4972 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4973 without a fill_function.
4974 * linux-s390-low.c (s390_fill_last_break): Remove.
4975 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4976 (s390_arch_setup): Use regset's size instead of fill_function for
4977 loop end condition.
4978
4979 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4980
4981 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4982 the regset's store function when ptrace returned an error.
4983 * regcache.c (get_thread_regcache): Invalidate register cache
4984 before fetching inferior's registers.
4985
4986 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4987
4988 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4989 while-loop as for-loop.
4990 (regsets_store_inferior_registers): Likewise.
4991
4992 2014-11-28 Yao Qi <yao@codesourcery.com>
4993
4994 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4995 * config.in, configure: Re-generate.
4996 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4997 is defined.
4998
4999 2014-11-21 Yao Qi <yao@codesourcery.com>
5000
5001 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5002 (AC_CHECK_HEADERS): Remove malloc.h.
5003 * configure: Re-generated.
5004 * config.in: Re-generated.
5005 * server.h: Don't include alloca.h and malloc.h.
5006 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5007 Don't include malloc.h.
5008
5009 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5010
5011 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5012 corresponding ERRNO check in same block.
5013
5014 2014-11-12 Pedro Alves <palves@redhat.com>
5015
5016 * server.c (cont_thread): Update comment.
5017 (start_inferior, attach_inferior): No longer clear cont_thread.
5018 (handle_v_cont): No longer set cont_thread.
5019 (captured_main): Clear cont_thread each time a GDB connects.
5020
5021 2014-11-12 Pedro Alves <palves@redhat.com>
5022
5023 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5024 thread, and don't resume all threads if the Hc thread has exited.
5025
5026 2014-11-12 Pedro Alves <palves@redhat.com>
5027
5028 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5029 the process group instead of to a specific LWP.
5030
5031 2014-10-15 Pedro Alves <palves@redhat.com>
5032
5033 PR server/17487
5034 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5035 parameter.
5036 (arm_set_thread_context): Delete.
5037 (the_low_target): Adjust.
5038 * win32-i386-low.c (debug_registers_changed)
5039 (debug_registers_used): Delete.
5040 (update_debug_registers_callback): New function.
5041 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5042 needing to update their debug registers.
5043 (win32_get_current_dr): New function.
5044 (x86_dr_low_get_addr, x86_dr_low_get_control)
5045 (x86_dr_low_get_status): Fetch the debug register from the thread
5046 record's context.
5047 (i386_initial_stuff): Adjust.
5048 (i386_get_thread_context): Remove current_event parameter. Don't
5049 clear debug_registers_changed nor copy DR values to
5050 debug_reg_state.
5051 (i386_set_thread_context): Delete.
5052 (i386_prepare_to_resume): New function.
5053 (i386_thread_added): Mark the thread as needing to update irs
5054 debug registers.
5055 (the_low_target): Remove i386_set_thread_context and install
5056 i386_prepare_to_resume.
5057 * win32-low.c (win32_get_thread_context): Adjust.
5058 (win32_set_thread_context): Use SetThreadContext
5059 directly.
5060 (win32_prepare_to_resume): New function.
5061 (win32_require_context): New function, factored out from ...
5062 (thread_rec): ... this.
5063 (continue_one_thread): Call win32_prepare_to_resume on each thread
5064 we're about to continue.
5065 (win32_resume): Call win32_prepare_to_resume on the event thread.
5066 * win32-low.h (struct win32_thread_info)
5067 <debug_registers_changed>: New field.
5068 (struct win32_target_ops): Change prototype of set_thread_context,
5069 delete set_thread_context and add prepare_to_resume.
5070 (win32_require_context): New declaration.
5071
5072 2014-10-08 Gary Benson <gbenson@redhat.com>
5073
5074 * server.h: Do not include common-exceptions.h.
5075
5076 2014-10-08 Gary Benson <gbenson@redhat.com>
5077
5078 * server.h: Do not include cleanups.h.
5079
5080 2014-09-30 James Hogan <james.hogan@imgtec.com>
5081
5082 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5083 mips64-dsp-linux.c.
5084
5085 2014-09-23 Yao Qi <yao@codesourcery.com>
5086
5087 * linux-low.c (lp_status_maybe_breakpoint): New function.
5088 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5089 (count_events_callback): Likewise.
5090 (select_event_lwp_callback): Likewise.
5091 (cancel_breakpoints_callback): Likewise.
5092
5093 2014-09-19 Don Breazeal <donb@codesourcery.com>
5094
5095 * linux-low.c (handle_extended_wait): Call
5096 linux_ptrace_get_extended_event.
5097 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5098 linux_is_extended_waitstatus.
5099
5100 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5101
5102 * Makefile.in (CPPFLAGS): Define.
5103 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5104 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5105
5106 2014-09-16 Gary Benson <gbenson@redhat.com>
5107
5108 * inferiors.h (current_inferior): Renamed as...
5109 (current_thread): New variable. All uses updated.
5110 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5111 (maybe_move_out_of_jump_pad): Likewise.
5112 (cancel_breakpoint): Likewise.
5113 (linux_low_filter_event): Likewise.
5114 (wait_for_sigstop): Likewise.
5115 (linux_resume_one_lwp): Likewise.
5116 (need_step_over_p): Likewise.
5117 (start_step_over): Likewise.
5118 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5119 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5120 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5121 and save_inferior as saved_thread.
5122 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5123 saved_thread.
5124 (regcache_invalidate_thread): Likewise.
5125 * remote-utils.c (prepare_resume_reply): Likewise.
5126 * thread-db.c (thread_db_get_tls_address): Likewise.
5127 (disable_thread_event_reporting): Likewise.
5128 (remove_thread_event_breakpoints): Likewise.
5129 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5130 as saved_thread.
5131 * target.h (set_desired_inferior): Renamed as...
5132 (set_desired_thread): New declaration. All uses updated.
5133 * server.c (myresume): Updated comment to reference thread instead
5134 of inferior.
5135 (handle_serial_event): Likewise.
5136 (handle_target_event): Likewise.
5137
5138 2014-09-12 Tom Tromey <tromey@redhat.com>
5139 Gary Benson <gbenson@redhat.com>
5140
5141 * regcache.h: Include common-regcache.h.
5142 (regcache_read_pc): Don't declare.
5143 * regcache.c (get_thread_regcache_for_ptid): New function.
5144
5145 2014-09-11 Tom Tromey <tromey@redhat.com>
5146 Gary Benson <gbenson@redhat.com>
5147
5148 * symbol.c: New file.
5149 * Makefile.in (SFILES): Add symbol.c.
5150 (OBS): Add symbol.o.
5151
5152 2014-09-11 Gary Benson <gbenson@redhat.com>
5153
5154 * target.c (target_stop_ptid, target_continue_ptid): New
5155 functions.
5156
5157 2014-09-11 Tom Tromey <tromey@redhat.com>
5158 Gary Benson <gbenson@redhat.com>
5159
5160 * target.h: Include target/target.h.
5161 * target.c (target_read_memory, target_read_uint32)
5162 (target_write_memory): New functions.
5163
5164 2014-09-11 Gary Benson <gbenson@redhat.com>
5165
5166 * server.h (debug_hw_points): Don't declare.
5167 * server.c (debug_hw_points): Don't define. Replace all uses
5168 with show_debug_regs.
5169 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5170 all uses with show_debug_regs.
5171
5172 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5173
5174 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5175 endianness into account.
5176 (ppc_supply_ptrace_register): Likewise.
5177
5178 2014-09-03 James Hogan <james.hogan@imgtec.com>
5179
5180 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5181 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5182
5183 2014-09-03 Gary Benson <gbenson@redhat.com>
5184
5185 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5186 ALL_DEBUG_ADDRESS_REGISTERS.
5187
5188 2014-09-02 Gary Benson <gbenson@redhat.com>
5189
5190 * i386-low.h: Renamed as...
5191 * x86-low.h: New file. All type, function and variable name
5192 prefixes changed from "i386_" to "x86_". All references updated.
5193 * i386-low.c: Renamed as...
5194 * x86-low.c: New file. All type, function and variable name
5195 prefixes changed from "i386_" to "x86_". All references updated.
5196
5197 2014-09-02 Gary Benson <gbenson@redhat.com>
5198
5199 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5200 (x86_linux_new_thread): Likewise.
5201
5202 2014-08-29 Gary Benson <gbenson@redhat.com>
5203
5204 * server.h (setjmp.h): Do not include.
5205 (toplevel): Do not declare.
5206 (common-exceptions.h): Include.
5207 (cleanups.h): Likewise.
5208 * server.c (toplevel): Do not define.
5209 (exit_code): New static global.
5210 (detach_or_kill_for_exit_cleanup): New function.
5211 (main): New function. Original main renamed to...
5212 (captured_main): New function.
5213 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5214
5215 2014-08-29 Gary Benson <gbenson@redhat.com>
5216
5217 * Makefile.in (SFILES): Add common/common-exceptions.c.
5218 (OBS): Add common-exceptions.o.
5219 (common-exceptions.o): New rule.
5220 * utils.c (prepare_to_throw_exception): New function.
5221
5222 2014-08-29 Gary Benson <gbenson@redhat.com>
5223
5224 * config.in: Regenerate.
5225 * configure: Likewise.
5226
5227 2014-08-29 Gary Benson <gbenson@redhat.com>
5228
5229 * Makefile.in (SFILES): Add common/cleanups.c.
5230 (OBS): cleanups.o.
5231 (cleanups.o): New rule.
5232
5233 2014-08-29 Gary Benson <gbenson@redhat.com>
5234
5235 * utils.c (internal_vwarning): New function.
5236
5237 2014-08-28 Gary Benson <gbenson@redhat.com>
5238
5239 * utils.h (fatal): Remove declaration.
5240 * utils.c (fatal): Remove function.
5241
5242 2014-08-28 Gary Benson <gbenson@redhat.com>
5243
5244 * tracepoint.c (gdb_agent_init): Replace fatal with
5245 perror_with_name.
5246 (initialize_tracepoint): Likewise.
5247
5248 2014-08-28 Gary Benson <gbenson@redhat.com>
5249
5250 * remote-utils.c (remote_prepare): Replace fatal with error.
5251
5252 2014-08-28 Gary Benson <gbenson@redhat.com>
5253
5254 * linux-low.c (linux_async): Replace fatal with warning.
5255 Tidy up and return.
5256 (linux_start_non_stop): Return -1 if linux_async failed.
5257
5258 2014-08-28 Gary Benson <gbenson@redhat.com>
5259
5260 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5261 gdb_assert.
5262 (i386_dr_low_get_addr): Remove vague comment.
5263 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5264 gdb_assert.
5265
5266 2014-08-28 Gary Benson <gbenson@redhat.com>
5267
5268 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5269 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5270 internal_error.
5271 (linux_resume_one_lwp): Likewise.
5272 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5273 gdb_assert.
5274 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5275 with internal_error.
5276 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5277 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5278 (find_register_by_name): Replace fatal with internal_error.
5279 (find_regno): Likewise.
5280 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5281 * thread-db.c (thread_db_create_event): Likewise.
5282 (thread_db_load_search): Likewise.
5283 (try_thread_db_load_1): Likewise.
5284 * tracepoint.c (get_jump_space_head): Replace fatal with
5285 internal_error.
5286 (claim_trampoline_space): Likewise.
5287 (have_fast_tracepoint_trampoline_buffer): Likewise.
5288 (cmd_qtstart): Likewise.
5289 (stop_tracing): Likewise.
5290 (fast_tracepoint_collecting): Likewise.
5291 (target_malloc): Likewise.
5292 (download_tracepoint): Likewise.
5293 (download_trace_state_variables): Replace check with gdb_assert.
5294 (upload_fast_traceframes): Replace fatal with internal_error.
5295
5296 2014-08-19 Tom Tromey <tromey@redhat.com>
5297 Gary Benson <gbenson@redhat.com>
5298
5299 * Makefile.in (SFILES): Add common/common-debug.c.
5300 (OBS): Add common-debug.o.
5301 (common-debug.o): New rule.
5302 * debug.h (debug_printf): Don't declare.
5303 * debug.c (debug_printf): Renamed and rewritten as...
5304 (debug_vprintf): New function.
5305
5306 2014-08-19 Gary Benson <gbenson@redhat.com>
5307
5308 * utils.h: Do not include print-utils.h.
5309
5310 2014-08-19 Tom Tromey <tromey@redhat.com>
5311 Gary Benson <gbenson@redhat.com>
5312
5313 * server.h: Add static assertion.
5314 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5315
5316 2014-08-19 Tom Tromey <tromey@redhat.com>
5317 Gary Benson <gbenson@redhat.com>
5318
5319 * Makefile.in (SFILES): Add common/errors.c.
5320 (OBS): Add errors.o.
5321 (IPA_OBS): Add errors-ipa.o.
5322 (errors.o): New rule.
5323 (errors-ipa.o): Likewise.
5324 * utils.h (perror_with_name, error, warning): Don't declare.
5325 * utils.c (warning): Renamed and rewritten as...
5326 (vwarning): New function.
5327 (error): Renamed and rewritten as...
5328 (verror): New function.
5329 (internal_error): Renamed and rewritten as...
5330 (internal_verror): New function.
5331
5332 2014-08-07 Gary Benson <gbenson@redhat.com>
5333
5334 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5335 * configure: Regenerate.
5336 * config.in: Likewise.
5337 * server.h: Do not include errno.h.
5338 * event-loop.c: Likewise.
5339 * hostio-errno.c: Likewise.
5340 * linux-low.c: Likewise.
5341 * remote-utils.c: Likewise.
5342 * spu-low.c: Likewise.
5343 * utils.c: Likewise.
5344 * gdbreplay.c: Unconditionally include errno.h.
5345
5346 2014-08-07 Gary Benson <gbenson@redhat.com>
5347
5348 * server.h: Do not include string.h.
5349 * event-loop.c: Likewise.
5350 * linux-low.c: Likewise.
5351 * regcache.c: Likewise.
5352 * remote-utils.c: Likewise.
5353 * spu-low.c: Likewise.
5354 * utils.c: Likewise.
5355
5356 2014-08-07 Gary Benson <gbenson@redhat.com>
5357
5358 * server.h: Do not include gdb_assert.h.
5359
5360 2014-08-07 Gary Benson <gbenson@redhat.com>
5361
5362 * server.h: Do not include common-utils.h.
5363
5364 2014-08-07 Gary Benson <gbenson@redhat.com>
5365
5366 * server.h: Do not include ptid.h.
5367 * notif.h: Likewise.
5368
5369 2014-08-07 Gary Benson <gbenson@redhat.com>
5370
5371 * server.h: Do not include gdb_locale.h.
5372
5373 2014-08-07 Gary Benson <gbenson@redhat.com>
5374
5375 * server.h: Do not include gdb/signals.h.
5376 * win32-low.c: Likewise.
5377
5378 2014-08-07 Gary Benson <gbenson@redhat.com>
5379
5380 * server.h: Do not include pathmax.h.
5381
5382 2014-08-07 Gary Benson <gbenson@redhat.com>
5383
5384 * server.h: Do not include libiberty.h.
5385 * linux-bfin-low.c: Likewise.
5386
5387 2014-08-07 Gary Benson <gbenson@redhat.com>
5388
5389 * server.h: Do not include ansidecl.h.
5390
5391 2014-08-07 Gary Benson <gbenson@redhat.com>
5392
5393 * linux-x86-low.c: Do not include stddef.h.
5394 * lynx-ppc-low.c: Likewise.
5395 * tracepoint.c: Likewise.
5396
5397 2014-08-07 Gary Benson <gbenson@redhat.com>
5398
5399 * server.h: Do not include stdarg.h.
5400 * nto-low.c: Likewise.
5401
5402 2014-08-07 Gary Benson <gbenson@redhat.com>
5403
5404 * server.h: Do not include stdlib.h.
5405 * inferiors.c: Likewise.
5406 * linux-low.c: Likewise.
5407 * regcache.c: Likewise.
5408 * spu-low.c: Likewise.
5409 * tracepoint.c: Likewise.
5410 * utils.c: Likewise.
5411
5412 2014-08-07 Gary Benson <gbenson@redhat.com>
5413
5414 * server.h: Do not include stdio.h.
5415 * linux-low.c: Likewise.
5416 * remote-utils.c: Likewise.
5417 * spu-low.c: Likewise.
5418 * utils.c: Likewise.
5419 * wincecompat.c: Likewise.
5420
5421 2014-08-06 Gary Benson <gbenson@redhat.com>
5422
5423 * regcache.c (init_register_cache): Move conditionals inside if.
5424
5425 2014-08-06 Gary Benson <gbenson@redhat.com>
5426
5427 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5428
5429 2014-07-31 Gary Benson <gbenson@redhat.com>
5430
5431 * ax.h: Do not include server.h.
5432 * gdbthread.h: Likewise.
5433 * lynx-low.h: Likewise.
5434 * notif.h: Likewise.
5435
5436 2014-07-30 Gary Benson <gbenson@redhat.com>
5437
5438 * server.h: Include common-defs.h.
5439 Do not include config.h or build-gnulib-gdbserver/config.h.
5440
5441 2014-07-30 Gary Benson <gbenson@redhat.com>
5442
5443 * hostio-errno.c: Move server.h to top of includes list.
5444 * inferiors.c: Likewise.
5445 * linux-x86-low.c: Likewise.
5446 * notif.c: Include server.h.
5447
5448 2014-07-24 Tom Tromey <tromey@redhat.com>
5449 Gary Benson <gbenson@redhat.com>
5450
5451 * server.h (CORE_ADDR): Now unsigned.
5452
5453 2014-07-16 Pedro Alves <palves@redhat.com>
5454
5455 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5456
5457 2014-07-15 Pedro Alves <palves@redhat.com>
5458
5459 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5460 copy.
5461
5462 2014-07-11 Pedro Alves <palves@redhat.com>
5463
5464 * linux-low.c (kill_wait_lwp): New function, based on
5465 kill_one_lwp_callback, but use my_waitpid directly.
5466 (kill_one_lwp_callback, linux_kill): Use it.
5467
5468 2014-06-23 Pedro Alves <palves@redhat.com>
5469
5470 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5471 before setting DR0..DR3.
5472
5473 2014-06-20 Gary Benson <gbenson@redhat.com>
5474
5475 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5476 * configure: Regenerated.
5477 * config.in: Likewise.
5478
5479 2014-06-20 Gary Benson <gbenson@redhat.com>
5480
5481 * Makefile.in (SFILES): Update locations for files moved
5482 from common to nat.
5483 (object file files): Reordered.
5484
5485 2014-06-20 Gary Benson <gbenson@redhat.com>
5486
5487 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5488 (i386_dr_low_set_addr): Likewise.
5489 (i386_dr_low_get_addr): Likewise.
5490 (i386_dr_low_can_set_control): Likewise.
5491 (i386_dr_low_set_control): Likewise.
5492 (i386_dr_low_get_control): Likewise.
5493 (i386_dr_low_get_status): Likewise.
5494 (i386_get_debug_register_length): Likewise.
5495 * linux-x86-low.c (i386_dr_low_set_addr):
5496 Changed signature. Made static.
5497 (i386_dr_low_get_addr): Likewise.
5498 (i386_dr_low_set_control): Likewise.
5499 (i386_dr_low_get_control): Likewise.
5500 (i386_dr_low_get_status): Likewise.
5501 (i386_dr_low): New global variable.
5502 * win32-i386-low.c (i386_dr_low_set_addr):
5503 Changed signature. Made static.
5504 (i386_dr_low_get_addr): Likewise.
5505 (i386_dr_low_set_control): Likewise.
5506 (i386_dr_low_get_control): Likewise.
5507 (i386_dr_low_get_status): Likewise.
5508 (i386_dr_low): New global variable.
5509
5510 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5511
5512 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5513 * Makefile.in (AR, AR_FLAGS): Define.
5514 * configure: Regenerate.
5515
5516 2014-06-19 Gary Benson <gbenson@redhat.com>
5517
5518 * Makefile.in (i386-dregs.o): New rule.
5519 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5520 * i386-low.c (target.h): Remove include.
5521 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5522 (DR_CONTROL_SHIFT): Likewise.
5523 (DR_CONTROL_SIZE): Likewise.
5524 (DR_RW_EXECUTE): Likewise.
5525 (DR_RW_WRITE): Likewise.
5526 (DR_RW_READ): Likewise.
5527 (DR_RW_IORW): Likewise.
5528 (DR_LEN_1): Likewise.
5529 (DR_LEN_2): Likewise.
5530 (DR_LEN_4): Likewise.
5531 (DR_LEN_8): Likewise.
5532 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5533 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5534 (DR_ENABLE_SIZE): Likewise.
5535 (DR_LOCAL_SLOWDOWN): Likewise.
5536 (DR_GLOBAL_SLOWDOWN): Likewise.
5537 (DR_CONTROL_RESERVED): Likewise.
5538 (I386_DR_CONTROL_MASK): Likewise.
5539 (I386_DR_VACANT): Likewise.
5540 (I386_DR_LOCAL_ENABLE): Likewise.
5541 (I386_DR_GLOBAL_ENABLE): Likewise.
5542 (I386_DR_DISABLE): Likewise.
5543 (I386_DR_SET_RW_LEN): Likewise.
5544 (I386_DR_GET_RW_LEN): Likewise.
5545 (I386_DR_WATCH_HIT): Likewise.
5546 (i386_wp_op_t): Likewise.
5547 (i386_show_dr): Likewise.
5548 (i386_length_and_rw_bits): Likewise.
5549 (i386_insert_aligned_watchpoint): Likewise.
5550 (i386_remove_aligned_watchpoint): Likewise.
5551 (i386_handle_nonaligned_watchpoint): Likewise.
5552 i386_update_inferior_debug_regs(): Likewise.
5553 (i386_dr_insert_watchpoint): Likewise.
5554 (i386_dr_remove_watchpoint): Likewise.
5555 (i386_dr_region_ok_for_watchpoint): Likewise.
5556 (i386_dr_stopped_data_address): Likewise.
5557 (i386_dr_stopped_by_watchpoint): Likewise.
5558
5559 2014-06-19 Gary Benson <gbenson@redhat.com>
5560
5561 * i386-low.c (i386_dr_show): Renamed to
5562 i386_show_dr and made static. All uses updated.
5563 (i386_dr_length_and_rw_bits): Renamed to
5564 i386_length_and_rw_bits and made static.
5565 All uses updated.
5566 (i386_dr_insert_aligned_watchpoint): Renamed to
5567 i386_insert_aligned_watchpoint and made static.
5568 All uses updated.
5569 (i386_dr_remove_aligned_watchpoint): Renamed to
5570 i386_remove_aligned_watchpoint and made static.
5571 All uses updated.
5572 (i386_dr_update_inferior_debug_regs): Renamed to
5573 i386_update_inferior_debug_regs and made static.
5574 All uses updated.
5575
5576 2014-06-18 Gary Benson <gbenson@redhat.com>
5577
5578 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5579 (i386_dr_low_can_set_control): Likewise.
5580 (i386_get_debug_register_length): Likewise.
5581 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5582 (i386_dr_low_can_set_control): Likewise.
5583 (i386_get_debug_register_length): Likewise.
5584
5585 2014-06-17 Gary Benson <gbenson@redhat.com>
5586
5587 * i386-low.h (i386-dregs.h): New include.
5588 (DR_FIRSTADDR): Now in i386-dregs.h.
5589 (DR_LASTADDR): Likewise.
5590 (DR_NADDR): Likewise.
5591 (DR_STATUS): Likewise.
5592 (DR_CONTROL): Likewise.
5593 (i386_debug_reg_state): Likewise.
5594 (i386_dr_insert_watchpoint): Likewise.
5595 (i386_dr_remove_watchpoint): Likewise.
5596 (i386_dr_region_ok_for_watchpoint): Likewise.
5597 (i386_dr_stopped_data_address): Likewise.
5598 (i386_dr_stopped_by_watchpoint): Likewise.
5599 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5600
5601 2014-06-18 Gary Benson <gbenson@redhat.com>
5602
5603 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5604 i386_dr_insert_watchpoint.
5605 (i386_low_remove_watchpoint): Renamed to
5606 i386_dr_remove_watchpoint.
5607 (i386_low_region_ok_for_watchpoint): Renamed to
5608 i386_dr_region_ok_for_watchpoint.
5609 (i386_low_stopped_data_address): Renamed to
5610 i386_dr_stopped_data_address.
5611 (i386_low_stopped_by_watchpoint): Renamed to
5612 i386_dr_stopped_by_watchpoint.
5613 * i386-low.c (i386_show_dr): Renamed to
5614 i386_dr_show and made nonstatic. All uses updated.
5615 (i386_length_and_rw_bits): Renamed to
5616 i386_dr_length_and_rw_bits and made nonstatic.
5617 All uses updated.
5618 (i386_insert_aligned_watchpoint): Renamed to
5619 i386_dr_insert_aligned_watchpoint and made nonstatic.
5620 All uses updated.
5621 (i386_remove_aligned_watchpoint): Renamed to
5622 i386_dr_remove_aligned_watchpoint and made nonstatic.
5623 All uses updated.
5624 (i386_update_inferior_debug_regs): Renamed to
5625 i386_dr_update_inferior_debug_regs and made nonstatic.
5626 All uses updated.
5627 (i386_low_insert_watchpoint): Renamed to
5628 i386_dr_insert_watchpoint. All uses updated.
5629 (i386_low_remove_watchpoint): Renamed to
5630 i386_dr_remove_watchpoint. All uses updated.
5631 (i386_low_region_ok_for_watchpoint): Renamed to
5632 i386_dr_region_ok_for_watchpoint. All uses updated.
5633 (i386_low_stopped_data_address): Renamed to
5634 i386_dr_stopped_data_address. All uses updated.
5635 (i386_low_stopped_by_watchpoint): Renamed to
5636 i386_dr_stopped_by_watchpoint. All uses updated.
5637
5638 2014-06-18 Gary Benson <gbenson@redhat.com>
5639
5640 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5641 (i386_dr_low_can_set_control): Likewise.
5642 (i386_insert_aligned_watchpoint): New check.
5643
5644 2014-06-18 Gary Benson <gbenson@redhat.com>
5645
5646 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5647 Renamed to state.
5648
5649 2014-06-18 Gary Benson <gbenson@redhat.com>
5650
5651 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5652 instead of fatal and error.
5653 (i386_handle_nonaligned_watchpoint): Likewise.
5654
5655 2014-06-18 Gary Benson <gbenson@redhat.com>
5656
5657 * i386-low.c (i386_get_debug_register_length): New macro.
5658 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5659 (i386_show_dr): Use debug_printf instead of fprintf. Use
5660 phex to format values.
5661
5662 2014-06-18 Gary Benson <gbenson@redhat.com>
5663
5664 * i386-low.h: Comment changes.
5665 * i386-low.c: Likewise.
5666
5667 2014-06-18 Gary Benson <gbenson@redhat.com>
5668
5669 * i386-low.c: Whitespace changes.
5670
5671 2014-06-12 Tom Tromey <tromey@redhat.com>
5672
5673 * utils.c (freeargv): Remove.
5674
5675 2014-06-12 Tom Tromey <tromey@redhat.com>
5676
5677 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5678 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5679 (parse_debug_format_options): Likewise.
5680 (gdbserver_usage): Likewise.
5681 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5682 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5683 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5684 against libiberty.
5685 ($(LIBGNU)): Depend on libiberty.
5686 (all-lib): Recurse into all subdirs.
5687 (install-only): Invoke "install" target in subdirs.
5688 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5689 targets.
5690 * configure: Rebuild.
5691 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5692 for vasprintf, vsnprintf, or gettimeofday.
5693 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5694 srv_tgtobj.
5695
5696 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5697
5698 * development.sh: Delete.
5699 * Makefile.in (config.status): Adjust dependency on development.sh.
5700 * configure.ac: Adjust development.sh source call.
5701 * configure: Regenerate.
5702
5703 2014-06-02 Pedro Alves <palves@redhat.com>
5704
5705 * ax.c (gdb_free_agent_expr): New function.
5706 * ax.h (gdb_free_agent_expr): New declaration.
5707 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5708 list.
5709 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5710 static.
5711 (clear_breakpoint_conditions_and_commands): New function.
5712 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5713 (clear_breakpoint_conditions_and_commands): New declaration.
5714
5715 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5716
5717 * linux-aarch64-low.c (asm/ptrace.h): Include.
5718
5719 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5720
5721 Fix TLS access for -static -pthread.
5722 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5723 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5724 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5725
5726 2014-05-20 Pedro Alves <palves@redhat.com>
5727
5728 * linux-aarch64-low.c (aarch64_insert_point)
5729 (aarch64_remove_point): No longer check whether the type is
5730 supported here. Adjust to new interface.
5731 (the_low_target): Install aarch64_supports_z_point_type as
5732 supports_z_point_type method.
5733 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5734 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5735 instead of a Z packet char. Adjust.
5736 (arm_supports_z_point_type): New function.
5737 (arm_insert_point, arm_remove_point): Adjust to new interface.
5738 (the_low_target): Install arm_supports_z_point_type.
5739 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5740 (cris_insert_point, cris_remove_point): Adjust to new interface.
5741 Don't check whether the type is supported here.
5742 (the_low_target): Install cris_supports_z_point_type.
5743 * linux-low.c (linux_supports_z_point_type): New function.
5744 (linux_insert_point, linux_remove_point): Adjust to new interface.
5745 * linux-low.h (struct linux_target_ops) <insert_point,
5746 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5747 raw_breakpoint pointer parameter.
5748 <supports_z_point_type>: New method.
5749 * linux-mips-low.c (mips_supports_z_point_type): New function.
5750 (mips_insert_point, mips_remove_point): Adjust to new interface.
5751 Use mips_supports_z_point_type.
5752 (the_low_target): Install mips_supports_z_point_type.
5753 * linux-ppc-low.c (the_low_target): Install NULL as
5754 supports_z_point_type method.
5755 * linux-s390-low.c (the_low_target): Install NULL as
5756 supports_z_point_type method.
5757 * linux-sparc-low.c (the_low_target): Install NULL as
5758 supports_z_point_type method.
5759 * linux-x86-low.c (x86_supports_z_point_type): New function.
5760 (x86_insert_point): Adjust to new insert_point interface. Use
5761 insert_memory_breakpoint. Adjust to new
5762 i386_low_insert_watchpoint interface.
5763 (x86_remove_point): Adjust to remove_point interface. Use
5764 remove_memory_breakpoint. Adjust to new
5765 i386_low_remove_watchpoint interface.
5766 (the_low_target): Install x86_supports_z_point_type.
5767 * lynx-low.c (lynx_target_ops): Install NULL as
5768 supports_z_point_type callback.
5769 * nto-low.c (nto_supports_z_point_type): New.
5770 (nto_insert_point, nto_remove_point): Adjust to new interface.
5771 (nto_target_ops): Install nto_supports_z_point_type.
5772 * mem-break.c: Adjust intro comment.
5773 (struct raw_breakpoint) <raw_type, size>: New fields.
5774 <inserted>: Update comment.
5775 <shlib_disabled>: Delete field.
5776 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5777 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5778 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5779 (raw_bkpt_type_to_target_hw_bp_type): New function.
5780 (find_enabled_raw_code_breakpoint_at): New function.
5781 (find_raw_breakpoint_at): New type and size parameters. Use them.
5782 (insert_memory_breakpoint): New function, based off
5783 set_raw_breakpoint_at.
5784 (remove_memory_breakpoint): New function.
5785 (set_raw_breakpoint_at): Reimplement.
5786 (set_breakpoint): New, based on set_breakpoint_at.
5787 (set_breakpoint_at): Reimplement.
5788 (delete_raw_breakpoint): Go through the_target->remove_point
5789 instead of assuming memory breakpoints.
5790 (find_gdb_breakpoint_at): Delete.
5791 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5792 (find_gdb_breakpoint): New function.
5793 (set_gdb_breakpoint_at): Delete.
5794 (z_type_supported): New function.
5795 (set_gdb_breakpoint_1): New function, loosely based off
5796 set_gdb_breakpoint_at.
5797 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5798 (delete_gdb_breakpoint_at): Delete.
5799 (delete_gdb_breakpoint_1): New function, loosely based off
5800 delete_gdb_breakpoint_at.
5801 (delete_gdb_breakpoint): New function.
5802 (clear_gdb_breakpoint_conditions): Rename to ...
5803 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5804 breakpoint.
5805 (add_condition_to_breakpoint): Make static.
5806 (add_breakpoint_condition): Take a struct breakpoint pointer
5807 instead of an address. Adjust.
5808 (gdb_condition_true_at_breakpoint): Rename to ...
5809 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5810 z_type parameter.
5811 (gdb_condition_true_at_breakpoint): Reimplement.
5812 (add_breakpoint_commands): Take a struct breakpoint pointer
5813 instead of an address. Adjust.
5814 (gdb_no_commands_at_breakpoint): Rename to ...
5815 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5816 parameter. Return true if no breakpoint was found. Change debug
5817 output.
5818 (gdb_no_commands_at_breakpoint): Reimplement.
5819 (run_breakpoint_commands): Rename to ...
5820 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5821 and change return type to boolean.
5822 (run_breakpoint_commands): New function.
5823 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5824 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5825 breakpoint. Go through the_target->remove_point instead of
5826 assuming memory breakpoint.
5827 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5828 software and hardware breakpoints.
5829 (reinsert_raw_breakpoint): Go through the_target->insert_point
5830 instead of assuming memory breakpoint.
5831 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5832 software and hardware breakpoints.
5833 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5834 Check both software and hardware breakpoints.
5835 (validate_inserted_breakpoint): Assert the breakpoint is a
5836 software breakpoint. Set the inserted flag to -1 instead of
5837 setting shlib_disabled.
5838 (delete_disabled_breakpoints): Adjust.
5839 (validate_breakpoints): Only validate software breakpoints.
5840 Adjust to inserted flag change.
5841 (check_mem_read, check_mem_write): Skip breakpoint types other
5842 than software breakpoints. Adjust to inserted flag change.
5843 * mem-break.h (enum raw_bkpt_type): New enum.
5844 (raw_breakpoint, struct process_info): Forward declare.
5845 (Z_packet_to_target_hw_bp_type): Delete declaration.
5846 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5847 (set_gdb_breakpoint, delete_gdb_breakpoint)
5848 (clear_breakpoint_conditions): New declarations.
5849 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5850 (breakpoint_inserted_here): Update comment.
5851 (add_breakpoint_condition, add_breakpoint_commands): Replace
5852 address parameter with a breakpoint pointer parameter.
5853 (gdb_breakpoint_here): Update comment.
5854 (delete_gdb_breakpoint_at): Delete.
5855 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5856 * server.c (process_point_options): Take a struct breakpoint
5857 pointer instead of an address. Adjust.
5858 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5859 delete_gdb_breakpoint.
5860 * spu-low.c (spu_target_ops): Install NULL as
5861 supports_z_point_type method.
5862 * target.h: Include mem-break.h.
5863 (struct target_ops) <prepare_to_access_memory>: Update comment.
5864 <supports_z_point_type>: New field.
5865 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5866 instead of a char. Also take a raw breakpoint pointer.
5867 * win32-arm-low.c (the_low_target): Install NULL as
5868 supports_z_point_type.
5869 * win32-i386-low.c (i386_supports_z_point_type): New function.
5870 (i386_insert_point, i386_remove_point): Adjust to new interface.
5871 (the_low_target): Install i386_supports_z_point_type.
5872 * win32-low.c (win32_supports_z_point_type): New function.
5873 (win32_insert_point, win32_remove_point): Adjust to new interface.
5874 (win32_target_ops): Install win32_supports_z_point_type.
5875 * win32-low.h (struct win32_target_ops):
5876 <supports_z_point_type>: New method.
5877 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5878 instead of a char. Also take a raw breakpoint pointer.
5879
5880 2014-05-20 Pedro Alves <palves@redhat.com>
5881
5882 * mem-break.h: Include break-common.h.
5883 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5884 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5885 (Z_packet_to_target_hw_bp_type): New declaration.
5886 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5887 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5888 (Z_PACKET_ACCESS_WP): Delete macros.
5889 (Z_packet_to_hw_type): Delete function.
5890 * i386-low.h: Don't include break-common.h here.
5891 (Z_packet_to_hw_type): Delete declaration.
5892 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5893 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5894 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5895 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5896 * linux-aarch64-low.c: Don't include break-common.h here.
5897 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5898 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5899 (Z_packet_to_target_hw_bp_type): Delete function.
5900 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5901 function.
5902 (mips_insert_point, mips_remove_point): Use
5903 Z_packet_to_target_hw_bp_type.
5904
5905 2014-05-20 Pedro Alves <palves@redhat.com>
5906
5907 * linux-aarch64-low.c: Include break-common.h.
5908 (enum target_point_type): Delete.
5909 (Z_packet_to_point_type): Rename to ...
5910 (Z_packet_to_target_hw_bp_type): ... this, and return a
5911 target_hw_bp_type instead.
5912 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5913 instead of an enum target_point_type.
5914 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5915 breakpoint type.
5916 (aarch64_dr_state_insert_one_point)
5917 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5918 (aarch64_handle_aligned_watchpoint)
5919 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5920 Take an enum target_hw_bp_type instead of an enum
5921 target_point_type.
5922 (aarch64_supports_z_point_type): New function.
5923 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5924 use Z_packet_to_target_hw_bp_type.
5925
5926 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5927
5928 * configure.ac: Only use -Werror by default when DEVELOPMENT
5929 is true.
5930 * configure: Regenerate.
5931
5932 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5933
5934 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5935 * linux-x86-low.c (X86_64_USER_REGS): New.
5936 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5937
5938 2014-04-28 Yao Qi <yao@codesourcery.com>
5939
5940 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5941 name.
5942
5943 2014-04-25 Pedro Alves <palves@redhat.com>
5944
5945 PR server/16255
5946 * linux-low.c (linux_attach_fail_reason_string): New function.
5947 (linux_attach_lwp): Delete.
5948 (linux_attach_lwp_1): Rename to ...
5949 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5950 argument. Remove "initial" parameter. Return int instead of
5951 void. Don't error or warn here.
5952 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5953 failure to attach to the tgid. Call warning when failing to
5954 attach to an lwp.
5955 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5956 argument. Remove "initial" parameter. Return int instead of
5957 void. Don't error or warn here.
5958 (linux_attach_fail_reason_string): New declaration.
5959 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5960 interface change. Use linux_attach_fail_reason_string.
5961
5962 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5963 Walfred Tedeschi <walfred.tedeschi@intel.com>
5964
5965 * Makefile.in: Added rules to handle new files
5966 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5967 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5968 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5969 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5970 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5971 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5972 x32-avx512-linux.o.
5973 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5974 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5975 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5976 i386/x32-avx512.xml.
5977 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5978 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5979 i386/x32-avx512-linux.xml.
5980 * i387-fp.c (num_avx512_k_registers): New constant for number
5981 of K registers.
5982 (num_avx512_zmmh_low_registers): New constant for number of
5983 lower ZMM registers (0-15).
5984 (num_avx512_zmmh_high_registers): New constant for number of
5985 higher ZMM registers (16-31).
5986 (num_avx512_ymmh_registers): New contant for number of higher
5987 YMM registers (ymm16-31 added by avx521 on x86_64).
5988 (num_avx512_xmm_registers): New constant for number of higher
5989 XMM registers (xmm16-31 added by AVX512 on x86_64).
5990 (struct i387_xsave): Add space for AVX512 registers.
5991 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5992 Add code to handle AVX512 registers.
5993 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5994 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5995 prototypei from generated file.
5996 (tdesc_amd64_avx512_linux): Likewise.
5997 (init_registers_x32_avx512_linux): Likewise.
5998 (tdesc_x32_avx512_linux): Likewise.
5999 (init_registers_i386_avx512_linux): Likewise.
6000 (tdesc_i386_avx512_linux): Likewise.
6001 (x86_64_regmap): Add AVX512 registers.
6002 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6003 mask.
6004 (initialize_low_arch): Add code to initialize AVX512 registers.
6005
6006 2014-04-23 Pedro Alves <palves@redhat.com>
6007
6008 * mem-break.c (find_gdb_breakpoint_at): Make static.
6009 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6010
6011 2014-04-23 Pedro Alves <palves@redhat.com>
6012
6013 * i386-low.c: Don't include break-common.h here.
6014 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6015 prototype to take target_hw_bp_type as argument instead of a Z
6016 packet char.
6017 * i386-low.h: Include break-common.h here.
6018 (Z_packet_to_hw_type): Declare.
6019 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6020 prototypes.
6021 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6022 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6023 (x86_remove_point): Convert the packet number to a
6024 target_hw_bp_type before calling i386_low_remove_watchpoint.
6025 * win32-i386-low.c (i386_insert_point): Convert the packet number
6026 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6027 (i386_remove_point): Convert the packet number to a
6028 target_hw_bp_type before calling i386_low_remove_watchpoint.
6029
6030 2014-04-23 Pedro Alves <palves@redhat.com>
6031
6032 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6033
6034 2014-04-10 Pedro Alves <palves@redhat.com>
6035
6036 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6037 Check if the condition or command is NULL before checking if the
6038 breakpoint is known. On success, return true.
6039 * mem-break.h (add_breakpoint_condition): Document return.
6040 (add_breakpoint_commands): Add describing comment.
6041 * server.c (skip_to_semicolon): New function.
6042 (process_point_options): Use it.
6043
6044 2014-04-09 Pedro Alves <palves@redhat.com>
6045
6046 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6047 to lwpid_of.
6048
6049 2014-02-27 Pedro Alves <palves@redhat.com>
6050
6051 PR 12702
6052 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6053 macros.
6054 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6055 output.
6056 (last_thread_of_process_p): Take a PID argument instead of a
6057 thread pointer.
6058 (linux_wait_for_lwp): Delete.
6059 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6060 functions.
6061 (linux_low_filter_event): New function, party factored out from
6062 linux_wait_for_event.
6063 (linux_wait_for_event): Rename to ...
6064 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6065 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6066 sigsuspend. Check for zombie leaders.
6067 (linux_wait_for_event): Reimplement as wrapper around
6068 linux_wait_for_event_filtered.
6069 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6070 a normal or signal exit is seen, it's the whole process exiting.
6071 (wait_for_sigstop): No longer a for_each_inferior callback.
6072 Rewrite on top of linux_wait_for_event_filtered.
6073 (stop_all_lwps): Call wait_for_sigstop directly.
6074 * server.c (resume, handle_target_event): Handle
6075 TARGET_WAITKIND_NO_RESUMED.
6076
6077 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6078
6079 * win32-low.c (psapi_get_dll_name,
6080 * win32_CreateToolhelp32Snapshot): Delete.
6081 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6082 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6083 Delete.
6084 (handle_load_dll): Add function description.
6085 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6086
6087 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6088
6089 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6090 Add comment.
6091 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6092 base address when calling win32_add_one_solib.
6093 (handle_load_dll): Delete local variable load_addr.
6094 Remove 0x1000 offset applied to DLL base address when calling
6095 win32_add_one_solib.
6096 (handle_unload_dll): Add comment.
6097
6098 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6099
6100 * win32-low.c (win32_add_all_dlls): Renames
6101 win32_ensure_ntdll_loaded. Rewrite function documentation.
6102 Adjust implementation to always load all DLLs.
6103 Add 0x1000 offset to DLL base address when calling
6104 win32_add_one_solib.
6105 (child_initialization_done): New static global.
6106 (do_initial_child_stuff): Set child_initialization_done to
6107 zero during child initialization, and 1 after. Replace call
6108 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6109 Add comment.
6110 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6111 (handle_unload_dll): Add function documentation.
6112 (get_child_debug_event): Ignore load and unload DLL events
6113 during child initialization.
6114
6115 2014-02-20 Doug Evans <dje@google.com>
6116
6117 Remove global all_lwps.
6118 * inferiors.h (ptid_of): Move here from linux-low.h.
6119 (pid_of, lwpid_of): Ditto.
6120 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6121 parameter is a struct thread_info * now.
6122 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6123 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6124 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6125 directly.
6126 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6127 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6128 * linux-arm-low.c (update_registers_callback): Update, "entry"
6129 parameter is a struct thread_info * now.
6130 Fetch lwpid from current_inferior directly.
6131 (arm_insert_point): Pass &all_threads to find_inferior instead of
6132 &all_lwps.
6133 (arm_remove_point): Ditto.
6134 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6135 (arm_prepare_to_resume): Fetch pid from thread.
6136 (arm_read_description): Fetch lwpid from current_inferior directly.
6137 * linux-low.c (all_lwps): Delete.
6138 (delete_lwp): Delete call to remove_inferior.
6139 (handle_extended_wait): Fetch lwpid from thread.
6140 (add_lwp): Don't set lwp->entry.id. Remove call to
6141 add_inferior_to_list.
6142 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6143 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6144 (kill_one_lwp_callback): Ditto.
6145 (linux_kill): Don't dereference NULL pointer.
6146 Fetch ptid,lwpid from thread.
6147 (get_detach_signal): Fetch ptid from thread.
6148 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6149 Simplify call to regcache_invalidate_thread.
6150 (delete_lwp_callback): Update, "entry" parameter is a
6151 struct thread_info * now. Fetch pid from thread.
6152 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6153 (status_pending_p_callback): Update, "entry" parameter is a
6154 struct thread_info * now. Fetch ptid from thread.
6155 (find_lwp_pid): Update, "entry" parameter is a
6156 struct thread_info * now.
6157 (linux_wait_for_lwp): Fetch pid from thread.
6158 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6159 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6160 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6161 (dequeue_one_deferred_signal): Ditto.
6162 (cancel_breakpoint): Fetch ptid from current_inferior.
6163 (linux_wait_for_event): Pass &all_threads to find_inferior,
6164 not &all_lwps. Fetch ptid, lwpid from thread.
6165 (count_events_callback): Update, "entry" parameter is a
6166 struct thread_info * now.
6167 (select_singlestep_lwp_callback): Ditto.
6168 (select_event_lwp_callback): Ditto.
6169 (cancel_breakpoints_callback): Ditto.
6170 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6171 not &all_lwps.
6172 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6173 (unsuspend_one_lwp): Update, "entry" parameter is a
6174 struct thread_info * now.
6175 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6176 not &all_lwps.
6177 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6178 Fetch lwpid from thread, not lwp.
6179 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6180 Pass &all_threads to find_inferior, not &all_lwps.
6181 (send_sigstop): Fetch lwpid from thread, not lwp.
6182 (send_sigstop_callback): Update, "entry" parameter is a
6183 struct thread_info * now.
6184 (suspend_and_send_sigstop_callback): Ditto.
6185 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6186 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6187 struct thread_info * now.
6188 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6189 from thread, lwp.
6190 (lwp_running): Update, "entry" parameter is a
6191 struct thread_info * now.
6192 (stop_all_lwps): Fetch ptid from thread.
6193 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6194 (linux_resume_one_lwp): Fetch lwpid from thread.
6195 (linux_set_resume_request): Update, "entry" parameter is a
6196 struct thread_info * now. Fetch pid, lwpid from thread.
6197 (resume_status_pending_p): Update, "entry" parameter is a
6198 struct thread_info * now.
6199 (need_step_over_p): Ditto. Fetch lwpid from thread.
6200 (start_step_over): Fetch lwpid from thread.
6201 (linux_resume_one_thread): Update, "entry" parameter is a
6202 struct thread_info * now. Fetch lwpid from thread.
6203 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6204 (proceed_one_lwp): Update, "entry" parameter is a
6205 struct thread_info * now. Fetch lwpid from thread.
6206 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6207 struct thread_info * now.
6208 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6209 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6210 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6211 directly.
6212 (regsets_store_inferior_registers): Ditto.
6213 (fetch_register, store_register): Ditto.
6214 (linux_read_memory, linux_write_memory): Ditto.
6215 (linux_request_interrupt): Ditto.
6216 (linux_read_auxv): Ditto.
6217 (linux_xfer_siginfo): Ditto.
6218 (linux_qxfer_spu): Ditto.
6219 (linux_qxfer_libraries_svr4): Ditto.
6220 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6221 moved to inferiors.h.
6222 (get_lwp): Delete.
6223 (get_thread_lwp): Update.
6224 (struct lwp_info): Delete member "entry". Simplify comment for
6225 member "thread".
6226 (all_lwps): Delete.
6227 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6228 current_inferior directly.
6229 (update_watch_registers_callback): Update, "entry" parameter is a
6230 struct thread_info * now. Fetch pid from thread.
6231 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6232 (mips_insert_point): Fetch lwpid from current_inferior.
6233 Pass &all_threads to find_inferior, not &all_lwps.
6234 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6235 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6236 directly.
6237 (mips_stopped_data_address): Ditto.
6238 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6239 directly.
6240 * linux-tile-low.c (tile_arch_setup): Ditto.
6241 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6242 (update_debug_registers_callback): Update, "entry" parameter is a
6243 struct thread_info * now. Fetch pid from thread.
6244 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6245 Pass &all_threads to find_inferior, not &all_lwps.
6246 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6247 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6248 Pass &all_threads to find_inferior, not &all_lwps.
6249 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6250 (i386_dr_low_get_status): Ditto.
6251 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6252 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6253 (x86_linux_read_description): Ditto.
6254 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6255
6256 2014-02-20 Doug Evans <dje@google.com>
6257
6258 * inferiors.c (get_first_inferior): Fix buglet.
6259
6260 2014-02-19 Doug Evans <dje@google.com>
6261
6262 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6263 * inferiors.c (add_thread): Change result type to struct thread_info *.
6264 All callers updated.
6265 (add_lwp): Call add_thread here instead of in callers.
6266 All callers updated.
6267 * linux-low.h (get_lwp_thread): Rewrite.
6268 (struct lwp_info): New member "thread".
6269
6270 2014-02-19 Doug Evans <dje@google.com>
6271
6272 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6273 All callers updated.
6274
6275 2014-02-19 Doug Evans <dje@google.com>
6276
6277 * inferiors.c (add_thread): Fix whitespace.
6278
6279 2014-02-19 Doug Evans <dje@google.com>
6280
6281 * dll.c (clear_dlls): Replace accessing list implemention details
6282 with API function.
6283 * gdbthread.h (get_first_thread): Declare.
6284 * inferiors.c (for_each_inferior_with_data): New function.
6285 (get_first_thread): New function.
6286 (find_thread_ptid): Simplify.
6287 (get_first_inferior): New function.
6288 (clear_list): Delete.
6289 (one_inferior_p): New function.
6290 (clear_inferior_list): New function.
6291 (clear_inferiors): Update.
6292 * inferiors.h (for_each_inferior_with_data): Declare.
6293 (clear_inferior_list): Declare.
6294 (one_inferior_p): Declare.
6295 (get_first_inferior): Declare.
6296 * linux-low.c (linux_wait_for_event): Replace accessing list
6297 implemention details with API function.
6298 * server.c (target_running): Ditto.
6299 (accumulate_file_name_length): New function.
6300 (emit_dll_description): New function.
6301 (handle_qxfer_libraries): Replace accessing list implemention
6302 details with API function.
6303 (handle_qxfer_threads_worker): New function.
6304 (handle_qxfer_threads_proper): Replace accessing list implemention
6305 details with API function.
6306 (handle_query): Ditto.
6307 (visit_actioned_threads_callback_ftype): New typedef.
6308 (visit_actioned_threads_data): New struct.
6309 (visit_actioned_threads): Rewrite to be find_inferior callback.
6310 (resume): Call find_inferior.
6311 (handle_status): Replace accessing list implemention
6312 details with API function.
6313 (process_serial_event): Replace accessing list implemention details
6314 with API function.
6315 * target.c (set_desired_inferior): Replace accessing list implemention
6316 details with API function.
6317 * tracepoint.c (same_process_p): New function.
6318 (gdb_agent_about_to_close): Replace accessing list implemention
6319 details with API function.
6320 * win32-low.c (child_delete_thread): Replace accessing list
6321 implemention details with API function.
6322 (match_dll_by_basename): New function.
6323 (dll_is_loaded_by_basename): New function.
6324 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6325 details call to dll_is_loaded_by_basename.
6326
6327 2014-02-19 Doug Evans <dje@google.com>
6328
6329 * dll.h (struct dll_info): Add comment.
6330 * gdbthread.h (struct thread_info): Add comment.
6331 (current_ptid): Simplify.
6332 * inferiors.c (add_process): Update.
6333 (remove_process): Update.
6334 * inferiors.h (struct process_info): Rename member "head" to "entry".
6335 * linux-low.c (delete_lwp): Update.
6336 (add_lwp): Update.
6337 (last_thread_of_process_p): Update.
6338 (kill_one_lwp_callback, linux_kill): Update.
6339 (status_pending_p_callback): Update.
6340 (wait_for_sigstop): Update. Simplify read of ptid.
6341 (start_step_over): Update.
6342 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6343 (get_lwp_thread): Update.
6344 (struct lwp_info): Rename member "head" to "entry".
6345 * regcache.h (inferior_list_entry): Delete.
6346 * server.c (kill_inferior_callback): Update.
6347 (detach_or_kill_inferior_callback): Update.
6348 (print_started_pid): Update.
6349 (print_attached_pid): Update.
6350 (process_serial_event): Simplify read of ptid.
6351 * thread-db.c (thread_db_create_event): Update.
6352 (thread_db_get_tls_address): Update.
6353 * win32-low.c (current_inferior_ptid): Simplify.
6354
6355 2014-02-19 Tom Tromey <tromey@redhat.com>
6356
6357 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6358 argument.
6359 (target_supports_btrace): Update.
6360
6361 2014-02-14 Yao Qi <yao@codesourcery.com>
6362
6363 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6364 (rsp-low-ipa.o): New target.
6365
6366 2014-02-12 Tom Tromey <tromey@redhat.com>
6367
6368 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6369 convert_ascii_to_int.
6370 * regcache.c (registers_to_string): Likewise.
6371 * remote-utils.c (decode_M_packet): Likewise.
6372 * server.c (process_serial_event): Likewise.
6373
6374 2014-02-12 Tom Tromey <tromey@redhat.com>
6375
6376 * server.c (handle_query, handle_v_run): Use hex2bin, not
6377 unhexify.
6378 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6379
6380 2014-02-12 Tom Tromey <tromey@redhat.com>
6381
6382 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6383 convert_int_to_ascii.
6384 * regcache.c (registers_to_string, collect_register_as_string):
6385 Likewise.
6386 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6387 Likewise.
6388 * server.c (process_serial_event): Likewise.
6389 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6390 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6391
6392 2014-02-12 Tom Tromey <tromey@redhat.com>
6393
6394 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6395 bin2hex, not hexify.
6396 * tracepoint.c (cmd_qtstatus): Likewise.
6397
6398 2014-02-12 Tom Tromey <tromey@redhat.com>
6399
6400 * remote-utils.c (monitor_output): Pass explicit length to
6401 hexify.
6402
6403 2014-02-12 Tom Tromey <tromey@redhat.com>
6404
6405 * tracepoint.c: Include rsp-low.h.
6406 * server.c: Include rsp-low.h.
6407 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6408 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6409 declare.
6410 * remote-utils.c: Include rsp-low.h.
6411 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6412 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6413 (convert_int_to_ascii, convert_ascii_to_int): Move to
6414 common/rsp-low.c.
6415 * regcache.c: Include rsp-low.h.
6416 * ax.c: Include rsp-low.h.
6417 * Makefile.in (SFILES): Add common/rsp-low.c.
6418 (OBS): Add rsp-low.o.
6419 (rsp-low.o): New target.
6420
6421 2014-02-12 Tom Tromey <tromey@redhat.com>
6422
6423 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6424 Include print-utils.h.
6425 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6426 (plongest, thirty_two, phex_nz): Remove.
6427 * Makefile.in (SFILES): Add common/print-utils.c.
6428 (OBS): Add print-utils.o.
6429 (print-utils-ipa.o): New target.
6430 (print-utils.o): New target.
6431 (IPA_OBJS): Add print-utils-ipa.o.
6432
6433 2014-02-06 Tom Tromey <tromey@redhat.com>
6434
6435 * Makefile.in (SFILES): Fix indentation.
6436
6437 2014-02-05 Doug Evans <dje@google.com>
6438
6439 * linux-low.c (linux_wait_for_event): Improve comment.
6440 (linux_wait_1): Keep current_inferior in sync with event_child.
6441
6442 2014-01-22 Doug Evans <dje@google.com>
6443
6444 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6445
6446 2014-01-22 Doug Evans <dje@google.com>
6447
6448 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6449 * configure: Regenerate.
6450 * config.in: Regenerate.
6451 * Makefile.in (SFILES): Add debug.c.
6452 (OBS): Add debug.o.
6453 * debug.c: New file.
6454 * debug.h: New file.
6455 * linux-aarch64-low.c (*): Update all debugging printfs to use
6456 debug_printf instead of fprintf.
6457 * linux-arm-low.c (*): Ditto.
6458 * linux-cris-low.c (*): Ditto.
6459 * linux-crisv32-low.c (*): Ditto.
6460 * linux-m32r-low.c (*): Ditto.
6461 * linux-sparc-low.c (*): Ditto.
6462 * linux-x86.c (*): Ditto.
6463 * linux-low.c (*): Ditto.
6464 (linux_wait_1): Add calls to debug_enter, debug_exit.
6465 (linux_wait): Remove redundant debugging printf.
6466 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6467 (linux_resume, unstop_all_lwps): Ditto.
6468 * mem-break.c (*): Update all debugging printfs to use
6469 debug_printf instead of fprintf.
6470 * remote-utils.c (*): Ditto.
6471 * thread-db.c (*): Ditto.
6472 * server.c #include <ctype.h>, "gdb_vecs.h".
6473 (debug_threads): Moved to debug.c.
6474 (*): Update all debugging printfs to use debug_printf instead of
6475 fprintf.
6476 (start_inferior): Replace call to fflush with call to debug_flush.
6477 (monitor_show_help): Mention set debug-format.
6478 (parse_debug_format_options): New function.
6479 (handle_monitor_command): Handle "monitor set debug-format".
6480 (gdbserver_usage): Mention --debug-format.
6481 (main): Parse --debug-format.
6482 * server.h (debug_threads): Declaration moved to debug.h.
6483 #include "debug.h".
6484 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6485 trace_debug_1 that uses debug_printf.
6486 (tracepoint_look_up_symbols): Update all debugging printfs to use
6487 debug_printf instead of fprintf.
6488
6489 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6490
6491 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6492 sys/ptrace.h.
6493
6494 2014-01-17 Pedro Alves <palves@redhat.com>
6495
6496 PR build/16445
6497 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6498 defined after including gdb_proc_service.h.
6499
6500 2014-01-16 Doug Evans <dje@google.com>
6501
6502 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6503 (match_dll): Use it.
6504
6505 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6506
6507 * target.h (target_ops) <read_btrace>: Change parameters and
6508 return type to allow error reporting.
6509 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6510 trace reading errors on.
6511 * linux-low.c (linux_low_read_btrace): Pass trace reading
6512 errors on.
6513 (linux_low_disable_btrace): New.
6514
6515 2014-01-15 Doug Evans <dje@google.com>
6516
6517 * inferiors.c (thread_id_to_gdb_id): Delete.
6518 * inferiors.h (thread_id_to_gdb_id): Delete.
6519
6520 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6521
6522 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6523 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6524 versions.
6525
6526 2014-01-08 Pedro Alves <palves@redhat.com>
6527
6528 * server.c (handle_status): Don't discard previous queued stop
6529 replies or thread's pending status here.
6530 (main) <disconnection>: Do it here instead.
6531
6532 2014-01-08 Pedro Alves <palves@redhat.com>
6533
6534 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6535 * server.c (visit_actioned_threads, handle_pending_status): New
6536 function.
6537 (handle_v_cont): Factor out parts to ...
6538 (resume): ... this new function. If in all-stop, and a thread
6539 being resumed has a pending status, report it without actually
6540 resuming.
6541 (myresume): Adjust to use the new 'resume' function.
6542 (clear_pending_status_callback, set_pending_status_callback)
6543 (find_status_pending_thread_callback): New functions.
6544 (handle_status): Handle the case of multiple threads having
6545 interesting statuses to report. Report threads' real last signal
6546 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6547 with an interesting thread to report the status for, instead of
6548 always reporting the status of the first thread.
6549
6550 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6551
6552 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6553 * gdbreplay.c (gdbreplay_version): Likewise.
6554
6555 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6556
6557 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6558 iov.iov_len with the real length in use.
6559
6560 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6561
6562 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6563 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6564 for all targets that use win32-low.c.
6565 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6566 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6567
6568 2013-12-13 Pedro Alves <palves@redhat.com>
6569
6570 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6571 if equal to TARGET_WAITKIND_LOADED.
6572 * win32-low.c (cached_status): New static global.
6573 (win32_wait): Add declaration.
6574 (do_initial_child_stuff): Flush all initial pending debug events
6575 up to the initial breakpoint.
6576 (win32_wait): If CACHED_STATUS was set, return that instead
6577 of doing a real wait. Remove the code resuming the execution
6578 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6579 during the initial phase. Also remove the code changing
6580 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6581 TARGET_WAITKIND_STOPPED.
6582
6583 2013-12-11 Yao Qi <yao@codesourcery.com>
6584
6585 * notif.c (handle_notif_ack): Return 0 if no notification
6586 matches.
6587
6588 2013-11-20 Doug Evans <dje@google.com>
6589
6590 * linux-low.c (linux_set_resume_request): Fix comment.
6591
6592 2013-11-20 Doug Evans <dje@google.com>
6593
6594 * linux-low.c (resume_status_pending_p): Tweak comment.
6595
6596 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6597
6598 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6599 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6600 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6601 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6602 (srv_amd64_regobj): Add amd64-mpx.o.
6603 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6604 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6605 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6606 * i387-fp.c (num_pl_bnd_register) Added constant.
6607 (num_pl_bnd_cfg_registers) Added constant.
6608 (struct i387_xsave) Added reserved area and MPX fields.
6609 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6610 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6611 function.
6612 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6613 (init_registers_amd64_mpx_linux): Declare new function.
6614 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6615 (x86_64_regmap): Add MPX registers.
6616 (x86_linux_read_description): Add MPX case.
6617 (initialize_low_arch): Initialize MPX targets.
6618
6619 2013-11-18 Tom Tromey <tromey@redhat.com>
6620
6621 * configure: Rebuild.
6622 * configure.ac: Don't check for stdlib.h.
6623 * gdbreplay.c: Unconditionally include stdlib.h.
6624
6625 2013-11-18 Tom Tromey <tromey@redhat.com>
6626
6627 * config.in: Rebuild.
6628 * configure: Rebuild.
6629 * configure.ac: Don't use AC_HEADER_DIRENT.
6630
6631 2013-11-18 Tom Tromey <tromey@redhat.com>
6632
6633 * server.h: Don't check HAVE_STRING_H.
6634 * gdbreplay.c: Don't check HAVE_STRING_H.
6635 * configure: Rebuild.
6636
6637 2013-11-18 Tom Tromey <tromey@redhat.com>
6638
6639 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6640 LIBGNU.
6641
6642 2013-11-08 Tom Tromey <tromey@redhat.com>
6643
6644 * configure, config.in: Rebuild.
6645 * configure.ac: Remove unused configury.
6646
6647 2013-11-08 Tom Tromey <tromey@redhat.com>
6648
6649 * acinclude.m4: Include common.m4, codeset.m4.
6650 * configure, config.in: Rebuild.
6651 * configure.ac: Use GDB_AC_COMMON.
6652
6653 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6654
6655 * linux-s390-low.c (HWCAP_S390_TE): New define.
6656 (s390_arch_setup): Consider the TE field in the HWCAP for
6657 determining 'have_regset_tdb'.
6658
6659 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6660
6661 PR gdb/16014
6662 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6663 call to sizeof.
6664
6665 2013-10-02 Pedro Alves <palves@redhat.com>
6666
6667 * server.c (process_serial_event): Don't output "GDBserver
6668 exiting" if GDB is connected through stdio.
6669 * target.c (mywait): Likewise, be silent if GDB is connected
6670 through stdio.
6671
6672 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6673
6674 * lynx-low.c (lynx_add_threads_after_attach): New function.
6675 (lynx_attach): Remove call to add_thread. Add call to
6676 lynx_add_threads_after_attach instead.
6677
6678 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6679
6680 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6681 * config.in, configure: Regenerated.
6682
6683 2013-09-18 Yao Qi <yao@codesourcery.com>
6684
6685 PR server/15959
6686 * server.c (start_inferior): Clear 'resume_info'.
6687
6688 2013-09-16 Jiong Wang <jiwang@tilera.com>
6689
6690 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6691 for each register.
6692
6693 2013-09-16 Jiong Wang <jiwang@tilera.com>
6694
6695 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6696 linux-tile-low.o to srv_tgtobj.
6697
6698 2013-09-16 Will Newton <will.newton@linaro.org>
6699
6700 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6701 out regs.
6702
6703 2013-09-06 Pedro Alves <palves@redhat.com>
6704
6705 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6706 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6707 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6708 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6709 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6710 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6711
6712 2013-09-06 Pedro Alves <palves@redhat.com>
6713
6714 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6715 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6716
6717 2013-09-06 Pedro Alves <palves@redhat.com>
6718
6719 * linux-amd64-ipa.c: Include tracepoint.h.
6720 * linux-i386-ipa.c: Include tracepoint.h.
6721
6722 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6723
6724 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6725 (ps_get_thread_area): New function.
6726
6727 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6728
6729 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6730 (initialize_low_arch): Call init_registers_crisv32 rather than
6731 init_register_crisv32.
6732
6733 2013-09-05 Pedro Alves <palves@redhat.com>
6734
6735 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6736 to ...
6737 * hostio.h: ... this new file.
6738 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6739 win32-low.c: Include hostio.h.
6740
6741 2013-09-05 Pedro Alves <palves@redhat.com>
6742
6743 * server.h (gdb_client_data, handler_func, callback_handler_func)
6744 (delete_file_handler, add_file_handler, append_callback_event)
6745 (delete_callback_event, start_event_loop, initialize_event_loop):
6746 Move to event-loop.h and include it.
6747 * event-loop.h: New file.
6748
6749 2013-09-05 Pedro Alves <palves@redhat.com>
6750
6751 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6752 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6753 (loaded_dll, unloaded_dll): Move to ...
6754 * dll.h: ... this new file.
6755 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6756
6757 2013-09-05 Pedro Alves <palves@redhat.com>
6758
6759 * server.h (current_process, get_thread_process, all_processes)
6760 (add_inferior_to_list, for_each_inferior, current_inferior)
6761 (remove_inferior, add_process, remove_process, find_process_pid)
6762 (have_started_inferiors_p, have_attached_inferiors_p)
6763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6764 (clear_inferiors, find_inferior, find_inferior_id)
6765 (inferior_target_data, set_inferior_target_data)
6766 (inferior_regcache_data, set_inferior_regcache_data): Move to
6767 inferiors.h, and include it.
6768 * inferiors.h: New file.
6769
6770 2013-09-05 Pedro Alves <palves@redhat.com>
6771
6772 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6773 Move ...
6774 * ax.h: ... here.
6775
6776 2013-09-05 Pedro Alves <palves@redhat.com>
6777
6778 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6779 tracepoint.h.
6780 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6781 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6782 (handle_tracepoint_general_set, handle_tracepoint_query)
6783 (tracepoint_finished_step, tracepoint_was_hit)
6784 (release_while_stepping_state_list, current_traceframe)
6785 (in_readonly_region, traceframe_read_mem)
6786 (fetch_traceframe_registers, traceframe_read_sdata)
6787 (traceframe_read_info, struct fast_tpoint_collect_status)
6788 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6789 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6790 (supply_fast_tracepoint_registers)
6791 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6792 (ipa_tdesc, claim_trampoline_space)
6793 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6794 (agent_mem_read, agent_get_trace_state_variable_value)
6795 (agent_set_trace_state_variable_value, agent_tsv_read)
6796 (agent_mem_read_string, get_raw_reg_func_addr)
6797 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6798 * tracepoint.h: ... this new file.
6799
6800 2013-09-05 Pedro Alves <palves@redhat.com>
6801
6802 * server.h (perror_with_name, error, fatal, warning, paddress)
6803 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6804 include it.
6805 * utils.h: New file.
6806
6807 2013-09-05 Pedro Alves <palves@redhat.com>
6808
6809 * server.h (remote_debug, noack_mode, transport_is_reliable)
6810 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6811 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6812 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6813 (write_enn, initialize_async_io, enable_async_io)
6814 (disable_async_io, check_remote_input_interrupt_request)
6815 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6816 (dead_thread_notify, prepare_resume_reply)
6817 (decode_address_to_semicolon, decode_address, decode_m_packet)
6818 (decode_M_packet, decode_X_packet, decode_xfer_write)
6819 (decode_search_memory_packet, unhexify, hexify)
6820 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6821 (look_up_one_symbol, relocate_instruction)
6822 (monitor_output): Move to remote-utils.h, and include it.
6823 * remote-utils.h: New file.
6824
6825 2013-09-05 Pedro Alves <palves@redhat.com>
6826
6827 * server.h (_): Delete.
6828
6829 2013-09-02 Pedro Alves <palves@redhat.com>
6830
6831 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6832 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6833 allocated.
6834 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6835
6836 2013-09-02 Pierre Muller <muller@sourceware.org>
6837
6838 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6839 or WriteProcessMemory complete successfully and handle
6840 ERROR_PARTIAL_COPY error.
6841
6842 2013-09-02 Pedro Alves <palves@redhat.com>
6843
6844 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6845 error instead of EIO.
6846
6847 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6848
6849 PR server/15604
6850 * linux-low.c: Include filestuff.h.
6851 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6852 * lynx-low.c: Include filestuff.h.
6853 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6854 * server.c: Include filestuff.h.
6855 (main): Call notice_open_fds.
6856 * spu-low.c: Include filestuff.h.
6857 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6858
6859 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6860
6861 * Makefile.in: Explain why ../target and ../nat are not
6862 listed as include file search paths.
6863 (linux-waitpid.o): New object file rule.
6864 * configure.srv (srv_native_linux_obj): New variable.
6865 Replace all occurrences of linux native object files with
6866 $srv_native_linux_obj.
6867 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6868 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6869 (linux_enable_event_reporting): Remove declaration.
6870 (my_waitpid): Moved to common/linux-waitpid.c.
6871 (linux_wait_for_event): Pass ptid when calling
6872 linux_enable_event_reporting.
6873 (linux_supports_tracefork_flag): Remove.
6874 (linux_enable_event_reporting): Likewise.
6875 (linux_tracefork_grandchild): Remove.
6876 (STACK_SIZE): Moved to common/linux-ptrace.c.
6877 (linux_tracefork_child): Remove.
6878 (linux_test_for_tracefork): Remove.
6879 (linux_look_up_symbols): Call linux_supports_traceclone.
6880 (initialize_low): Remove call to linux_test_for_tracefork.
6881 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6882 common/linux-ptrace.h.
6883 (PTRACE_TYPE_ARG4): Likewise.
6884 Include linux-ptrace.h.
6885
6886 2013-08-21 Pedro Alves <palves@redhat.com>
6887
6888 * config.in: Renegerate.
6889
6890 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6891
6892 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6893 (SFILES): Remove $(srcdir)/common/target-common.c and
6894 add $(srcdir)/target/waitstatus.c.
6895 (OBS): Remove target-common.o and add waitstatus.o.
6896 (server_h): Remove $(srcdir)/../common/target-common.h and
6897 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6898 and $(srcdir)/../target/waitstatus.h.
6899 (target-common.o): Remove.
6900 (waitstatus.o): New target object file.
6901 * target.h: Do not include target-common.h and
6902 include target/resume.h, target/wait.h and
6903 target/waitstatus.h.
6904
6905 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6906
6907 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6908 to PTRACE_TYPE_ARG3.
6909 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6910 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6911 PTRACE_TYPE_ARG4.
6912 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6913 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6914
6915 2013-07-27 Jie Zhang <jie@codesourcery.com>
6916 Daniel Jacobowitz <dan@codesourcery.com>
6917 Yao Qi <yao@codesourcery.com>
6918
6919 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6920 (mips-linux-watch.o): New rule.
6921 (mips_linux_watch_h): New variable.
6922 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6923 srv_tgtobj.
6924 * linux-mips-low.c: Include mips-linux-watch.h.
6925 (struct arch_process_info, struct arch_lwp_info): New.
6926 (update_watch_registers_callback): New function.
6927 (mips_linux_new_process, mips_linux_new_thread) New functions.
6928 (mips_linux_prepare_to_resume, mips_insert_point): New
6929 functions.
6930 (mips_remove_point, mips_stopped_by_watchpoint): New
6931 functions.
6932 (rsp_bp_type_to_target_hw_bp_type): New function.
6933 (mips_stopped_data_address): New function.
6934 (the_low_target): Add watchpoint support functions.
6935
6936 2013-07-27 Yao Qi <yao@codesourcery.com>
6937
6938 * i386-low.c: Include break-common.h.
6939 (enum target_hw_bp_type): Remove.
6940
6941 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6942
6943 * Makefile.in (SFILES): /common/target-common.c.
6944 (OBS): Add target-common.o.
6945 (server_h): Add $(srcdir)/../common/target-common.h.
6946 (target-common.o): New target.
6947 * server.c (queue_stop_reply_callback): Free
6948 status string after use.
6949 * target.c (target_waitstatus_to_string): Remove.
6950 * target.h: Include target-common.h.
6951 (resume_kind): Likewise.
6952 (target_waitkind): Likewise.
6953 (target_waitstatus): Likewise.
6954 (TARGET_WNOHANG): Likewise.
6955
6956 2013-07-04 Yao Qi <yao@codesourcery.com>
6957
6958 * Makefile.in (host_alias): Use @host_noncanonical@.
6959 (target_alias): Use @target_noncanonical@.
6960 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6961 ACX_NONCANONICAL_HOST.
6962 * configure: Regenerated.
6963
6964 Revert:
6965 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6966
6967 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6968 * configure: Rebuild.
6969 * Makefile.in (version_host, version_target): Get from configure.
6970 (version.c): Use $(version_host) and $(version_target).
6971
6972 2013-07-03 Pedro Alves <palves@redhat.com>
6973
6974 * Makefile.in (config.status): Depend on development.sh.
6975 * acinclude.m4: Include libmcheck.m4.
6976 * configure: Regenerate.
6977
6978 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6979
6980 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6981 attribute inside the parentheses.
6982 (winapi_DebugSetProcessKillOnExit): Ditto.
6983 (winapi_DebugBreakProcess): Ditto.
6984 (winapi_GenerateConsoleCtrlEvent): Ditto.
6985
6986 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6987
6988 * notif.h (notif_event): Add a dummy member to avoid compiler
6989 errors.
6990
6991 2013-07-01 Pedro Alves <palves@redhat.com>
6992
6993 * hostio.c (HOSTIO_PATH_MAX): Define.
6994 (require_filename, handle_open, handle_unlink, handle_readlink):
6995 Use it.
6996
6997 2013-07-01 Pedro Alves <palves@redhat.com>
6998
6999 * server.h: Include "pathmax.h".
7000 * linux-low.c: Don't include sys/param.h.
7001 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7002 MAXPATHLEN.
7003 * win32-low.c: Don't include sys/param.h.
7004 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7005
7006 2013-07-01 Pedro Alves <palves@redhat.com>
7007
7008 * event-loop.c: Don't check HAVE_UNISTD_H before including
7009 <unistd.h>.
7010 * gdbreplay.c: Likewise.
7011 * remote-utils.c: Likewise.
7012 * server.c: Likewise.
7013 * configure.ac: Don't check for unistd.h.
7014 * configure: Regenerate.
7015
7016 2013-06-28 Tom Tromey <tromey@redhat.com>
7017
7018 * Makefile.in (version.c): Use version.in, not
7019 common/version.in.
7020
7021 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7022
7023 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7024 * configure: Rebuild.
7025 * Makefile.in (version_host, version_target): Get from configure.
7026 (version.c): Use $(version_host) and $(version_target).
7027
7028 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7029
7030 Fix trace-status to output user name without trailing colon.
7031 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7032
7033 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7034
7035 Fix trace-status to output proper start-time and stop-time.
7036 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7037 output start time and stop time in hex as gdb expects.
7038
7039 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7040
7041 * tracepoint.c (build_traceframe_info_xml): Output trace state
7042 variables present in the trace buffer.
7043
7044 2013-06-24 Tom Tromey <tromey@redhat.com>
7045
7046 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7047 create-version.sh.
7048 (version.o): Remove.
7049 * gdbreplay.c: Include version.h.
7050 (version, host_name): Don't declare.
7051 * server.h: Include version.h.
7052 (version, host_name): Don't declare.
7053
7054 2013-06-12 Pedro Alves <palves@redhat.com>
7055
7056 * linux-x86-low.c (linux_is_elf64): Delete global.
7057 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7058 with local linux_pid_exe_is_elf_64_file use.
7059
7060 2013-06-11 Pedro Alves <palves@redhat.com>
7061
7062 * linux-low.c (regset_disabled, disable_regset): New functions.
7063 (regsets_fetch_inferior_registers)
7064 (regsets_store_inferior_registers): Use them.
7065 (initialize_regsets_info); Don't allocate the disabled_regsets
7066 array here.
7067 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7068 comment.
7069
7070 2013-06-11 Pedro Alves <palves@redhat.com>
7071
7072 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7073 xmalloc.
7074
7075 2013-06-11 Pedro Alves <palves@redhat.com>
7076
7077 * linux-x86-low.c (initialize_low_arch): Call
7078 init_registers_x32_avx_linux.
7079
7080 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7081
7082 Fix compatibility with Android Bionic.
7083 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7084 it is not empty.
7085
7086 2013-06-07 Pedro Alves <palves@redhat.com>
7087
7088 PR server/14823
7089 * Makefile.in (OBS): Add tdesc.o.
7090 (IPA_OBJS): Add tdesc-ipa.o.
7091 (tdesc-ipa.o): New rule.
7092 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7093 interface.
7094 * linux-low.c (new_inferior): Delete.
7095 (disabled_regsets, num_regsets): Delete.
7096 (linux_add_process): Adjust to set the new per-process
7097 new_inferior flag.
7098 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7099 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7100 was a stop. When calling arch_setup, switch the current inferior
7101 to the thread that got an event.
7102 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7103 (regsets_fetch_inferior_registers)
7104 (regsets_store_inferior_registers): New regsets_info parameter.
7105 Adjust to use it.
7106 (linux_register_in_regsets): New regs_info parameter. Adjust to
7107 use it.
7108 (register_addr, fetch_register, store_register): New usrregs_info
7109 parameter. Adjust to use it.
7110 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7111 parameter regs_info. Adjust to use it.
7112 (linux_fetch_registers): Get the current inferior's regs_info, and
7113 adjust to use it.
7114 (linux_store_registers): Ditto.
7115 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7116 (initialize_low): Don't initialize the target_regsets here. Call
7117 initialize_low_arch.
7118 * linux-low.h (target_regsets): Delete declaration.
7119 (struct regsets_info): New.
7120 (struct usrregs_info): New.
7121 (struct regs_info): New.
7122 (struct process_info_private) <new_inferior>: New field.
7123 (struct linux_target_ops): Delete the num_regs, regmap, and
7124 regset_bitmap fields. New field regs_info.
7125 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7126 * i387-fp.c (num_xmm_registers): Delete.
7127 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7128 calls to new interface.
7129 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7130 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7131 Infer the number of xmm registers from the regcache's target
7132 description.
7133 * i387-fp.h (num_xmm_registers): Delete.
7134 * inferiors.c (add_thread): Don't install the thread's regcache
7135 here.
7136 * proc-service.c (gregset_info): Fetch the current inferior's
7137 regs_info. Adjust to use it.
7138 * regcache.c: Include tdesc.h.
7139 (register_bytes, reg_defs, num_registers)
7140 (gdbserver_expedite_regs): Delete.
7141 (get_thread_regcache): If the thread doesn't have a regcache yet,
7142 create one, instead of aborting gdbserver.
7143 (regcache_invalidate_one): Rename to ...
7144 (regcache_invalidate_thread): ... this.
7145 (regcache_invalidate_one): New.
7146 (regcache_invalidate): Only invalidate registers of the current
7147 process.
7148 (init_register_cache): Add target_desc parameter, and use it.
7149 (new_register_cache): Ditto. Assert the target description has a
7150 non zero registers_size.
7151 (regcache_cpy): Add assertions. Adjust.
7152 (realloc_register_cache, set_register_cache): Delete.
7153 (registers_to_string, registers_from_string): Adjust.
7154 (find_register_by_name, find_regno, find_register_by_number)
7155 (register_cache_size): Add target_desc parameter, and use it.
7156 (free_register_cache_thread, free_register_cache_thread_one)
7157 (regcache_release, register_cache_size): New.
7158 (register_size): Add target_desc parameter, and use it.
7159 (register_data, supply_register, supply_register_zeroed)
7160 (supply_regblock, supply_register_by_name, collect_register)
7161 (collect_register_as_string, collect_register_by_name): Adjust.
7162 * regcache.h (struct target_desc): Forward declare.
7163 (struct regcache) <tdesc>: New field.
7164 (init_register_cache, new_register_cache): Add target_desc
7165 parameter.
7166 (regcache_invalidate_thread): Declare.
7167 (regcache_invalidate_one): Delete declaration.
7168 (regcache_release): Declare.
7169 (find_register_by_number, register_cache_size, register_size)
7170 (find_regno): Add target_desc parameter.
7171 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7172 declarations.
7173 * remote-utils.c: Include tdesc.h.
7174 (outreg, prepare_resume_reply): Adjust.
7175 * server.c: Include tdesc.h.
7176 (gdbserver_xmltarget): Delete declaration.
7177 (get_features_xml, process_serial_event): Adjust.
7178 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7179 declare.
7180 (struct process_info) <tdesc>: New field.
7181 (ipa_tdesc): Declare.
7182 * tdesc.c: New file.
7183 * tdesc.h: New file.
7184 * tracepoint.c: Include tdesc.h.
7185 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7186 (get_context_regcache): Adjust to pass ipa_tdesc down.
7187 (do_action_at_tracepoint): Adjust to get the register cache size
7188 from the context regcache's description.
7189 (traceframe_walk_blocks): Adjust to get the register cache size
7190 from the current trace frame's description.
7191 (traceframe_get_pc): Adjust to get current trace frame's
7192 description and pass it down.
7193 (gdb_collect): Adjust to get the register cache size from the
7194 IPA's description.
7195 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7196 (gdbserver_xmltarget): Delete.
7197 (initialize_low_tracepoint): Set the ipa's target description.
7198 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7199 (initialize_low_tracepoint): Set the ipa's target description.
7200 * linux-x86-low.c: Include tdesc.h.
7201 [__x86_64__] (is_64bit_tdesc): New.
7202 (ps_get_thread_area, x86_get_thread_area): Use it.
7203 (i386_cannot_store_register): Rename to ...
7204 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7205 (i386_cannot_fetch_register): Rename to ...
7206 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7207 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7208 to new interface.
7209 (target_regsets): Rename to ...
7210 (x86_regsets): ... this.
7211 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7212 interface.
7213 (x86_siginfo_fixup): Use is_64bit_tdesc.
7214 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7215 (tdesc_x32_avx_linux, tdesc_x32_linux)
7216 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7217 Declare.
7218 (x86_linux_update_xmltarget): Delete.
7219 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7220 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7221 (AMD64_LINUX_USER64_CS): New.
7222 (x86_linux_read_description): New, based on
7223 x86_linux_update_xmltarget.
7224 (same_process_callback): New.
7225 (x86_arch_setup_process_callback): New.
7226 (x86_linux_update_xmltarget): New.
7227 (x86_regsets_info): New.
7228 (amd64_linux_regs_info): New.
7229 (i386_linux_usrregs_info): New.
7230 (i386_linux_regs_info): New.
7231 (x86_linux_regs_info): New.
7232 (x86_arch_setup): Reimplement.
7233 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7234 (x86_emit_ops): Ditto.
7235 (the_low_target): Adjust. Install x86_linux_regs_info,
7236 x86_cannot_fetch_register, and x86_cannot_store_register.
7237 (initialize_low_arch): New.
7238 * linux-ia64-low.c (tdesc_ia64): Declare.
7239 (ia64_fetch_register): Adjust.
7240 (ia64_usrregs_info, regs_info): New globals.
7241 (ia64_regs_info): New function.
7242 (the_low_target): Adjust.
7243 (initialize_low_arch): New function.
7244 * linux-sparc-low.c (tdesc_sparc64): Declare.
7245 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7246 Adjust.
7247 (sparc_arch_setup): New function.
7248 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7249 (the_low_target): Adjust.
7250 (initialize_low_arch): New function.
7251 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7252 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7253 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7254 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7255 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7256 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7257 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7258 (tdesc_powerpc_isa205_vsx64l): Declare.
7259 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7260 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7261 (ppc_set_pc, ppc_get_hwcap): Adjust.
7262 (ppc_usrregs_info): Forward declare.
7263 (!__powerpc64__) ppc_regmap_adjusted: New global.
7264 (ppc_arch_setup): Adjust to the current process'es target
7265 description.
7266 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7267 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7268 (ppc_store_evrregset): Adjust.
7269 (target_regsets): Rename to ...
7270 (ppc_regsets): ... this, and make static.
7271 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7272 (ppc_regs_info): New function.
7273 (the_low_target): Adjust.
7274 (initialize_low_arch): New function.
7275 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7276 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7277 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7278 (tdesc_s390x_linux64v2): Declare.
7279 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7280 (s390_fill_gregset, s390_store_last_break): Adjust.
7281 (target_regsets): Rename to ...
7282 (s390_regsets): ... this, and make static.
7283 (s390_get_pc, s390_set_pc): Adjust.
7284 (s390_get_hwcap): New target_desc parameter, and use it.
7285 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7286 (s390_arch_setup): Adjust to set the current process'es target
7287 description. Don't adjust the regmap.
7288 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7289 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7290 (regs_info_3264): New globals.
7291 (s390_regs_info): New function.
7292 (the_low_target): Adjust.
7293 (initialize_low_arch): New function.
7294 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7295 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7296 [__mips64] (init_registers_mips_linux)
7297 (init_registers_mips_dsp_linux): Delete defines.
7298 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7299 (have_dsp): New global.
7300 (mips_read_description): New, based on mips_arch_setup.
7301 (mips_arch_setup): Reimplement.
7302 (get_usrregs_info): New function.
7303 (mips_cannot_fetch_register, mips_cannot_store_register)
7304 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7305 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7306 (target_regsets): Rename to ...
7307 (mips_regsets): ... this, and make static.
7308 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7309 (dsp_regs_info, regs_info): New globals.
7310 (mips_regs_info): New function.
7311 (the_low_target): Adjust.
7312 (initialize_low_arch): New function.
7313 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7314 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7315 Declare.
7316 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7317 (arm_read_description): New, with bits factored from
7318 arm_arch_setup.
7319 (arm_arch_setup): Reimplement.
7320 (target_regsets): Rename to ...
7321 (arm_regsets): ... this, and make static.
7322 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7323 (arm_regs_info): New function.
7324 (the_low_target): Adjust.
7325 (initialize_low_arch): New function.
7326 * linux-m68k-low.c (tdesc_m68k): Declare.
7327 (target_regsets): Rename to ...
7328 (m68k_regsets): ... this, and make static.
7329 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7330 (m68k_regs_info): New function.
7331 (m68k_arch_setup): New function.
7332 (the_low_target): Adjust.
7333 (initialize_low_arch): New function.
7334 * linux-sh-low.c (tdesc_sharch): Declare.
7335 (target_regsets): Rename to ...
7336 (sh_regsets): ... this, and make static.
7337 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7338 (sh_regs_info, sh_arch_setup): New functions.
7339 (the_low_target): Adjust.
7340 (initialize_low_arch): New function.
7341 * linux-bfin-low.c (tdesc_bfin): Declare.
7342 (bfin_arch_setup): New function.
7343 (bfin_usrregs_info, regs_info): New globals.
7344 (bfin_regs_info): New function.
7345 (the_low_target): Adjust.
7346 (initialize_low_arch): New function.
7347 * linux-cris-low.c (tdesc_cris): Declare.
7348 (cris_arch_setup): New function.
7349 (cris_usrregs_info, regs_info): New globals.
7350 (cris_regs_info): New function.
7351 (the_low_target): Adjust.
7352 (initialize_low_arch): New function.
7353 * linux-cris-low.c (tdesc_crisv32): Declare.
7354 (cris_arch_setup): New function.
7355 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7356 (cris_regs_info): New function.
7357 (the_low_target): Adjust.
7358 (initialize_low_arch): New function.
7359 * linux-m32r-low.c (tdesc_m32r): Declare.
7360 (m32r_arch_setup): New function.
7361 (m32r_usrregs_info, regs_info): New globals.
7362 (m32r_regs_info): Adjust.
7363 (initialize_low_arch): New function.
7364 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7365 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7366 (tic6x_usrregs_info): Forward declare.
7367 (tic6x_read_description): New function, based on ...
7368 (tic6x_arch_setup): ... this. Reimplement.
7369 (target_regsets): Rename to ...
7370 (tic6x_regsets): ... this, and make static.
7371 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7372 (tic6x_regs_info): New function.
7373 (the_low_target): Adjust.
7374 (initialize_low_arch): New function.
7375 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7376 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7377 (target_regsets): Rename to ...
7378 (xtensa_regsets): ... this, and make static.
7379 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7380 globals.
7381 (xtensa_arch_setup, xtensa_regs_info): New functions.
7382 (the_low_target): Adjust.
7383 (initialize_low_arch): New function.
7384 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7385 (nios2_arch_setup): Set the current process'es tdesc.
7386 (target_regsets): Rename to ...
7387 (nios2_regsets): ... this.
7388 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7389 (nios2_regs_info): New function.
7390 (the_low_target): Adjust.
7391 (initialize_low_arch): New function.
7392 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7393 (aarch64_arch_setup): Set the current process'es tdesc.
7394 (target_regsets): Rename to ...
7395 (aarch64_regsets): ... this.
7396 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7397 (aarch64_regs_info): New function.
7398 (the_low_target): Adjust.
7399 (initialize_low_arch): New function.
7400 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7401 globals.
7402 (target_regsets): Rename to ...
7403 (tile_regsets): ... this.
7404 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7405 (tile_regs_info): New function.
7406 (tile_arch_setup): Set the current process'es tdesc.
7407 (the_low_target): Adjust.
7408 (initialize_low_arch): New function.
7409 * spu-low.c (tdesc_spu): Declare.
7410 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7411 * win32-arm-low.c (tdesc_arm): Declare.
7412 (arm_arch_setup): New function.
7413 (the_low_target): Install arm_arch_setup instead of
7414 init_registers_arm.
7415 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7416 (init_windows_x86): Rename to ...
7417 (i386_arch_setup): ... this. Set `win32_tdesc'.
7418 (the_low_target): Adjust.
7419 * win32-low.c (win32_tdesc): New global.
7420 (child_add_thread): Don't create the thread cache here.
7421 (do_initial_child_stuff): Set the new process'es tdesc.
7422 * win32-low.h (struct target_desc): Forward declare.
7423 (win32_tdesc): Declare.
7424 * lynx-i386-low.c (tdesc_i386): Declare global.
7425 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7426 * lynx-low.c (lynx_tdesc): New global.
7427 (lynx_add_process): Set the new process'es tdesc.
7428 * lynx-low.h (struct target_desc): Forward declare.
7429 (lynx_tdesc): Declare global.
7430 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7431 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7432 * nto-low.c (nto_tdesc): New global.
7433 (do_attach): Set the new process'es tdesc.
7434 * nto-low.h (struct target_desc): Forward declare.
7435 (nto_tdesc): Declare.
7436 * nto-x86-low.c (tdesc_i386): Declare.
7437 (nto_x86_arch_setup): Set `nto_tdesc'.
7438
7439 2013-06-04 Gary Benson <gbenson@redhat.com>
7440
7441 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7442 to qSupported response when appropriate.
7443 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7444 with nonzero-length annex.
7445 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7446 arguments supplied in annex.
7447
7448 2013-05-31 Doug Evans <dje@google.com>
7449
7450 PR server/15594
7451 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7452 64 bits in 64-cross-32 environment.
7453
7454 2013-05-28 Pedro Alves <palves@redhat.com>
7455
7456 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7457 (aarch64-without-fpu.c): Delete rule.
7458 * configure.srv (aarch64*-*-linux*): Remove references to
7459 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7460 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7461 declaration.
7462
7463 2013-05-24 Pedro Alves <palves@redhat.com>
7464
7465 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7466 instead of strchr/decode_address. Error if the range isn't split
7467 with a ','. Don't assume there's be a ':' in the action.
7468
7469 2013-05-23 Yao Qi <yao@codesourcery.com>
7470 Pedro Alves <palves@redhat.com>
7471
7472 * linux-low.c (lwp_in_step_range): New function.
7473 (linux_wait_1): If the thread was range stepping and stopped
7474 outside the stepping range, report the stop to GDB. Otherwise,
7475 continue stepping. Add range stepping debug output.
7476 (linux_set_resume_request): Copy the step range from the resume
7477 request to the lwp.
7478 (linux_supports_range_stepping): New.
7479 (linux_target_ops) <supports_range_stepping>: Set to
7480 linux_supports_range_stepping.
7481 * linux-low.h (struct linux_target_ops)
7482 <supports_range_stepping>: New field.
7483 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7484 * linux-x86-low.c (x86_supports_range_stepping): New.
7485 (the_low_target) <supports_range_stepping>: Set to
7486 x86_supports_range_stepping.
7487 * server.c (handle_v_cont): Handle 'r' action.
7488 (handle_v_requests): Append ";r" if the target supports range
7489 stepping.
7490 * target.h (struct thread_resume) <step_range_start,
7491 step_range_end>: New fields.
7492 (struct target_ops) <supports_range_stepping>:
7493 New field.
7494 (target_supports_range_stepping): New macro.
7495
7496 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7497
7498 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7499 confusion in comment.
7500
7501 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7502
7503 * lynx-low.c (struct process_info_private): New type.
7504 (lynx_add_process): New function.
7505 (lynx_create_inferior, lynx_attach): Replace calls to
7506 add_process by calls to lynx_add_process.
7507 (lynx_resume): If PTID is null, then try using
7508 current_process()->private->last_wait_event_ptid.
7509 Add comments.
7510 (lynx_clear_inferiors): Delete. The contents of that function
7511 has been inlined in lynx_mourn;
7512 (lynx_wait_1): Save the ptid in the process's private data.
7513 (lynx_mourn): Free the process' private data. Replace call
7514 to lynx_clear_inferiors by call to clear_inferiors.
7515
7516 2013-05-17 Yao Qi <yao@codesourcery.com>
7517
7518 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7519 the right place.
7520
7521 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7522
7523 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7524 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7525 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7526 PT_TEXT_END_ADDR guards. Update comments.
7527 (linux_target_op) <read_offsets>: Conditionally define to
7528 linux_read_offsets if the target is UCLIBC and if it defines
7529 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7530
7531 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7532 Andrew Jenner <andrew@codesourcery.com>
7533
7534 * Makefile.in (SFILES): Add linux-nios2-low.c.
7535 (clean): Add action to delete nios2-linux.c.
7536 (nios2-linux.c): New rule.
7537 * configure.srv: Add nios2*-*-linux*.
7538 * linux-nios2-low.c: New.
7539
7540 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7541
7542 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7543
7544 2013-04-25 Hui Zhu <hui@codesourcery.com>
7545
7546 PR gdb/15186
7547 * ax.c (ax_printf): Add fflush.
7548
7549 2013-04-22 Tom Tromey <tromey@redhat.com>
7550
7551 * Makefile.in (SFILES): Add filestuff.c.
7552 (OBS): Add filestuff.o.
7553 (filestuff.o): New target.
7554 * config.in, configure: Rebuild.
7555 * configure.ac: Check for fdwalk, pipe2.
7556
7557 2013-04-17 Pedro Alves <palves@redhat.com>
7558
7559 * configure.ac (USE_THREAD_DB): Delete variable.
7560 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7561 Don't AC_SUBST USE_THREAD_DB.
7562 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7563 * config.in, configure: Regenerate.
7564
7565 2013-04-16 Pedro Alves <palves@redhat.com>
7566
7567 * linux-low.h (struct lwp_info) <thread_known>: Move under
7568 the USE_THREAD_DB #ifdef.
7569
7570 2013-04-16 Pedro Alves <palves@redhat.com>
7571
7572 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7573 (linux-low.o): Delete rule.
7574 * linux-low.h: Always include "gdb_thread_db.h" instead of
7575 conditionally including thread_db.h.
7576 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7577 HAVE_THREAD_DB_H.
7578
7579 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7580
7581 * Makefile.in (install-only): Fix make install regression.
7582
7583 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7584
7585 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7586 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7587 installation.
7588 * gdbserver.1: Remove.
7589
7590 2013-03-22 Pedro Alves <palves@redhat.com>
7591
7592 * linux-low.c (handle_extended_wait): Don't call
7593 linux_enable_event_reporting.
7594
7595 2013-03-15 Tony Theodore <tonyt@logyst.com>
7596
7597 PR build/9098:
7598 * Makefile.in (SHELL): Use @SHELL@.
7599
7600 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7601
7602 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7603 compiler warning.
7604
7605 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7606
7607 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7608 Remove extraneous NULL element.
7609
7610 2013-03-13 Yao Qi <yao@codesourcery.com>
7611
7612 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7613 'V' block in trace frame.
7614
7615 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7616
7617 * target.h (struct target_ops): Add btrace ops.
7618 (target_supports_btrace): New macro.
7619 (target_enable_btrace): New macro.
7620 (target_disable_btrace): New macro.
7621 (target_read_btrace): New macro.
7622 * gdbthread.h (struct thread_info): Add btrace field.
7623 * server.c: Include btrace-common.h.
7624 (handle_btrace_general_set): New function.
7625 (handle_btrace_enable): New function.
7626 (handle_btrace_disable): New function.
7627 (handle_general_set): Call handle_btrace_general_set.
7628 (handle_qxfer_btrace): New function.
7629 (struct qxfer qxfer_packets[]): Add btrace entry.
7630 * inferiors.c (remove_thread): Disable btrace.
7631 * linux-low: Include linux-btrace.h.
7632 (linux_low_enable_btrace): New function.
7633 (linux_low_read_btrace): New function.
7634 (linux_target_ops): Add btrace ops.
7635 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7636 Add srv_linux_btrace=yes.
7637 (x86_64-*-linux*): Add linux-btrace.o.
7638 Add srv_linux_btrace=yes.
7639 * configure.ac: Define HAVE_LINUX_BTRACE.
7640 * config.in: Regenerated.
7641 * configure: Regenerated.
7642
7643 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7644
7645 * server.c (handle_qxfer): Preserve error message if -3 is
7646 returned.
7647 (qxfer): Document the -3 return value.
7648
7649 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7650
7651 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7652 (linux_btrace_h): New variable.
7653 (linux-btrace.o): New rule.
7654
7655 2013-03-08 Stan Shebs <stan@codesourcery.com>
7656 Hafiz Abid Qadeer <abidh@codesourcery.com>
7657
7658 * tracepoint.c (trace_buffer_size): New global.
7659 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7660 (init_trace_buffer): Change to one-argument function. Allocate
7661 trace buffer memory.
7662 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7663 handle QTBuffer:size packet.
7664 (cmd_bigqtbuffer_size): New function.
7665 (initialize_tracepoint): Call init_trace_buffer with
7666 DEFAULT_TRACE_BUFFER_SIZE.
7667 * server.c (handle_query): Add QTBuffer:size in the
7668 supported packets.
7669
7670 2013-03-07 Yao Qi <yao@codesourcery.com>
7671
7672 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7673 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7674 of -1.
7675 (cmd_qtsp): Adjust condition. Do post increment.
7676 Set cur_action and cur_step_action back to 0.
7677
7678 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7679
7680 PR server/15236
7681 * linux-low.c (linux_write_memory): Return early success if LEN is
7682 zero.
7683
7684 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7685
7686 * configure.srv: Add x86_64-*-cygwin* as target.
7687
7688 2013-02-28 Tom Tromey <tromey@redhat.com>
7689
7690 * configure.ac: Invoke AC_SYS_LARGEFILE.
7691 * configure, config.in: Rebuild.
7692
7693 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7694
7695 * win32-low.c: Throughout, fix format strings and casts of
7696 printf-like functions to avoid type related warnings on all
7697 platforms.
7698 (get_child_debug_event): Print dwDebugEventCode as hex since
7699 that's how it's usually documented.
7700
7701 2013-02-28 Yao Qi <yao@codesourcery.com>
7702
7703 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7704 pulongest.
7705
7706 2013-02-27 Jiong Wang <jiwang@tilera.com>
7707
7708 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7709 (reg-tilegx32.c): New rule.
7710 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7711 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7712 different register info initializer according to elf class.
7713 (init_registers_tilgx32): New function. The tilegx32 register info
7714 initializer.
7715 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7716 (tile_store_gregset): Likewise.
7717
7718 2013-02-27 Yao Qi <yao@codesourcery.com>
7719
7720 * server.c (process_point_options): Print debug message when
7721 debug_threads is true.
7722
7723 2013-02-26 Yao Qi <yao@codesourcery.com>
7724
7725 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7726
7727 2013-02-19 Pedro Alves <palves@redhat.com>
7728 Kai Tietz <ktietz@redhat.com>
7729
7730 PR gdb/15161
7731
7732 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7733 instead of strtoul to extract address from packet.
7734 (process_serial_event) <'z'>: Likewise.
7735
7736 2013-02-18 Yao Qi <yao@codesourcery.com>
7737
7738 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7739
7740 2013-02-14 Pedro Alves <palves@redhat.com>
7741
7742 Plug memory leak.
7743
7744 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7745 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7746
7747 2013-02-14 Pedro Alves <palves@redhat.com>
7748
7749 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7750
7751 2013-02-14 Pedro Alves <palves@redhat.com>
7752
7753 * tracepoint.c (save_string): Delete.
7754 (add_tracepoint_action): Use savestring instead of save_string.
7755
7756 2013-02-12 Pedro Alves <palves@redhat.com>
7757
7758 * linux-xtensa-low.c: Ditto.
7759 * xtensa-xtregs.c: Ditto.
7760
7761 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7762
7763 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7764 thread_db.
7765
7766 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7767
7768 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7769 aarch64_num_wp_regs and aarch64_num_bp_regs to
7770 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7771
7772 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7773
7774 * linux-aarch64-low.c (ps_get_thread_area): Replace
7775 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7776
7777 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7778 Marcus Shawcroft <marcus.shawcroft@arm.com>
7779 Nigel Stephens <nigel.stephens@arm.com>
7780 Yufeng Zhang <yufeng.zhang@arm.com>
7781
7782 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7783 (aarch64.c, aarch64-without-fpu.c): New targets.
7784 * configure.srv (aarch64*-*-linux*): New.
7785 * linux-aarch64-low.c: New file.
7786
7787 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7788
7789 * linux-low.c (handle_extended_wait, linux_create_inferior)
7790 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7791 (dequeue_one_deferred_signal, linux_resume_one_thread)
7792 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7793 (linux_tracefork_grandchild, linux_test_for_tracefork)
7794 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7795 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7796 where the argument is 0.
7797
7798 2013-01-25 Yao Qi <yao@codesourcery.com>
7799
7800 * event-loop.c: Include "queue.h".
7801 (gdb_event_p): New typedef.
7802 (struct gdb_event) <next_event>: Remove.
7803 (event_queue): Change to QUEUE(gdb_event_p).
7804 (async_queue_event): Remove.
7805 (gdb_event_xfree): New.
7806 (initialize_event_loop): New.
7807 (process_event): Use API from QUEUE.
7808 (wait_for_event): Likewise.
7809 * server.c (main): Call initialize_event_loop.
7810 * server.h (initialize_event_loop): Declare.
7811
7812 2013-01-18 Yao Qi <yao@codesourcery.com>
7813
7814 * ax.h (struct eval_agent_expr_context): New.
7815 (gdb_eval_agent_expr): Update declaration.
7816 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7817 TFRAME. Add new argument CTX.
7818 * server.h (struct eval_agent_expr_context): Declare.
7819 (agent_mem_read, agent_tsv_read): Update declaration.
7820 (agent_mem_read_string): Likewise.
7821 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7822 (add_traceframe_block): Add new argument TPOINT.
7823 Increase TPOINT->traceframe_usage.
7824 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7825 eval_tracepoint_agent_expr.
7826 (condition_true_at_tracepoint): Likewise.
7827 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7828 (agent_mem_read_string, agent_tsv_read): Likewise.
7829
7830 2013-01-16 Yao Qi <yao@codesourcery.com>
7831
7832 * linux-low.c (linux_resume_one_lwp): Don't check
7833 'lwp->bp_reinsert != 0'.
7834
7835 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7836 Pedro Alves <palves@redhat.com>
7837
7838 * lynx-low.c (ptrace_request_to_str): Define a temporary
7839 macro and use it to simplify this function's implementation.
7840
7841 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7842
7843 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7844 sets errno.
7845
7846 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7847
7848 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7849
7850 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7851
7852 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7853
7854 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7855
7856 * lynx-low.c (lynx_resume): Use the resume_info parameter
7857 to determine the ptid for the lynx_ptrace call, unless
7858 it is equal to minus_one_ptid, in which case we use the
7859 ptid of the current_inferior.
7860 (lynx_wait_1): After having received a thread create/exit
7861 event, resume the inferior's execution using the signaling
7862 thread's ptid, rather than the old ptid.
7863
7864 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7865
7866 * lynx-low.c (lynx_resume): Delete variable ret.
7867
7868 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7869
7870 * gdbreplay.c (gdbreplay_version): Update copyright year.
7871 * server.c (gdbserver_version): Likewise.
7872
7873 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7874
7875 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7876 new thread.
7877
7878 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7879
7880 * lynx-low.c (ptrace_request_to_str): Add handling for
7881 PTRACE_GETTRACESIG.
7882
7883 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7884
7885 * lynx-low.c (lynx_attach): Delete variable new_process.
7886
7887 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7888
7889 * lynx-low.c (lynx_create_inferior): Delete variable
7890 new_process.
7891
7892 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7893
7894 * lynx-low.c (ptrace_request_to_str): Do not handle
7895 PTRACE_GETTHREADLIST if this macro does not exist.
7896
7897 2012-12-15 Yao Qi <yao@codesourcery.com>
7898
7899 * Makefile.in (OBS): Add notif.o.
7900 * notif.c, notif.h: New.
7901 * server.c: Include "notif.h".
7902 (struct vstop_notif) <next>: Remove.
7903 <base>: New field.
7904 (queue_stop_reply): Update.
7905 (push_event, send_next_stop_reply): Remove.
7906 (discard_queued_stop_replies): Update.
7907 (notif_stop): New variable.
7908 (handle_v_stopped): Remove.
7909 (handle_v_requests): Don't call handle_v_stopped. Call
7910 handle_ack_notif instead.
7911 (queue_stop_reply_callback): Call notif_event_enque instead
7912 of queue_stop_reply.
7913 (handle_status): Don't call send_next_stop_reply, call
7914 notif_write_event instead.
7915 (kill_inferior_callback): Likewise.
7916 (detach_or_kill_inferior_callback): Likewise.
7917 (main): Call initialize_notif.
7918 (process_serial_event): Call QUEUE_is_empty.
7919 (handle_target_event): Call notif_push instead of push event.
7920 * server.h (push_event): Remove declaration.
7921
7922 2012-12-10 Tom Tromey <tromey@redhat.com>
7923
7924 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7925 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7926 macros.
7927 (.c.o): Rewrite.
7928 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7929 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7930 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7931 (amd64-linux-ipa.o, ax.o): Rewrite.
7932 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7933 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7934 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7935 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7936 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7937 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7938 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7939 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7940 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7941 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7942 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7943 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7944 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7945 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7946 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7947 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7948 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7949 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7950 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7951 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7952 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7953 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7954 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7955 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7956 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7957 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7958 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7959 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7960 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7961 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7962 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7963 (reg-tilegx.o): Remove.
7964 (all_object_files): New macro.
7965 Include .deps files.
7966 * aclocal.m4, configure: Rebuild.
7967 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7968 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7969 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7970
7971 2012-12-05 Tom Tromey <tromey@redhat.com>
7972
7973 PR gdb/14917:
7974 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7975
7976 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7977
7978 * configure.ac: Check for linux/perf_event.h.
7979 * config.in: Regenerated.
7980 * configure: Regenerated.
7981
7982 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7983
7984 * hostio.c (handle_readlink): Decrease buffer size
7985 parameter passed to readlink by one byte.
7986
7987 2012-11-26 Yao Qi <yao@codesourcery.com>
7988
7989 * configure.ac (build_warnings): Append '-Wempty-body'.
7990 * configure: Regenerated.
7991 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7992 body.
7993
7994 2012-11-15 Pierre Muller <muller@sourceware.org>
7995
7996 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7997 * config.in: Regenerate.
7998 * configure: Regenerate.
7999 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8000 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8001 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8002 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8003 header.
8004 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8005 instead of <sys/wait.h> header.
8006 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8007
8008 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8009
8010 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8011 (various make rules): Remove -DGDBSERVER
8012
8013 2012-11-09 Yao Qi <yao@codesourcery.com>
8014
8015 * spu-low.c (current_ptid): Move it to ..
8016 * gdbthread.h: ... here. New.
8017 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8018 * server.c (myresume, process_serial_event): Likewise.
8019 * thread-db.c (thread_db_find_new_threads): Likewise.
8020 * tracepoint.c (run_inferior_command): Likewise.
8021
8022 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8023
8024 * server.c (handle_search_memory_1): Include access length in
8025 warning message.
8026
8027 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8028
8029 * linux-crisv32-low.c: Fix compile errors.
8030
8031 2012-09-04 Yao Qi <yao@codesourcery.com>
8032
8033 * tracepoint.c (cmd_qtsv): Adjust debug message.
8034 Don't check CUR_TPOINT.
8035
8036 2012-08-28 Yao Qi <yao@codesourcery.com>
8037
8038 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8039 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8040 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8041 Remove declarations of xmalloc, xreallloc, xstrdup and
8042 freeargv.
8043 * Makefile.in (libiberty_h): New.
8044 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8045 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8046
8047 2012-08-23 Yao Qi <yao@codesourcery.com>
8048
8049 * server.h: Remove declaration of 'xsnprintf'.
8050
8051 2012-08-22 Keith Seitz <keiths@redhat.com>
8052
8053 * server.h: Include build-gnulib-gbserver/config.h.
8054 * gdbreplay.c: Likewise.
8055
8056 2012-08-08 Doug Evans <dje@google.com>
8057
8058 * Makefile.in (SFILES): Add gdb_vecs.c.
8059 (OBS): Add gdb_vecs.o.
8060 (gdb_vecs_h, host_defs_h): New variables.
8061 (thread-db.o): Add $(gdb_vecs_h) dependency.
8062 (gdb_vecs.o): New rule.
8063 * thread-db.c: #include "gdb_vecs.h".
8064 (thread_db_load_search): Use a vector to iterate over path elements.
8065 Handle text appearing after "$pdir".
8066
8067 * configure.ac: Add check for strstr.
8068 * config.in: Regenerate.
8069 * configure: Regenerate.
8070
8071 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8072
8073 * hostio.c (handle_pread): If pread fails, fall back to attempting
8074 lseek/read.
8075 (handle_pwrite): Likewise for pwrite.
8076
8077 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8078
8079 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8080 between unsupported TYPE and unimplementable ADDR/LEN combination.
8081 (arm_insert_point): Act on new return value.
8082
8083 2012-07-31 Pedro Alves <palves@redhat.com>
8084
8085 * server.c (process_point_options): Only skip tokens if we find
8086 one that is unrecognized. Don't treat 'X' specially while
8087 skipping unrecognized tokens.
8088
8089 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8090
8091 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8092 to 4-byte-align HW breakpoint addresses for Thumb.
8093
8094 2012-07-27 Yao Qi <yao@codesourcery.com>
8095
8096 PR remote/14161.
8097
8098 * server.h: Declare gdb_agent_about_to_close.
8099 * target.c (kill_inferior): Include "agent.h".
8100 New. Send command 'kill'.
8101 * target.h (kill_inferior): Removed macro.
8102 * tracepoint.c (gdb_agent_about_to_close): New.
8103 (gdb_agent_helper_thread): Handle command 'close'.
8104 Wait endlessly until the inferior stops.
8105 Install gdb_agent_remove_socket to atexit hook.
8106 (agent_socket_name): New static variable.
8107 (gdb_agent_socket_init): Replace local variable 'name' with
8108 'agent_socket_name'.
8109 (gdb_agent_remove_socket): New.
8110
8111 2012-07-27 Yao Qi <yao@codesourcery.com>
8112
8113 * server.c (process_point_options): Stop at 'X' when parsing.
8114
8115 2012-07-19 Michael Eager <eager@eagercon.com>
8116
8117 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8118 to hw_execute.
8119 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8120 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8121 hardware breakpoint.
8122
8123 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8124
8125 * gdbserver/linux-low.c (initialize_low): Call
8126 linux_ptrace_init_warnings.
8127
8128 2012-07-02 Doug Evans <dje@google.com>
8129
8130 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8131 pointer to int.
8132
8133 2012-07-02 Stan Shebs <stan@codesourcery.com>
8134
8135 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8136 (ax.o): Add it to build rule.
8137 (ax-ipa.o): Ditto.
8138 (OBS): Add format.o.
8139 (IPA_OBS): Add format.o.
8140 * server.c (handle_query): Claim support for breakpoint commands.
8141 (process_point_options): Add command case.
8142 (process_serial_event): Leave running if there are printfs in
8143 effect.
8144 * mem-break.h (any_persistent_commands): Declare.
8145 (add_breakpoint_commands): Declare.
8146 (gdb_no_commands_at_breakpoint): Declare.
8147 (run_breakpoint_commands): Declare.
8148 * mem-break.c (struct point_command_list): New struct.
8149 (struct breakpoint): New field command_list.
8150 (any_persistent_commands): New function.
8151 (add_commands_to_breakpoint): New function.
8152 (add_breakpoint_commands): New function.
8153 (gdb_no_commands_at_breakpoint): New function.
8154 (run_breakpoint_commands): New function.
8155 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8156 locally.
8157 * ax.c: Include format.h.
8158 (ax_printf): New function.
8159 (gdb_eval_agent_expr): Add printf opcode.
8160
8161 2012-06-13 Yao Qi <yao@codesourcery.com>
8162
8163 * server.c (start_inferior): Remove duplicated writes to fields
8164 'last_resume_kind' and 'last_status' of 'current_inferior'.
8165
8166 2012-06-12 Yao Qi <yao@codesourcery.com>
8167 Pedro Alves <palves@redhat.com>
8168
8169 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8170 comment.
8171 * server.c (handle_v_cont): Extend comment.
8172
8173 2012-06-11 Yao Qi <yao@codesourcery.com>
8174
8175 * linux-low.c (linux_attach): Add 'static'.
8176
8177 2012-06-06 Yao Qi <yao@codesourcery.com>
8178
8179 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8180
8181 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8182
8183 Fix gcc -flto compilation warning.
8184 * server.c (main): Make variable multi_mode and attach volatile.
8185
8186 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8187
8188 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8189 if the platform doesn't know about it.
8190
8191 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8192
8193 * Makefile.in (SFILES): Add linux-tile-low.c.
8194 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8195 * configure.srv: Handle tilegx-*-linux*.
8196 * linux-tile-low.c: New file.
8197
8198 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8199
8200 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8201
8202 2012-05-24 Pedro Alves <palves@redhat.com>
8203
8204 PR gdb/7205
8205
8206 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8207
8208 2012-05-24 Pedro Alves <palves@redhat.com>
8209
8210 PR gdb/7205
8211
8212 Replace target_signal with gdb_signal throughout.
8213
8214 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8215
8216 * linux-low.c (linux_store_registers): Avoid the copying sequence
8217 when no data has been retrieved by ptrace.
8218
8219 2012-05-22 Will Deacon <will.deacon@arm.com>
8220
8221 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8222 Include asm/ptrace.h.
8223 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8224 already defined.
8225
8226 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8227
8228 * linux-low.c (linux_store_registers): Don't re-retrieve data
8229 with ptrace that has already been obtained from /proc. Always
8230 copy any data retrieved with ptrace to the buffer supplied.
8231
8232 2012-05-11 Yao Qi <yao@codesourcery.com>
8233 Pedro Alves <palves@redhat.com>
8234
8235 * linux-low.c (enum stopping_threads_kind): New.
8236 (stopping_threads): Change type to `enum stopping_threads_kind'.
8237 (handle_extended_wait): If stopping and suspending threads, leave
8238 the new_lwp suspended too.
8239 (linux_wait_for_event): Adjust.
8240 (stop_all_lwps): Set `stopping_threads' to
8241 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8242 whether we're suspending threads or just stopping them. Assert no
8243 recursion happens.
8244
8245 2012-04-29 Yao Qi <yao@codesourcery.com>
8246
8247 * server.h: Move some code to ...
8248 * gdbthread.h: ... here. New.
8249 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8250 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8251 (nto-low.o, win32-low.o): Likewise.
8252 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8253 * regcache.c, remote-utils.c, server.c: Likewise.
8254 * target.c, tracepoint.c, win32-low.c: Likewise.
8255
8256 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8257
8258 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8259 (PTRACE_ARG4_TYPE): Likewise.
8260 (PTRACE_XFER_TYPE): Likewise.
8261 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8262 ptrace to PTRACE_ARG3_TYPE.
8263 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8264 (PTRACE_ARG4_TYPE): Likewise.
8265 (PTRACE_XFER_TYPE): Likewise.
8266 (linux_detach_one_lwp): Cast fourth argument of
8267 ptrace to long then PTRACE_ARG4_TYPE.
8268 (regsets_fetch_inferior_registers): Cast third argument of
8269 ptrace to long then PTRACE_ARG3_TYPE.
8270 (regsets_store_inferior_registers): Likewise.
8271
8272 2012-04-20 Pedro Alves <palves@redhat.com>
8273
8274 * configure: Regenerate.
8275
8276 2012-04-19 Pedro Alves <palves@redhat.com>
8277
8278 * Makefile.in (GNULIB_BUILDDIR): New.
8279 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8280 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8281 (all, install-only, uninstall, clean-info, all-lib, clean): No
8282 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8283 (maintainer-clean realclean distclean): Use subdir_do.
8284 (subdir_do): New.
8285 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8286 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8287 * acinclude.m4: Include acx_configure_dir.m4.
8288 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8289 calls. Call AC_PROG_RANLIB. Configure gnulib using
8290 ACX_CONFIGURE_DIR.
8291 (GNULIB): New.
8292 (GNULIB_STDINT_H): Adjust.
8293 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8294 * gdbreplay.c: Include build-gnulib/config.h.
8295 * server.h: Likewise.
8296 * aclocal.m4: Regenerate.
8297 * config.in: Regenerate.
8298 * configure: Regenerate.
8299
8300 2012-04-19 Pedro Alves <palves@redhat.com>
8301
8302 * Makefile.in (LIBGNU, INCGNU): Adjust.
8303 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8304 (all, install-only, uninstall, clean-info, all-lib, clean)
8305 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8306 * configure.ac: Adjust AC_OUTPUT output.
8307 * aclocal.m4: Regenerate.
8308 * configure: Regenerate.
8309
8310 2012-04-19 Pedro Alves <palves@redhat.com>
8311
8312 * Makefile.in (generated_files): New.
8313 (server_h): Remove the explicit dependency on config.h, and depend
8314 on $generated_files.
8315
8316 2012-04-19 Pedro Alves <palves@redhat.com>
8317
8318 * Makefile.in (INCGNU): Add -Ignulib.
8319
8320 2012-04-19 Pedro Alves <palves@redhat.com>
8321
8322 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8323 (INCGNU): ... this, and spell out -I here.
8324 (GNULIB_LIB): Rename to ...
8325 (LIBGNU): ... this.
8326 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8327
8328 2012-04-19 Pedro Alves <palves@redhat.com>
8329
8330 * config.in: Regenerate.
8331
8332 2012-04-19 Pedro Alves <palves@redhat.com>
8333
8334 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8335 * server.h (memmem): Remove declaration.
8336 * config.in: Regenerate.
8337 * configure: Regenerate.
8338
8339 2012-04-19 Yao Qi <yao@codesourcery.com>
8340
8341 * Makefile.in (SFILES): Add common/vec.c.
8342 (OBS): Add vec.o.
8343 (vec.o): New rule.
8344
8345 2012-04-19 Yao Qi <yao@codesourcery.com>
8346
8347 * remote-utils.c (prepare_resume_reply): Replace with macro
8348 target_core_of_thread.
8349 * server.c (handle_qxfer_threads_proper): Likewise.
8350 * target.h (traget_core_of_thread): New macro.
8351
8352 2012-04-18 Pedro Alves <palves@redhat.com>
8353
8354 * aclocal.m4: Regenerate.
8355 * configure: Regenerate.
8356
8357 2012-04-16 Yao Qi <yao@codesourcery.com>
8358
8359 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8360 duplicated on address.
8361
8362 2012-04-16 Yao Qi <yao@codesourcery.com>
8363
8364 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8365 (struct tracepoint_action_ops) <send>: New field.
8366 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8367 (agent_expr_send, x_tracepoint_action_send): New.
8368 (l_tracepoint_action_send): New.
8369 (cmd_qtdp): Download and install tracepoint
8370 according to `use_agent'.
8371 (run_inferior_command): Add one more parameter `len'.
8372 Update callers.
8373 (tracepoint_send_agent): New.
8374 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8375
8376 2012-04-16 Yao Qi <yao@codesourcery.com>
8377
8378 * tracepoint.c (download_tracepoints): Moved to ...
8379 (cmd_qtstart): ... here.
8380
8381 2012-04-14 Yao Qi <yao@codesourcery.com>
8382
8383 * tracepoint.c: Include inttypes.h.
8384 (struct collect_memory_action): Use sized types.
8385 (struct tracepoint): Likewise.
8386 (cmd_qtdp, stop_tracing): Update print specifiers.
8387 (cmd_qtp, response_tracepoint): Likewise.
8388 (collect_data_at_tracepoint): Likewise.
8389 (collect_data_at_step): Likewise.
8390
8391 2012-04-14 Yao Qi <yao@codesourcery.com>
8392
8393 Import gnulib module inttypes.
8394 * aclocal.m4, config.in, configure: Regenerated.
8395
8396 2012-04-14 Yao Qi <yao@codesourcery.com>
8397
8398 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8399 Makefile and config.status at last.
8400
8401 2012-04-13 Yao Qi <yao@codesourcery.com>
8402
8403 * tracepoint.c: Include stdint.h unconditionally.
8404
8405 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8406
8407 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8408 on BFD_HAVE_SYS_PROCFS_TYPE.
8409 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8410 * configure: Regenerate.
8411 * config.in: Likewise.
8412
8413 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8414
8415 * Makefile.in (clean): Also remove x32.c x32-linux.c
8416 x32-avx.c x32-avx-linux.c.
8417 (x32.o): New target.
8418 (x32.c): Likewise.
8419 (x32-linux.o): Likewise.
8420 (x32-linux.c): Likewise.
8421 (x32-avx.o): Likewise.
8422 (x32-avx.c): Likewise.
8423 (x32-avx-linux.o): Likewise.
8424 (x32-avx-linux.c): Likewise.
8425
8426 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8427 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8428 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8429 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8430 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8431 i386/x32-avx-linux.xml.
8432
8433 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8434 (init_registers_x32_avx_linux): Likwise.
8435 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8436 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8437
8438 2012-04-13 Pedro Alves <palves@redhat.com>
8439
8440 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8441 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8442 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8443 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8444 the sub-make.
8445
8446 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8447
8448 * linux-x86-low.c (compat_x32_clock_t): New.
8449 (compat_x32_siginfo_t): Likewise.
8450 (compat_x32_siginfo_from_siginfo): Likewise.
8451 (siginfo_from_compat_x32_siginfo): Likewise.
8452 (linux_is_elf64): Likewise.
8453 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8454 and siginfo_from_compat_x32_siginfo for x32.
8455 (x86_arch_setup): Set linux_is_elf64.
8456
8457 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8458
8459 PR gdb/13969
8460 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8461 e_machine field.
8462 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8463 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8464 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8465 compatible with process.
8466
8467 2012-04-12 Yao Qi <yao@codesourcery.com>
8468
8469 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8470 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8471 (install-only, install-info, clean): Handle sub dir gnulib.
8472 (all-lib, am--refresh): New targets.
8473 (memmem.o): Remove target.
8474 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8475 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8476 (AC_REPLACE_FUNCS): Remove memmem.
8477 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8478 (AC_OUTPUT): Generate Makefile in gnulib/.
8479 * aclocal.m4, config.in, configure: Regenerated.
8480
8481 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8482
8483 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8484
8485 2012-04-05 Pedro Alves <palves@redhat.com>
8486
8487 -Werror=strict-aliasing
8488
8489 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8490 pointer.
8491
8492 2012-04-04 Pedro Alves <palves@redhat.com>
8493
8494 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8495 (sparc_store_gregset_from_stack, sparc_store_gregset)
8496 (sparc_breakpoint_at): Fix formatting.
8497
8498 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8499
8500 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8501 are available.
8502 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8503 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8504 * config.in: Regenerate.
8505 * configure: Likewise.
8506
8507 2012-03-29 Pedro Alves <palves@redhat.com>
8508
8509 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8510 Correct ptrace arguments.
8511
8512 2012-03-28 Pedro Alves <palves@redhat.com>
8513
8514 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8515 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8516 (IA64_FR1_REGNUM): New defines.
8517 (ia64_fetch_register): New.
8518 (the_low_target): Install it.
8519 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8520 field.
8521 * linux-low.c (linux_fetch_registers): Try the
8522 the_low_target.fetch_register hook first.
8523
8524 * linux-arm-low.c (the_low_target): Adjust.
8525 * linux-bfin-low.c (the_low_target): Adjust.
8526 * linux-cris-low.c (the_low_target): Adjust.
8527 * linux-crisv32-low.c (the_low_target): Adjust.
8528 * linux-m32r-low.c (the_low_target): Adjust.
8529 * linux-m68k-low.c (the_low_target): Adjust.
8530 * linux-mips-low.c (the_low_target): Adjust.
8531 * linux-ppc-low.c (the_low_target): Adjust.
8532 * linux-s390-low.c (the_low_target): Adjust.
8533 * linux-sh-low.c (the_low_target): Adjust.
8534 * linux-sparc-low.c (the_low_target): Adjust.
8535 * linux-tic6x-low.c (the_low_target): Adjust.
8536 * linux-x86-low.c (the_low_target): Adjust.
8537 * linux-xtensa-low.c (the_low_target): Adjust.
8538
8539 2012-03-26 Pedro Alves <palves@redhat.com>
8540
8541 * server.c (handle_qxfer_libraries): Don't bail early if
8542 the_target->qxfer_libraries_svr4 is not NULL.
8543
8544 2012-03-26 Pedro Alves <palves@redhat.com>
8545
8546 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8547
8548 2012-03-23 Pedro Alves <palves@redhat.com>
8549
8550 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8551 "library-list-svr4" element's start tag when the the DSO list is
8552 empty.
8553
8554 2012-03-23 Pedro Alves <palves@redhat.com>
8555
8556 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8557 a variable whose type size is the same as the inferior's pointer
8558 size.
8559
8560 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8561
8562 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8563 struct siginfo.
8564 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8565 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8566 * linux-low.h: Include <signal.h>.
8567 (struct siginfo): Remove forward declaration.
8568 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8569 struct siginfo.
8570
8571 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8572
8573 * .gitignore: Ignore more files.
8574
8575 2012-03-19 Pedro Alves <palves@redhat.com>
8576 Jan Kratochvil <jan.kratochvil@redhat.com>
8577
8578 * server.c (cont_thread, general_thread): Add describing comments.
8579 (start_inferior): Clear `cont_thread'.
8580 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8581 of a process.
8582
8583 2012-03-15 Yao Qi <yao@codesourcery.com>
8584
8585 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8586 handling to ...
8587 (cmd_qtdp): ... here.
8588
8589 2012-03-15 Yao Qi <yao@codesourcery.com>
8590
8591 * tracepoint.c (struct tracepoint_action_ops): New.
8592 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8593 (m_tracepoint_action_download): New.
8594 (r_tracepoint_action_download): New.
8595 (x_tracepoint_action_download): New.
8596 (l_tracepoint_action_download): New.
8597 (add_tracepoint_action): Install `action->ops' according type.
8598 (download_tracepoint_1): Move code `download' function pointer
8599 of various tracepoint_action_ops.
8600
8601 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8602
8603 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8604 linux_ptrace_attach_warnings.
8605
8606 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8607
8608 * Makefile.in (linux-ptrace.o): New.
8609 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8610 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8611 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8612 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8613 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8614 of these targets.
8615 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8616
8617 2012-03-08 Yao Qi <yao@codesourcery.com>
8618 Pedro Alves <palves@redhat.com>
8619
8620 Fix PR server/13392.
8621 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8622 offset of JMP insn.
8623 * tracepoint.c (remove_tracepoint): New.
8624 (cmd_qtdp): Call remove_tracepoint when failed to install.
8625
8626 2012-03-07 Pedro Alves <palves@redhat.com>
8627
8628 * linux-low.c (get_detach_signal): New.
8629 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8630 Pass on pending signals to PTRACE_DETACH. Check the result of the
8631 ptrace call.
8632 * server.c (program_signals, program_signals_p): New.
8633 (handle_general_set): Handle QProgramSignals.
8634 * server.h (program_signals, program_signals_p): Declare.
8635
8636 2012-03-05 Pedro Alves <palves@redhat.com>
8637 Jan Kratochvil <jan.kratochvil@redhat.com>
8638
8639 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8640 New comment why.
8641
8642 2012-03-03 Yao Qi <yao@codesourcery.com>
8643
8644 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8645 agent_look_up_symbols.
8646
8647 2012-03-03 Yao Qi <yao@codesourcery.com>
8648
8649 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8650 (linux-x86-low.o): Likewise.
8651 * server.h: Remove in_process_agent_loaded.
8652 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8653 common/agent.c.
8654 Update callers.
8655
8656 2012-03-03 Yao Qi <yao@codesourcery.com>
8657
8658 * tracepoint.c (gdb_agent_capability): New global.
8659 (in_process_agent_loaded_ust): Renamed to
8660 `in_process_agent_supports_ust'.
8661 Update callers.
8662 (in_process_agent_supports_ust): Call agent_capability_check.
8663 (clear_installed_tracepoints): Assert that agent supports
8664 agent.
8665
8666 2012-03-03 Yao Qi <yao@codesourcery.com>
8667
8668 * linux-low.c (linux_supports_agent): New.
8669 (linux_target_ops): Initialize field `supports_agent' with
8670 linux_supports_agent.
8671 * target.h (struct target_ops) <supports_agent>: New.
8672 (target_supports_agent): New macro.
8673 * server.c (handle_general_set): Handle packet 'QAgent'.
8674 (handle_query): Send `QAgent+'.
8675 * Makefile.in (server.o): Depends on agent.h.
8676
8677 2012-03-03 Yao Qi <yao@codesourcery.com>
8678
8679 * Makefile.in (OBS): Add agent.o.
8680 Add new rule for agent.o.
8681 Track dependence of tracepoint.c on agent.h.
8682 * tracepoint.c (run_inferior_command_1):
8683 (run_inferior_command): Call agent_run_command.
8684 (gdb_ust_connect_sync_socket): Deleted. Move it to
8685 common/agent.c.
8686 (resume_thread, stop_thread): Likewise.
8687 (gdb_ust_socket_init): Renamed to ...
8688 (gdb_agent_socket_init): ... New.
8689 (gdb_ust_thread): Renamed to ...
8690 (gdb_agent_helper_thread): ... New.
8691 (gdb_ust_init): Move some code to ...
8692 (gdb_agent_init): ... here. New.
8693 [HAVE_UST]: Call gdb_ust_init.
8694 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8695 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8696 * config.in, configure: Regenerated.
8697
8698 2012-03-02 Pedro Alves <palves@redhat.com>
8699
8700 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8701 * linux-low.c (struct simple_pid_list): New.
8702 (stopped_pids): New a struct simple_pid_list pointer.
8703 (add_to_pid_list, pull_pid_from_list): New.
8704 (handle_extended_wait): Don't assume the first signal new children
8705 report is SIGSTOP. Adjust call to pull_pid_from_list.
8706 (linux_wait_for_lwp): Adjust.
8707
8708 2012-03-02 Yao Qi <yao@codesourcery.com>
8709
8710 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8711 debug log.
8712
8713 2012-03-02 Yao Qi <yao@codesourcery.com>
8714
8715 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8716 `stop_pc' and `tpoint'. Update caller.
8717
8718 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8719
8720 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8721 * linux-low.c (use_linux_regsets): New macro.
8722 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8723 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8724 (linux_register_in_regsets): New function.
8725 (usr_fetch_inferior_registers): Skip registers covered by
8726 regsets.
8727 (usr_store_inferior_registers): Likewise.
8728 (usr_fetch_inferior_registers): New macro.
8729 (usr_store_inferior_registers): Likewise.
8730 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8731 (linux_store_registers): Likewise.
8732 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8733 prototype.
8734 (init_registers_mips64_dsp_linux): Likewise.
8735 (init_registers_mips_linux): New macro.
8736 (init_registers_mips_dsp_linux): Likewise.
8737 (mips_dsp_num_regs): Likewise.
8738 (DSP_BASE, DSP_CONTROL): New fallback macros.
8739 (mips_base_regs): New macro.
8740 (mips_regmap): Use it. Fix the size.
8741 (mips_dsp_regmap): New variable.
8742 (mips_dsp_regset_bitmap): Likewise.
8743 (mips_arch_setup): New function.
8744 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8745 than mips_regmap.
8746 (mips_cannot_store_register): Likewise.
8747 (the_low_target): Update .arch_setup, .num_regs and .regmap
8748 initializers. Add .regset_bitmap initializer.
8749 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8750 initializer.
8751 * linux-bfin-low.c (the_low_target): Likewise.
8752 * linux-cris-low.c (the_low_target): Likewise.
8753 * linux-crisv32-low.c (the_low_target): Likewise.
8754 * linux-ia64-low.c (the_low_target): Likewise.
8755 * linux-m32r-low.c (the_low_target): Likewise.
8756 * linux-m68k-low.c (the_low_target): Likewise.
8757 * linux-ppc-low.c (the_low_target): Likewise.
8758 * linux-s390-low.c (the_low_target): Likewise.
8759 * linux-sh-low.c (the_low_target): Likewise.
8760 * linux-sparc-low.c (the_low_target): Likewise.
8761 * linux-tic6x-low.c (the_low_target): Likewise.
8762 * linux-x86-low.c (the_low_target): Likewise.
8763 * linux-xtensa-low.c (the_low_target): Likewise.
8764 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8765 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8766 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8767 srv_xmlfiles.
8768 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8769 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8770
8771 2012-02-29 Yao Qi <yao@codesourcery.com>
8772 Pedro Alves <palves@redhat.com>
8773
8774 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8775 `step_over_finished' is true.
8776
8777 2012-02-27 Pedro Alves <palves@redhat.com>
8778
8779 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8780 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8781
8782 2012-02-27 Pedro Alves <palves@redhat.com>
8783
8784 PR server/9684
8785 * linux-low.c (pid_is_stopped): New.
8786 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8787
8788 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8789
8790 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8791 of conditions.
8792
8793 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8794
8795 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8796
8797 2012-02-24 Luis Machado <lgustavo@codesourcery>
8798
8799 * server.c (handle_query): Advertise support for target-side
8800 breakpoint condition evaluation.
8801 (process_point_options): New function.
8802 (process_serial_event): When inserting a breakpoint, check for
8803 a target-side condition that should be evaluated.
8804
8805 * mem-break.c: Include regcache.h and ax.h.
8806 (point_cond_list_t): New data structure.
8807 (breakpoint) <cond_list>: New field.
8808 (find_gdb_breakpoint_at): Make non-static.
8809 (delete_gdb_breakpoint_at): Clear any target-side
8810 conditions.
8811 (clear_gdb_breakpoint_conditions): New function.
8812 (add_condition_to_breakpoint): Likewise.
8813 (add_breakpoint_condition): Likewise.
8814 (gdb_condition_true_at_breakpoint): Likewise.
8815 (gdb_breakpoint_here): Return result directly instead
8816 of going through a local variable.
8817
8818 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8819 (clear_gdb_breakpoint_conditions): Likewise.
8820 (add_breakpoint_condition): Likewise.
8821 (gdb_condition_true_at_breakpoint): Likewise.
8822
8823 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8824 (need_step_over_p): Take target-side breakpoint condition into
8825 consideration.
8826
8827 2012-02-24 Luis Machado <lgustavo@codesourcery>
8828
8829 * server.h: Include tracepoint.h.
8830 (agent_mem_read, agent_get_trace_state_variable_value,
8831 agent_set_trace_state_variable_value,
8832 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8833 get_set_tsv_func_addr): New prototypes.
8834
8835 * ax.h: New include file.
8836 * ax.c: New source file.
8837
8838 * tracepoint.c: Include ax.h.
8839 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8840 agent_expr, eval_result_type): Move to ax.h.
8841 (parse_agent_expr): Rename to ...
8842 (gdb_parse_agent_expr): ... this, make it non-static and move
8843 to ax.h.
8844 (unparse_agent_expr) Rename to ...
8845 (gdb_unparse_agent_expr): ... this, make it non-static and move
8846 to ax.h.
8847 (eval_agent_expr): Rename to ...
8848 (eval_tracepoint_agent_expr): ... this.
8849 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8850 forward declarations.
8851 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8852 (agent_get_trace_state_variable_value): New function.
8853 (agent_set_trace_state_variable_value): New function.
8854 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8855 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8856 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8857 (condition_true_at_tracepoint): Likewise.
8858 (parse_agent_expr): Rename to ...
8859 (gdb_parse_agent_expr): ... this and move to ax.c.
8860 (unparse_agent_expr): Rename to ...
8861 (gdb_unparse_agent_expr): ... this and move to ax.c.
8862 (gdb_agent_op_name): Move to ax.c.
8863 (eval_agent_expr): Rename to ...
8864 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8865 and move to ax.c.
8866 (eval_tracepoint_agent_expr): New function.
8867 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8868 non-static.
8869 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8870 ax.c.
8871 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8872 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8873 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8874 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8875 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8876 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8877 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8878 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8879 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8880 (compile_bytecodes): Remove forward declaration.
8881 (is_goto_target): Move to ax.c.
8882 (compile_bytecodes): Move to ax.c and call
8883 agent_get_trace_state_variable_value (...) and
8884 agent_set_trace_state_variable_value (...).
8885
8886 * Makefile.in: Update ax.c and IPA dependencies.
8887
8888 2012-02-24 Pedro Alves <palves@redhat.com>
8889
8890 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8891 (cmd_bigqtbuffer_circular): ... this. Only handle
8892 'QTBuffer:circular:'.
8893 (handle_tracepoint_general_set): Adjust.
8894
8895 2012-02-16 Yao Qi <yao@codesourcery.com>
8896
8897 * inferiors.c: Move code to ...
8898 * dll.c: .... here. New.
8899 * server.h: Declare clear_dlls.
8900 * Makefile.in (SFILES): Add dll.c.
8901 (OBS): Add dll.o
8902 (dll.o): New rule.
8903
8904 2012-02-11 Yao Qi <yao@codesourcery.com>
8905
8906 * server.c: (handle_monitor_command): Add a new parameter
8907 `own_buf'.
8908 (handle_query): Update caller.
8909
8910 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8911
8912 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8913 * configure, config.in: Regenerate.
8914 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8915 is not defined.
8916
8917 2012-02-02 Pedro Alves <palves@redhat.com>
8918
8919 Try SIGKILL first, then PTRACE_KILL.
8920 * linux-low.c (linux_kill_one_lwp): New.
8921 (linux_kill_one_lwp): Rename to ...
8922 (kill_one_lwp_callback): ... this. Use the new
8923 linux_kill_one_lwp.
8924
8925 2012-02-02 Pedro Alves <palves@redhat.com>
8926
8927 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8928 inferior.
8929
8930 2012-01-27 Pedro Alves <palves@redhat.com>
8931
8932 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8933 (elf_64_file_p): Make static.
8934 (linux_pid_exe_is_elf_64_file): New.
8935 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8936 Delete declarations.
8937 (linux_pid_exe_is_elf_64_file): Declare.
8938 * linux-x86-low.c (x86_arch_setup): Use
8939 linux_pid_exe_is_elf_64_file.
8940
8941 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8942
8943 * linux-low.c (linux_wait_for_event_1): Rename to ...
8944 (linux_wait_for_event): ... here and merge it with former
8945 linux_wait_for_event - new variable wait_ptid, use it.
8946 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8947
8948 2012-01-23 Pedro Alves <palves@redhat.com>
8949
8950 * server.c (main): Avoid yet another case of infinite loop while
8951 detaching/killing after a longjmp.
8952
8953 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8954
8955 Code cleanup.
8956 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8957
8958 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8959
8960 * hostio.c (handle_readlink): New function.
8961 (handle_vFile): Call it to handle "vFile:readlink" packets.
8962
8963 2012-01-20 Pedro Alves <palves@redhat.com>
8964 Ulrich Weigand <ulrich.weigand@linaro.org>
8965
8966 * server.c (handle_v_requests): Only support vAttach and vRun to
8967 start multiple processes when in extended protocol mode.
8968
8969 2012-01-17 Pedro Alves <palves@redhat.com>
8970
8971 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8972 memalign plus mprotect to allocate the scratch buffer.
8973
8974 2012-01-13 Pedro Alves <palves@redhat.com>
8975
8976 * server.c (attach_inferior): Clear `cont_thread'.
8977
8978 2012-01-13 Pedro Alves <palves@redhat.com>
8979
8980 * server.c (main): Avoid infinite loop while detaching/killing
8981 after a longjmp.
8982
8983 2012-01-09 Doug Evans <dje@google.com>
8984
8985 * server.c (start_inferior): Set last_ptid in --wrapper case.
8986
8987 2012-01-06 Yao Qi <yao@codesourcery.com>
8988
8989 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8990 defined.
8991 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8992
8993 2012-01-04 Yao Qi <yao@codesourcery.com>
8994
8995 * tracepoint.c (cmd_qtdp): Print debug message
8996 for static tracepoint.
8997
8998 2012-01-04 Yao Qi <yao@codesourcery.com>
8999
9000 * tracepoint.c (trace_vdebug): Differentiate debug message
9001 between gdbserver and IPA.
9002
9003 2012-01-03 Yao Qi <yao@codesourcery.com>
9004
9005 * tracepoint.c (tracepoint_was_hit): Don't collect for
9006 static tracepoint.
9007
9008 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9009
9010 * terminal.h: Reformat copyright header.
9011
9012 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9013
9014 * server.c (gdbserver_version): Update copyright year.
9015 * gdbreplay.c (gdbreplay_version): Likewise.
9016
9017 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9018
9019 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9020
9021 Revert:
9022 2011-12-18 Hui Zhu <teawater@gmail.com>
9023 * linux-low.c (linux_create_inferior): Save return value to ret.
9024
9025 2011-12-18 Hui Zhu <teawater@gmail.com>
9026
9027 * linux-low.c (linux_create_inferior): Save return value to ret.
9028
9029 2011-12-16 Doug Evans <dje@google.com>
9030
9031 * linux-low.c (linux_create_inferior): If stdio connection,
9032 redirect stdin from /dev/null, stdout to stderr.
9033 * remote-utils.c (remote_is_stdio): New static global.
9034 (remote_connection_is_stdio): New function.
9035 (remote_prepare): Handle stdio connection.
9036 (remote_open): Ditto.
9037 (remote_close): Don't close stdin for stdio connections.
9038 (read_prim,write_prim): New functions. Replace all calls to
9039 read/write to these.
9040 * server.c (main): Watch for "-" argument. Move call to
9041 remote_prepare before start_inferior.
9042 * server.h (STDIO_CONNECTION_NAME): New macro.
9043 (remote_connection_is_stdio): Declare.
9044
9045 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9046 in debugging output.
9047
9048 2011-12-15 Yao Qi <yao@codesourcery.com>
9049
9050 * tracepoint.c: Include sys/syscall.h.
9051 (gdb_ust_thread): Remove preprocessor conditional.
9052
9053 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9054
9055 * linux-low.c (linux_detach_one_lwp): Call
9056 the_low_target.prepare_to_resume before detaching.
9057
9058 2011-12-14 Yao Qi <yao@codesourcery.com>
9059
9060 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9061 of write.
9062
9063 2011-12-14 Yao Qi <yao@codesourcery.com>
9064
9065 * i386-low.c (i386_low_stopped_data_address): Initialize local
9066 variable `control'.
9067
9068 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9069
9070 PR remote/13492
9071
9072 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9073 DR_CONTROL unless necessary. Extend comments.
9074 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9075 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9076
9077 2011-12-13 Yao Qi <yao@codesourcery.com>
9078
9079 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9080 macros.
9081 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9082
9083 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9084
9085 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9086 Print new debug message for such case.
9087
9088 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9089
9090 Fix overlapping memcpy.
9091 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9092 the read_inferior_memory transfer.
9093 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9094 write_inferior_memory transfer.
9095 (set_fast_tracepoint_jump): New variable buf. Use it for the
9096 read_inferior_memory and write_inferior_memory transfers.
9097 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9098 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9099 Use it for the write_inferior_memory transfer.
9100 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9101 buffers.
9102
9103 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9104
9105 * linux-low.c (fetch_register, store_register): Make code
9106 consistent, fix formatting.
9107
9108 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9109
9110 * linux-low.c (usr_store_inferior_registers): Factor out code
9111 to handle individual registers into...
9112 (store_register): ... this new function.
9113
9114 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9115
9116 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9117 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9118 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9119 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9120 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9121 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9122 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9123 (srv_xmlfiles): Add new XML files.
9124
9125 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9126 and <sys/uio.h>.
9127 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9128 (init_registers_s390_linux32v1): Add prototype.
9129 (init_registers_s390_linux32v2): Likewise.
9130 (init_registers_s390_linux64v1): Likewise.
9131 (init_registers_s390_linux64v2): Likewise.
9132 (init_registers_s390x_linux64v1): Likewise.
9133 (init_registers_s390x_linux64v2): Likewise.
9134 (s390_num_regs): Increment to 52.
9135 (s390_regmap): Add orig_r2 register.
9136 (s390_num_regs_3264): Increment to 68.
9137 (s390_regmap_3264): Add orig_r2 register.
9138 (s390_collect_ptrace_register): Handle orig_r2 register.
9139 (s390_supply_ptrace_register): Likewise.
9140 (s390_fill_last_break): New function.
9141 (s390_store_last_break): Likewise.
9142 (s390_fill_system_call): New function.
9143 (s390_store_system_call): Likewise.
9144 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9145 register sets.
9146 (s390_check_regset): New function.
9147 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9148 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9149 Update target_regsets for available register sets.
9150
9151 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9152 Jan Kratochvil <jan.kratochvil@redhat.com>
9153
9154 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9155 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9156 New.
9157 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9158 * linux-low.h (struct process_info_private): New member r_debug.
9159 * server.c (handle_qxfer_libraries): Call
9160 the_target->qxfer_libraries_svr4.
9161 (handle_qxfer_libraries_svr4): New function.
9162 (qxfer_packets): New entry "libraries-svr4".
9163 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9164 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9165 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9166 PACKET_qXfer_libraries_svr4.
9167
9168 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9171 PSW address/mask between 8-byte and 16-byte formats.
9172 (s390_supply_ptrace_register): Likewise.
9173 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9174 basic addressing mode bit.
9175
9176 2011-11-24 Stan Shebs <stan@codesourcery.com>
9177
9178 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9179
9180 2011-11-17 Stan Shebs <stan@codesourcery.com>
9181
9182 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9183 (tracing_start_time): New global.
9184 (tracing_stop_time): New global.
9185 (tracing_user_name): New global.
9186 (tracing_notes): New global.
9187 (tracing_stop_note): New global.
9188 (cmd_qtstart): Set traceframe_usage, start_time.
9189 (stop_tracing): Set stop_time.
9190 (cmd_qtstatus): Report additional status.
9191 (cmd_qtp): New function.
9192 (handle_tracepoint_query): Call it.
9193 (cmd_qtnotes): New function.
9194 (handle_tracepoint_general_set): Call it.
9195 (get_timestamp): Rename from tsv_get_timestamp.
9196
9197 2011-11-14 Stan Shebs <stan@codesourcery.com>
9198 Kwok Cheung Yeung <kcy@codesourcery.com>
9199
9200 * linux-x86-low.c (small_jump_insn): New.
9201 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9202 trampoline and error message, build a trampoline and issue a small
9203 jump instruction to it.
9204 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9205 trampoline and error message.
9206 (x86_get_min_fast_tracepoint_insn_len): New.
9207 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9208 * linux-low.h (struct linux_target_ops): Add arguments to
9209 install_fast_tracepoint_jump_pad operation, add new operation.
9210 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9211 arguments.
9212 (linux_get_min_fast_tracepoint_insn_len): New function.
9213 (linux_target_op): Add new operation.
9214 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9215 (gdb_trampoline_buffer_end): Ditto.
9216 (gdb_trampoline_buffer_error): Ditto.
9217 (struct ipa_sym_addresses): Add fields for new IPA variables.
9218 (symbol_list): Add entries for new IPA variables.
9219 (struct tracepoint): Add fields to hold the address range of the
9220 trampoline used by the tracepoint.
9221 (trampoline_buffer_head): New static variable.
9222 (trampoline_buffer_tail): Ditto.
9223 (claim_trampoline_space): New function.
9224 (have_fast_tracepoint_trampoline_buffer): New function.
9225 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9226 structure.
9227 (install_fast_tracepoint): Ditto, also add error buffer argument.
9228 (cmd_qtminftpilen): New function.
9229 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9230 (fast_tracepoint_from_trampoline_address): New function.
9231 (fast_tracepoint_collecting): Handle trampoline as part of jump
9232 pad space.
9233 (set_trampoline_buffer_space): New function.
9234 (initialize_tracepoint): Initialize new IPA variables.
9235 * target.h (struct target_ops): Add arguments to
9236 install_fast_tracepoint_jump_pad operation, add new
9237 get_min_fast_tracepoint_insn_len operation.
9238 (target_get_min_fast_tracepoint_insn_len): New.
9239 (install_fast_tracepoint_jump_pad): Add arguments.
9240 * server.h (IPA_BUFSIZ): Define.
9241 * linux-i386-ipa.c: Include extra header files.
9242 (initialize_fast_tracepoint_trampoline_buffer): New function.
9243 (initialize_low_tracepoint): Call it.
9244 * server.h (set_trampoline_buffer_space): Declare.
9245 (claim_trampoline_space): Ditto.
9246 (have_fast_tracepoint_trampoline_buffer): Ditto.
9247
9248 2011-11-14 Yao Qi <yao@codesourcery.com>
9249
9250 * server.c (handle_query): Handle InstallInTrace for qSupported.
9251 * tracepoint.c (add_tracepoint): Sort list.
9252 (install_tracepoint, download_tracepoint): New.
9253 (cmd_qtdp): Call them to install and download tracepoints.
9254 (sort_tracepoints): Removed.
9255 (cmd_qtstart): Update.
9256
9257 2011-11-14 Yao Qi <yao@codesourcery.com>
9258
9259 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9260 * mem-break.h: Declare.
9261 * tracepoint.c (cmd_qtstart): Move some code to ...
9262 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9263 New.
9264 (download_tracepoints): Move some code to ...
9265 (download_tracepoint_1): ... here. New.
9266
9267 2011-11-08 Yao Qi <yao@codesourcery.com>
9268
9269 * remote-utils.c (relocate_instruction): A comment fix.
9270
9271 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9272
9273 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9274 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9275 dr_status_mirror and dr_control_mirror from debug_reg_state.
9276 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9277 (i386_initial_stuff): Remove use of deleted globals.
9278 (i386_get_thread_context, i386_set_thread_context,
9279 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9280 from debug_reg_state.
9281
9282 2011-11-05 Yao Qi <yao@codesourcery.com>
9283
9284 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9285 address as TPOINT's.
9286
9287 2011-11-02 Stan Shebs <stan@codesourcery.com>
9288
9289 * tracepoint.c (agent_mem_read_string): New function.
9290 (eval_agent_expr): Call it for tracenz.
9291 * server.c (handle_query): Report support for tracenz.
9292
9293 2011-11-02 Yao Qi <yao@codesourcery.com>
9294
9295 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9296
9297 2011-11-02 Yao Qi <yao@codesourcery.com>
9298
9299 * target.h: Fix a typo in comment.
9300
9301 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9302
9303 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9304 clobber the breakpoints' shadows with fast tracepoint jumps.
9305 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9306 * target.c (write_inferior_memory): Also pass MYADDR down to
9307 check_mem_write.
9308
9309 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9310
9311 * configure.ac: Check support for personality routine.
9312 * configure: Regenerate.
9313 * config.in: Likewise.
9314 * linux-low.c: Include <sys/personality.h>.
9315 Define ADDR_NO_RANDOMIZE if necessary.
9316 (linux_create_inferior): Disable address space randomization when
9317 forking inferior, if requested.
9318 (linux_supports_disable_randomization): New function.
9319 (linux_target_ops): Install it.
9320 * server.h (disable_randomization): Declare.
9321 * server.c (disable_randomization): New global variable.
9322 (handle_general_set): Handle QDisableRandomization.
9323 (handle_query): Likewise for qSupported.
9324 (main): Support --disable-randomization and --no-disable-randomization
9325 command line arguments.
9326 * target.h (struct target_ops): Add supports_disable_randomization.
9327 (target_supports_disable_randomization): New macro.
9328
9329 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9330
9331 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9332 ifdef check.
9333 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9334 [!PT_GETDSBT] (target_loadmap): New definition.
9335 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9336 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9337 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9338 and PT_GETDSBT to LINUX_LOADMAP.
9339 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9340 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9341
9342 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9343
9344 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9345 (arm_linux_hwbp_cap): New static variable.
9346 (arm_linux_get_hwbp_cap): Replace by ...
9347 (arm_linux_init_hwbp_cap): ... this new function.
9348 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9349 (arm_linux_get_hw_watchpoint_count): Likewise.
9350 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9351 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9352 (arm_prepare_to_resume): Use perror_with_name instead of error.
9353
9354 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9355
9356 * linux-arm-low.c: Include <signal.h>.
9357 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9358 (struct arm_linux_hwbp_cap): New data type.
9359 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9360 (struct arm_linux_hw_breakpoint): New data type.
9361 (MAX_BPTS, MAX_WPTS): Define.
9362 (struct arch_process_info, struct arch_lwp_info): New data types.
9363 (arm_linux_get_hwbp_cap): New function.
9364 (arm_linux_get_hw_breakpoint_count): Likewise.
9365 (arm_linux_get_hw_watchpoint_count): Likewise.
9366 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9367 (arm_hwbp_control_initialize): Likewise.
9368 (arm_hwbp_control_is_enabled): Likewise.
9369 (arm_hwbp_control_is_initialized): Likewise.
9370 (arm_hwbp_control_disable): Likewise.
9371 (arm_linux_hw_breakpoint_equal): Likewise.
9372 (arm_linux_hw_point_initialize): Likewise.
9373 (struct update_registers_data): New data structure.
9374 (update_registers_callback: New function.
9375 (arm_insert_point): Likewise.
9376 (arm_remove_point): Likewise.
9377 (arm_stopped_by_watchpoint): Likewise.
9378 (arm_stopped_data_address): Likewise.
9379 (arm_new_process): Likewise.
9380 (arm_new_thread): Likewise.
9381 (arm_prepare_to_resume): Likewise.
9382 (the_low_target): Register arm_insert_point, arm_remove_point,
9383 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9384 arm_new_thread, and arm_prepare_to_resume.
9385
9386 2011-09-15 Stan Shebs <stan@codesourcery.com>
9387
9388 * server.h (struct emit_ops): Add compare-goto fields.
9389 * tracepoint.c (gdb_agent_op_sizes): New table.
9390 (emit_eq_goto): New function.
9391 (emit_ne_goto): New function.
9392 (emit_lt_goto): New function.
9393 (emit_le_goto): New function.
9394 (emit_gt_goto): New function.
9395 (emit_ge_goto): New function.
9396 (is_goto_target): New function.
9397 (compile_bytecodes): Recognize special cases of compare-goto
9398 combinations and call specialized emitters for them.
9399 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9400 (amd64_emit_ne_goto): New function.
9401 (amd64_emit_lt_goto): New function.
9402 (amd64_emit_le_goto): New function.
9403 (amd64_emit_gt_goto): New function.
9404 (amd64_emit_ge_goto): New function.
9405 (amd64_emit_ops): Add the new functions.
9406 (i386_emit_eq_goto): New function.
9407 (i386_emit_ne_goto): New function.
9408 (i386_emit_lt_goto): New function.
9409 (i386_emit_le_goto): New function.
9410 (i386_emit_gt_goto): New function.
9411 (i386_emit_ge_goto): New function.
9412 (i386_emit_ops): Add the new functions.
9413
9414 2011-09-08 Stan Shebs <stan@codesourcery.com>
9415
9416 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9417 (i386_emit_epilogue): Restore %ebx.
9418
9419 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9420
9421 * server.c (step_thread): Remove definition.
9422 (process_serial_event): Don't handle Hs.
9423 * server.h (step_thread): Remove declaration.
9424 * target.c (set_desired_inferior): Remove use of step_thread.
9425
9426 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9427
9428 * linux-low.c: Include linux-procfs.h.
9429 (linux_attach_lwp_1): Update comments.
9430 (linux_attach): Scan for existing threads when attaching to a
9431 process that is the tgid.
9432 * Makefile.in: Update dependencies.
9433
9434 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9435
9436 * configure.srv: Add linux-procfs.o dependencies.
9437
9438 2011-08-14 Yao Qi <yao@codesourcery.com>
9439
9440 * target.h (struct target_ops): Fix indent.
9441 * win32-low.c (win32_target_ops): Fix comment.
9442
9443 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9444 Yao Qi <yao@codesourcery.com>
9445
9446 * Makefile.in (clean): Remove tic6x-*.c files.
9447 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9448 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9449 (tic6x-c64xp-linux.c): Likewise.
9450 * configure.srv: Add support for tic6x-*-uclinux.
9451 * linux-tic6x-low.c: New.
9452 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9453
9454 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9455 Yao Qi <yao@codesourcery.com>
9456
9457 * target.h (struct target_ops): Add read_loadmap.
9458 * linux-low.c (struct target_loadseg): New type.
9459 (struct target_loadmap): New type.
9460 (linux_read_loadmap): New function.
9461 (linux_target_ops): Add linux_read_loadmap.
9462 * server.c (handle_query): Support qXfer:fdpic:read packet.
9463 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9464 to NULL.
9465
9466 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9467
9468 * win32-low.c: Include <stdint.h>.
9469
9470 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9471
9472 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9473 to the inferior here.
9474 (i386_remove_aligned_watchpoint): Ditto.
9475 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9476 fit part of the watchpoint in the debug registers.
9477 (i386_update_inferior_debug_regs): New.
9478 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9479 registers, and only update the inferior on success.
9480 (i386_low_remove_watchpoint): Ditto.
9481
9482 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9483
9484 * linux-low.c (compare_ints, unique, list_threads, show_process,
9485 linux_core_of_thread): Delete.
9486 (linux_target_ops): Change linux_core_of_thread to
9487 linux_common_core_of_thread.
9488 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9489 * utils.c (malloc_failure): Change type of argument.
9490 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9491 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9492 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9493 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9494 (IPA_OBJS): Add common-utils-ipa.o.
9495 (ptid_h, linux_osdata_h): New macros.
9496 (server_h): Add common/common-utils.h, common/xml-utils.h,
9497 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9498 common/ptid.h.
9499 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9500 ptid.o, buffer.o): New rules.
9501 (linux-low.o): Add common/linux-osdata.h as a dependency.
9502 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9503 * configure.ac: Add AC_HEADER_DIRENT check.
9504 * config.in: Regenerate.
9505 * configure: Regenerate.
9506 * remote-utils.c (xml_escape_text): Delete.
9507 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9508 buffer_xml_printf): Move to common/buffer.c.
9509 * server.c (main): Remove call to initialize_inferiors.
9510 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9511 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9512 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9513 internal_error, gdb_assert, gdb_assert_fail): Delete.
9514 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9515 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9516 common/buffer.h.
9517 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9518 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9519 initialize_inferiors): Delete.
9520
9521 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9522
9523 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9524 symbol error.
9525
9526 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9527
9528 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9529 assertion.
9530 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9531
9532 2011-05-26 Yao Qi <yao@codesourcery.com>
9533
9534 * Makefile.in (thread-db.o): Track dependence to
9535 common/gdb_thread_db.h.
9536 * thread-db.c: include gdb_thread_db.h from right place.
9537
9538 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9539
9540 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9541 __FILE__ and __LINE__ to internal_error.
9542
9543 2011-05-13 Doug Evans <dje@google.com>
9544
9545 * thread-db.c (try_thread_db_load_from_sdir): New function.
9546 (try_thread_db_load_from_dir): New function.
9547 (thread_db_load_search): Handle $sdir, ignore $pdir.
9548 Remove trying of system directories if search of
9549 libthread-db-search-path fails, that is now done via $sdir.
9550
9551 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9552
9553 * server.c (handle_query): Add EnableDisableTracepoints to the list
9554 of supported features.
9555 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9556 tracepoints.
9557 (cmd_qtenable_disable): New.
9558 (cmd_qtstart): Install tracepoints even if disabled.
9559 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9560 receiving a QTEnable or QTDisable packet.
9561 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9562 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9563 tracepoints.
9564 (gdb_probe): Skip data collection if static tracepoint is disabled.
9565
9566 2011-05-10 Doug Evans <dje@google.com>
9567
9568 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9569
9570 2011-05-04 Doug Evans <dje@google.com>
9571
9572 * linux-low.c (linux_join): Skip process lookup.
9573 * spu-low.c (spu_join): Ditto.
9574 * server.c (join_inferiors_callback): Delete.
9575 (process_serial_event): For 'D' packet (detach) call join_inferior
9576 directly.
9577
9578 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9579
9580 * README: Don't mention xscale*-*-linux*.
9581 * configure.srv (xscale*-*-linux*): Don't handle target.
9582
9583 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9584
9585 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9586 casting pointers.
9587 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9588 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9589 (i386_emit_void_call_2): Likewise.
9590
9591 2011-04-26 Yao Qi <yao@codesourcery.com>
9592
9593 * linux-low.c: Move common macros to linux-ptrace.h.
9594 Include linux-ptrace.h.
9595 * Makefile.in (linux_ptrace_h): New.
9596 (linux-low.o): Depends on linux-ptrace.h.
9597
9598 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9599
9600 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9601 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9602 (remote_prepare): New function with most of the TCP code from ...
9603 (remote_open): ... here. Detect PORT here unconditionally. Move also
9604 setting transport_is_reliable.
9605 * server.c (run_once): New variable.
9606 (gdbserver_usage): Document it.
9607 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9608 the first run if RUN_ONCE.
9609 * server.h (run_once, remote_prepare): New declarations.
9610
9611 2011-04-19 Tom Tromey <tromey@redhat.com>
9612
9613 * win32-low.c (handle_load_dll): Remove duplicate "the".
9614
9615 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9616
9617 Remove support for old Cygwin 1.5 versions.
9618 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9619 function to avoid warning.
9620 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9621 warning.
9622
9623 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9624
9625 * gdbserver/server.h (Macro _): Define it if not available.
9626
9627 2011-03-14 Michael Snyder <msnyder@vmware.com>
9628
9629 * hostio.c (handle_close): Remove unnecessary null test.
9630
9631 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9632
9633 * Makefile.in (maintainer-clean realclean distclean): Remove
9634 "make ... subdir_do" command.
9635
9636 2011-03-10 Michael Snyder <msnyder@vmware.com>
9637
9638 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9639
9640 * server.c (handle_v_run): Free alloced buffer on early return.
9641
9642 2011-03-09 Yao Qi <yao@codesourcery.com>
9643
9644 Revert:
9645 2011-03-04 Yao Qi <yao@codesourcery.com>
9646
9647 * Makefile.in: Remove GNU make feature --directory.
9648
9649 2011-03-05 Yao Qi <yao@codesourcery.com>
9650
9651 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9652 (subdir_do): New make target. Copied from gdb/Makefile.
9653 (maintainer-clean, realclean, distclean, clean): Call corresponding
9654 make targets in common/Makefile.
9655
9656 2011-02-11 Yao Qi <yao@codesourcery.com>
9657
9658 * configure.ac: Call AC_PROG_RANLIB.
9659 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9660 * configure: Regenerate.
9661
9662 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9663
9664 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9665
9666 2011-03-06 Yao Qi <yao@codesourcery.com>
9667
9668 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9669
9670 2011-03-05 Yao Qi <yao@codesourcery.com>
9671
9672 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9673 (subdir_do): New make target. Copied from gdb/Makefile.
9674 (maintainer-clean, realclean, distclean, clean): Call corresponding
9675 make targets in common/Makefile.
9676
9677 2011-03-04 Yao Qi <yao@codesourcery.com>
9678
9679 * Makefile.in: Remove GNU make feature --directory.
9680
9681 2011-03-04 Michael Snyder <msnyder@vmware.com>
9682
9683 * server.c (queue_stop_reply): Call xmalloc not malloc.
9684
9685 2011-03-02 Michael Snyder <msnyder@vmware.com>
9686
9687 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9688
9689 2011-02-28 Michael Snyder <msnyder@vmware.com>
9690
9691 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9692 (cmd_qtframe): Ditto.
9693 (cmd_qtbuffer): Ditto.
9694 (cmd_bigqtbuffer): Ditto.
9695
9696 * utils.c (decimal2str): Initialize 'width' to nine, then
9697 don't mess with it.
9698
9699 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9700
9701 * hostio.c (require_data): Free *data, not data.
9702
9703 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9704
9705 * hostio.c (require_data): Use free, not xfree.
9706
9707 2011-02-27 Michael Snyder <msnyder@vmware.com>
9708
9709 * server.c (handle_query): Discard unused value.
9710
9711 * hostio.c (require_data): Free malloc memory before returning
9712 error.
9713
9714 2011-02-26 Michael Snyder <msnyder@vmware.com>
9715
9716 * linux-low.c (list_threads): Call closedir for dirent.
9717
9718 2011-02-27 Michael Snyder <msnyder@vmware.com>
9719
9720 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9721 a case statement falls through.
9722
9723 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9724
9725 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9726 in comparison.
9727
9728 2011-02-26 Michael Snyder <msnyder@vmware.com>
9729
9730 * utils.c (decimal2str): Eliminate dead code and dead param.
9731 (pulongest): Drop dead param from call to decimal2str.
9732 (plongest): Ditto.
9733
9734 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9735
9736 Revert the following patch (not approved yet):
9737 2011-02-21 Hui Zhu <teawater@gmail.com>
9738 * tracepoint.c (tp_printf): New function.
9739 (eval_agent_expr): Handle gdb_agent_op_printf.
9740
9741 2011-02-21 Hui Zhu <teawater@gmail.com>
9742
9743 * tracepoint.c (tp_printf): New function.
9744 (eval_agent_expr): Handle gdb_agent_op_printf.
9745
9746 2011-02-18 Tom Tromey <tromey@redhat.com>
9747
9748 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9749 (tracepoint.o): Likewise.
9750 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9751 (gdb_agent_op_names): Likewise.
9752
9753 2011-02-18 Tom Tromey <tromey@redhat.com>
9754
9755 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9756 gdb_agent_op_rot>: New constants.
9757 (gdb_agent_op_names): Add pick and roll.
9758 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9759 cases.
9760
9761 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9762
9763 * aclocal.m4: Regenerated with aclocal-1.11.1.
9764
9765 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9766
9767 * server.c (handle_qxfer_traceframe_info): New.
9768 (qxfer_packets): Register "traceframe-info".
9769 (handle_query): Report support for qXfer:traceframe-info:read+.
9770 * tracepoint.c (match_blocktype): New.
9771 (traceframe_find_block_type): Rename to ...
9772 (traceframe_walk_blocks): ... this. Add callback filter argument,
9773 and use it.
9774 (traceframe_find_block_type): New, reimplemented on top of
9775 traceframe_walk_blocks.
9776 (build_traceframe_info_xml): New.
9777 (traceframe_read_info): New.
9778 * server.h (traceframe_read_info): Declare.
9779
9780 2011-02-11 Yao Qi <yao@codesourcery.com>
9781
9782 * configure.ac: Call AC_PROG_RANLIB.
9783 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9784 * configure: Regenerate.
9785
9786 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9787
9788 * server.c (gdb_read_memory): Change return semantics to allow
9789 partial transfers.
9790 (handle_search_memory_1): Adjust.
9791 (process_serial_event) <'m' packet>: Handle partial transfers.
9792 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9793
9794 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9795
9796 * regcache.c (init_register_cache): Initialize
9797 regcache->register_status.
9798 (free_register_cache): Release regcache->register_status.
9799 (regcache_cpy): Copy register_status.
9800 (registers_to_string): Print 'x's for unavailable registers.
9801 (supply_register): Mark the register's status valid or
9802 unavailable, depending on whether a buffer was passed in or not.
9803 (supply_register_zeroed): New.
9804 (supply_regblock): Mark the registers' status valid or
9805 unavailable, depending on whether a buffer was passed in or not.
9806 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9807 (struct regcache): New `register_status' field.
9808 (supply_register_zeroed): Declare.
9809 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9810 supply_register_zeroed, rather than passing a NULL buffer to
9811 supply_register.
9812 * tracepoint.c (fetch_traceframe_registers): Update comment.
9813
9814 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9815
9816 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9817 buffer explicit.
9818
9819 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9820
9821 * server.h (decode_xfer_write): Change prototype.
9822 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9823 and don't extract the annex here.
9824 * server.c (decode_xfer_read): Remove `annex' parameter,
9825 and don't extract the annex here.
9826 (decode_xfer): New.
9827 (struct qxfer): New.
9828 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9829 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9830 (handle_qxfer_statictrace): New functions, abstracted out from
9831 handle_query, and made to use the struct qxfer interface.
9832 (handle_threads_qxfer_proper): Rename to ...
9833 (handle_qxfer_threads_proper): ... this.
9834 (handle_threads_qxfer): Rename to ...
9835 (handle_qxfer_threads): ... this. Adjust.
9836 (qxfer_packets): New array.
9837 (handle_qxfer): New function.
9838 (handle_query): Use handle_qxfer.
9839
9840 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9841
9842 * gdbreplay.c: Shorten lines of >= 80 columns.
9843 * linux-low.c: Ditto.
9844 * linux-ppc-low.c: Ditto.
9845 * linux-s390-low.c: Ditto.
9846 * linux-sparc-low.c: Ditto.
9847 * linux-x86-low.c: Ditto.
9848 * linux-xtensa-low.c: Ditto.
9849 * mem-break.c: Ditto.
9850 * nto-low.c: Ditto.
9851 * regcache.h: Ditto.
9852 * remote-utils.c: Ditto.
9853 * server.c: Ditto.
9854 * server.h: Ditto.
9855 * thread-db.c: Ditto.
9856 * tracepoint.c: Ditto.
9857 * utils.c: Ditto.
9858 * win32-low.h: Ditto.
9859
9860 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9861
9862 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9863 update.
9864
9865 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9866
9867 * server.c (gdbserver_version): Update copyright year in version
9868 output.
9869 * gdbreplay.c (gdbreplay_version): Ditto.
9870
9871 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9872
9873 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9874 * linux-bfin-low.c: New file.
9875 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9876 PT_DATA_ADDR for BFIN targets.
9877 * Makefile.in (SFILES): Add linux-bfin-low.c.
9878 (clean): Remove reg-bfin.c.
9879 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9880 * README: Mention supported Blackfin targets.
9881
9882 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9883
9884 * .gitignore: New file.
9885
9886 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9887
9888 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9889
9890 2010-10-22 Jie Zhang <jie@codesourcery.com>
9891
9892 * Makefile.in: Add FLAGS_TO_PASS variable.
9893 (install): Remove dependency of install-only and recursively
9894 invoke make for install-only.
9895
9896 2010-10-04 Doug Evans <dje@google.com>
9897
9898 * Makefile.in (uninstall): Use $(DESTDIR).
9899
9900 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9901
9902 PR gdb/11842
9903
9904 * linux-x86-low.c (compat_siginfo_from_siginfo)
9905 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9906 si_code is < 0. Check for si_code == SI_TIMER before checking for
9907 si_code < 0.
9908
9909 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9910
9911 * lynx-i386-low.c: New file.
9912 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9913
9914 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9915
9916 * lynx-low.c (ptrace_request_to_str): Remove handling for
9917 request values that have been removed in LynxOS 5.x.
9918
9919 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9920
9921 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9922 <ptrace.h>
9923
9924 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9925
9926 * configure.ac: Add --enable-inprocess-agent option.
9927 * configure: Rebuilt.
9928
9929 2010-09-06 Yao Qi <yao@codesourcery.com>
9930
9931 * linux-low.c (linux_kill): Remove unused variable.
9932 (linux_stabilize_threads): Likewise.
9933 * server.c (start_inferior): Likewise.
9934 (queue_stop_reply_callback): Likewise.
9935 * tracepoint.c (do_action_at_tracepoint): Likewise.
9936
9937 2010-09-06 Yao Qi <yao@codesourcery.com>
9938
9939 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9940 on return.
9941
9942 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9943
9944 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9945
9946 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9947
9948 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9949 "$(IPA_DEPFILES)".
9950
9951 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9952
9953 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9954 gdbserver/lynx-ppc-low.c: New files.
9955 * Makefile.in (lynx_low_h): New variable.
9956 (lynx-low.o, lynx-ppc-low.o): New rules.
9957 * configure.ac: On LynxOS, link with -lnetinet.
9958 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9959 * configure: regenerate.
9960
9961 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9962
9963 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9964 * configure.ac: Add check for vasprintf and vsnprintf.
9965 * configure, config.in: Regenerate.
9966 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9967
9968 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9969
9970 * gdbreplay.c: Move include of alloca.h up, next to include of
9971 malloc.h.
9972 * server.h: Add include of malloc.h.
9973 * mem-break.c: Remove include of malloc.h.
9974 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9975
9976 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9977
9978 * Makefile.in (memmem.o): Build with -Wno-error.
9979
9980 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9981
9982 * utils.c (xsnprintf): Make non-static.
9983 * server.h: Add xsnprintf declaration.
9984 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9985 replace calls to snprintf by calls to xsnprintf throughout.
9986
9987 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9988
9989 * configure.ac: Add configure check for alloca.
9990 * configure, config.in: Regenerate.
9991 * server.h: Include alloca.h if it exists.
9992 * gdbreplay.c: Include alloca.h if it exists.
9993
9994 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9995
9996 * linux-low.c (__SIGRTMIN): Define if not already defined.
9997 (linux_create_inferior): Check for __ANDROID__ rather than
9998 __SIGRTMIN.
9999 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10000 are already deferred.
10001 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10002 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10003 stopped and already has a pending signal to report.
10004 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10005 a pending signal to report or is moving out of a jump pad.
10006 (linux_init_signals): Check for __ANDROID__ rather than
10007 __SIGRTMIN.
10008
10009 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10010
10011 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10012 debug_threads check. Avoid a linear search when not doing debug
10013 output.
10014
10015 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10016
10017 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10018 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10019 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10020 (process_event): Change local fd's type to gdb_fildes_t.
10021 (create_file_handler): Adjust prototype.
10022 (delete_file_handler): Adjust prototype.
10023 (handle_file_event): Adjust prototype. Use pfildes.
10024 (create_file_event): Adjsut prototype.
10025 * remote-utils.c (remote_desc, listen_desc): Change type to
10026 gdb_fildes_t.
10027 * server.h: New gdb_fildes_t typedef.
10028 [USE_WIN32API]: Include winsock2.h.
10029 (delete_file_handler, add_file_handler): Adjust prototypes.
10030 (pfildes): Declare.
10031 * utils.c (pfildes): New.
10032
10033 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10034
10035 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10036 * configure: Regenerate.
10037
10038 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10039
10040 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10041 (linux_done_accessing_memory): ... this.
10042 (linux_target_ops): Adjust.
10043 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10044 * nto-low.c (nto_target_ops): Adjust comment.
10045 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10046 * spu-low.c (spu_target_ops): Adjust comment.
10047 * target.h (target_ops): Rename unprepare_to_access_memory field
10048 to done_accessing_memory.
10049 (unprepare_to_access_memory): Rename to ...
10050 (done_accessing_memory): ... this.
10051
10052 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10053
10054 * linux-low.c (linux_prepare_to_access_memory): New.
10055 (linux_unprepare_to_access_memory): New.
10056 (linux_target_ops): Install them.
10057 * server.c (read_memory): Rename to ...
10058 (gdb_read_memory): ... this. Use
10059 prepare_to_access_memory/prepare_to_access_memory.
10060 (write_memory): Rename to ...
10061 (gdb_write_memory): ... this. Use
10062 prepare_to_access_memory/prepare_to_access_memory.
10063 (handle_search_memory_1): Adjust.
10064 (process_serial_event): Adjust.
10065 * target.h (struct target_ops): New fields
10066 prepare_to_access_memory and unprepare_to_access_memory.
10067 (prepare_to_access_memory, unprepare_to_access_memory): New.
10068 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10069 prepare_to_access_memory/prepare_to_access_memory.
10070 * nto-low.c (nto_target_ops): Adjust.
10071 * spu-low.c (spu_target_ops): Adjust.
10072 * win32-low.c (win32_target_ops): Adjust.
10073
10074 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10075
10076 * Makefile.in (WARN_CFLAGS): Get it from configure.
10077 (WERROR_CFLAGS): New.
10078 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10079 * configure.ac: Introduce --enable-werror, which adds -Werror to
10080 the compiler command line. Enabled by default. Disable with
10081 --disable-werror. Add -Wdeclaration-after-statement
10082 Wpointer-arith and -Wformat-nonliteral to warning flags.
10083 * configure: Regenerate.
10084
10085 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10086
10087 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10088
10089 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10090
10091 * gdbreplay.c (remote_error): New.
10092 (gdbchar): New.
10093 (expect): Use gdbchar. Check for error reading from GDB.
10094 Clarify sync error output.
10095 (play): Check for errors writing to GDB.
10096 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10097 * remote-utils.c (getpkt): Check for errors writing to the remote
10098 descriptor.
10099
10100 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10101
10102 * linux-low.c (linux_wait_1): Move non-debugging code out of
10103 `debug_threads' control.
10104
10105 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10106
10107 * linux-low.c (linux_wait_1): Don't set last_status here.
10108 * server.c (push_event, queue_stop_reply_callback): Assert we're
10109 not pushing a TARGET_WAITKIND_IGNORE event.
10110 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10111 (myresume, handle_target_event): Set the thread's last_resume_kind
10112 and last_status from the target returned status.
10113
10114 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10115
10116 PR threads/10729
10117
10118 * linux-x86-low.c (update_debug_registers_callback): New.
10119 (i386_dr_low_set_addr): Use it.
10120 (i386_dr_low_get_addr): New.
10121 (i386_dr_low_set_control): Use update_debug_registers_callback.
10122 (i386_dr_low_get_control): New.
10123 (i386_dr_low_get_status): Adjust.
10124 * linux-low.c (linux_stop_lwp): New.
10125 * linux-low.h (linux_stop_lwp): Declare.
10126
10127 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10128 argument instead of a i386_debug_reg_state.
10129 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10130 a i386_debug_reg_state.
10131 (i386_insert_aligned_watchpoint): Adjust.
10132 (i386_remove_aligned_watchpoint): Adjust.
10133 (i386_low_stopped_data_address): Read the debug registers from the
10134 inferior instead of from the mirrors.
10135 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10136 (i386_dr_low_get_addr): Declare.
10137 (i386_dr_low_get_control): Declare.
10138 (i386_dr_low_get_status): Change prototype.
10139
10140 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10141 (i386_dr_low_get_addr): New.
10142 (i386_dr_low_get_control): New.
10143 (i386_dr_low_get_status): Adjust prototype. Return
10144 dr_status_mirror.
10145 (i386_initial_stuff): Clear dr_status_mirror and
10146 dr_control_mirror.
10147 (i386_get_thread_context): Adjust.
10148 (i386_set_thread_context): Adjust.
10149 (i386_thread_added): Adjust.
10150
10151 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10152
10153 * linux-low.h (linux_thread_area): Delete declaration.
10154
10155 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10156
10157 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10158 after its termination.
10159
10160 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10161
10162 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10163 (gdb_wants_all_stopped): Delete.
10164 (linux_wait_1): Don't call them.
10165 * server.c (handle_v_cont): Tag all threads as want-stopped.
10166 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10167 stopped as "client-wants-stopped".
10168
10169 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10170
10171 * Makefile.in (signals_h): New.
10172 (server_h): Depend on it.
10173 (server.o): Don't depend on $(signals_def).
10174 (signals.o): Depend on $(signals_def).
10175
10176 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10177
10178 * Makefile.in (signals_def): New.
10179 (server_h): Append include/gdb/signals.h and signals_def.
10180 (server.o): Append signals_def.
10181
10182 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10183
10184 * server.c (handle_target_event): Use target_signal_to_host for
10185 resume_info.sig initialization.
10186 * target.h (struct thread_resume) <sig>: New comment.
10187
10188 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10189
10190 * server.c (handle_query): strcpy() the returned string from paddress()
10191 instead of sprintf().
10192 * utils.c (paddress): Return phex_nz().
10193
10194 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10195
10196 * server.c (handle_v_cont): Call mourn_inferior if process
10197 just exited.
10198 (myresume): Likewise.
10199
10200 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10201
10202 Static tracepoints, and integration with UST.
10203
10204 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10205 * mem-break.c (uninsert_all_breakpoints)
10206 (reinsert_all_breakpoints): New.
10207 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10208 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10209 (gdb_agent_ust_loaded, helper_thread_id)
10210 (gdb_agent_helper_thread_id): New macros.
10211 (struct ipa_sym_addresses): Add addr_ust_loaded,
10212 addr_helper_thread_id, addr_cmd_buf.
10213 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10214 (in_process_agent_loaded_ust): New.
10215 (write_e_ust_not_loaded): New.
10216 (maybe_write_ipa_ust_not_loaded): New.
10217 (struct collect_static_trace_data_action): New.
10218 (enum tracepoint_type) <static_tracepoint>: New.
10219 (struct tracepoint) <handle>: Mention static tracepoints.
10220 (struct static_tracepoint_ctx): New.
10221 (CMD_BUF_SIZE): New.
10222 (add_tracepoint_action): Handle static tracepoint actions.
10223 (unprobe_marker_at): New.
10224 (clear_installed_tracepoints): Handle static tracepoints.
10225 (cmd_qtdp): Handle static tracepoints.
10226 (probe_marker_at): New.
10227 (cmd_qtstart): Handle static tracepoints.
10228 (response_tracepoint): Handle static tracepoints.
10229 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10230 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10231 (get_context_regcache): Handle static tracepoints.
10232 (do_action_at_tracepoint): Handle static tracepoint actions.
10233 (traceframe_find_block_type): Handle static trace data blocks.
10234 (traceframe_read_sdata): New.
10235 (download_tracepoints): Download static tracepoint actions.
10236 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10237 (GDB_PROBE_NAME): New.
10238 (ust_ops): New.
10239 (GET_UST_SYM): New.
10240 (USTF): New.
10241 (dlsym_ust): New.
10242 (ust_marker_to_static_tracepoint): New.
10243 (gdb_probe): New.
10244 (collect_ust_data_at_tracepoint): New.
10245 (gdb_ust_probe): New.
10246 (UNIX_PATH_MAX, SOCK_DIR): New.
10247 (gdb_ust_connect_sync_socket): New.
10248 (resume_thread, stop_thread): New.
10249 (run_inferior_command): New.
10250 (init_named_socket): New.
10251 (gdb_ust_socket_init): New.
10252 (cstr_to_hexstr): New.
10253 (next_st): New.
10254 (first_marker, next_marker): New.
10255 (response_ust_marker): New.
10256 (cmd_qtfstm, cmd_qtsstm): New.
10257 (unprobe_marker_at, probe_marker_at): New.
10258 (cmd_qtstmat, gdb_ust_thread): New.
10259 (gdb_ust_init): New.
10260 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10261 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10262 (ST_REGENTRY): New.
10263 (x86_64_st_collect_regmap): New.
10264 (X86_64_NUM_ST_COLLECT_GREGS): New.
10265 (AMD64_RIP_REGNUM): New.
10266 (supply_static_tracepoint_registers): New.
10267 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10268 (ST_REGENTRY): New.
10269 (i386_st_collect_regmap): New.
10270 (i386_NUM_ST_COLLECT_GREGS): New.
10271 (supply_static_tracepoint_registers): New.
10272 * server.c (handle_query): Handle qXfer:statictrace:read.
10273 <qSupported>: Report support for StaticTracepoints, and
10274 qXfer:statictrace:read features.
10275 * server.h (traceframe_read_sdata)
10276 (supply_static_tracepoint_registers): Declare.
10277 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10278 (unpack_varlen_hex): Include in IPA build.
10279 * Makefile.in (ustlibs, ustinc): New.
10280 (IPA_OBJS): Add remote-utils-ipa.o.
10281 ($(IPA_LIB)): Link -ldl and -lpthread.
10282 (UST_CFLAGS): New.
10283 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10284 * config.in, configure: Regenerate.
10285
10286 2010-06-20 Ian Lance Taylor <iant@google.com>
10287 Pedro Alves <pedro@codesourcery.com>
10288
10289 * linux-x86-low.c (always_true): Delete.
10290 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10291 trying to fool the compiler with always_true.
10292
10293 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10294
10295 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10296 conditions in gdbserver.
10297
10298 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10299
10300 * spu-low.c (spu_read_memory): Wrap around local store limit.
10301 (spu_write_memory): Likewise.
10302
10303 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10304
10305 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10306 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10307 LONGEST uses.
10308 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10309 uses.
10310 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10311 uses with LONGEST uses.
10312
10313 2010-06-14 Stan Shebs <stan@codesourcery.com>
10314 Pedro Alves <pedro@codesourcery.com>
10315
10316 Bytecode compiler.
10317
10318 * linux-x86-low.c: Include limits.h.
10319 (add_insns): New.
10320 (always_true): New.
10321 (EMIT_ASM): New.
10322 (EMIT_ASM32): New.
10323 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10324 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10325 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10326 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10327 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10328 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10329 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10330 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10331 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10332 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10333 (amd64_emit_void_call_2): New.
10334 (amd64_emit_ops): New.
10335 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10336 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10337 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10338 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10339 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10340 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10341 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10342 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10343 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10344 (i386_emit_stack_adjust, i386_emit_int_call_1)
10345 (i386_emit_void_call_2): New.
10346 (i386_emit_ops): New.
10347 (x86_emit_ops): New.
10348 (the_low_target): Install x86_emit_ops.
10349 * server.h (struct emit_ops): New.
10350 (get_raw_reg_func_addr): Declare.
10351 (current_insn_ptr, emit_error): Declare.
10352 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10353 (set_trace_state_variable_value): New defines.
10354 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10355 addr_get_trace_state_variable_value and
10356 addr_set_trace_state_variable_value.
10357 (symbol_list): New fields for get_raw_reg,
10358 get_trace_state_variable_value and set_trace_state_variable_value.
10359 (condfn): New typedef.
10360 (struct tracepoint): New field `compiled_cond'.
10361 (do_action_at_tracepoint): Clear compiled_cond.
10362 (get_trace_state_variable_value, set_trace_state_variable_value):
10363 Export in the IPA.
10364 (condition_true_at_tracepoint): If there's a compiled condition,
10365 run that.
10366 (current_insn_ptr, emit_error): New globals.
10367 (struct bytecode_address): New.
10368 (get_raw_reg_func_addr): New.
10369 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10370 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10371 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10372 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10373 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10374 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10375 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10376 (compile_tracepoint_condition, compile_bytecodes): New.
10377 * target.h (emit_ops): Forward declare.
10378 (struct target_ops): New field emit_ops.
10379 (target_emit_ops): New.
10380 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10381 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10382 * linux-low.c (linux_emit_ops): New.
10383 (linux_target_ops): Install it.
10384 * linux-low.h (struct linux_target_ops): New field emit_ops.
10385
10386 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10387
10388 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10389 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10390
10391 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10392 Stan Shebs <stan@codesourcery.com>
10393
10394 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10395 (all): Depend on $(extra_libraries).
10396 (install-only): Install the IPA.
10397 (IPA_OBJS, IPA_LIB): New.
10398 (clean): Remove the IPA lib.
10399 (IPAGENT_CFLAGS): New.
10400 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10401 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10402 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10403 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10404 * configure.ac: Check for atomic builtins support in the compiler.
10405 (IPA_DEPFILES, extra_libraries): Define.
10406 * configure.srv (ipa_obj): Add description.
10407 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10408 (i[34567]86-*-linux*): Set ipa_obj.
10409 (x86_64-*-linux*): Set ipa_obj.
10410 * linux-low.c (stabilizing_threads): New.
10411 (supports_fast_tracepoints): New.
10412 (linux_detach): Stabilize threads before detaching.
10413 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10414 the lwp is either not stabilizing, or is moving out of a jump pad.
10415 (linux_fast_tracepoint_collecting): New.
10416 (maybe_move_out_of_jump_pad): New.
10417 (enqueue_one_deferred_signal): New.
10418 (dequeue_one_deferred_signal): New.
10419 (linux_wait_for_event_1): If moving out of a jump pad, defer
10420 pending signals to later.
10421 (linux_stabilize_threads): New.
10422 (linux_wait_1): Check if threads need moving out of jump pads, and
10423 do it if so.
10424 (stuck_in_jump_pad_callback): New.
10425 (move_out_of_jump_pad_callback): New.
10426 (lwp_running): New.
10427 (linux_resume_one_lwp): Handle moving out of jump pads.
10428 (linux_set_resume_request): Dequeue deferred signals.
10429 (need_step_over_p): Also step over fast tracepoint jumps.
10430 (start_step_over): Also uninsert fast tracepoint jumps.
10431 (finish_step_over): Also reinsert fast tracepoint jumps.
10432 (linux_install_fast_tracepoint_jump): New.
10433 (linux_target_ops): Install linux_stabilize_threads and
10434 linux_install_fast_tracepoint_jump_pad.
10435 * linux-low.h (linux_target_ops) <get_thread_area,
10436 install_fast_tracepoint_jump_pad>: New fields.
10437 (struct lwp_info) <collecting_fast_tracepoint,
10438 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10439 (linux_get_thread_area): Declare.
10440 * linux-x86-low.c (jump_insn): New.
10441 (x86_get_thread_area): New.
10442 (append_insns): New.
10443 (push_opcode): New.
10444 (amd64_install_fast_tracepoint_jump_pad): New.
10445 (i386_install_fast_tracepoint_jump_pad): New.
10446 (x86_install_fast_tracepoint_jump_pad): New.
10447 (the_low_target): Install x86_get_thread_area and
10448 x86_install_fast_tracepoint_jump_pad.
10449 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10450 (struct fast_tracepoint_jump): New.
10451 (fast_tracepoint_jump_insn): New.
10452 (fast_tracepoint_jump_shadow): New.
10453 (find_fast_tracepoint_jump_at): New.
10454 (fast_tracepoint_jump_here): New.
10455 (delete_fast_tracepoint_jump): New.
10456 (set_fast_tracepoint_jump): New.
10457 (uninsert_fast_tracepoint_jumps_at): New.
10458 (reinsert_fast_tracepoint_jumps_at): New.
10459 (set_breakpoint_at): Use write_inferior_memory.
10460 (uninsert_raw_breakpoint): Use write_inferior_memory.
10461 (check_mem_read): Mask out fast tracepoint jumps.
10462 (check_mem_write): Mask out fast tracepoint jumps.
10463 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10464 (set_fast_tracepoint_jump): Declare.
10465 (delete_fast_tracepoint_jump)
10466 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10467 (reinsert_fast_tracepoint_jumps_at): Declare.
10468 * regcache.c: Don't compile many functions when building the
10469 in-process agent library.
10470 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10471 the register buffer in the heap.
10472 (free_register_cache): If the register buffer isn't owned by the
10473 regcache, don't free it.
10474 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10475 pre-existing register caches.
10476 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10477 type.
10478 (convert_ascii_to_int): : Constify `from' parameter type.
10479 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10480 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10481 the needed buffer in-place.
10482 (relocate_instruction): New.
10483 * server.c (handle_query) <qSymbols>: If the target supports
10484 tracepoints, give it a chance of looking up symbols. Report
10485 support for fast tracepoints.
10486 (handle_status): Stabilize threads.
10487 (process_serial_event): Adjust.
10488 * server.h (struct fast_tracepoint_jump): Forward declare.
10489 (struct process_info) <fast_tracepoint_jumps>: New field.
10490 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10491 (decode_X_packet, decode_M_packet): Adjust.
10492 (relocate_instruction): Declare.
10493 (in_process_agent_loaded): Declare.
10494 (tracepoint_look_up_symbols): Declare.
10495 (struct fast_tpoint_collect_status): Declare.
10496 (fast_tracepoint_collecting): Declare.
10497 (force_unlock_trace_buffer): Declare.
10498 (handle_tracepoint_bkpts): Declare.
10499 (initialize_low_tracepoint)
10500 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10501 * target.h (struct target_ops) <stabilize_threads,
10502 install_fast_tracepoint_jump_pad>: New fields.
10503 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10504 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10505 [HAVE_STDINT_H]: Include stdint.h.
10506 (trace_debug_1): Rename to ...
10507 (trace_vdebug): ... this.
10508 (trace_debug): Rename to ...
10509 (trace_debug_1): ... this. Add `level' parameter.
10510 (trace_debug): New.
10511 (ATTR_USED, ATTR_NOINLINE): New.
10512 (IP_AGENT_EXPORT): New.
10513 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10514 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10515 (about_to_request_buffer_space, trace_buffer_is_full)
10516 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10517 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10518 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10519 (traceframe_write_count, traceframes_created)
10520 (trace_state_variables)
10521 New renaming defines.
10522 (struct ipa_sym_addresses): New.
10523 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10524 (symbol_list): New.
10525 (ipa_sym_addrs): New.
10526 (all_tracepoint_symbols_looked_up): New.
10527 (in_process_agent_loaded): New.
10528 (write_e_ipa_not_loaded): New.
10529 (maybe_write_ipa_not_loaded): New.
10530 (tracepoint_look_up_symbols): New.
10531 (debug_threads) [IN_PROCESS_AGENT]: New.
10532 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10533 (UNKNOWN_SIDE_EFFECTS): New.
10534 (stop_tracing): New.
10535 (flush_trace_buffer): New.
10536 (stop_tracing_bkpt): New.
10537 (flush_trace_buffer_bkpt): New.
10538 (read_inferior_integer): New.
10539 (read_inferior_uinteger): New.
10540 (read_inferior_data_pointer): New.
10541 (write_inferior_data_pointer): New.
10542 (write_inferior_integer): New.
10543 (write_inferior_uinteger): New.
10544 (struct collect_static_trace_data_action): Delete.
10545 (enum tracepoint_type): New.
10546 (struct tracepoint) <type>: New field `type'.
10547 <actions_str, step_actions, step_actions_str>: Only include in
10548 GDBserver.
10549 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10550 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10551 (tracepoints): Use IP_AGENT_EXPORT.
10552 (last_tracepoint): Don't include in the IPA.
10553 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10554 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10555 (alloced_trace_state_variables): New.
10556 (trace_state_variables): Use IP_AGENT_EXPORT.
10557 (traceframe_t): Delete unused variable.
10558 (circular_trace_buffer): Don't include in the IPA.
10559 (trace_buffer_start): Delete.
10560 (struct trace_buffer_control): New.
10561 (trace_buffer_free): Delete.
10562 (struct ipa_trace_buffer_control): New.
10563 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10564 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10565 New.
10566 (trace_buffer_ctrl): New.
10567 (TRACE_BUFFER_CTRL_CURR): New.
10568 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10569 Reimplement as macros.
10570 (trace_buffer_wrap): Delete.
10571 (traceframe_write_count, traceframe_read_count)
10572 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10573 (struct tracepoint_hit_ctx) <type>: New field.
10574 (struct fast_tracepoint_ctx): New.
10575 (memory_barrier): New.
10576 (cmpxchg): New.
10577 (record_tracepoint_error): Update atomically in the IPA.
10578 (clear_inferior_trace_buffer): New.
10579 (about_to_request_buffer_space): New.
10580 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10581 updating the same buffer.
10582 (add_tracepoint): Default the tracepoint's type to trap
10583 tracepoint, and orig_size to -1.
10584 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10585 internal variables.
10586 (create_trace_state_variable): New parameter `gdb'. Handle it.
10587 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10588 (cmd_qtdp): Handle fast tracepoints.
10589 (cmd_qtdv): Adjust.
10590 (max_jump_pad_size): New.
10591 (gdb_jump_pad_head): New.
10592 (get_jump_space_head): New.
10593 (claim_jump_space): New.
10594 (sort_tracepoints): New.
10595 (MAX_JUMP_SIZE): New.
10596 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10597 IPA.
10598 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10599 support. Upload fast traceframes, and delete internal IPA
10600 breakpoints.
10601 (stop_tracing_handler): New.
10602 (flush_trace_buffer_handler): New.
10603 (cmd_qtstop): Upload fast tracepoints.
10604 (response_tracepoint): Handle fast tracepoints.
10605 (tracepoint_finished_step): Upload fast traceframes. Set the
10606 tracepoint hit context's tracepoint type.
10607 (handle_tracepoint_bkpts): New.
10608 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10609 type. Add comment about fast tracepoints.
10610 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10611 non-existing action_str field.
10612 (get_context_regcache): Handle fast tracepoints.
10613 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10614 to the regcache.
10615 (fast_tracepoint_from_jump_pad_address): New.
10616 (fast_tracepoint_from_ipa_tpoint_address): New.
10617 (collecting_t): New.
10618 (force_unlock_trace_buffer): New.
10619 (fast_tracepoint_collecting): New.
10620 (collecting): New.
10621 (gdb_collect): New.
10622 (write_inferior_data_ptr): New.
10623 (target_tp_heap): New.
10624 (target_malloc): New.
10625 (download_agent_expr): New.
10626 (UALIGN): New.
10627 (download_tracepoints): New.
10628 (download_trace_state_variables): New.
10629 (upload_fast_traceframes): New.
10630 (IPA_FIRST_TRACEFRAME): New.
10631 (IPA_NEXT_TRACEFRAME_1): New.
10632 (IPA_NEXT_TRACEFRAME): New.
10633 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10634 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10635 (gdb_jump_pad_buffer_end): New.
10636 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10637 (initialize_tracepoint): Adjust.
10638 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10639 buffer. Initialize the low module.
10640 * utils.c (PREFIX, TOOLNAME): New.
10641 (malloc_failure): Use PREFIX.
10642 (error): In the IPA, an error causes an exit.
10643 (fatal, warning): Use PREFIX.
10644 (internal_error): Use TOOLNAME.
10645 (NUMCELLS): Increase to 10.
10646 * configure, config.in: Regenerate.
10647
10648 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10649
10650 * server.c (handle_query) <qSupported>: Do two passes over the
10651 qSupported string to avoid nesting strtok.
10652
10653 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10656 (CDEPS): New.
10657 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10658 -Wl,--dynamic-list.
10659 * configure: Regenerate.
10660 * proc-service.list: New.
10661
10662 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10663
10664 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10665 New comment.
10666
10667 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10668
10669 * gdbreplay.c (remote_open): Check error return from socket() call by
10670 its equality to -1 not by it being negative.
10671 * remote-utils.c (remote_open): Likewise.
10672
10673 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10674
10675 * config.h: Regenerate.
10676
10677 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10678
10679 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10680 doesn't provide PTRACE_GET_THREAD_AREA.
10681
10682 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10683
10684 * linux-m68k-low.c: Include <asm/ptrace.h>
10685 (ps_get_thread_area): Implement.
10686
10687 2010-05-03 Doug Evans <dje@google.com>
10688
10689 * event-loop.c (struct callback_event): New struct.
10690 (callback_list): New global.
10691 (append_callback_event, delete_callback_event): New functions.
10692 (process_callback): New function.
10693 (start_event_loop): Call it.
10694 * remote-utils.c (NOT_SCHEDULED): Define.
10695 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10696 moved out of readchar.
10697 (readchar): Rewrite. Call reschedule before returning.
10698 (reset_readchar): New function.
10699 (remote_close): Call it.
10700 (process_remaining, reschedule): New functions.
10701 * server.h (callback_handler_func): New typedef.
10702 (append_callback_event, delete_callback_event): Declare.
10703
10704 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10705
10706 * proc-service.c (ps_pglobal_lookup): Use
10707 thread_db_look_up_one_symbol.
10708 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10709 parameter. Use it instead of all_symbols_looked_up.
10710 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10711 field.
10712 (all_symbols_looked_up): Don't declare.
10713 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10714 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10715 field.
10716 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10717 Set all_symbols_looked_up here.
10718 (thread_db_look_up_one_symbol): New.
10719 (thread_db_get_tls_address): Adjust.
10720 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10721 thread_db object on the heap, and tentatively set it in the
10722 process structure.
10723 (thread_db_init): Don't set all_symbols_looked_up here.
10724 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10725
10726 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10727
10728 * linux-low.c (linux_kill, linux_detach): Adjust.
10729 (status_pending_p_callback): Remove redundant statement. Check
10730 for !TARGET_WAITIKIND_IGNORE, instead of
10731 TARGET_WAITKIND_STOPPED.
10732 (handle_tracepoints): Make sure LWP is locked. Adjust.
10733 (linux_wait_for_event_1): Adjust.
10734 (linux_cancel_breakpoints): New.
10735 (unsuspend_one_lwp): New.
10736 (unsuspend_all_lwps): New.
10737 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10738 (send_sigstop_callback): Change return type to int, add new
10739 `except' parameter and handle it.
10740 (suspend_and_send_sigstop_callback): New.
10741 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10742 pass them down. If SUSPEND, also increment the lwp's suspend
10743 count.
10744 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10745 (need_step_over_p): Don't consider suspended LWPs.
10746 (start_step_over): Adjust.
10747 (proceed_one_lwp): Change return type to int, add new `except'
10748 parameter and handle it.
10749 (unsuspend_and_proceed_one_lwp): New.
10750 (proceed_all_lwps): Use find_inferior instead of
10751 for_each_inferior.
10752 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10753 also decrement the suspend count of LWPs. Pass `except' down,
10754 instead of hacking its suspend count.
10755 (linux_pause_all): Add `freeze' parameter. Adjust.
10756 (linux_unpause_all): New.
10757 (linux_target_ops): Install linux_unpause_all.
10758 * server.c (handle_status): Adjust.
10759 * target.h (struct target_ops): New fields `unpause_all' and
10760 `cancel_breakpoints'. Add new parameter to `pause_all'.
10761 (pause_all): Add new `freeze' parameter.
10762 (unpause_all): New.
10763 (cancel_breakpoints): New.
10764 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10765 cancel breakpoints.
10766 (cmd_qtstart): Pause threads.
10767 (stop_tracing): Pause threads, and cancel breakpoints.
10768 * win32-low.c (win32_target_ops): Adjust.
10769
10770 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10771
10772 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10773 the inferior right away from here...
10774 (linux_wait_1): ... to here, and adjust to check the thread's
10775 last_resume_kind instead of the lwp's step or stop_expected flags.
10776
10777 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10778
10779 * README: Use consistent `GDB' and `GDBserver' spellings.
10780
10781 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10782
10783 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10784 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10785 (linux_detach_one_lwp): Assume the lwp is stopped.
10786 (any_thread_of): Delete.
10787 (linux_detach): Stop all lwps here. Don't blindly delete all
10788 breakpoints.
10789 (delete_lwp_callback): New.
10790 (linux_mourn): Delete all lwps of the process that is gone.
10791 (linux_wait_1): Don't delete the last lwp of the process here.
10792 * mem-break.h (mark_breakpoints_out): Declare.
10793 * mem-break.c (mark_breakpoints_out): New.
10794 (free_all_breakpoints): Use it.
10795 * server.c (handle_target_event): If the process is gone, mark
10796 breakpoints out.
10797 * thread-db.c (struct thread_db) <create_bp>: New field.
10798 (thread_db_enable_reporting): Fix prototype. Store a thread event
10799 breakpoint reference in the thread_db struct.
10800 (thread_db_load_search): Clear the thread_db object.
10801 (try_thread_db_load_1): Ditto.
10802 (switch_to_process): New.
10803 (disable_thread_event_reporting): Use it.
10804 (remove_thread_event_breakpoints): New.
10805 (thread_db_detach, thread_db_mourn): Use it.
10806
10807 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10808
10809 * linux-low.c (linux_enable_event_reporting): New.
10810 (linux_wait_for_event_1, handle_extended_wait): Use it.
10811
10812 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10813
10814 * linux-low.c (linux_kill_one_lwp, linux_kill)
10815 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10816 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10817 SIGSTOP even if the LWP is stopped.
10818 (send_sigstop_callback): New.
10819 (stop_all_lwps): Use send_sigstop_callback instead.
10820 (linux_resume_one_thread): Adjust.
10821 (proceed_one_lwp): Still proceed an LWP that the client has
10822 requested to stop, if we haven't reported it as stopped yet. Make
10823 sure that LWPs the client want stopped, have a pending SIGSTOP.
10824
10825 2010-04-26 Doug Evans <dje@google.com>
10826
10827 * server.c (handle_general_set): Make static.
10828
10829 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10830 Print received char after testing for error/eof instead of before.
10831 (input_interrupt): Tweak comment.
10832
10833 2010-04-23 Doug Evans <dje@google.com>
10834
10835 * server.c (start_inferior): Print inferior argv if --debug.
10836
10837 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10838
10839 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10840 * nto-x86-low.c: Include server.h
10841
10842 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10843
10844 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10845 be consistent with other sources of this directory.
10846 (init_registers_amd64): Correct name of source file of this function
10847 in the comment.
10848
10849 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10850
10851 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10852 64-bit executables.
10853
10854 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10855
10856 * win32-i386-low.c: Add 64-bit support.
10857 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10858 (init_registers_amd64): Declare.
10859 (mappings): Add 64-bit version of array.
10860 (init_windows_x86): New function.
10861 (the_low_target): Change init_arch field to init_windows_x86.
10862
10863 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10864
10865 * win32-low.c: Adapt to support also 64-bit architecture.
10866 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10867 (get_image_name): Use SIZE_T type for local variable `done'.
10868 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10869 (toolhelp_get_dll_name): Idem.
10870 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10871 Use uintptr_t typecast to avoid warning.
10872 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10873 (handle_exception): Use phex_nz to avoid warning.
10874 (win32_wait): Remove unused local variable `process'.
10875
10876 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10877
10878 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10879 `amd64-avx.o'.
10880
10881 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10882
10883 * configure.ac: Use `ws2_32' library for srv_mingw.
10884 * configure: Regenerate.
10885 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10886 * remote-utils.c: Likewise.
10887
10888 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10889
10890 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10891 if __x86_64__ is defined.
10892
10893 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10894
10895 * configure: Regenerate.
10896
10897 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10898
10899 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10900 * target.h (target_ops): New get_tib_address field.
10901 * win32-low.h (win32_thread_info): Add thread_local_base field.
10902 * win32-low.c (child_add_thread): Add tlb argument.
10903 Set thread_local_base field to TLB.
10904 (get_child_debug_event): Adapt to child_add_thread change.
10905 (win32_get_tib_address): New function.
10906 (win32_target_ops): Set get_tib_address field to
10907 win32_get_tib_address.
10908 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10909
10910 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10911
10912 * linux-low.c (linux_mourn): Also remove the process.
10913 * server.c (handle_target_event): Don't remove the process here.
10914 * nto-low.c (nto_mourn): New.
10915 (nto_target_ops): Install it.
10916 * spu-low.c (spu_mourn): New.
10917 (spu_target_ops): Install it.
10918 * win32-low.c (win32_mourn): New.
10919 (win32_target_ops): Install it.
10920
10921 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10922
10923 * server.h (buffer_xml_printf): Remove redundant `;'.
10924
10925 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10926
10927 * regcache.c (set_register_cache): Invalidate regcaches before
10928 changing the register cache layout.
10929 (regcache_invalidate_one): Allow a NULL regcache.
10930 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10931 regcaches before changing the register cache layout or the target
10932 regsets.
10933
10934 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10935
10936 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10937 variable warning on Linux/x86-64.
10938
10939 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10940
10941 GDBserver disconnected tracing support.
10942
10943 * linux-low.c (linux_remove_process): Delete.
10944 (add_lwp): Don't set last_resume_kind here.
10945 (linux_kill): Use `mourn'.
10946 (linux_detach): Use `thread_db_detach', and `mourn'.
10947 (linux_mourn): New.
10948 (linux_attach_lwp_1): Adjust comment.
10949 (linux_attach): last_resume_kind moved the thread_info; adjust.
10950 (status_pending_p_callback): Adjust.
10951 (linux_wait_for_event_1): Adjust.
10952 (count_events_callback, select_singlestep_lwp_callback)
10953 (select_event_lwp_callback, cancel_breakpoints_callback)
10954 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10955 (proceed_one_lwp): Adjust.
10956 (linux_async): Add debug output.
10957 (linux_thread_stopped): New.
10958 (linux_pause_all): New.
10959 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10960 linux_pause_all.
10961 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10962 (thread_db_free): Delete declaration.
10963 (thread_db_detach, thread_db_mourn): Declare.
10964 * thread-db.c (thread_db_init): Use thread_db_mourn.
10965 (thread_db_free): Delete, split in two.
10966 (disable_thread_event_reporting): New.
10967 (thread_db_detach): New.
10968 (thread_db_mourn): New.
10969
10970 * server.h (struct thread_info) <last_resume_kind>: New field.
10971 <attached>: Add comment.
10972 <gdb_detached>: New field.
10973 (handler_func): Change return type to int.
10974 (handle_serial_event, handle_target_event): Ditto.
10975 (gdb_connected): Declare.
10976 (tracing): Delete.
10977 (disconnected_tracing): Declare.
10978 (stop_tracing): Declare.
10979
10980 * server.c (handle_query) <qSupported>: Report support for
10981 disconnected tracing.
10982 (queue_stop_reply_callback): Account for running threads.
10983 (gdb_wants_thread_stopped): New.
10984 (gdb_wants_all_threads_stopped): New.
10985 (gdb_reattached_process): New.
10986 (handle_status): Clear the `gdb_detached' flag of all processes.
10987 In all-stop, stop all threads.
10988 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10989 (process_serial_event): If the remote connection breaks, or if an
10990 exit was forced with "monitor exit", force an event loop exit.
10991 Handle disconnected tracing on detach.
10992 (handle_serial_event): Adjust.
10993 (handle_target_event): If GDB isn't connected, forward events back
10994 to the inferior, unless the last process exited, in which case,
10995 exit gdbserver. Adjust interface.
10996
10997 * remote-utils.c (remote_open): Don't block in accept. Instead
10998 register an event loop source on the listen socket file
10999 descriptor. Refactor bits into ...
11000 (listen_desc): ... this new global.
11001 (gdb_connected): ... this new function.
11002 (enable_async_notification): ... this new function.
11003 (handle_accept_event): ... this new function.
11004 (remote_close): Clear remote_desc.
11005
11006 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11007
11008 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11009 New fields.
11010 (mourn_inferior): Define.
11011 (target_process_qsupported): Avoid the dangling else problem.
11012 (thread_stopped): Define.
11013 (pause_all): Define.
11014 (target_waitstatus_to_string): Declare.
11015 * target.c (target_waitstatus_to_string): New.
11016
11017 * tracepoint.c (tracing): Make extern.
11018 (disconnected_tracing): New.
11019 (stop_tracing): Make extern. Handle tracing stops due to GDB
11020 disconnecting.
11021 (cmd_qtdisconnected): New.
11022 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11023 (handle_tracepoint_general_set): Handle QTDisconnected.
11024
11025 * event-loop.c (event_handler_func): Change return type to int.
11026 (process_event): Bail out if the event handler wants the event
11027 loop to stop.
11028 (handle_file_event): Ditto.
11029 (start_event_loop): Bail out if the event handler wants the event
11030 loop to stop.
11031
11032 * nto-low.c (nto_target_ops): Adjust.
11033 * spu-low.c (spu_wait): Don't remove the process here.
11034 (spu_target_ops): Adjust.
11035 * win32-low.c (win32_wait): Don't remove the process here.
11036 (win32_target_ops): Adjust.
11037
11038 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11039
11040 * regcache.c (realloc_register_cache): Invalidate inferior's
11041 regcache before recreating it.
11042
11043 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11044
11045 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11046
11047 2010-04-09 Stan Shebs <stan@codesourcery.com>
11048 Pedro Alves <pedro@codesourcery.com>
11049
11050 * server.h (LONGEST): New.
11051 (struct thread_info) <while_stepping>: New field.
11052 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11053 Declare.
11054 (initialize_tracepoint, handle_tracepoint_general_set)
11055 (handle_tracepoint_query, tracepoint_finished_step)
11056 (tracepoint_was_hit, release_while_stepping_state_list):
11057 (current_traceframe): Declare.
11058 * server.c (handle_general_set): Handle tracepoint packets.
11059 (read_memory): New.
11060 (write_memory): New.
11061 (handle_search_memory_1): Use read_memory.
11062 (handle_query): Report support for conditional tracepoints, trace
11063 state variables, and tracepoint sources. Handle tracepoint
11064 queries.
11065 (main): Initialize the tracepoints module.
11066 (process_serial_event): Handle traceframe reads/writes.
11067
11068 * linux-low.c (handle_tracepoints): New.
11069 (linux_wait_1): Call it.
11070 (linux_resume_one_lwp): Handle while-stepping.
11071 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11072 (linux_target_ops): Install them.
11073 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11074 New field.
11075 * linux-x86-low.c (x86_supports_tracepoints): New.
11076 (the_low_target). Install it.
11077
11078 * mem-break.h (delete_breakpoint): Declare.
11079 * mem-break.c (delete_breakpoint): Make external.
11080
11081 * target.h (struct target_ops): Add `supports_tracepoints',
11082 `read_pc', and `write_pc' fields.
11083 (target_supports_tracepoints): Define.
11084 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11085 (phex_nz): New.
11086
11087 * regcache.h (struct regcache) <registers_owned>: New field.
11088 (init_register_cache, regcache_cpy): Declare.
11089 (regcache_read_pc, regcache_write_pc): Declare.
11090 (register_cache_size): Declare.
11091 (supply_regblock): Declare.
11092 * regcache.c (init_register_cache): New.
11093 (new_register_cache): Use it.
11094 (regcache_cpy): New.
11095 (register_cache_size): New.
11096 (supply_regblock): New.
11097 (regcache_read_pc, regcache_write_pc): New.
11098
11099 * tracepoint.c: New.
11100
11101 * Makefile.in (OBS): Add tracepoint.o.
11102 (tracepoint.o): New rule.
11103
11104 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11105
11106 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11107 (i386-mmx.o): New.
11108 (i386-mmx.c): Likewise.
11109 (i386-mmx-linux.o): Likewise.
11110 (i386-mmx-linux.c): Likewise.
11111
11112 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11113 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11114 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11115 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11116
11117 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11118 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11119 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11120
11121 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11122
11123 * Makefile.in (clean): Updated.
11124 (i386-avx.o): New.
11125 (i386-avx.c): Likewise.
11126 (i386-avx-linux.o): Likewise.
11127 (i386-avx-linux.c): Likewise.
11128 (amd64-avx.o): Likewise.
11129 (amd64-avx.c): Likewise.
11130 (amd64-avx-linux.o): Likewise.
11131 (amd64-avx-linux.c): Likewise.
11132
11133 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11134 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11135 (srv_amd64_regobj): Add amd64-avx.o.
11136 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11137 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11138 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11139 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11140 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11141 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11142 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11143
11144 * i387-fp.c: Include "i386-xstate.h".
11145 (i387_xsave): New.
11146 (i387_cache_to_xsave): Likewise.
11147 (i387_xsave_to_cache): Likewise.
11148 (x86_xcr0): Likewise.
11149
11150 * i387-fp.h (i387_cache_to_xsave): Likewise.
11151 (i387_xsave_to_cache): Likewise.
11152 (x86_xcr0): Likewise.
11153
11154 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11155 * linux-crisv32-low.c (target_regsets): Likewise.
11156 * linux-m68k-low.c (target_regsets): Likewise.
11157 * linux-mips-low.c (target_regsets): Likewise.
11158 * linux-ppc-low.c (target_regsets): Likewise.
11159 * linux-s390-low.c (target_regsets): Likewise.
11160 * linux-sh-low.c (target_regsets): Likewise.
11161 * linux-sparc-low.c (target_regsets): Likewise.
11162 * linux-xtensa-low.c (target_regsets): Likewise.
11163
11164 * linux-low.c: Include <sys/uio.h>.
11165 (regsets_fetch_inferior_registers): Support nt_type.
11166 (regsets_store_inferior_registers): Likewise.
11167 (linux_process_qsupported): New.
11168 (linux_target_ops): Add linux_process_qsupported.
11169
11170 * linux-low.h (regset_info): Add nt_type.
11171 (linux_target_ops): Add process_qsupported.
11172
11173 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11174 and <sys/uio.h>.
11175 (init_registers_i386_avx_linux): New.
11176 (init_registers_amd64_avx_linux): Likewise.
11177 (xmltarget_i386_linux_no_xml): Likewise.
11178 (xmltarget_amd64_linux_no_xml): Likewise.
11179 (PTRACE_GETREGSET): Likewise.
11180 (PTRACE_SETREGSET): Likewise.
11181 (x86_fill_xstateregset): Likewise.
11182 (x86_store_xstateregset): Likewise.
11183 (use_xml): Likewise.
11184 (x86_linux_update_xmltarget): Likewise.
11185 (x86_linux_process_qsupported): Likewise.
11186 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11187 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11188 init_registers_i386_linux here. Call
11189 x86_linux_update_xmltarget.
11190 (the_low_target): Add x86_linux_process_qsupported.
11191
11192 * server.c (handle_query): Call target_process_qsupported.
11193
11194 * target.h (target_ops): Add process_qsupported.
11195 (target_process_qsupported): New.
11196
11197 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11198
11199 * inferiors.c (add_thread): Set last_status kind to
11200 TARGET_WAITKIND_IGNORE.
11201 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11202 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11203 (linux_wait_1): Move `thread' local definition to block that uses
11204 it. Don't NULL initialize `event_child'.
11205 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11206 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11207 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11208
11209 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11210
11211 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11212 an extended waitstatus, or by a watchpoint.
11213 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11214 thread was stepping or has been stopped by a watchpoint.
11215
11216 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11217
11218 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11219 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11220 of another, then delete the previous, and validate all
11221 breakpoints.
11222 (validate_inserted_breakpoint): New.
11223 (delete_disabled_breakpoints): New.
11224 (validate_breakpoints): New.
11225 (check_mem_read): Validate breakpoints before trusting their
11226 shadow. Delete disabled breakpoints.
11227 (check_mem_write): Validate breakpoints before trusting they
11228 should be inserted. Delete disabled breakpoints.
11229 * mem-break.h (validate_breakpoints):
11230 * server.c (handle_query): Validate breakpoints when we see a
11231 qSymbol query.
11232
11233 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11234
11235 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11236 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11237 if we could tell there's a GDB breakpoint at stop_pc.
11238 (need_step_over_p): Don't do a step over if we find a GDB
11239 breakpoint at the resume PC.
11240
11241 * mem-break.c (struct raw_breakpoint): New.
11242 (enum bkpt_type): New type `gdb_breakpoint'.
11243 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11244 fields. New field `raw'.
11245 (find_raw_breakpoint_at): New.
11246 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11247 breakpoint instead.
11248 (set_breakpoint_at): Adjust.
11249 (delete_raw_breakpoint): New.
11250 (release_breakpoint): New.
11251 (delete_breakpoint): Rename to...
11252 (delete_breakpoint_1): ... this. Add proc parameter. Use
11253 release_breakpoint. Return ENOENT.
11254 (delete_breakpoint): Reimplement.
11255 (find_breakpoint_at): Delete.
11256 (find_gdb_breakpoint_at): New.
11257 (delete_breakpoint_at): Delete.
11258 (set_gdb_breakpoint_at): New.
11259 (delete_gdb_breakpoint_at): New.
11260 (gdb_breakpoint_here): New.
11261 (set_reinsert_breakpoint): Use release_breakpoint.
11262 (uninsert_breakpoint): Rename to ...
11263 (uninsert_raw_breakpoint): ... this.
11264 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11265 (reinsert_raw_breakpoint): Change parameter type to
11266 raw_breakpoint.
11267 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11268 instead.
11269 (check_breakpoints): Adjust. Use release_breakpoint.
11270 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11271 (breakpoint_inserted_here): Ditto.
11272 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11273 Don't trust the breakpoint's shadow if it is not inserted.
11274 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11275 (delete_all_breakpoints): Adjust.
11276 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11277 use delete_breakpoint_1.
11278
11279 * mem-break.h (breakpoints_supported): Delete declaration.
11280 (set_gdb_breakpoint_at): Declare.
11281 (gdb_breakpoint_here): Declare.
11282 (delete_breakpoint_at): Delete.
11283 (delete_gdb_breakpoint_at): Declare.
11284
11285 * server.h (struct raw_breakpoint): Forward declare.
11286 (struct process_info): New field `raw_breakpoints'.
11287
11288 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11289 breakpoints.
11290
11291 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11292
11293 * linux-low.c (status_pending_p_callback): Fix comment.
11294 (linux_wait_for_event_1): Move most of the internal breakpoint
11295 handling from here...
11296 (linux_wait_1): ... to here.
11297 (count_events_callback): New.
11298 (select_singlestep_lwp_callback): New.
11299 (select_event_lwp_callback): New.
11300 (cancel_breakpoints_callback): New.
11301 (select_event_lwp): New.
11302 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11303 priority to all LWPs that have had events that should be reported
11304 to the client. Cancel breakpoints when about to reporting the
11305 event to the client, not while stopping lwps. No longer cancel
11306 finished single-steps here.
11307 (cancel_finished_single_step): Delete.
11308 (cancel_finished_single_steps): Delete.
11309
11310 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11311
11312 * mem-break.c (enum bkpt_type): New.
11313 (struct breakpoint): New field `type'.
11314 (set_breakpoint_at): Change return type to struct breakpoint
11315 pointer. Set type to `other_breakpoint' by default.
11316 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11317 in the breakpoint list.
11318 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11319 (reinsert_breakpoint): Rename to ...
11320 (reinsert_raw_breakpoint): ... this.
11321 (reinsert_breakpoints_at): Adjust.
11322 * mem-break.h (struct breakpoint): Declare.
11323 (set_breakpoint_at): Change return type to struct breakpoint
11324 pointer.
11325
11326 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11327
11328 * server.c (handle_query): Assign, not compare.
11329
11330 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11331
11332 Teach linux gdbserver to step-over-breakpoints.
11333
11334 * linux-low.c (can_hardware_single_step): New.
11335 (supports_breakpoints): New.
11336 (handle_extended_wait): If stopping threads, read the stop pc of
11337 the new cloned LWP.
11338 (get_pc): New.
11339 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11340 low target doesn't support retrieving the PC.
11341 (add_lwp): Set last_resume_kind to resume_continue.
11342 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11343 (linux_attach): Don't clear stop_expected. Set the lwp's
11344 last_resume_kind to resume_stop.
11345 (linux_detach_one_lwp): Don't check for removed breakpoints.
11346 (check_removed_breakpoint): Delete.
11347 (status_pending_p): Rename to ...
11348 (status_pending_p_callback): ... this. Don't check for removed
11349 breakpoints. Don't consider threads that are stopped from GDB's
11350 perspective.
11351 (linux_wait_for_lwp): Always read the stop_pc here.
11352 (cancel_breakpoint): New.
11353 (step_over_bkpt): New global.
11354 (linux_wait_for_event_1): Implement stepping over breakpoints.
11355 (gdb_wants_lwp_stopped): New.
11356 (gdb_wants_all_stopped): New.
11357 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11358 single-step traps here. Store the thread's last reported target
11359 wait status.
11360 (send_sigstop): Don't clear stop_expected. Always set it,
11361 instead.
11362 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11363 (cancel_finished_single_step): New.
11364 (cancel_finished_single_steps): New.
11365 (wait_for_sigstop): Don't cancel finished single-step traps here.
11366 (linux_resume_one_lwp): Don't check for removed breakpoints.
11367 Don't set `step' on non-hardware step archs.
11368 (linux_set_resume_request): Ignore resume_stop requests if already
11369 stopping or stopped. Set the lwp's last_resume_kind.
11370 (resume_status_pending_p): Don't check for removed breakpoints.
11371 (need_step_over_p): New.
11372 (start_step_over): New.
11373 (finish_step_over): New.
11374 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11375 requests. Clear the thread's last reported target waitstatus.
11376 Don't use the `suspended' flag. Don't consider pending breakpoints.
11377 (linux_resume): Start a step-over if necessary.
11378 (proceed_one_lwp): New.
11379 (proceed_all_lwps): New.
11380 (unstop_all_lwps): New.
11381 * linux-low.h (struct lwp_info): Rewrite comment for the
11382 `suspended' flag. Add the `stop_pc' field. Delete the
11383 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11384 Add `'last_resume_kind' and `need_step_over' fields.
11385 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11386 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11387 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11388 (set_raw_breakpoint_at): New.
11389 (set_breakpoint_at): Rewrite to use it.
11390 (reinsert_breakpoint_handler): Delete.
11391 (set_reinsert_breakpoint): New.
11392 (reinsert_breakpoint_by_bp): Delete.
11393 (delete_reinsert_breakpoints): New.
11394 (uninsert_breakpoint): Rewrite.
11395 (uninsert_breakpoints_at): New.
11396 (reinsert_breakpoint): Rewrite.
11397 (reinsert_breakpoints_at): New.
11398 (check_breakpoints): Rewrite.
11399 (breakpoint_here): New.
11400 (breakpoint_inserted_here): New.
11401 (check_mem_read): Adjust.
11402 * mem-break.h (breakpoints_supported, breakpoint_here)
11403 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11404 (reinsert_breakpoint_by_bp): Delete declaration.
11405 (delete_reinsert_breakpoints): Declare.
11406 (reinsert_breakpoint): Delete declaration.
11407 (reinsert_breakpoints_at): Declare.
11408 (uninsert_breakpoint): Delete declaration.
11409 (uninsert_breakpoints_at): Declare.
11410 (check_breakpoints): Adjust prototype.
11411 * server.h: Adjust include order.
11412 (struct thread_info): Declare here. Add a `last_status' field.
11413
11414 2010-03-23 Michael Snyder <msnyder@vmware.com>
11415
11416 * server.c (crc32): New function.
11417 (handle_query): Add handling for 'qCRC:' request.
11418
11419 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11420
11421 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11422 lwp had been stopped by a watchpoint.
11423
11424 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11425
11426 * server.h (internal_error): Declare.
11427 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11428 * utils.c (internal_error): New function.
11429
11430 2010-03-15 Andreas Schwab <schwab@redhat.com>
11431
11432 * configure.srv: Fix typo setting srv_regobj.
11433
11434 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11435
11436 * linux-low.c (fetch_register): Avoid passing a non string literal
11437 format to `error'.
11438 (usr_store_inferior_registers): Ditto.
11439
11440 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11441
11442 * linux-low.c (linux_write_memory): Bail out early if peeking
11443 memory failed.
11444
11445 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11446
11447 * linux-low.h (struct lwp_info): New fields
11448 `stopped_by_watchpoint' and `stopped_data_address'.
11449 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11450 here, and cache them in the lwp object.
11451 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11452 directly.
11453 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11454 field.
11455 (linux_stopped_by_watchpoint): Rewrite.
11456 (linux_stopped_data_address): Rewrite.
11457
11458 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11459
11460 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11461 switching the current inferior, not before.
11462
11463 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11464
11465 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11466 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11467 i386-linux.c and amd64-linux.c.
11468 (reg-i386.o): Removed.
11469 (reg-i386.c): Likewise.
11470 (reg-i386-linux.o): Likewise.
11471 (reg-i386-linux.c): Likewise.
11472 (reg-x86-64.o): Likewise.
11473 (reg-x86-64.c): Likewise.
11474 (reg-x86-64-linux.o): Likewise.
11475 (reg-x86-64-linux.c): Likewise.
11476 (i386.o): New.
11477 (i386.c): Likewise.
11478 (i386-linux.o): Likewise.
11479 (i386-linux.c): Likewise.
11480 (amd64.o): Likewise.
11481 (amd64.c): Likewise.
11482 (amd64-linux.o): Likewise.
11483 (amd64-linux.c): Likewise.
11484
11485 * configure.srv (srv_i386_regobj): New.
11486 (srv_i386_linux_regobj): Likewise.
11487 (srv_amd64_regobj): Likewise.
11488 (srv_amd64_linux_regobj): Likewise.
11489 (srv_i386_32bit_xmlfiles): Likewise.
11490 (srv_i386_64bit_xmlfiles): Likewise.
11491 (srv_i386_xmlfiles): Likewise.
11492 (srv_amd64_xmlfiles): Likewise.
11493 (srv_i386_linux_xmlfiles): Likewise.
11494 (srv_amd64_linux_xmlfiles): Likewise.
11495 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11496 srv_xmlfiles to $srv_i386_xmlfiles.
11497 (i[34567]86-*-mingw32ce*): Likewise.
11498 (i[34567]86-*-mingw*): Likewise.
11499 (i[34567]86-*-nto*): Likewise.
11500 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11501 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11502 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11503 (x86_64-*-linux*): Likewise.
11504
11505 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11506 (init_registers_amd64_linux): New.
11507 (x86_arch_setup): Replace init_registers_x86_64_linux with
11508 init_registers_amd64_linux.
11509
11510 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11511
11512 * configure.ac: Check for libdl. If it is not available link against
11513 static libthread_db.
11514 * configure: Regenerate.
11515
11516 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11517
11518 PR9605
11519
11520 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11521 handing a read watchpoint.
11522 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11523
11524 2010-02-12 Doug Evans <dje@google.com>
11525
11526 * linux-low.c (linux_supports_tracefork_flag): Document.
11527 (linux_look_up_symbols): Add comment.
11528
11529 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11530
11531 * regcache.c (supply_register): Clear regcache if buf is NULL.
11532
11533 2010-02-02 Nicolas Roche <roche@sourceware.org>
11534 Joel Brobecker <brobecker@adacore.com>
11535
11536 * inferiors.c (find_inferior): Add function documentation.
11537 (unloaded_dll): Handle the case where the unloaded dll has not
11538 been previously registered in the dll list.
11539
11540 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11541
11542 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11543 (thumb2_breakpoint): New.
11544 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11545
11546 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11547
11548 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11549 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11550 breakpoints.
11551
11552 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11553
11554 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11555
11556 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11557
11558 * linux-s390-low.c (s390_collect_ptrace_register)
11559 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11560
11561 2010-01-21 Doug Evans <dje@google.com>
11562
11563 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11564 (PTRACE_ARG4_TYPE): New macro.
11565 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11566 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11567 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11568 (usr_store_inferior_registers): Ditto.
11569 (linux_read_memory, linux_write_memory): Ditto.
11570 (linux_test_for_tracefork): Ditto.
11571
11572 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11573 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11574
11575 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11576
11577 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11578 target.
11579
11580 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11581
11582 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11583 prototype to take a regcache. Adjust.
11584
11585 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11586
11587 * regcache.h (struct thread_info): Forward declare.
11588 (struct regcache): New.
11589 (new_register_cache): Adjust prototype.
11590 (get_thread_regcache): Declare.
11591 (free_register_cache): Adjust prototype.
11592 (registers_to_string, registers_from_string): Ditto.
11593 (supply_register, supply_register_by_name, collect_register)
11594 (collect_register_as_string, collect_register_by_name): Ditto.
11595 * regcache.c (struct inferior_regcache_data): Delete.
11596 (get_regcache): Rename to ...
11597 (get_thread_regcache): ... this. Adjust. Switch inferior before
11598 fetching registers.
11599 (regcache_invalidate_one): Adjust.
11600 (regcache_invalidate): Fix prototype.
11601 (new_register_cache): Return the new register cache.
11602 (free_register_cache): Change prototype.
11603 (realloc_register_cache): Adjust.
11604 (registers_to_string): Change prototype to take a regcache. Adjust.
11605 (registers_from_string): Ditto.
11606 (register_data): Ditto.
11607 (supply_register): Ditto.
11608 (supply_register_by_name): Ditto.
11609 (collect_register): Ditto.
11610 (collect_register_as_string): Ditto.
11611 (collect_register_by_name): Ditto.
11612 * server.c (process_serial_event): Adjust.
11613 * linux-low.h (regset_fill_func, regset_store_func): Change
11614 prototype.
11615 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11616 Change prototype.
11617 * linux-low.c (get_stop_pc): Adjust.
11618 (check_removed_breakpoint): Adjust.
11619 (linux_wait_for_event): Adjust.
11620 (linux_resume_one_lwp): Adjust.
11621 (fetch_register): Add regcache parameter. Adjust.
11622 (usr_store_inferior_registers): Ditto.
11623 (regsets_fetch_inferior_registers): Ditto.
11624 (regsets_store_inferior_registers): Ditto.
11625 (linux_fetch_registers, linux_store_registers): Ditto.
11626 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11627 regcache. Adjust.
11628 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11629 Ditto.
11630 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11631 prototype to take a regcache.
11632 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11633 * remote-utils.c (convert_ascii_to_int, outreg)
11634 (prepare_resume_reply): Change prototype to take a regcache.
11635 Adjust.
11636 * target.h (struct target_ops) <fetch_registers, store_registers>:
11637 Change prototype to take a regcache.
11638 (fetch_inferior_registers, store_inferior_registers): Change
11639 prototype to take a regcache. Adjust.
11640 * proc-service.c (ps_lgetregs): Adjust.
11641 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11642 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11643 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11644 take a regcache. Adjust.
11645 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11646 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11647 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11648 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11649 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11650 (cris_cannot_fetch_register):
11651 (cris_breakpoint_at): Change prototype to take a regcache.
11652 Adjust.
11653 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11654 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11655 to take a regcache. Adjust.
11656 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11657 Adjust.
11658 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11659 take a regcache. Adjust.
11660 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11661 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11662 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11663 * linux-mips-low.c (mips_get_pc):
11664 (mips_set_pc): Change prototype to take a regcache. Adjust.
11665 (mips_reinsert_addr): Adjust.
11666 (mips_collect_register): Change prototype to take a regcache.
11667 Adjust.
11668 (mips_supply_register):
11669 (mips_collect_register_32bit, mips_supply_register_32bit)
11670 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11671 (mips_store_fpregset): Ditto.
11672 * linux-ppc-low.c (ppc_supply_ptrace_register)
11673 (ppc_supply_ptrace_register): Ditto.
11674 (parse_spufs_run): Adjust.
11675 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11676 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11677 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11678 take a regcache. Adjust.
11679 * linux-s390-low.c (s390_collect_ptrace_register)
11680 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11681 (s390_set_pc): Change prototype to take a regcache. Adjust.
11682 (s390_arch_setup): Adjust.
11683 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11684 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11685 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11686 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11687 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11688 regcache. Adjust.
11689 (sparc_breakpoint_at): Adjust.
11690 * linux-xtensa-low.c (xtensa_fill_gregset):
11691 (xtensa_store_gregset):
11692 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11693 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11694 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11695 prototype to take a regcache. Adjust.
11696 * win32-arm-low.c (arm_fetch_inferior_register)
11697 (arm_store_inferior_register): Change prototype to take a
11698 regcache. Adjust.
11699 * win32-i386-low.c (i386_fetch_inferior_register)
11700 (i386_store_inferior_register): Change prototype to take a
11701 regcache. Adjust.
11702 * win32-low.c (child_fetch_inferior_registers)
11703 (child_store_inferior_registers): Change prototype to take a
11704 regcache. Adjust.
11705 (win32_wait): Adjust.
11706 (win32_fetch_inferior_registers): Change prototype to take a
11707 regcache. Adjust.
11708 (win32_store_inferior_registers): Adjust.
11709 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11710 store_inferior_register>: Change prototype to take a regcache.
11711
11712 2010-01-20 Doug Evans <dje@google.com>
11713
11714 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11715 #ifdef.
11716 (linux_wait_for_event1, linux_init_signals): Ditto.
11717 (W_STOPCODE): Provide definition if missing.
11718
11719 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11720
11721 * linux-low.c (linux_core_of_thread): New.
11722 (compare_ints, show_process, list_threads): New.
11723 (linux_qxfer_osdata): Report threads and cores.
11724 (linux_target_op): Register linux_core_of_thread.
11725 * remote-utils.c (prepare_resume_reply): Report the core.
11726 (buffer_xml_printf): Support %d specifier.
11727 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11728 New.
11729 (handle_query): Handle qXfer:threads. Announce availability
11730 thereof.
11731 * target.h (struct target_ops): New field core_of_thread.
11732
11733 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11734
11735 * Makefile.in (clean): Remove new generated files.
11736 (reg-s390.o, reg-s390.c): Remove rules.
11737 (reg-s390x.o, reg-s390x.c): Likewise.
11738 (s390-linux32.o, s390-linux32.c): Add rules.
11739 (s390-linux64.o, s390-linux64.c): Likewise.
11740 (s390x-linux64.o, s390x-linux64.c): Likewise.
11741 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11742 * linux-s390-low.c: Include <elf.h>.
11743 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11744 (init_registers_s390): Remove prototype.
11745 (init_registers_s390x): Likewise.
11746 (init_registers_s390_linux32): Add prototype.
11747 (init_registers_s390_linux64): Likewise.
11748 (init_registers_s390x_linux64): Likewise.
11749 (s390_num_regs_3264): New define.
11750 (s390_regmap_3264): New global variable.
11751 (s390_cannot_fetch_register): Remove obsolete check.
11752 (s390_cannot_store_register): Likewise.
11753 (s390_collect_ptrace_register): Handle upper/lower register halves.
11754 (s390_supply_ptrace_register): Likewise.
11755 (s390_fill_gregset): Update to register number changes.
11756 (s390_get_hwcap): New routine.
11757 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11758 Install appropriate regmap and register set.
11759
11760 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11761
11762 * server.c (gdbserver_version): Update copyright year to 2010.
11763 * gdbreplay.c (gdbreplay_version): Likewise.
11764
11765 2009-12-28 Doug Evans <dje@google.com>
11766
11767 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11768 elf/external.h. Include <elf.h> instead but only if necessary.
11769
11770 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11771
11772 * linux-low.c (linux_remove_process): Remove `detaching'
11773 parameter. Don't release/detach from thread_db here.
11774 (linux_kill): Release/detach from thread_db here, ...
11775 (linux_detach): ... and here, before actually detaching.
11776 (linux_wait_1): ... and here, when a process exits.
11777 * thread-db.c (any_thread_of): New.
11778 (thread_db_free): Switch the current inferior to a thread of the
11779 passed in process.
11780
11781 2009-12-21 Doug Evans <dje@google.com>
11782
11783 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11784
11785 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11786 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11787 warning ifndef __NR_tkill. Move setting of errno there too.
11788 Delete unnecessary resetting of errno after syscall.
11789 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11790
11791 * configure.ac: Check for dladdr.
11792 * config.in: Regenerate.
11793 * configure: Regenerate.
11794 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11795 (try_thread_db_load): Update.
11796
11797 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11798
11799 2009-12-18 Doug Evans <dje@google.com>
11800
11801 * event-loop.c: Include unistd.h if it exists.
11802
11803 * linux-low.c (my_waitpid): Move definition away from being in
11804 between linux_tracefork_child/linux_test_for_tracefork.
11805
11806 * gdb_proc_service.h (psaddr_t): Fix type.
11807 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11808 signature to match glibc.
11809
11810 2009-12-16 Doug Evans <dje@google.com>
11811
11812 * linux-low.c (linux_read_memory): Fix argument to read.
11813
11814 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11815
11816 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11817 events, don't leave current_inferior pointing at null.
11818
11819 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11820
11821 * win32-low.c (LOG): Delete.
11822 (OUTMSG): Output to stderr.
11823 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11824 on compile time LOG macro.
11825 (win32_wait): Fix debug output.
11826
11827 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11828
11829 * win32-low.c (win32_add_one_solib): If the dll name is
11830 "ntdll.dll", prepend the system directory to the dll path.
11831
11832 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11833
11834 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11835
11836 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11837 Vladimir Prus <vladimir@codesourcery.com>
11838
11839 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11840 * configure.ac: Check for __mcoldfire__ and set
11841 gdb_cv_m68k_is_coldfire.
11842 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11843 reg-cf.o and reg-m68k.o.
11844 * configure: Regenerated.
11845
11846 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11847
11848 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11849 Pass it to thread_db_free.
11850 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11851 proper `detaching' argument to linux_remove_process.
11852 * linux-low.h (thread_db_free): Add `detaching' parameter.
11853 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11854 to thread_db_free.
11855 (thread_db_free): Add `detaching' parameter. Only
11856 call td_ta_clear_event if detaching from process.
11857
11858 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11859
11860 * thread-db.c (thread_db_free): Fix typo.
11861
11862 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11863
11864 PR gdb/10838
11865 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11866
11867 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11868
11869 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11870 with an i686 compiler.
11871 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11872 needed.
11873 * configure: Rebuilt.
11874
11875 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11876
11877 PR gdb/10783
11878
11879 * server.c (handle_search_memory_1): Correct read_addr initialization
11880 in loop for searching subsequent chunks.
11881
11882 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11883
11884 * configure.ac: New --with-libthread-db option.
11885 * thread-db.c: Allow direct dependence on libthread_db.
11886 (thread_db_free): Adjust.
11887 * config.in: Regenerate.
11888 * configure: Likewise.
11889
11890 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11891
11892 PR gdb/10757
11893 * thread-db.c (attach_thread): New function.
11894 (maybe_attach_thread): Return success/failure.
11895 (find_new_threads_callback): Adjust.
11896 (thread_db_find_new_threads): Loop until no new threads.
11897
11898 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11899
11900 * proc-service.c (ps_lgetregs): Formatting.
11901
11902 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11903
11904 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11905 * configure.ac: Adjust.
11906 * linux-low.h (struct process_info_private): Move members to struct
11907 thread_db.
11908 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11909 * linux-low.c (linux_remove_process): Adjust.
11910 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11911 * server.c (handle_query): Move code ...
11912 (handle_monitor_command): ... here. New function.
11913 * target.h (struct target_ops): New member.
11914 * thread-db.c (struct thread_db): New.
11915 (libthread_db_search_path): New variable.
11916 (thread_db_create_event, thread_db_enable_reporting)
11917 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11918 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11919 (try_thread_db_load_1, dladdr_to_soname): New functions.
11920 (try_thread_db_load, thread_db_load_search): New functions.
11921 (thread_db_init): Search for libthread_db.
11922 (thread_db_free): New function.
11923 (thread_db_handle_monitor_command): Likewise.
11924 * config.in: Regenerate.
11925 * configure: Regenerate.
11926
11927 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11928
11929 * spu-low.c (spu_kill): Wait for inferior to terminate.
11930 Call clear_inferiors.
11931 (spu_detach): Call clear_inferiors.
11932
11933 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11934
11935 * aclocal.m4: Regenerate.
11936 * config.in: Likewise.
11937 * configure: Likewise.
11938
11939 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11940
11941 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11942 (parse_spufs_run): New function.
11943 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11944 (ppc_breakpoint_at): Handle SPU breakpoints.
11945
11946 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11947
11948 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11949 (SPUFS_MAGIC): Define.
11950 (spu_enumerate_spu_ids): New function.
11951 (linux_qxfer_spu): New function.
11952 (linux_target_ops): Install linux_qxfer_spu.
11953
11954 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11955
11956 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11957 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11958 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11959 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11960 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11961 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11962 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11963 (init_registers_powerpc_cell32l): Add prototype.
11964 (init_registers_powerpc_cell64l): Likewise.
11965 (ppc_arch_setup): Detect Cell/B.E. architecture.
11966
11967 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11968
11969 * Makefile.in (datarootdir): New variable.
11970
11971 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11972
11973 * linux-low.c (linux_write_memory): Update debugging output.
11974 * Makefile.in (clean): Add new descriptions.
11975 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11976 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11977 * configure.srv: Add new files for arm*-*-linux*.
11978 * linux-arm-low.c: Add new declarations.
11979 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11980 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11981 (HWCAP_VFPv3D16): New.
11982 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11983 instead of __IWMMXT__.
11984 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11985 (arm_arch_setup): New.
11986 (target_regsets): Remove #ifdef. Add VFP regset.
11987 (the_low_target): Use arm_arch_setup.
11988
11989 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11990
11991 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11992 the main thread again.
11993
11994 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11995
11996 Adding Neutrino gdbserver.
11997 * configure: Regenerated.
11998 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11999 * configure.srv (i[34567]86-*-nto*): New target.
12000 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12001 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12002 (nto_comctrl) [__QNX__]: New function.
12003 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12004
12005 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12006
12007 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12008 srv_tgtobj.
12009
12010 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12011 Pedro Alves <pedro@codesourcery.com>
12012
12013 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12014 don't support CONTEXT_EXTENDED_REGISTERS.
12015 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12016 (the_low_target): Install them.
12017 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12018 failing with ERROR_PIPE_NOT_CONNECTED.
12019
12020 2009-06-30 Doug Evans <dje@google.com>
12021 Pierre Muller <muller@ics.u-strasbg.fr>
12022
12023 Add h/w watchpoint support to x86-linux, win32-i386.
12024 * Makefile.in (SFILES): Add i386-low.c
12025 (i386_low_h): Define.
12026 (i386-low.o): Add dependencies.
12027 (linux-x86-low.o): Add i386-low.h dependency.
12028 (win32-i386-low.o): Ditto.
12029 * i386-low.c: New file.
12030 * i386-low.h: New file.
12031 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12032 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12033 * linux-low.c (linux_add_process): Initialize arch_private.
12034 (linux_remove_process): Free arch_private.
12035 (add_lwp): Initialize arch_private.
12036 (delete_lwp): Free arch_private.
12037 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12038 provided.
12039 * linux-low.h (process_info_private): New member arch_private.
12040 (lwp_info): New member arch_private.
12041 (linux_target_ops): New members new_process, new_thread,
12042 prepare_to_resume.
12043 (ptid_of): New macro.
12044 * linux-x86-low.c: Include stddef.h, i386-low.h.
12045 (arch_process_info): New struct.
12046 (arch_lwp_info): New struct.
12047 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12048 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12049 (i386_dr_low_get_status): New function.
12050 (x86_insert_point, x86_remove_point): New functions.
12051 (x86_stopped_by_watchpoint): New function.
12052 (x86_stopped_data_address): New function.
12053 (x86_linux_new_process, x86_linux_new_thread): New functions.
12054 (x86_linux_prepare_to_resume): New function.
12055 (the_low_target): Add entries for insert_point, remove_point,
12056 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12057 prepare_to_resume.
12058 * server.c (debug_hw_points): New global.
12059 (monitor_show_help): Document set debug-hw-points.
12060 (handle_query): Process "set debug-hw-points".
12061 * server.h (debug_hw_points): Declare.
12062 (paddress): Declare.
12063 * utils.c (NUMCELLS, CELLSIZE): New macros.
12064 (get_sell, xsnprintf, paddress): New functions.
12065 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12066 remove_point, stopped_by_watchpoint, stopped_data_address.
12067 * win32-i386-low.c: Include i386-low.h.
12068 (debug_reg_state): Replaces dr.
12069 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12070 (i386_dr_low_get_status): New function.
12071 (i386_insert_point, i386_remove_point): New functions.
12072 (i386_stopped_by_watchpoint): New function.
12073 (i386_stopped_data_address): New function.
12074 (i386_initial_stuff): Update.
12075 (get_thread_context,set_thread_context,i386_thread_added): Update.
12076 (the_low_target): Add entries for insert_point,
12077 remove_point, stopped_by_watchpoint, stopped_data_address.
12078 * win32-low.c (win32_insert_watchpoint): New function.
12079 (win32_remove_watchpoint): New function.
12080 (win32_stopped_by_watchpoint): New function.
12081 (win32_stopped_data_address): New function.
12082 (win32_target_ops): Add entries for insert_watchpoint,
12083 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12084 * win32-low.h (win32_target_ops): New members insert_point,
12085 remove_point, stopped_by_watchpoint, stopped_data_address.
12086
12087 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12088
12089 * server.c (process_serial_event): Re-return unsupported, not
12090 error, if the type isn't recognized. Re-allow supporting only
12091 insert or remove packets. Also call require_running for
12092 breakpoints. Add missing break statement to default case. Tidy.
12093 * target.h (struct target_ops): Rename insert_watchpoint to
12094 insert_point, and remove_watchpoint to remove_point.
12095
12096 * linux-low.h (struct linux_target_ops): Likewise.
12097 * linux-low.c (linux_insert_watchpoint): Rename to ...
12098 (linux_insert_point): ... this. Adjust.
12099 (linux_remove_watchpoint): Rename to ...
12100 (linux_remove_point): ... this. Adjust.
12101 (linux_target_ops): Adjust.
12102 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12103 (cris_insert_point): ... this.
12104 (cris_remove_watchpoint): Rename to ...
12105 (cris_remove_point): ... this.
12106 (the_low_target): Adjust.
12107
12108 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12109
12110 * server.c (handle_v_kill): Pass signal_pid to
12111 kill_inferior if multi_process is zero.
12112
12113 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12114
12115 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12116 * target.h (target_ops): Comment for *_watchpoint to make it clear
12117 the functions can get types '0' and '1'.
12118
12119 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12120
12121 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12122 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12123 * regcache.c (get_regcache): Likewise.
12124 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12125 * win32-low.c (child_fetch_inferior_registers): Remove check for
12126 regno 0.
12127
12128 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12129 Pedro Alves <pedro@codesourcery.com>
12130
12131 * target.h (struct target_ops) <supports_multi_process>: New
12132 callback.
12133 (target_supports_multi_process): New.
12134 * server.c (handle_query): Even if GDB reports support, only
12135 enable multi-process if the target also supports it. Report
12136 multi-process support only if the target backend supports it.
12137 * linux-low.c (linux_supports_multi_process): New function.
12138 (linux_target_ops): Install it as target_supports_multi_process
12139 callback.
12140
12141 2009-05-24 Doug Evans <dje@google.com>
12142
12143 Global renaming of find_thread_pid to find_thread_ptid.
12144 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12145 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12146 All callers updated.
12147
12148 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12149 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12150 directly.
12151
12152 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12153 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12154 (linux_resume_one_lwp): Ditto.
12155
12156 2009-05-23 Doug Evans <dje@google.com>
12157
12158 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12159 from struct inferior_list_entry * to struct lwp_info *.
12160 All callers updated.
12161
12162 2009-05-13 Doug Evans <dje@google.com>
12163
12164 * linux-x86-low.c: Don't include assert.h.
12165 (x86_siginfo_fixup): Use fatal, not assert.
12166 (x86_arch_setup): Fix comment.
12167
12168 2009-05-12 Doug Evans <dje@google.com>
12169
12170 Biarch support for i386/amd64 gdbserver.
12171 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12172 Add linux-x86-low.c.
12173 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12174 (linux-x86-low.o): Add.
12175 * linux-x86-64-low.c: Delete.
12176 * linux-i386-low.c: Delete.
12177 * linux-x86-low.c: New file.
12178 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12179 linux-x86-low.o.
12180 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12181 linux-x86-low.o.
12182 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12183 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12184 (linux_child_pid_to_exec_file): New function.
12185 (elf_64_header_p, elf_64_file_p): New functions.
12186 (siginfo_fixup): New function.
12187 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12188 give target a chance to convert layout.
12189 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12190 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12191
12192 2009-05-07 Doug Evans <dje@google.com>
12193
12194 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12195 (regsets_store_inferior_registers): Ditto.
12196
12197 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12198
12199 PR server/10048
12200
12201 * linux-low.c (must_set_ptrace_flags): Delete.
12202 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12203 of the global.
12204 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12205 `lwp->must_set_ptrace_flags' instead.
12206 (linux_wait_for_event_1): Set ptrace options here.
12207 (linux_wait_1): ... not here.
12208
12209 2009-04-30 Doug Evans <dje@google.com>
12210
12211 * inferiors.c (started_inferior_callback): New function.
12212 (attached_inferior_callback): New function.
12213 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12214 * server.c (print_started_pid, print_attached_pid): New functions.
12215 (detach_or_kill_for_exit): New function.
12216 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12217 * server.h (have_started_inferiors_p): Declare.
12218 (have_attached_inferiors_p): Declare.
12219
12220 * inferiors.c (remove_process): Fix memory leak, free process.
12221 * linux-low.c (linux_remove_process): New function.
12222 (linux_kill): Call it instead of remove_process.
12223 (linux_detach, linux_wait_1): Ditto.
12224
12225 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12226
12227 * configure.srv: Add x86 Windows CE target.
12228
12229 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12230
12231 * inferiors.c (get_thread_process): Make global.
12232 * server.h (get_thread_process): Add prototype.
12233 * thread-db.c (find_one_thread): Use get_thread_process
12234 instead of current_process.
12235 (thread_db_get_tls_address): Do not crash if called when
12236 thread layer is not yet initialized.
12237
12238 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12239
12240 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12241 * spu-low.c (current_tid): Rename to ...
12242 (current_ptid): ... this.
12243 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12244 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12245 ptid_get_lwp (current_ptid) instead of current_tid.
12246 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12247 instead of current_tid. Use find_process_pid to verify pid
12248 argument is valid. Pass proper argument to remove_process.
12249 (spu_thread_alive): Compare current_ptid instead of current_tid.
12250 (spu_resume): Likewise.
12251
12252 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12253
12254 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12255 variable.
12256
12257 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12258
12259 Implement the multiprocess extensions, and add linux multiprocess
12260 support.
12261
12262 * server.h (ULONGEST): Declare.
12263 (struct ptid, ptid_t): New.
12264 (minus_one_ptid, null_ptid): Declare.
12265 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12266 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12267 (struct inferior_list_entry): Change `id' type from unsigned from
12268 to ptid_t.
12269 (struct sym_cache, struct breakpoint, struct
12270 process_info_private): Forward declare.
12271 (struct process_info): Declare.
12272 (current_process): Declare.
12273 (all_processes): Declare.
12274 (initialize_inferiors): Declare.
12275 (add_thread): Adjust to use ptid_t.
12276 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12277 (add_process, remove_process, find_thread_pid): Declare.
12278 (find_inferior_id): Adjust to use ptid_t.
12279 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12280 (multi_process): Declare.
12281 (push_event): Adjust to use ptid_t.
12282 (read_ptid, write_ptid): Declare.
12283 (prepare_resume_reply): Adjust to use ptid_t.
12284 (clear_symbol_cache): Declare.
12285 * inferiors.c (all_processes): New.
12286 (null_ptid, minus_one_ptid): New.
12287 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12288 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12289 (add_thread): Change unsigned long to ptid. Remove gdb_id
12290 parameter. Adjust.
12291 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12292 (gdb_id_to_thread): Rename to ...
12293 (find_thread_pid): ... this. Change unsigned long to ptid.
12294 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12295 (loaded_dll, pull_pid_from_list): Adjust.
12296 (add_process, remove_process, find_process_pid)
12297 (get_thread_process, current_process, initialize_inferiors): New.
12298 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12299 (struct target_waitstatus) <related_pid>: Ditto.
12300 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12301 return type to int.
12302 (struct target_ops) <join>: Add `pid' argument.
12303 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12304 (struct target_ops) <wait>: Add `ptid' field. Change return type
12305 to ptid.
12306 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12307 (mywait): Add `ptid' argument. Change return type to ptid_t.
12308 (target_pid_to_str): Declare.
12309 * target.c (set_desired_inferior): Adjust to use ptids.
12310 (mywait): Add new `ptid' argument. Adjust.
12311 (target_pid_to_str): New.
12312 * mem-break.h (free_all_breakpoints): Declare.
12313 * mem-break.c (breakpoints): Delelete.
12314 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12315 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12316 to use per-process breakpoint list.
12317 (free_all_breakpoints): New.
12318 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12319 (symbol_cache, all_symbols_looked_up): Delete.
12320 (hexchars): New.
12321 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12322 read_ptid): New.
12323 (prepare_resume_reply): Change ptid argument's type from unsigned
12324 long to ptid_t. Adjust. Implement W;process and X;process.
12325 (free_sym_cache, clear_symbol_cache): New.
12326 (look_up_one_symbol): Adjust to per-process symbol cache. *
12327 * server.c (cont_thread, general_thread, step_thread): Change type
12328 to ptid_t.
12329 (attached): Delete.
12330 (multi_process): New.
12331 (last_ptid): Change type to ptid_t.
12332 (struct vstop_notif) <ptid>: Change type to ptid_t.
12333 (queue_stop_reply, push_event): Change `ptid' argument's type to
12334 ptid_t.
12335 (discard_queued_stop_replies): Add `pid' argument.
12336 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12337 changes. Don't reference the `attached' global.
12338 (attach_inferior): Adjust to mywait interface changes.
12339 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12340 features. Handle and report "multiprocess+". Handle
12341 "qAttached:PID".
12342 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12343 changes.
12344 (handle_v_kill): New.
12345 (handle_v_stopped): Adjust to use target_pid_to_str.
12346 (handle_v_requests): Allow multiple attaches and runs when
12347 multiprocess extensions are in effect. Handle "vKill".
12348 (myresume): Adjust to use ptids.
12349 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12350 (handle_status): Adjust to discard_queued_stop_replies interface
12351 change.
12352 (first_thread_of, kill_inferior_callback)
12353 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12354 (main): Call initialize_inferiors. Adjust to use ptids, killing
12355 and detaching from all inferiors. Handle multiprocess packet
12356 variants.
12357 * linux-low.h: Include gdb_proc_service.h.
12358 (struct process_info_private): New.
12359 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12360 <lwpid_of>: Use ptid_get_lwp.
12361 (get_lwp_thread): Adjust.
12362 (struct lwp_info): Add `dead' member.
12363 (find_lwp_pid): Declare.
12364 * linux-low.c (thread_db_active): Delete.
12365 (new_inferior): Adjust comment.
12366 (inferior_pid): Delete.
12367 (linux_add_process): New.
12368 (handle_extended_wait): Adjust.
12369 (add_lwp): Change unsigned long to ptid.
12370 (linux_create_inferior): Add process to processes table. Adjust
12371 to use ptids. Don't set new_inferior here.
12372 (linux_attach_lwp): Rename to ...
12373 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12374 it. Adjust to use ptids.
12375 (linux_attach_lwp): New.
12376 (linux_attach): Add process to processes table. Don't set
12377 new_inferior here.
12378 (struct counter): New.
12379 (second_thread_of_pid_p, last_thread_of_process_p): New.
12380 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12381 multiple processes.
12382 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12383 processes. Remove process from process table.
12384 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12385 to multiple processes.
12386 (any_thread_of): New.
12387 (linux_detach): Add `pid' argument, and handle it. Remove process
12388 from processes table.
12389 (linux_join): Add `pid' argument. Handle it.
12390 (linux_thread_alive): Change unsighed long argument to ptid_t.
12391 Consider dead lwps as not being alive.
12392 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12393 threads we're not interested in.
12394 (same_lwp, find_lwp_pid): New.
12395 (linux_wait_for_lwp): Change `pid' argument's type from int to
12396 ptid_t. Adjust.
12397 (linux_wait_for_event): Rename to ...
12398 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12399 from int to ptid_t. Adjust.
12400 (linux_wait_for_event): New.
12401 (linux_wait_1): Add `ptid' argument. Change return type to
12402 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12403 that exit from the process table.
12404 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12405 Adjust.
12406 (mark_lwp_dead): New.
12407 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12408 stopping all threads, mark its main lwp as dead.
12409 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12410 ptids.
12411 (fetch_register, usr_store_inferior_registers)
12412 (regsets_fetch_inferior_registers)
12413 (regsets_store_inferior_registers, linux_read_memory)
12414 (linux_write_memory): Inline `inferior_pid'.
12415 (linux_look_up_symbols): Adjust to use per-process
12416 `thread_db_active'.
12417 (linux_request_interrupt): Adjust to use ptids.
12418 (linux_read_auxv): Inline `inferior_pid'.
12419 (initialize_low): Don't reference thread_db_active.
12420 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12421 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12422 (ps_getpid): Return the pid of the current inferior.
12423 * thread-db.c (proc_handle, thread_agent): Delete.
12424 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12425 per-process data.
12426 (find_one_thread): Change argument type to ptid_t. Adjust to
12427 per-process data.
12428 (maybe_attach_thread): Adjust to per-process data and ptids.
12429 (thread_db_find_new_threads): Ditto.
12430 (thread_db_init): Ditto.
12431 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12432 processes table. Adjust to use ptids.
12433 (spu_kill, spu_detach): Adjust interface. Remove process from
12434 processes table.
12435 (spu_join, spu_thread_alive): Adjust interface.
12436 (spu_wait): Adjust interface. Remove process from processes
12437 table. Adjust to use ptids.
12438 * win32-low.c (current_inferior_tid): Delete.
12439 (current_inferior_ptid): New.
12440 (debug_event_ptid): New.
12441 (thread_rec): Take a ptid. Adjust.
12442 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12443 (child_delete_thread): Ditto.
12444 (do_initial_child_stuff): Add `attached' argument. Add process to
12445 processes table.
12446 (child_fetch_inferior_registers, child_store_inferior_registers):
12447 Adjust.
12448 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12449 (win32_attach): Pass 1 to do_initial_child_stuff.
12450 (win32_kill): Adjust interface. Remove process from processes
12451 table.
12452 (win32_detach): Ditto.
12453 (win32_join): Adjust interface.
12454 (win32_thread_alive): Take a ptid.
12455 (win32_resume): Adjust to use ptids.
12456 (get_child_debug_event): Ditto.
12457 (win32_wait): Adjust interface. Remove exiting process from
12458 processes table.
12459
12460 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12461
12462 Non-stop mode support.
12463
12464 * server.h (non_stop): Declare.
12465 (gdb_client_data, handler_func): Declare.
12466 (delete_file_handler, add_file_handler, start_event_loop):
12467 Declare.
12468 (handle_serial_event, handle_target_event, push_event)
12469 (putpkt_notif): Declare.
12470 * target.h (enum resume_kind): New.
12471 (struct thread_resume): Replace `step' field by `kind' field.
12472 (TARGET_WNOHANG): Define.
12473 (struct target_ops) <wait>: Add `options' argument.
12474 <supports_non_stop, async, start_non_stop>: New fields.
12475 (target_supports_non_stop, target_async): New.
12476 (start_non_stop): Declare.
12477 (mywait): Add `options' argument.
12478 * target.c (mywait): Add `options' argument. Print child exit
12479 notifications here.
12480 (start_non_stop): New.
12481 * server.c (non_stop, own_buf, mem_buf): New globals.
12482 (struct vstop_notif): New.
12483 (notif_queue): New global.
12484 (queue_stop_reply, push_event, discard_queued_stop_replies)
12485 (send_next_stop_reply): New.
12486 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12487 interface changes.
12488 (attach_inferior): In non-stop mode, don't wait for the target
12489 here.
12490 (handle_general_set): Handle QNonStop.
12491 (handle_query): When handling qC, return the current general
12492 thread, instead of the first thread of the list.
12493 (handle_query): If the backend supports non-stop mode, include
12494 QNonStop+ in the qSupported query response.
12495 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12496 and non-stop mode.
12497 (handle_v_attach, handle_v_run): Handle non-stop mode.
12498 (handle_v_stopped): New.
12499 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12500 (myresume): Adjust to use resume_kind. Handle non-stop.
12501 (queue_stop_reply_callback): New.
12502 (handle_status): Handle non-stop mode.
12503 (main): Clear non_stop flag on reconnection. Use the event-loop.
12504 Refactor serial protocol handling from here ...
12505 (process_serial_event): ... to this new function. When GDB
12506 selects any thread, select one here. In non-stop mode, wait until
12507 GDB acks all pending events before exiting.
12508 (handle_serial_event, handle_target_event): New.
12509 * remote-utils.c (remote_open): Install remote_desc in the event
12510 loop.
12511 (remote_close): Remove remote_desc from the event loop.
12512 (putpkt_binary): Rename to...
12513 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12514 (putpkt_binary): New as wrapper around putpkt_binary_1.
12515 (putpkt_notif): New.
12516 (prepare_resume_reply): In non-stop mode, don't change the
12517 general_thread.
12518 * event-loop.c: New.
12519 * Makefile.in (OBJ): Add event-loop.o.
12520 (event-loop.o): New rule.
12521
12522 * linux-low.h (pid_of): Moved here.
12523 (lwpid_of): New.
12524 (get_lwp_thread): Use lwpid_of.
12525 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12526 * linux-low.c (pid_of): Delete.
12527 (inferior_pid): Use lwpid_of.
12528 (linux_event_pipe): New.
12529 (target_is_async_p): New.
12530 (delete_lwp): New.
12531 (handle_extended_wait): Use lwpid_of.
12532 (add_lwp): Don't set lwpid field.
12533 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12534 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12535 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12536 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12537 first. Adjust to linux_wait_for_event interface changes. Use
12538 lwpid_of.
12539 (linux_detach): Don't delete the main lwp here.
12540 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12541 (status_pending_p): Don't consider explicitly suspended lwps.
12542 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12543 pointer. Add OPTIONS argument. Change return type to int. Use
12544 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12545 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12546 pointer. Add status pointer argument. Return a pid instead of a
12547 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12548 changes. In non-stop mode, don't switch to a random thread.
12549 (linux_wait): Rename to...
12550 (linux_wait_1): ... this. Add target_options argument, and handle
12551 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12552 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12553 clean exit and signal exit code. Don't stop all threads in
12554 non-stop mode. In all-stop mode, only stop all threads when
12555 reporting a stop to GDB. Handle explicit thread stop requests.
12556 (async_file_flush, async_file_mark): New.
12557 (linux_wait): New.
12558 (send_sigstop): Use lwpid_of.
12559 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12560 interface changes. In non-stop mode, don't switch to a random
12561 thread.
12562 (linux_resume_one_lwp): Use lwpid_of.
12563 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12564 (linux_resume_one_thread): ... this. Handle resume_stop. In
12565 non-stop mode, don't look for pending flag in all threads.
12566 (resume_status_pending_p): Don't consider explicitly suspended
12567 threads.
12568 (my_waitpid): Reimplement. Emulate __WALL.
12569 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12570 Use lwpid_of.
12571 (sigchld_handler, linux_supports_non_stop, linux_async)
12572 (linux_start_non_stop): New.
12573 (linux_target_ops): Register linux_supports_non_stop, linux_async
12574 and linux_start_non_stop.
12575 (initialize_low): Install SIGCHLD handler.
12576 * thread-db.c (thread_db_create_event, find_one_thread)
12577 (thread_db_get_tls_address): Use lwpid_of.
12578 * win32-low.c (win32_detach): Adjust to use resume_kind.
12579 (win32_wait): Add `options' argument.
12580 * spu-low.c (spu_resume): Adjust to use resume_kind.
12581 (spu_wait): Add `options' argument.
12582
12583 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12584
12585 Decouple target code from remote protocol.
12586
12587 * target.h (enum target_waitkind): New.
12588 (struct target_waitstatus): New.
12589 (struct target_ops) <wait>: Return an unsigned long. Take a
12590 target_waitstatus pointer instead of a char pointer.
12591 (mywait): Likewise.
12592 * target.c (mywait): Change prototype to return an unsigned long.
12593 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12594 * server.h (thread_from_wait, old_thread_from_wait): Delete
12595 declarations.
12596 (prepare_resume_reply): Change prototype to take a
12597 target_waitstatus.
12598 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12599 (last_status, last_ptid): New.
12600 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12601 pid instead of a signal.
12602 (attach_inferior): Remove "status" and "signal" parameters.
12603 Adjust.
12604 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12605 not as an address.
12606 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12607 (handle_v_requests, myresume): Remove "status" and "signal"
12608 parameters. Adjust.
12609 (handle_status): New.
12610 (main): Delete local `status'. Adjust.
12611 * remote-utils.c: Include target.h.
12612 (prepare_resume_reply): Change prototype to take a
12613 target_waitstatus. Adjust.
12614
12615 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12616 interface.
12617 * spu-low.c (spu_wait): Adjust.
12618 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12619 Delete.
12620 (win32_wait): Adjust.
12621
12622 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12623
12624 * target.h (struct thread_resume): Delete leave_stopped member.
12625 (struct target_ops): Add a `n' argument to the `resume' callback.
12626 * server.c (start_inferior): Adjust.
12627 (handle_v_cont, myresume): Adjust.
12628 * linux-low.c (check_removed_breakpoint): Adjust to resume
12629 interface change, and to removed leave_stopped field.
12630 (resume_ptr): Delete.
12631 (struct thread_resume_array): New.
12632 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12633 resume interface change.
12634 (linux_continue_one_thread, linux_queue_one_thread)
12635 (resume_status_pending_p): Check if the resume field is NULL
12636 instead of checking the leave_stopped member.
12637 (linux_resume): Adjust to the target resume interface change.
12638 * spu-low.c (spu_resume): Adjust to the target resume interface
12639 change.
12640 * win32-low.c (win32_detach, win32_resume): Ditto.
12641
12642 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12643
12644 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12645 flag.
12646 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12647 pending.
12648 (linux_continue_one_thread): Only preserve the stepping flag if
12649 there's a pending breakpoint.
12650
12651 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12652
12653 * server.c (main): After the inferior having exited, call
12654 remote_close before exiting gdbserver.
12655
12656 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12657
12658 Fix size of FPSCR in Power 7 processors.
12659 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12660 (PPC_FEATURE_HAS_DFP): New #define.
12661 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12662 size of the FPSCR.
12663
12664 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12665
12666 * server.c (handle_query) Whitespace and formatting.
12667
12668 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12669
12670 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12671 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12672 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12673 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12674 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12675 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12676 Makefile.in, configure.ac: Fix whitespace throughout.
12677 * configure: Regenerate.
12678
12679 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12680
12681 * inferiors.c (find_inferior): Make it safe for the callback
12682 function to delete the currently iterated inferior.
12683
12684 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12685
12686 * Makefile.in (linuw_low_h): Move higher.
12687 (thread-db.o): Depend on $(linux_low_h).
12688
12689 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12690
12691 Rename "process" to "lwp" throughout.
12692
12693 * linux-low.c (all_processes): Rename to...
12694 (all_lwps): ... this.
12695 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12696 (add_process): Rename to ...
12697 (add_lwp): ... this. Adjust.
12698 (linux_create_inferior): Adjust.
12699 (linux_attach_lwp): Adjust.
12700 (linux_attach): Adjust.
12701 (linux_kill_one_process): Rename to ...
12702 (linux_kill_one_lwp): ... this. Adjust.
12703 (linux_kill): Adjust.
12704 (linux_detach_one_process): Rename to ...
12705 (linux_detach_one_lwp): ... this. Adjust.
12706 (linux_detach): Adjust.
12707 (check_removed_breakpoint): Adjust.
12708 (status_pending_p): Adjust.
12709 (linux_wait_for_process): Rename to ...
12710 (linux_wait_for_lwp): ... this. Adjust.
12711 (linux_wait_for_event): Adjust.
12712 (send_sigstop): Adjust.
12713 (wait_for_sigstop): Adjust.
12714 (stop_all_processes): Rename to ...
12715 (stop_all_lwps): ... this.
12716 (linux_resume_one_process): Rename to ...
12717 (linux_resume_one_lwp): ... this. Adjust.
12718 (linux_set_resume_request, linux_continue_one_thread)
12719 (linux_queue_one_thread, resume_status_pending_p)
12720 (usr_store_inferior_registers, regsets_store_inferior_registers)
12721 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12722 Adjust.
12723 * linux-low.h (get_process): Rename to ...
12724 (get_lwp): ... this. Adjust.
12725 (get_thread_process): Rename to ...
12726 (get_thread_lwp): ... this. Adjust.
12727 (get_process_thread): Rename to ...
12728 (get_lwp_thread): ... this. Adjust.
12729 (struct process_info): Rename to ...
12730 (struct lwp_info): ... this.
12731 (all_processes): Rename to ...
12732 (all_lwps): ... this.
12733 * proc-service.c (ps_lgetregs): Adjust.
12734 * thread-db.c (thread_db_create_event, find_one_thread)
12735 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12736
12737 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12738
12739 * server.c (handle_query): Handle "qAttached".
12740
12741 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12742
12743 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12744 GPLv3, update license URL.
12745
12746 2009-03-01 Doug Evans <dje@google.com>
12747
12748 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12749 (server_h): Add gdb_signals.h.
12750 (signals.o): Update.
12751 * server.h (target_signal_from_host,target_signal_to_host_p)
12752 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12753
12754 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12755
12756 * remote-utils.c (getpkt): Also generate remote-debug
12757 information if noack_mode is set.
12758
12759 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12760
12761 * server.c (handle_query): Report qXfer:siginfo:read and
12762 qXfer:siginfo:write as supported and handle them.
12763 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12764 * linux-low.c (linux_xfer_siginfo): New.
12765 (linux_target_ops): Set it.
12766
12767 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12768
12769 * server.c (gdbserver_usage): Mention --remote-debug.
12770 (main): Accept '--remote-debug' switch.
12771
12772 2009-01-18 Doug Evans <dje@google.com>
12773
12774 * regcache.c (new_register_cache): No need to check result of xcalloc.
12775 * server.c (handle_search_memory): Back out calls to xmalloc,
12776 result is checked and error is returned to user upon failure.
12777 (handle_query): Ditto. Add more checks for result of malloc.
12778 (handle_v_cont): Check result of malloc, report error back to
12779 user upon failure.
12780 (handle_v_run): Ditto. Call freeargv.
12781 * server.h (freeargv): Declare.
12782 * utils.c (freeargv): New fn.
12783
12784 2009-01-15 Doug Evans <dje@google.com>
12785
12786 * gdbreplay.c (perror_with_name): Make arg const char *.
12787 * server.h (target_signal_to_name): Make return type const char *.
12788 * thread-db.c (thread_db_err_str): Make return type const char *.
12789 * utils.c (perror_with_name): Make arg const char *.
12790
12791 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12792
12793 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12794 when handling a EXIT_PROCESS_DEBUG_EVENT.
12795
12796 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12797
12798 * gdbreplay.c (gdbreplay_version): Update copyright year.
12799 * server.c (gdbserver_version): Likewise.
12800
12801 2009-01-05 Doug Evans <dje@google.com>
12802
12803 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12804 (handle_extended_wait): Improve comment.
12805
12806 2008-12-13 Doug Evans <dje@google.com>
12807
12808 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12809 * server.h (ATTR_MALLOC): New macro.
12810 (xmalloc,xcalloc,xstrdup): Declare.
12811 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12812 * inferiors.c: Ditto.
12813 * linux-low.c: Ditto.
12814 * mem-break.c: Ditto.
12815 * regcache.c: Ditto.
12816 * remote-utils.c: Ditto.
12817 * server.c: Ditto.
12818 * target.c: Ditto.
12819 * win32-low.c: Ditto.
12820
12821 2008-12-12 Doug Evans <dje@google.com>
12822
12823 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12824 in debugging printf.
12825
12826 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12827
12828 2008-12-09 Doug Evans <dje@google.com>
12829
12830 * linux-low.h (struct process_info): Delete member tid, unused.
12831 * thread-db.c (find_one_thread): Update.
12832 (maybe_attach_thread): Update.
12833
12834 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12835
12836 * target.h (struct target_ops): Add qxfer_osdata member.
12837 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12838 and dirent.h.
12839 (linux_qxfer_osdata): New functions.
12840 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12841 callback.
12842 * server.c (handle_query): Handle "qXfer:osdata:read:".
12843 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12844 (buffer_xml_printf): New functions.
12845 * server.h (struct buffer): New.
12846 (buffer_grow_str, buffer_grow_str0): New macros.
12847 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12848 (buffer_xml_printf): Declare.
12849
12850 2008-11-24 Doug Evans <dje@google.com>
12851
12852 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12853
12854 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12855
12856 * server.c (handle_v_run): Always use the supplied argument list.
12857
12858 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12859
12860 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12861 (xtensa_regmap_table): Add entry for scompare1.
12862
12863 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12864
12865 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12866 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12867 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12868 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12869 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12870 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12871 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12872 XML target descriptions.
12873 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12874 when inferior is running on an ISA 2.05 or later processor. Add
12875 special case to return offset for full 64-bit slot of FPSCR when
12876 in 32-bits.
12877
12878 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12879
12880 * Makefile.in (SFILES, clean): Added sparc64 files.
12881 (reg-sparc64.o, reg-sparc64.c): New.
12882 * configure.srv (sparc*-*-linux*): New configuration.
12883 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12884 syscall arguments for SPARC.
12885 (regsets_store_inferior_registers): Likewise.
12886 * linux-sparc-low.c: New file.
12887
12888 2008-10-21 Doug Evans <dje@google.com>
12889
12890 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12891 (READLINE_DIR,READLINE_DEP): Delete.
12892 (INTERNAL_CFLAGS): Update.
12893 (LINTFLAGS): Update.
12894
12895 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12896
12897 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12898 whole argv from the last run, not just argv[0].
12899
12900 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12901
12902 * regcache.c (new_register_cache): Return NULL if the register
12903 cache size isn't known yet.
12904 (free_register_cache): Avoid dereferencing a NULL regcache.
12905
12906 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12907
12908 * configure.srv: Merge MIPS and MIPS64.
12909
12910 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12911
12912 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12913
12914 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12915
12916 * Makefile.in: Add required vsx dependencies.
12917
12918 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12919 Declare init_registers_powerpc_vsx32l.
12920 Declare init_registers_powerpc_vsx64l.
12921 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12922 (ppc_arch_setup): Check for VSX in hwcap.
12923 (ppc_fill_vsxregset): New function.
12924 (ppc_store_vsxregset): New function.
12925 Add new VSX entry in regset_info target_regsets.
12926
12927 * configure.srv: Add new VSX dependencies.
12928
12929 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12930
12931 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12932 (remote_open): Set or clear transport_is_reliable.
12933 (putpkt_binary): Don't expect acks in noack mode.
12934 (getpkt): Don't send ack/nac in noack mode.
12935 * server.c (handle_general_set): Handle QStartNoAckMode.
12936 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12937 qSupported.
12938 (main): Reset noack_mode on every connection.
12939 * server.h (noack_mode): Declare.
12940
12941 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12942
12943 * Makefile.in (GDBREPLAY_OBS): New variable.
12944 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12945
12946 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12947 Daniel Jacobowitz <dan@codesourcery.com>
12948
12949 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12950 (usr_store_inferior_registers): Likewise.
12951 (regsets_store_inferior_registers): Likewise.
12952
12953 2008-07-31 Rolf Jansen <rj@surtec.com>
12954 Pedro Alves <pedro@codesourcery.com>
12955
12956 * configure.ac: Check for memmem declaration.
12957 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12958 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12959 (disable_packet_qfThreadInfo): Unconditionally compile.
12960 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12961 * configure, config.in: Regenerate.
12962
12963 2008-07-28 Doug Kwan <dougkwan@google.com>
12964
12965 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12966 (linux_write_memory): Remove declaration of errno.
12967
12968 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12969
12970 * linux-low.c (handle_extended_wait): Do not use "status"
12971 variable uninitialized.
12972
12973 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12974
12975 * server.c (handle_v_attach): Inhibit reporting dll changes.
12976
12977 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12978
12979 * remote-utils.c (prepare_resume_reply): If requested, don't
12980 output "thread:TID" in the T stop reply.
12981
12982 * server.c (disable_packet_vCont, disable_packet_Tthread)
12983 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12984 (handle_query): If requested, disable support for qC, qfThreadInfo
12985 and qsThreadInfo.
12986 (handle_v_requests): If requested, disable support for vCont.
12987 (gdbserver_show_disableable): New.
12988 (main): Handle --disable-packet and --disable-packet=LIST.
12989
12990 * server.h (disable_packet_vCont, disable_packet_Tthread)
12991 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12992
12993 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12994
12995 * server.c (gdbserver_usage): Mention --version.
12996
12997 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12998
12999 * Makefile.in (gdbreplay.o): New rule.
13000
13001 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13002
13003 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13004 message, not gdbserver.
13005
13006 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13007 Nathan Sidwell <nathan@codesourcery.com>
13008 Joseph Myers <joseph@codesourcery.com>
13009
13010 * acinclude.m4: Include ../../config/acx.m4.
13011 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13012 * configure, config.in: Regenerate.
13013 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13014 * server.c (gdbserver_version): Print PKGVERSION.
13015 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13016 (main): Adjust gdbserver_usage calls.
13017 * gdbreplay.c (version, host_name): Add declarations.
13018 (gdbreplay_version, gdbreplay_usage): New.
13019 (main): Accept --version and --help options.
13020
13021 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13022
13023 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13024 (arm_breakpoint_at): Handle Thumb.
13025 (the_low_target): Add comment.
13026
13027 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13028
13029 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13030
13031 2008-05-09 Doug Evans <dje@google.com>
13032
13033 * server.h (decode_search_memory_packet): Declare.
13034 * remote-utils.c (decode_search_memory_packet): New fn.
13035 * server.c (handle_search_memory_1): New fn.
13036 (handle_search_memory): New fn.
13037 (handle_query): Process qSearch:memory packets.
13038
13039 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13040
13041 * regcache.c (registers_length): Remove.
13042 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13043 full register packet.
13044 * regcache.h (registers_length): Remove prototype.
13045 * server.h (PBUFSIZ): Define to 16384.
13046
13047 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13048
13049 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13050 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13051 powerpc-64l.o, and powerpc-altivec64l.o.
13052 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13053 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13054 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13055 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13056 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13057 to srv_xmlfiles.
13058
13059 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13060 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13061 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13062 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13063 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13064 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13065 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13066 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13067 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13068 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13069 (clean): Update.
13070
13071 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13072 (init_registers_powerpc_32l): ... this new prototype.
13073 (init_registers_powerpc_32): Remove, replace by ...
13074 (init_registers_powerpc_altivec32l): ... this new prototype.
13075 (init_registers_powerpc_e500): Remove, replace by ...
13076 (init_registers_powerpc_e500l): ... this new prototype.
13077 (init_registers_ppc64): Remove, replace by ...
13078 (init_registers_powerpc_64l): ... this new prototype.
13079 (init_registers_powerpc_64): Remove, replace by ...
13080 (init_registers_powerpc_altivec64l): ... this new prototype.
13081 (ppc_num_regs): Set to 73.
13082 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13083 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13084 (ppc_cannot_store_register): Handle orig_r3 and trap.
13085 (ppc_arch_setup): Update init_registers_... calls.
13086 (ppc_fill_gregset): Handle orig_r3 and trap.
13087
13088 * inferiors.c (clear_inferiors): Reset current_inferior.
13089
13090 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13091
13092 * acinclude.m4: Add override.m4.
13093 * configure: Regenerate.
13094
13095 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13096
13097 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13098 initial call to init_register_ppc64.
13099
13100 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13101
13102 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13103 single powerpc*-*-linux* case.
13104 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13105
13106 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13107
13108 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13109 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13110 from reg_xmlfiles.
13111 * linux-ppc-low.c: Include <elf.h>.
13112 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13113 (ppc_hwcap): New global variable.
13114 (ppc_regmap): Remove __SPE__ #ifdef sections.
13115 (ppc_regmap_e500): New global variable.
13116 (ppc_cannot_store_register): Update __SPE__ special case.
13117 (ppc_get_hwcap): New function.
13118 (ppc_arch_setup): Use it to determine whether inferior supports
13119 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13120 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13121 Do not access registers if target does not support AltiVec.
13122 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13123 Do not access registers if target does not support SPE.
13124 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13125
13126 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13127
13128 * linux-low.c (disabled_regsets, num_regsets): New.
13129 (use_regsets_p): Delete.
13130 (linux_wait_for_process): Clear disabled_regsets.
13131 (regsets_fetch_inferior_registers): Check and set it.
13132 (regsets_store_inferior_registers): Likewise.
13133 (linux_fetch_registers, linux_store_registers): Do not use
13134 use_regsets_p.
13135 (initialize_low): Allocate disabled_regsets.
13136
13137 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13138
13139 * Makefile.in (LIBOBJS): New.
13140 (OBS): Use LIBOBJS.
13141 (memmem.o): New rule.
13142 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13143 * configure: Regenerated.
13144
13145 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13146
13147 * server.c (handle_query): Never return "unsupported" for
13148 qXfer:features:read queries.
13149
13150 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13151
13152 * server.c (get_features_xml): Fix inverted condition.
13153 (handle_query): Always support qXfer:feature:read.
13154
13155 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13156
13157 * server.c (wrapper_argv): New.
13158 (start_inferior): Handle wrapper_argv. If set, expect an extra
13159 trap.
13160 (gdbserver_usage): Document --wrapper.
13161 (main): Parse --wrapper.
13162
13163 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13164
13165 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13166 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13167 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13168 (ppc_set_pc): Likewise.
13169 (ppc_arch_setup): New function.
13170 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13171 of collect_register.
13172 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13173
13174 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13175
13176 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13177 instead of linux-ppc64-low.o.
13178 * linux-ppc64-low.c: Remove file.
13179 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13180 (linux-ppc64-low.o): Remove rule.
13181
13182 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13183 (init_registers_powerpc_64): Likewise.
13184 (ppc_regmap): Conditionally define depending on __powerpc64__.
13185 (ppc_cannot_store_register): Do not special-case "fpscr" when
13186 compiled on __powerpc64__.
13187 (ppc_collect_ptrace_register): New function.
13188 (ppc_supply_ptrace_register): New function.
13189 (ppc_breakpoint): Change type to "unsigned int".
13190 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13191 (the_low_target): Conditionally provide initializers for the
13192 arch_setup member depending on __powerpc64__. Install
13193 collect_ptrace_register and supply_ptrace_register members.
13194
13195 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13196
13197 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13198 * server.c (gdbserver_xmltarget): Define.
13199 (get_features_xml): Use it to replace "target.xml" and arch_string.
13200
13201 * configure.srv: Remove srv_xmltarget. Add XML files that were
13202 mentioned there to srv_xmlfiles instead. Remove conditional tests
13203 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13204 srv_xmlfiles and srv_regobj to include all possible choices.
13205 * configure.ac (srv_xmltarget): Remove.
13206 (srv_xmlfiles): Do not add "target.xml".
13207 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13208 checks for supplementary target information.
13209 * configure: Regenerate.
13210 * Makefile.in (XML_TARGET): Remove.
13211 (target.xml): Remove rule.
13212 (clean): Do not clean up target.xml.
13213 (.PRECIOUS): Do not mention target.xml.
13214
13215 * target.h (struct target_ops): Remove arch_string member.
13216 * linux-low.c (linux_arch_string): Remove.
13217 (linux_target_ops): Remove arch_string initializer.
13218 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13219 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13220 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13221 * spu-low.c (spu_arch_string): Remove.
13222 (spu_target_ops): Remove arch_string initializer.
13223 * win32-low.c (win32_arch_string): Remove.
13224 (win32_target_ops): Remove arch_string initializer.
13225 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13226 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13227 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13228
13229 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13230
13231 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13232 by collect_ptrace_register and supply_ptrace_register hooks.
13233 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13234 instead of checking for the_low_target.left_pad_xfer.
13235 (usr_store_inferior_registers): Use collect_ptrace_register callback
13236 instead of checking for the_low_target.left_pad_xfer.
13237
13238 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13239 (s390_supply_ptrace_register): Likewise.
13240 (s390_fill_gregset): Call s390_collect_ptrace_register.
13241 (the_low_target): Update.
13242
13243 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13244 (ppc_supply_ptrace_register): Likewise.
13245 (the_low_target): Update.
13246
13247 * linux-i386-low.c (the_low_target): Update.
13248 * linux-x86-64-low.c (the_low_target): Update.
13249
13250 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13251
13252 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13253 reg-s390.o and reg-s390x.o.
13254
13255 * linux-low.c (new_inferior): New global variable.
13256 (linux_create_inferior, linux_attach): Set it.
13257 (linux_wait_for_process): Call the_low_target.arch_setup after the
13258 target has stopped for the first time.
13259 (initialize_low): Do not call the_low_target.arch_setup.
13260
13261 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13262 (s390_set_pc): Likewise.
13263 (s390_arch_setup): New function.
13264 (the_low_target): Use s390_arch_setup as arch_setup routine.
13265
13266 * regcache.c (realloc_register_cache): New function.
13267 (set_register_cache): Call it for each existing regcache.
13268
13269 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13270
13271 * server.h (init_registers): Remove prototype.
13272
13273 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13274 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13275 instead of init_registers ().
13276 * linux-arm-low.c (init_registers_arm): Add prototype.
13277 (init_registers_arm_with_iwmmxt): Likewise.
13278 (the_low_target): Add initializer for arch_setup field.
13279 * linux-cris-low.c (init_registers_cris): Add prototype.
13280 (the_low_target): Add initializer for arch_setup field.
13281 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13282 (the_low_target): Add initializer for arch_setup field.
13283 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13284 (the_low_target): Add initializer for arch_setup field.
13285 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13286 (the_low_target): Add initializer for arch_setup field.
13287 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13288 (the_low_target): Add initializer for arch_setup field.
13289 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13290 (the_low_target): Add initializer for arch_setup field.
13291 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13292 (init_registers_mips64_linux): Likewise.
13293 (the_low_target): Add initializer for arch_setup field.
13294 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13295 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13296 (the_low_target): Add initializer for arch_setup field.
13297 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13298 (init_registers_powerpc_64): Likewise.
13299 (the_low_target): Add initializer for arch_setup field.
13300 * linux-s390-low.c (init_registers_s390): Add prototype.
13301 (init_registers_s390x): Likewise.
13302 (the_low_target): Add initializer for arch_setup field.
13303 * linux-sh-low.c (init_registers_sh): Add prototype.
13304 (the_low_target): Add initializer for arch_setup field.
13305 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13306 (the_low_target): Add initializer for arch_setup field.
13307 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13308 (the_low_target): Add initializer for arch_setup field.
13309
13310 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13311 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13312 instead of init_registers ().
13313 * win32-arm-low.c (init_registers_arm): Add prototype.
13314 (the_low_target): Add initializer for arch_setup field.
13315 * win32-i386-low.c (init_registers_i386): Add prototype.
13316 (the_low_target): Add initializer for arch_setup field.
13317
13318 * spu-low.c (init_registers_spu): Add prototype.
13319 (initialize_low): Call initialie_registers_spu () instead of
13320 initialize_registers ().
13321
13322 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13323
13324 * server.c (handle_v_requests): When handling the vRun and vAttach
13325 packets, if already debugging a process, don't kill it. Return an
13326 error instead.
13327
13328 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * server.c (handle_query): Correct length check.
13331
13332 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13333
13334 * win32-low.c (do_initial_child_stuff): Add process handle
13335 parameter. Set current_process_handle and current_process_id from the
13336 parameters. Clear globals.
13337 (win32_create_inferior): Don't set current_process_handle and
13338 current_process_id here. Instead pass them on the call to
13339 do_initial_child_stuff.
13340 (win32_attach): Likewise.
13341 (win32_clear_inferiors): New.
13342 (win32_kill): Don't close the current process handle or the
13343 current thread handle here. Instead call win32_clear_inferiors.
13344 (win32_detach): Don't open a new handle to the process. Call
13345 win32_clear_inferiors.
13346 (win32_join): Don't rely on current_process_handle; open a new
13347 handle using the process id.
13348 (win32_wait): Call win32_clear_inferiors when the inferior process
13349 has exited.
13350
13351 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13352
13353 * server.c (monitor_show_help): Add "exit".
13354
13355 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13356
13357 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13358 (clean): Add reg-xtensa.c.
13359 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13360 * configure.srv (xtensa*-*-linux*) New target.
13361 * linux-xtensa-low.c: New.
13362 * xtensa-xtregs.c: New.
13363
13364 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13365
13366 * hostio.c: Don't include errno.h.
13367 (errno_to_fileio_errno): Move to hostio-errno.
13368 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13369 error number outputting to the target->hostio_last_error callback.
13370 (hostio_packet_error): Use FILEIO_EINVAL directly.
13371 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13372 calls to hostio_error.
13373 * hostio-errno.c: New.
13374 * server.h (hostio_last_error_from_errno): Declare.
13375 * target.h (target_ops): Add hostio_last_error member.
13376 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13377 as hostio_last_error handler.
13378 * spu-low.c (spu_target_ops): Likewise.
13379 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13380 (wince_hostio_last_error): New functions.
13381 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13382 as hostio_last_error handler.
13383 (win32_target_ops) [!_WIN32_WCE]: Register
13384 hostio_last_error_from_errno as hostio_last_error handler.
13385 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13386 (hostio-errno.o): New rule.
13387 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13388 * configure.srv (srv_hostio_err_objs): New variable. Default to
13389 hostio-errno.o.
13390 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13391 * configure: Regenerate.
13392
13393 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13394
13395 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13396 (linux_kill, linux_detach): Clean up the process list.
13397 * remote-utils.c (remote_open): Improve port number parsing.
13398 (putpkt_binary, input_interrupt): Only send interrupts if the target
13399 is running.
13400 * server.c (extended_protocol): Make static.
13401 (attached): Define earlier.
13402 (exit_requested, response_needed, program_argv): New variables.
13403 (target_running): New.
13404 (start_inferior): Clear attached here.
13405 (attach_inferior): Set attached here.
13406 (require_running): Define.
13407 (handle_query): Use require_running and target_running. Implement
13408 "monitor exit".
13409 (handle_v_attach, handle_v_run): New.
13410 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13411 (gdbserver_usage): Update.
13412 (main): Redo argument parsing. Handle --debug and --multi. Handle
13413 --attach along with other options or after the port. Save
13414 program_argv. Support no initial program. Resynchronize
13415 communication with GDB after an error. Handle "monitor exit".
13416 Use require_running and target_running. Always allow the extended
13417 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13418 restart in extended mode.
13419 * README: Refer to the GDB manual. Update --attach usage.
13420
13421 2007-12-20 Andreas Schwab <schwab@suse.de>
13422
13423 * linux-low.c (STACK_SIZE): Define.
13424 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13425 (linux_test_for_tracefork): Likewise.
13426
13427 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13428
13429 * linux-low.c (linux_wait_for_event): Update messages. Do not
13430 reinsert auto-delete breakpoints.
13431 * mem-break.c (struct breakpoint): Change return type of handler to
13432 int.
13433 (set_breakpoint_at): Update handler type.
13434 (reinsert_breakpoint_handler): Return 1 instead of calling
13435 delete_breakpoint.
13436 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13437 setting a new one.
13438 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13439 * mem-break.h (set_breakpoint_at): Update handler type.
13440 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13441 * win32-low.c (auto_delete_breakpoint): New.
13442 (get_child_debug_event): Use it.
13443
13444 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13445
13446 * configure.ac: Check for pread and pwrite.
13447 * hostio.c (handle_pread): Fall back to lseek and read.
13448 (handle_pwrite): Fall back to lseek and write.
13449 * config.in, configure: Regenerated.
13450
13451 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13452
13453 * server.c (myresume): Add own_buf argument.
13454 (main): Update calls.
13455
13456 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13459 * remote-utils.c (remote_open): Do not call disable_async_io.
13460 (block_async_io): Delete.
13461 (unblock_async_io): Make static.
13462 (initialize_async_io): New.
13463 * server.c (handle_v_cont): Handle async I/O here.
13464 (myresume): Likewise. Move other common resume tasks here...
13465 (main): ... from here. Call initialize_async_io. Disable async
13466 I/O before the main loop.
13467 * server.h (initialize_async_io): Declare.
13468 (block_async_io, unblock_async_io): Delete prototypes.
13469 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13470
13471 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13472
13473 * remote-utils.c (readchar): Allow binary data in received messages.
13474
13475 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13476
13477 * win32-low.c (attaching): New global.
13478 (win32_create_inferior): Clear the `attaching' global.
13479 (win32_attach): Set the `attaching' global.
13480 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13481 attaching. Only set a breakpoint at the entry point if not
13482 attaching.
13483
13484 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13485
13486 * server.c (main): Don't report dll events on the initial
13487 connection on attaches.
13488
13489 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13490
13491 * server.c (main): Relax numerical bases supported for the pid of
13492 the --attach command line argument.
13493
13494 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13495
13496 * win32-low.c (win32_attach): Call OpenProcess before
13497 DebugActiveProcess, not after. Add last error output to error
13498 call.
13499
13500 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13501
13502 * win32-low.c (win32_get_thread_context)
13503 (win32_set_thread_context): New functions.
13504 (thread_rec): Use win32_get_thread_context.
13505 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13506 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13507 field.
13508
13509 2007-12-03 Leo Zayas
13510 Pedro Alves <pedro_alves@portugalmail.pt>
13511
13512 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13513 global variables.
13514 (child_add_thread): Minor cleanup.
13515 (child_continue): Resume artificially suspended threads before
13516 calling ContinueDebugEvent.
13517 (suspend_one_thread): New.
13518 (fake_breakpoint_event): New.
13519 (get_child_debug_event): Change return type to int. Check here if
13520 gdb sent an interrupt request. If a soft interrupt was requested,
13521 fake a breakpoint event. Return 0 if there is no event to handle,
13522 and 1 otherwise.
13523 (win32_wait): Don't check here if gdb sent an interrupt request.
13524 Ensure there is a valid event to handle.
13525 (win32_request_interrupt): Add soft interruption method as last
13526 resort.
13527
13528 2007-12-03 Leo Zayas
13529 Pedro Alves <pedro_alves@portugalmail.pt>
13530
13531 * win32-low.h (win32_thread_info): Add descriptions to the
13532 structure members. Replace `suspend_count' counter by a
13533 `suspended' flag.
13534 * win32-low.c (thread_rec): Update condition of when to get the
13535 context from the inferior. Rely on ContextFlags being set if it
13536 has already been retrieved. Only suspend the inferior thread if
13537 we haven't already. Warn if that fails.
13538 (continue_one_thread): s/suspend_count/suspended/. Only call
13539 ResumeThread once. Warn if that fails.
13540
13541 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13542
13543 * win32-low.c (win32_wait): Don't read from the inferior when it
13544 has already exited.
13545
13546 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13547
13548 * Makefile.in (win32_low_h): New variable.
13549 (win32-low.o): Add dependency on $(win32_low_h).
13550 (win32-arm-low.o, win32-i386-low.o): New rules.
13551
13552 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13553
13554 * hostio.c: Correct copyright year.
13555
13556 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * Makefile.in (OBS): Add hostio.o.
13559 (hostio.o): New rule.
13560 * server.h (handle_vFile): Declare.
13561 * hostio.c: New file.
13562 * server.c (handle_v_requests): Take packet_len and new_packet_len
13563 for binary packets. Call handle_vFile.
13564 (main): Update call to handle_v_requests.
13565
13566 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13567
13568 * linux-low.c: Include <sched.h>.
13569
13570 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13571
13572 * linux-low.c (linux_tracefork_grandchild): New.
13573 (linux_tracefork_child): Use clone.
13574 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13575
13576 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13577
13578 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13579
13580 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13581
13582 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13583
13584 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * inferiors.c (change_inferior_id): Delete.
13587 (add_pid_to_list, pull_pid_from_list): New.
13588 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13589 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13590 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13591 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13592 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13593 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13594 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13595 (using_threads): Always set to 1.
13596 (handle_extended_wait): New.
13597 (add_process): Do not set TID.
13598 (linux_create_inferior): Set must_set_ptrace_flags.
13599 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13600 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13601 (linux_thread_alive): Rename TID argument to LWPID.
13602 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13603 (linux_wait_for_event): Do not use TID or check using_threads. Update
13604 call to dead_thread_notify. Call handle_extended_wait.
13605 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13606 (send_sigstop): Delete sigstop_sent.
13607 (wait_for_sigstop): Avoid TID.
13608 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13609 (linux_test_for_tracefork): New.
13610 (linux_lookup_signals): Use thread_db_active and
13611 linux_supports_tracefork_flag.
13612 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13613 * linux-low.h (get_process_thread): Avoid TID.
13614 (struct process_ifo): Move thread_known and tid to the end. Remove
13615 sigstop_sent.
13616 (linux_attach_lwp, thread_db_init): Update prototypes.
13617 * server.h (change_inferior_id): Delete prototype.
13618 (add_pid_to_list, pull_pid_from_list): New prototypes.
13619 * thread-db.c (thread_db_use_events): New.
13620 (find_first_thread): Rename to...
13621 (find_one_thread): ...this. Update callers and messages. Do not
13622 call fatal. Check thread_db_use_events. Do not call
13623 change_inferior_id or new_thread_notify.
13624 (maybe_attach_thread): Update. Do not call new_thread_notify.
13625 (thread_db_init): Set thread_db_use_events. Check use_events.
13626 * utils.c (fatal, warning): Correct message prefix.
13627
13628 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13629
13630 * Makefile.in (clean): Remove new files.
13631 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13632 (powerpc-64.o, powerpc-64.c): New rules.
13633 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13634 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13635 with SPE.
13636 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13637 SPE targets.
13638 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13639 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13640 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13641 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13642 (target_regsets): Add AltiVec and SPE register sets.
13643 * configure.ac: Check for AltiVec and SPE.
13644 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13645 (ppc_fill_vrregset, ppc_store_vrregset): New.
13646 (target_regsets): Add AltiVec register set.
13647 * configure: Regenerated.
13648
13649 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13650
13651 * linux-low.c (O_LARGEFILE): Define.
13652 (linux_read_memory): Use /proc/PID/mem.
13653 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13654 * configure, config.in: Regenerated.
13655
13656 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13657
13658 * linux-low.c (linux_wait_for_event): Do not pass signals while
13659 single-stepping.
13660
13661 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13662
13663 * win32-low.c (create_process): New.
13664 (win32_create_inferior): Use create_process instead of
13665 CreateProcess. If create_process failed retry appending an ".exe"
13666 suffix. Store the GetLastError result immediatelly after
13667 create_process calls and use it on the call to error.
13668
13669 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13670
13671 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13672
13673 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13674
13675 * configure.ac: Switch license to GPLv3.
13676
13677 2007-08-01 Michael Snyder <msnyder@access-company.com>
13678
13679 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13680
13681 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13682
13683 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13684 typedef.
13685 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13686 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13687 CloseToolhelp32Snapshot.
13688 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13689 CloseToolhelp32Snapshot.
13690
13691 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13692
13693 * server.c (main): Check for inferior exit before main loop.
13694
13695 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13696
13697 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13698 instead of on tmp_desc.
13699
13700 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13701 Daniel Jacobowitz <dan@codesourcery.com>
13702
13703 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13704 (add_thread): Minor cleanups.
13705 (clear_inferiors): Move lower in the file. Clear the DLL
13706 list.
13707 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13708 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13709 (xml_escape_text): New.
13710 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13711 for qSupported.
13712 (handle_v_cont): Report errors.
13713 (gdbserver_version): Update.
13714 (main): Correct size of own_buf. Do not report initial DLL events.
13715 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13716 (unloaded_dll, xml_escape_text): New.
13717 * win32-low.c (enum target_waitkind): Update comments.
13718 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13719 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13720 (win32_EnumProcessModules, win32_GetModuleInformation)
13721 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13722 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13723 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13724 (win32_Module32First, win32_Module32Next, load_toolhelp)
13725 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13726 (get_child_debug_event): Handle DLL events.
13727 (win32_wait): Likewise.
13728
13729 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13732 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13733
13734 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13735
13736 * win32-low.c (handle_output_debug_string): Ignore event if not
13737 waiting.
13738
13739 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13740
13741 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13742
13743 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13744
13745 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13746
13747 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * inferiors.c (change_inferior_id): Add comment.
13750 * linux-low.c (check_removed_breakpoint): Add an early
13751 prototype. Improve debug output.
13752 (linux_attach): Doc update.
13753 (linux_detach_one_process, linux_detach): Clean up before releasing
13754 each process.
13755 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13756 * linux-low.h (struct process_info): Doc improvement.
13757 * mem-break.c (delete_all_breakpoints): New.
13758 * mem-break.h (delete_all_breakpoints): New prototype.
13759 * thread-db.c (find_first_thread): New.
13760 (thread_db_create_event): Call it instead of
13761 thread_db_find_new_threads. Clean up unused variables.
13762 (maybe_attach_thread): Remove first thread handling.
13763 (thread_db_find_new_threads): Use find_first_thread.
13764 (thread_db_get_tls_address): Likewise.
13765
13766 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13767
13768 * thread-db.c (thread_db_find_new_threads): Add prototype.
13769 (thread_db_create_event): Check for the main thread before adding
13770 a new thread.
13771 (maybe_attach_thread): Only enable event reporting if TID == 0.
13772 (thread_db_get_tls_address): Check for new threads.
13773
13774 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * linux-low.c (linux_create_inferior): Try execv before execvp.
13777 * spu-low.c (spu_create_inferior): Likewise.
13778
13779 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13780
13781 * linux-low.c (linux_create_inferior): Change execv to execvp.
13782 * spu-low.c (spu_create_inferior): Likewies.
13783
13784 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13785
13786 * Makefile.in (clean): Clean new files instead of deleted ones.
13787 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13788 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13789 rules.
13790 * configure.srv: Specify XML files and new regformats for MIPS and
13791 MIPS64 GNU/Linux.
13792 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13793 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13794 an entry for the restart register.
13795 (mips_cannot_fetch_register, mips_cannot_store_register)
13796 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13797 register names to match the XML descriptions.
13798 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13799 restart register instead of $0.
13800
13801 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13802 Markus Deuling <deuling@de.ibm.com>
13803
13804 * remote-utils.c (decode_xfer_write): New function.
13805 * server.h (decode_xfer_write): Add prototype.
13806 * server.c (handle_query): Add PACKET_LEN argument. Support
13807 qXfer:spu:read and qXfer:spu:write packets.
13808 (main): Pass packet_len to handle_query.
13809 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13810 * target.h (target_ops): Add qxfer_spu.
13811
13812 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13813
13814 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13815 accessing non-seekable spufs files.
13816
13817 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13818
13819 * server.c (handle_query): Add reply for qC packet.
13820
13821 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13822 Leo Zayas <lerele@champenstudios@com>
13823
13824 * server.h (check_remote_input_interrupt_request): New function.
13825 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13826 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13827 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13828 (check_remote_input_interrupt_request): New function.
13829 * server.h (check_remote_input_interrupt_request): Declare.
13830 * win32-low.c (winapi_DebugBreakProcess,
13831 winapi_GenerateConsoleCtrlEvent): New typedefs.
13832 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13833 to 250 ms.
13834 (win32_wait): Check for remote interrupt request
13835 with check_remote_input_interrupt_request.
13836 (win32_request_interrupt): New function.
13837 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13838
13839 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13840
13841 * win32-low.c (debug_registers_changed,
13842 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13843 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13844 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13845 (thread_rec): Get context using the low target.
13846 (child_add_thread): Call thread_added on the low target,
13847 which does the same thing.
13848 (regptr): Delete.
13849 (do_initial_child_stuff): Remove debug registers references.
13850 Set context using the low target. Resume threads after
13851 setting the contexts.
13852 (child_continue): Remove dead variable. Remove debug
13853 registers references.
13854 (child_fetch_inferior_registers): Go through the low target.
13855 (do_child_store_inferior_registers): Remove.
13856 (child_store_inferior_registers): Go through the low target.
13857 (win32_resume): Remove debug registers references.
13858 Set context using the low target.
13859 (handle_exception): Change return type to void. Don't record
13860 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13861 first chance exception.
13862 (get_child_debug_event): Change return type to void. Remove
13863 goto loop. Always return after waiting for debug event.
13864 (win32_wait): Convert to switch statement. Handle spurious
13865 events.
13866
13867 * win32-i386-low.c (debug_registers_changed,
13868 debug_registers_used): New.
13869 (initial_stuff): Rename to ...
13870 (i386_initial_stuff): ... this. Clear debug registers
13871 state variables.
13872 (store_debug_registers): Delete.
13873 (i386_get_thread_context): New.
13874 (load_debug_registers): Delete.
13875 (i386_set_thread_context): New.
13876 (i386_thread_added): New.
13877 (single_step): Rename to ...
13878 (i386_single_step): ... this.
13879 (do_fetch_inferior_registers): Rename to ...
13880 (i386_fetch_inferior_register): ... this.
13881 (i386_store_inferior_register): New.
13882 (the_low_target): Adapt to new interface.
13883
13884 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13885 (arm_get_thread_context): New.
13886 (arm_set_thread_context): New.
13887 (regptr): New.
13888 (do_fetch_inferior_registers): Rename to ...
13889 (arm_fetch_inferior_register): ... this.
13890 (arm_store_inferior_register): New.
13891 (arm_wince_breakpoint): Reimplement as unsigned long.
13892 (arm_wince_breakpoint_len): Define.
13893 (the_low_target): Adapt to new interface.
13894
13895 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13896 load_debug_registers. Add get_thread_context, set_thread_context,
13897 thread_added and store_inferior_register. Rename
13898 fetch_inferior_registers to fetch_inferior_register.
13899 (regptr): Remove declaration.
13900
13901 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * linux-low.c (linux_detach): Change return type to int. Return 0.
13904 * spu-low.c (spu_detach): Likewise.
13905
13906 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13907
13908 * target.h (target_ops): Change return type of detach to int.
13909 Add join.
13910 (join_inferior): New.
13911 * server.c (main): Don't skip detach support on mingw32.
13912 If the inferior doesn't support detaching return error.
13913 Call join_inferior instead of using waitpid.
13914 * linux-low.c (linux_join): New.
13915 (linux_target_op): Add linux_join.
13916 * spu-low.c (spu_join): New.
13917 (spu_target_ops): Add spu_join.
13918 * win32-low.c (win32_detach): Adapt to new interface.
13919 Reopen current_process_handle before detaching. Issue a child
13920 resume before detaching.
13921 (win32_join): New.
13922 (win32_target_op): Add win32_join.
13923
13924 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13925
13926 * win32-low.c (win32-attach): Fix return value.
13927 * target.h (target_ops): Describe ATTACH return values.
13928
13929 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13930
13931 * win32-low.c (GETPROCADDRESS): Define.
13932 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13933 (winapi_DebugSetProcessKillOnExit): Likewise.
13934 (win32_create_inferior): Force usage of ansi CreateProcessA.
13935 (win32_attach): Use GETPROCADDRESS.
13936 (win32_detach): Likewise.
13937
13938 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13939
13940 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13941
13942 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13943
13944 * win32-low.c: Commit leftover changes from 2007-03-29.
13945
13946 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13949 fields short instead of int. Add explicit padding.
13950 (i387_cache_to_fsave): Remove unnecessary casts.
13951 (i387_fsave_to_cache): Doc fix.
13952 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13953
13954 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13955
13956 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13957 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13958
13959 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13960
13961 * configure.srv (arm*-*-mingw32ce*): Move near the other
13962 arm targets.
13963
13964 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13965
13966 * configure.ac: Add errno checking.
13967 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13968 sys/file.h and malloc.h.
13969 (AC_CHECK_DECLS): Add perror.
13970 (srv_mingwce): Handle.
13971 * configure.srv (i[34567]86-*-cygwin*): Add
13972 win32-i386-low.o to srv_tgtobj.
13973 (i[34567]86-*-mingw*): Likewise.
13974 (arm*-*-mingw32ce*): Add case.
13975 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13976 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13977 [__MINGW32CE__] (strerror): New function.
13978 [__MINGW32CE__] (errno): Define to GetLastError.
13979 [__MINGW32CE__] (COUNTOF): New macro.
13980 (remote_open): Remove extra close call.
13981 * mem-break.c (delete_breakpoint_at): New function.
13982 * mem-break.h (delete_breakpoint_at): Declare.
13983 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13984 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13985 [USE_WIN32API] (read, write): Add char* casts.
13986 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13987 * server.h: Include wincecompat.h on Windows CE.
13988 [HAVE_ERRNO_H]: Check.
13989 (perror): Declare if not declared.
13990 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13991 (perror_with_name): Remove errno declaration.
13992 * wincecompat.h: New.
13993 * wincecompat.c: New.
13994 * win32-low.h: New.
13995 * win32-arm-low.c: New.
13996 * win32-i386-low.c: New.
13997 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13998 (OUTMSG2): Make it safe.
13999 (_T): New macro.
14000 (COUNTOF): New macro.
14001 (NUM_REGS): Get it from the low target.
14002 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14003 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14004 (thread_rec): Let low target handle debug registers.
14005 (child_add_thread): Likewise.
14006 (child_init_thread_list): Likewise.
14007 (continue_one_thread): Likewise.
14008 (regptr): New.
14009 (do_child_fetch_inferior_registers): Move to ...
14010 * win32-i386-low.c: ... here, and rename to ...
14011 (do_fetch_inferior_registers): ... this.
14012 * win32-low.c (child_fetch_inferior_registers):
14013 Go through the low target.
14014 (do_child_store_inferior_registers): Use regptr.
14015 (strwinerror): New function.
14016 (win32_create_inferior): Handle Windows CE.
14017 Use strwinerror instead of strerror on Windows error
14018 codes. Add program to the error output.
14019 Don't close the main thread handle on Windows CE.
14020 (win32_attach): Use coredll.dll on Windows CE.
14021 (win32_kill): Close current process and current
14022 thread handles.
14023 (win32_detach): Use coredll.dll on Windows CE.
14024 (win32_resume): Let low target handle debug registers, and
14025 step request.
14026 (handle_exception): Add/Remove initial breakpoint. Avoid
14027 non-existant WSTOPSIG on Windows CE.
14028 (win32_read_inferior_memory): Cast to remove warning.
14029 (win32_arch_string): Go through the low target.
14030 (initialize_low): Call set_breakpoint_data with the low
14031 target's breakpoint.
14032 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14033 FOP_REGNUM, mappings): Move to ...
14034 * win32-i386-low.c: ... here.
14035 * win32-low.c (win32_thread_info): Move to ...
14036 * win32-low.h: ... here.
14037 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14038 win32-arm-low.c and wincecompat.c.
14039 (all:): Add $EXEEXT.
14040 (install-only:): Likewise.
14041 (gdbserver:): Likewise.
14042 (gdbreplay:): Likewise.
14043 * config.in: Regenerate.
14044 * configure: Regenerate.
14045
14046 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14047
14048 * win32-low.c: Rename typedef thread_info to
14049 win32_thread_info throughout.
14050
14051 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14052
14053 * win32-i386-low.c: Rename to ...
14054 * win32-low.c: ... this.
14055 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14056 * Makefile.in: Likewise.
14057
14058 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14059
14060 * remote-utils.c (monitor_output): Constify msg parameter.
14061 * server.h (monitor_output): Likewise.
14062 * win32-i386-low.c (handle_output_debug_string): New.
14063 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14064 handle_output_debug_string.
14065 (get_child_debug_event): Likewise.
14066
14067 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14068
14069 * server.c (main): Correct strtoul check.
14070
14071 2007-03-27 Jon Ringle <jon@ringle.org>
14072
14073 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14074
14075 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14076
14077 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14078
14079 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14080
14081 * terminal.h: Check HAVE_SGTTY_H.
14082
14083 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14084
14085 * remote-utils.c (remote_open): Print out the assigned port number.
14086
14087 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14088
14089 * remote-utils.c (monitor_output): New function.
14090 * server.c (debug_threads): Define here.
14091 (monitor_show_help): New function.
14092 (handle_query): Handle qRcmd.
14093 (main): Do not handle 'd' packet.
14094 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14095 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14096 of debug_threads.
14097
14098 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14099
14100 * Makefile.in (EXEEXT): New.
14101 (clean): Use $(EXEEXT).
14102
14103 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14104
14105 * target.h (target_ops): Rename send_signal to request_interrupt,
14106 and remove enum target_signal parameter.
14107 * linux-low.c (linux_request_interrupt): Rename from
14108 linux_send_signal, and always send SIGINT.
14109 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14110 and always send SIGINT.
14111 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14112 of send_signal.
14113 (input_interrupt): Likewise.
14114
14115 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14116
14117 * server.c (get_features_xml): Check if target implemented
14118 arch_string.
14119 * win32-i386-low.c (win32_arch_string): New.
14120 (win32_target_ops): Add win32_arch_string as arch_string member.
14121
14122 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14123
14124 * spu-low.c (spu_arch_string): New.
14125 (spu_target_ops): Add spu_arch_string.
14126
14127 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14130 * configure.ac: Do not check for terminal.h.
14131 * configure, config.in: Regenerated.
14132
14133 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * Makefile.in (OBS): Add $(XML_BUILTIN).
14136 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14137 (clean): Update.
14138 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14139 (arm-with-iwmmxt.c): New.
14140 * config.in, configure: Regenerate.
14141 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14142 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14143 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14144 (arm*-*-linux*): Add iWMMXt and regset support.
14145 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14146 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14147 (arm_store_wmmxregset, target_regsets): New.
14148 * server.c (get_features_xml): Take annex argument. Check builtin
14149 XML documents.
14150 (handle_query): Handle multiple annexes.
14151
14152 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * remote-utils.c [USE_WIN32API] (read, write): Define.
14155 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14156 write.
14157
14158 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14159
14160 * linux-i386-low.c (the_low_target): Set arch_string.
14161 * linux-x86-64-low.c (the_low_target): Likewise.
14162 * linux-low.c (linux_arch_string): New.
14163 (linux_target_ops): Add it.
14164 * linux-low.h (struct linux_target_ops): Add arch_string.
14165 * server.c (write_qxfer_response): Use const void * for DATA.
14166 (get_features_xml): New.
14167 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14168 * target.h (struct target_ops): Add arch_string method.
14169
14170 2007-01-03 Denis Pilat <denis.pilat@st.com>
14171 Daniel Jacobowitz <dan@codesourcery.com>
14172
14173 * linux-low.c (linux_kill): Handle being called with no threads.
14174 * win32-i386-low.c (win32_kill): Likewise.
14175 (get_child_debug_event): Clear current_process_handle.
14176
14177 2006-12-30 Denis PILAT <denis.pilat@st.com>
14178 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * remote-utils.c (remote_open): Check the type of specified
14181 serial port devices before opening them.
14182 * server.c (main): Kill the inferior if an error occurs during
14183 the first remote_open.
14184
14185 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14186
14187 * README: Update supported targets.
14188
14189 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14190
14191 * Makefile.in (clean): Remove reg-mips64.c.
14192 (reg-mips64.c, reg-mips64.o): New rules.
14193 * configure.srv: Handle mips64. Include regset support for mips.
14194 * linux-mips-low.c (union mips_register): New.
14195 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14196 (mips_breakpoint, mips_breakpoint_at): Use int.
14197 (mips_collect_register, mips_supply_register)
14198 (mips_collect_register_32bit, mips_supply_register_32bit)
14199 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14200 (mips_store_fpregset, target_regsets): New.
14201 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14202
14203 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14204
14205 * configure.srv: Add target "spu*-*-*".
14206 * Makefile.in (clean): Remove reg-spu.c.
14207 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14208 * spu-low.c: New file.
14209
14210 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14211
14212 * configure.ac: Correct td_thr_tls_get_addr test.
14213 * configure: Regenerated.
14214
14215 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14216
14217 * linux-low.c (linux_wait_for_event): Reformat. Use the
14218 pass_signals array.
14219 * remote-utils.c (decode_address_to_semicolon): New.
14220 * server.c (pass_signals, handle_general_set): New.
14221 (handle_query): Mention QPassSignals for qSupported.
14222 (main): Call handle_general_set.
14223 * server.h (pass_signals, decode_address_to_semicolon): New.
14224
14225 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14226
14227 * server.c (handle_query): Correct error handling for read_auxv.
14228
14229 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14230
14231 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14232 and srv_linux_thread_db to yes.
14233 * linux-s390-low.c (s390_fill_gregset): New function.
14234 (target_regsets): Define data structure.
14235
14236 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14237
14238 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14239 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14240 * config.in, configure: Regenerated.
14241 * inferiors.c (gdb_id_to_thread): New function.
14242 (gdb_id_to_thread_id): Use it.
14243 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14244 * linux-low.h (struct process_info): Add th member.
14245 (thread_db_get_tls_address): New prototype.
14246 * remote-utils.c (decode_address): Make non-static.
14247 * server.c (handle_query): Handle qGetTLSAddr.
14248 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14249 * target.h (struct target_ops): Add get_tls_address.
14250 * thread-db.c (maybe_attach_thread): Save the thread handle.
14251 (thread_db_get_tls_address): New.
14252
14253 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14254
14255 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14256 (linux_resume_one_process): Take a siginfo_t *. Update all
14257 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14258 (struct pending_signals): Add a siginfo_t.
14259 (linux_wait_for_process): Always set last_status.
14260 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14261 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14262 * linux-low.h (struct process_info): Add last_status.
14263
14264 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14265
14266 * remote-utils.c (try_rle): New function.
14267 (putpkt_binary): Use it.
14268
14269 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14270
14271 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14272 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14273 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14274 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14275 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14276 point registers.
14277
14278 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14279
14280 * server.c (terminal_fd): New variable.
14281 (old_foreground_pgrp): Likewise.
14282 (restore_old_foreground_pgrp): New function.
14283 (start_inferior): Record the terminal file descriptor in terminal_fd
14284 and its original foreground group in old_foreground_pgrp. Register
14285 restore_old_foreground_pgrp with atexit().
14286
14287 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14288
14289 * server.c (handle_query): Correct qPart to qXfer.
14290
14291 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14292
14293 * configure.ac: Check for more headers which are missing on
14294 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14295 * configure.srv: Add Cygwin and mingw32.
14296 * remote-utils.c: Don't include headers unconditionally which
14297 are missing on mingw32. Include <winsock.h> for mingw32.
14298 (remote_open): Adjust for mingw32 support. Flush
14299 standard error after writing to it.
14300 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14301 (unblock_async_io, enable_async_io, disable_async_io)
14302 (readchar, getpkt): Update for Winsock support.
14303 (prepare_resume_reply): Expect a protocol signal number.
14304 * server.c: Disable <sys/wait.h> on mingw32.
14305 (start_inferior): Adjust for mingw32 support. Flush
14306 standard error after writing to it.
14307 (attach_inferior): Likewise. Use protocol signal
14308 numbers.
14309 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14310 and names.
14311 * win32-i386-low.c: New file.
14312 * Makefile.in (XM_CLIBS): Set.
14313 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14314 (win32-i386-low.o): New dependency rule.
14315 * linux-low.c (linux_wait): Use target signal numbers.
14316 * target.h (struct target_ops): Doc fix.
14317 * server.h (target_signal_to_name): New prototype.
14318 * gdbreplay.c: Don't include headers unconditionally which
14319 are missing on mingw32. Include <winsock.h> for mingw32.
14320 (remote_close, remote_open): Adjust for Winsock support.
14321 * configure, config.in: Regenerated.
14322
14323 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14324
14325 * server.c (decode_xfer_read, write_qxfer_response): New.
14326 (handle_query): Take a packet length argument. Handle
14327 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14328 the qSupported response.
14329 (main): Update call to handle_query.
14330
14331 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14334 (putpkt_binary): Renamed from putpkt and adjusted for binary
14335 data.
14336 (putpkt): New wrapper for putpkt_binary.
14337 (readchar): Don't mask off the high bit.
14338 (decode_X_packet): New function.
14339 * server.c (main): Call putpkt_binary if a handler sets the packet
14340 length. Save the length of the incoming packet. Handle 'X'.
14341 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14342
14343 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * server.c (handle_query): Handle qSupported.
14346
14347 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * remote-utils.c (all_symbols_looked_up): New variable.
14350 (look_up_one_symbol): Check it.
14351 * server.h (look_up_one_symbol): New declaration.
14352 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14353
14354 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14355
14356 * Makefile.in (linux-arm-low.o): Update dependencies.
14357 * linux-arm-low.c: Include "gdb_proc_service.h".
14358 (PTRACE_GET_THREAD_AREA): Define.
14359 (ps_get_thread_area): New function.
14360
14361 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14362
14363 * configure.srv (m68k*-*-uclinux*): New target.
14364 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14365 (linux_resume_one_process): Remove extraneous cast.
14366 (linux_read_offsets): New.
14367 (linux_target_op): Add linux_read_offsets on mmuless systems.
14368 * server.c (handle_query): Add qOffsets logic.
14369 * target.h (struct target_ops): Add read_offsets.
14370
14371 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14374 (PTRACE_GET_THREAD_AREA): Define.
14375 (ps_get_thread_area): New function.
14376 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14377 (linux-x86-64-low.o): Update.
14378
14379 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14380
14381 * configure.ac: Remove checks for prfpregset_t.
14382 * gdb_proc_service.h: New file.
14383 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14384 new "gdb_proc_service.h".
14385 * proc-service.c: Likewise.
14386 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14387 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14388 * Makefile.in (gdb_proc_service_h): Updated.
14389 * configure, config.in: Regenerated.
14390
14391 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * remote-utils.c (prepare_resume_reply): Move declaration
14394 of gdb_id_from_wait to the top of the block.
14395
14396 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14397
14398 * linux-low.c (regsets_store_inferior_registers): Read the regset
14399 from the target before filling it.
14400
14401 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * server.c (attach_inferior): Return SIGTRAP for a successful
14404 attach.
14405
14406 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14407
14408 * Makefile.in (OBS): Add version.o.
14409 (STAGESTUFF): Delete.
14410 (version.o): Add dependencies.
14411 (version.c): Replace rule.
14412 (clean): Remove version.c.
14413 * server.c (gdbserver_version): New.
14414 (gdbserver_usage): Use printf.
14415 (main): Handle --version and --help.
14416 * server.h (version, host_name): Add declarations.
14417
14418 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14419
14420 * linux-arm-low.c:
14421 * linux-arm-low.c:
14422 * inferiors.c:
14423 * i387-fp.h:
14424 * i387-fp.c:
14425 * gdbreplay.c:
14426 * regcache.c:
14427 * proc-service.c:
14428 * mem-break.h:
14429 * mem-break.c:
14430 * linux-x86-64-low.c:
14431 * linux-sh-low.c:
14432 * linux-s390-low.c:
14433 * linux-ppc64-low.c:
14434 * linux-ppc-low.c:
14435 * linux-mips-low.c:
14436 * linux-m68k-low.c:
14437 * linux-m32r-low.c:
14438 * linux-low.h:
14439 * linux-low.c:
14440 * linux-ia64-low.c:
14441 * linux-i386-low.c:
14442 * linux-crisv32-low.c:
14443 * thread-db.c:
14444 * terminal.h:
14445 * target.h:
14446 * target.c:
14447 * server.h:
14448 * server.c:
14449 * remote-utils.c:
14450 * regcache.h:
14451 * utils.c:
14452 * Makefile.in:
14453 * configure.ac:
14454 * gdbserver.1: Add (C) after Copyright. Update the FSF
14455 address.
14456
14457 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14458
14459 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14460 (arm_breakpoint_at): Recognize both breakpoints.
14461 (the_low_target): Use the correct breakpoint instruction.
14462
14463 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14464
14465 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14466 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14467 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14468 (the_low_target): Update.
14469
14470 2005-10-25 Andreas Schwab <schwab@suse.de>
14471
14472 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14473
14474 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14475 (ia64_num_regs): Reduce to 462.
14476
14477 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14478
14479 * acinclude.m4: Correct quoting.
14480 * aclocal.m4: Regenerated.
14481
14482 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14483 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14484 (thread_db_init): Call thread_db_err_str.
14485 * configure.ac: Check for TD_VERSION.
14486 * config.in, configure: Regenerated.
14487
14488 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14489
14490 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14491
14492 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14493
14494 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14495 is not available. Define HAVE_PTRACE_GETREGS if it is.
14496 * config.in, configure: Regenerated.
14497 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14498 * linux-i386-low.c, linux-m68k-low.c: Update to use
14499 HAVE_PTRACE_GETREGS.
14500 * linux-low.c (regsets_fetch_inferior_registers)
14501 (regsets_store_inferior_registers): Only return 0 if we processed
14502 GENERAL_REGS.
14503 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14504 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14505
14506 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14507
14508 * inferiors.c (struct thread_info): Add gdb_id.
14509 (add_thread): Add gdb_id argument.
14510 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14511 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14512 calls to add_thread.
14513 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14514 * server.c (handle_query): Use thread_to_gdb_id.
14515 (handle_v_cont, main): Use gdb_id_to_thread_id.
14516 * server.h (add_thread): Update prototype.
14517 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14518 prototypes.
14519
14520 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14521
14522 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14523 left-padded registers.
14524 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14525 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14526
14527 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14528
14529 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14530 * configure: Regenerate.
14531 * config.in: Regenerate.
14532 * server.h (NEED_DECLARATION_STRERROR):
14533 Replace with !HAVE_DECL_STRERROR.
14534
14535 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14536
14537 * linux-low.c (linux_wait, linux_send_signal): Don't test
14538 an unsigned long variable for > 0 if it could be MAX_ULONG.
14539 * server.c (myresume): Likewise.
14540 * target.c (set_desired_inferior): Likewise.
14541
14542 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14543
14544 * configure.ac: Simplify and improve check for socklen_t.
14545 * configure, config.in: Regenerate.
14546
14547 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14548
14549 * acconfig.h: Remove.
14550 * configure.ac: Add a test for socklen_t. Use three-argument
14551 AC_DEFINE throughout.
14552 * config.in: Regenerated using autoheader 2.59.
14553 * configure: Regenerated.
14554
14555 * gdbreplay.c (socklen_t): Provide a default.
14556 (remote_open): Use socklen_t.
14557 * remote-utils.c (socklen_t): Provide a default.
14558 (remote_open): Use socklen_t.
14559 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14560 unsigned char.
14561
14562 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14563 char for buffers.
14564 * linux-low.c (linux_read_memory, linux_write_memory)
14565 (linux_read_auxv): Likewise.
14566 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14567 (check_mem_write): Likewise.
14568 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14569 Likewise.
14570 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14571 (registers_from_string, register_data): Likewise.
14572 * server.c (handle_query, main): Likewise.
14573 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14574 (decode_M_packet): Likewise.
14575 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14576 * target.h (struct target_ops): Update read_memory, write_memory,
14577 and read_auxv.
14578 (read_inferior_memory, write_inferior_memory): Update.
14579 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14580 to unsigned char *.
14581 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14582 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14583 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14584 linux-s390-low.c, linux-sh-low.c: Update for changes in
14585 read_inferior_memory and the_low_target->breakpoint.
14586
14587 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14588
14589 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14590 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14591 * configure.srv: Add powerpc64-*-linux*.
14592 * linux-ppc64-low.c: New file.
14593
14594 2005-05-23 Orjan Friberg <orjanf@axis.com>
14595
14596 * linux-cris-low.c: New file with support for CRIS.
14597 * linux-crisv32-low.c: Ditto for CRISv32.
14598 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14599 (clean): Add reg-cris.c and reg-crisv32.c.
14600 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14601 reg-crisv32.o, and reg-crisv32.c to make rules.
14602 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14603 recognized targets.
14604
14605 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14606
14607 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14608 of sizeof (PTRACE_XFER_TYPE).
14609 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14610
14611 2005-05-12 Orjan Friberg <orjanf@axis.com>
14612
14613 * target.h (struct target_ops): Add insert_watchpoint,
14614 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14615 pointers for hardware watchpoint support.
14616 * linux-low.h (struct linux_target_ops): Ditto.
14617 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14618 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14619 to linux_target_ops.
14620 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14621 reply packet.
14622 * server.c (main): Recognize 'Z' and 'z' packets.
14623
14624 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14625
14626 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14627 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14628 (the_low_target): Add new members.
14629
14630 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14631
14632 * proc-service.c (ps_lgetregs): Search all_processes instead of
14633 all_threads.
14634
14635 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14636
14637 * server.c (start_inferior): Change return type to int.
14638 (attach_inferior): Change sigptr to int *.
14639 (handle_v_cont, handle_v_requests): Change signal to int *.
14640 (main): Change signal to int.
14641
14642 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14643
14644 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14645 * configure.srv: Add m32r*-*-linux*.
14646 * linux-m32r-low.c: New file.
14647
14648 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14651
14652 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14653
14654 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14655 Take unsigned long arguments for PIDs.
14656 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14657 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14658 (wait_for_sigstop, linux_resume_one_process)
14659 (regsets_fetch_inferior_registers, linux_send_signal)
14660 (linux_read_auxv): Likewise. Update the types of variables holding
14661 PIDs. Update format string specifiers.
14662 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14663 * remote-utils.c (prepare_resume_reply): Likewise.
14664 * server.c (cont_thread, general_thread, step_thread)
14665 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14666 unsigned long.
14667 (handle_query): Update format specifiers.
14668 (handle_v_cont, main): Use strtoul for thread IDs.
14669 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14670 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14671 (general_thread, step_thread, thread_from_wait)
14672 (old_thread_from_wait): Update.
14673 * target.h (struct thread_resume): Use unsigned long for THREAD.
14674 (struct target_ops): Use unsigned long for arguments to attach and
14675 thread_alive.
14676
14677 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * acinclude.m4: Include bfd/bfd.m4 directly.
14680 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14681 <agriffis@toolchain.org>.
14682 * aclocal.m4, configure: Regenerated.
14683
14684 2005-01-07 Andrew Cagney <cagney@gnu.org>
14685
14686 * configure.ac: Rename configure.in, require autoconf 2.59.
14687 * configure: Re-generate.
14688
14689 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14690
14691 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14692 LIBS when finished.
14693 * aclocal.m4: Regenerated.
14694 * configure: Regenerated.
14695
14696 2004-11-21 Andreas Schwab <schwab@suse.de>
14697
14698 * linux-m68k-low.c (m68k_num_gregs): Define.
14699 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14700 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14701 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14702 (m68k_breakpoint_at): New. Add to the_low_target.
14703
14704 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14705 srv_linux_thread_db to yes.
14706
14707 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14708
14709 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14710 (ARCH_SET_FS): Likewise.
14711 (ARCH_GET_FS): Likewise.
14712 (ARCH_GET_GS): Likewise.
14713
14714 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14715
14716 * linux-i386-low.c (ps_get_thread_area): New.
14717 * linux-x86-64-low.c (ps_get_thread_area): New.
14718 * linux-low.c: Include <sys/syscall.h>.
14719 (linux_kill_one_process): Don't kill the first thread here.
14720 (linux_kill): Kill the first thread here.
14721 (kill_lwp): New function.
14722 (send_sigstop, linux_send_signal): Use it.
14723 * proc-service.c: Clean up #ifdefs.
14724 (fpregset_info): Delete.
14725 (ps_lgetregs): Update and enable implementation.
14726 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14727 implementations.
14728 * remote-utils.c (struct sym_cache, symbol_cache): New.
14729 (input_interrupt): Print a clearer message.
14730 (async_io_enabled): New variable.
14731 (enable_async_io, disable_async_io): Use it. Update comments.
14732 (look_up_one_symbol): Use the symbol cache.
14733 * thread-db.c (thread_db_look_up_symbols): New function.
14734 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14735
14736 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14737
14738 * configure.in: Test for -rdynamic.
14739 * configure: Regenerated.
14740 * Makefile (INTERNAL_LDFLAGS): New.
14741 (gdbserver, gdbreplay): Use it.
14742
14743 2004-09-02 Andrew Cagney <cagney@gnu.org>
14744
14745 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14746
14747 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14748
14749 * linux-low.c (linux_wait): Clear all_processes list also.
14750
14751 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14752
14753 * linux-low.c: Include <errno.h>. Remove extern declaration of
14754 errno.
14755
14756 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14757
14758 * gdbreplay.c, server.h, utils.c: Update copyright years.
14759
14760 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14761
14762 * server.c (main): Print child status or termination signal from
14763 variable 'signal', not 'sig'.
14764
14765 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14766
14767 * linux-low.c (linux_read_memory): Change return type to
14768 int. Check for and return error from ptrace().
14769 * target.c (read_inferior_memory): Change return type to int. Pass
14770 back return status from the_target->read_memory().
14771 * target.h (struct target_ops): Adapt *read_memory() prototype.
14772 Update comment.
14773 (read_inferior_memory): Adapt prototype.
14774 * server.c (main): Return an error packet if
14775 read_inferior_memory() returns an error.
14776
14777 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14778
14779 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14780 Unify with other clean targets.
14781
14782 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14783
14784 * server.c (handle_v_cont): Call set_desired_inferior.
14785
14786 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14787
14788 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14789
14790 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14791
14792 * linux-low.c (linux_wait): Unblock async I/O.
14793 (linux_resume): Block and enable async I/O.
14794 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14795 * server.h (block_async_io, unblock_async_io): Add prototypes.
14796
14797 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14798
14799 * remote-utils.c (remote_open): Print a status notice after
14800 opening a TCP port.
14801 * server.c (attach_inferior): Print a status notice after
14802 attaching.
14803
14804 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14805
14806 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14807
14808 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14809
14810 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14811 error packet.
14812 * server.c, target.h: Update copyright years.
14813
14814 2004-02-25 Roland McGrath <roland@redhat.com>
14815
14816 * target.h (struct target_ops): New member `read_auxv'.
14817 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14818 * linux-low.c (linux_read_auxv): New function.
14819 (linux_target_ops): Initialize `read_auxv' member to that.
14820
14821 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14822
14823 Committed by Jim Blandy <jimb@redhat.com>.
14824
14825 * linux-s390-low.c (s390_num_regs): Update.
14826 (s390_regmap): Remove control registers. Use __s390x__ predefine
14827 instead of GPR_SIZE to distiguish s390 and s390x targets.
14828
14829 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14830
14831 * linux-low.c: Update copyright year.
14832 (check_removed_breakpoint): Clear pending_is_breakpoint.
14833 (linux_set_resume_request, linux_queue_one_thread)
14834 (resume_status_pending_p): New functions.
14835 (linux_continue_one_thread): Use process->resume.
14836 (linux_resume): Only resume threads if there are no pending events.
14837 * linux-low.h (struct process_info): Add resume request
14838 pointer.
14839
14840 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14841
14842 * regcache.c (new_register_cache): Clear the allocated register
14843 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14844
14845 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14846
14847 * linux-low.c (linux_resume): Take a struct thread_resume *
14848 argument.
14849 (linux_wait): Update call.
14850 (resume_ptr): New static variable.
14851 (linux_continue_one_thread): Renamed from
14852 linux_continue_one_process. Use resume_ptr.
14853 (linux_resume): Use linux_continue_one_thread.
14854 * server.c (handle_v_cont, handle_v_requests): New functions.
14855 (myresume): New function.
14856 (main): Handle 'v' case.
14857 * target.h (struct thread_resume): New type.
14858 (struct target_ops): Change argument of "resume" to struct
14859 thread_resume *.
14860 (myresume): Delete macro.
14861
14862 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14863
14864 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14865 (uninstall): Support DESTDIR.
14866
14867 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14868
14869 * configure.srv: Add xscale*linux copy of arm*linux entry.
14870
14871 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * linux-arm-low.c (arm_reinsert_addr): New function.
14874 (the_low_target): Add arm_reinsert_addr.
14875
14876 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14877
14878 * mem-break.c: Remove whitespace at end of file.
14879
14880 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14881
14882 * configure.in: Check whether we need to prototype strerror.
14883 * server.h: Optionally prototype strerror.
14884 * gdbreplay.c (perror_with_name): Use strerror.
14885 * linux-low.c (linux_attach_lwp): Use strerror.
14886 * utils.c (perror_with_name): Use strerror.
14887 * config.in, configure: Regenerated.
14888
14889 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14890
14891 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14892 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14893
14894 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14895
14896 * Makefile.in (SFILES): Update.
14897 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14898 low-sun3.c: Remove files.
14899
14900 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14901
14902 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14903 (linux_detach_one_process, linux_detach): New functions.
14904 (linux_target_ops): Add linux_detach.
14905 * server.c (main): Handle 'D' packet.
14906 * target.h (struct target_ops): Add "detach" member.
14907 (detach_inferior): Define.
14908
14909 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14910
14911 From Kelley Cook <kelleycook@wideopenwest.com>:
14912 * configure.srv: Accept i[34567]86 variants.
14913
14914 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14915
14916 * linux-low.c (linux_wait_for_event): Correct comment typos.
14917 (linux_resume_one_process): Call check_removed_breakpoint.
14918 (linux_send_signal): New function.
14919 (linux_target_ops): Add linux_send_signal.
14920 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14921 of kill.
14922 * target.h (struct target_ops): Add send_signal.
14923
14924 2003-05-29 Jim Blandy <jimb@redhat.com>
14925
14926 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14927 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14928 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14929 away part of the register's value.
14930
14931 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14932
14933 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14934 (linux_wait_for_event, linux_init_signals): Likewise.
14935
14936 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14937
14938 * configure.in: Check for stdlib.h.
14939 * configure: Regenerated.
14940 * config.in: Regenerated.
14941
14942 2003-01-04 Andreas Schwab <schwab@suse.de>
14943
14944 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14945
14946 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14947
14948 * Makefile.in: Remove obsolete code.
14949
14950 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14951
14952 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14953 defined(PT_FPR0_HI).
14954
14955 2002-11-17 Stuart Hughes <seh@zee2.com>
14956
14957 * linux-arm-low.c (arm_num_regs): Increase.
14958 (arm_regmap): Include status register.
14959
14960 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14961
14962 * linux-low.c (register_addr): Remove incorrect -1 check.
14963
14964 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14965
14966 * linux-low.c (linux_create_inferior): Call setpgid. Return
14967 the new PID.
14968 (unstopped_p, linux_signal_pid): Remove.
14969 (linux_target_ops): Remove linux_signal_pid.
14970 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14971 global instead of target method.
14972 * target.h (struct target_ops): Remove signal_pid. Update comment
14973 for create_inferior.
14974 * server.c (signal_pid): New variable.
14975 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14976 gdbserver. Set the child to be the foreground process group.
14977 (attach_inferior): Set signal_pid.
14978
14979 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14980
14981 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14982
14983 2002-08-20 Jim Blandy <jimb@redhat.com>
14984
14985 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14986 default for this.
14987
14988 2002-08-01 Andrew Cagney <cagney@redhat.com>
14989
14990 * Makefile.in: Make chill references obsolete.
14991
14992 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14993
14994 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14995 * configure: Regenerate.
14996 * config.in: Regenerate.
14997
14998 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14999
15000 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15001 (perror_with_name, remote_close, remote_open, expect, play): Static.
15002
15003 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15004
15005 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15006 byte offsets instead of an array of indexes.
15007 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15008
15009 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15010
15011 * regcache.c: Add comment.
15012
15013 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15014
15015 * thread-db.c: New file.
15016 * proc-service.c: New file.
15017 * acinclude.m4: New file.
15018 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15019 proc-service.o, and thread-db.o.
15020 (linux-low.o): Add USE_THREAD_DB.
15021 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15022 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15023 * aclocal.m4: Regenerated.
15024 * config.in: Regenerated.
15025 * configure: Regenerated.
15026 * configure.in: Check for proc_service.h, sys/procfs.h,
15027 thread_db.h, and linux/elf.h headrs.
15028 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15029 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15030 Check for -lthread_db and thread support.
15031 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15032 PowerPC, and SuperH.
15033 * i387-fp.c: Constify arguments.
15034 * i387-fp.h: Likewise.
15035 * inferiors.c: (struct thread_info): Renamed from
15036 `struct inferior_info'. Remove PID member. Use generic inferior
15037 list header. All uses updated.
15038 (inferiors, signal_pid): Removed.
15039 (all_threads): New variable.
15040 (get_thread): Define.
15041 (add_inferior_to_list): New function.
15042 (for_each_inferior): New function.
15043 (change_inferior_id): New function.
15044 (add_inferior): Removed.
15045 (remove_inferior): New function.
15046 (add_thread): New function.
15047 (free_one_thread): New function.
15048 (remove_thread): New function.
15049 (clear_inferiors): Use for_each_inferior and free_one_thread.
15050 (find_inferior): New function.
15051 (find_inferior_id): New function.
15052 (inferior_target_data): Update argument type.
15053 (set_inferior_target_data): Likewise.
15054 (inferior_regcache_data): Likewise.
15055 (set_inferior_regcache_data): Likewise.
15056 * linux-low.c (linux_bp_reinsert): Remove.
15057 (all_processes, stopping_threads, using_thrads)
15058 (struct pending_signals, debug_threads, pid_of): New.
15059 (inferior_pid): Replace with macro.
15060 (struct inferior_linux_data): Remove.
15061 (get_stop_pc, add_process): New functions.
15062 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15063 Use add_process and add_thread.
15064 (linux_attach_lwp): New function, based on old linux_attach. Use
15065 add_process and add_thread. Set stop_expected for new threads.
15066 (linux_attach): New function.
15067 (linux_kill_one_process): New function.
15068 (linux_kill): Kill all LWPs.
15069 (linux_thread_alive): Use find_inferior_id.
15070 (check_removed_breakpoints, status_pending_p): New functions.
15071 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15072 Update. Use WNOHANG. Wait for cloned processes also. Update process
15073 struct for the found process.
15074 (linux_wait_for_event): New function.
15075 (linux_wait): Use it. Support LWPs.
15076 (send_sigstop, wait_for_sigstop, stop_all_processes)
15077 (linux_resume_one_process, linux_continue_one_process): New functions.
15078 (linux_resume): Support LWPs.
15079 (REGISTER_RAW_SIZE): Remove.
15080 (fetch_register): Use register_size instead. Call supply_register.
15081 (usr_store_inferior_registers): Likewise. Call collect_register.
15082 Fix recursive case.
15083 (regsets_fetch_inferior_registers): Improve error message.
15084 (regsets_store_inferior_registers): Add debugging.
15085 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15086 (unstopped_p, linux_signal_pid): New functions.
15087 (linux_target_ops): Add linux_signal_pid.
15088 (linux_init_signals): New function.
15089 (initialize_low): Call it. Initialize using_threads.
15090 * regcache.c (inferior_regcache_data): Add valid
15091 flag.
15092 (get_regcache): Fetch registers lazily. Add fetch argument
15093 and update all callers.
15094 (regcache_invalidate_one, regcache_invalidate): New
15095 functions.
15096 (new_register_cache): Renamed from create_register_cache.
15097 Return the new regcache.
15098 (free_register_cache): Change argument to a void *.
15099 (registers_to_string, registers_from_string): Call get_regcache
15100 with fetch flag set.
15101 (register_data): Make static. Pass fetch flag to get_regcache.
15102 (supply_register): Call get_regcache with fetch flag clear.
15103 (collect_register): Call get_regcache with fetch flag set.
15104 (collect_register_as_string): New function.
15105 * regcache.h: Update.
15106 * remote-utils.c (putpkt): Flush after debug output and use
15107 stderr.
15108 Handle input interrupts while waiting for an ACK.
15109 (input_interrupt): Use signal_pid method.
15110 (getpkt): Flush after debug output and use stderr.
15111 (outreg): Use collect_register_as_string.
15112 (new_thread_notify, dead_thread_notify): New functions.
15113 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15114 and general_thread.
15115 (look_up_one_symbol): Flush after debug output.
15116 * server.c (step_thread, server_waiting): New variables.
15117 (start_inferior): Don't use signal_pid. Update call to mywait.
15118 (attach_inferior): Update call to mywait.
15119 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15120 (main): Don't fetch/store registers explicitly. Use
15121 set_desired_inferior. Support proposed ``Hs'' packet. Update
15122 calls to mywait.
15123 * server.h: Update.
15124 (struct inferior_list, struct_inferior_list_entry): New.
15125 * target.c (set_desired_inferior): New.
15126 (write_inferior_memory): Constify.
15127 (mywait): New function.
15128 * target.h: Update.
15129 (struct target_ops): New signal_pid method.
15130 (mywait): Removed macro, added prototype.
15131
15132 * linux-low.h (regset_func): Removed.
15133 (regset_fill_func, regset_store_func): New.
15134 (enum regset_type): New.
15135 (struct regset_info): Add type field. Use new operation types.
15136 (struct linux_target_ops): stop_pc renamed to get_pc.
15137 Add decr_pc_after_break and breakpoint_at.
15138 (get_process, get_thread_proess, get_process_thread)
15139 (strut process_info, all_processes, linux_attach_lwp)
15140 (thread_db_init): New.
15141
15142 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15143 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15144 (the_low_target): Add new members.
15145 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15146 (i386_store_fpxregset): Constify.
15147 (target_regsets): Add new kind identifier.
15148 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15149 (i386_set_pc): Add debugging.
15150 (i386_breakpoint_at): New function.
15151 (the_low_target): Add new members.
15152 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15153 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15154 (mips_breakpoint_at): New.
15155 (the_low_target): Add new members.
15156 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15157 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15158 (the_low_target): Add new members.
15159 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15160 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15161 (the_low_target): Add new members.
15162 * linux-x86-64-low.c (target_regsets): Add new kind
15163 identifier.
15164
15165 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15166
15167 From Martin Pool <mbp@samba.org>:
15168 * server.c (gdbserver_usage): New function.
15169 (main): Call it.
15170
15171 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15172
15173 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15174 stop_at -> stop_pc.
15175
15176 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15177
15178 * Makefile.in: Remove obsolete code.
15179
15180 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15181
15182 * linux-low.c (regsets_fetch_inferior_registers),
15183 (regsets_store_inferior_registers): Removed cast to int from
15184 ptrace() calls.
15185 * regcache.h: Added declaration of struct inferior_info.
15186
15187 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15188
15189 * inferiors.c (struct inferior_info): Add regcache_data.
15190 (add_inferior): Call create_register_cache.
15191 (clear_inferiors): Call free_register_cache.
15192 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15193 * regcache.c (struct inferior_regcache_data): New.
15194 (registers): Remove.
15195 (get_regcache): New function.
15196 (create_register_cache, free_register_cache): New functions.
15197 (set_register_cache): Don't initialize the register cache here.
15198 (registers_to_string, registers_from_string, register_data): Call
15199 get_regcache.
15200 * regcache.h: Add prototypes.
15201 * server.h: Likewise.
15202
15203 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15204
15205 * mem-break.c: New file.
15206 * mem-break.h: New file.
15207 * Makefile.in: Add mem-break.o rule; update server.h
15208 dependencies.
15209 * inferiors.c (struct inferior_info): Add target_data
15210 member.
15211 (clear_inferiors): Free target_data member if set.
15212 (inferior_target_data, set_inferior_target_data): New functions.
15213 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15214 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15215 * linux-low.c (linux_bp_reinsert): New variable.
15216 (struct inferior_linux_data): New.
15217 (linux_create_inferior): Use set_inferior_target_data.
15218 (linux_attach): Likewise. Call add_inferior.
15219 (linux_wait_for_one_inferior): New function.
15220 (linux_wait): Call it.
15221 (linux_write_memory): Add const.
15222 (initialize_low): Call set_breakpoint_data.
15223 * linux-low.h (struct linux_target_ops): Add breakpoint
15224 handling members.
15225 * server.c (attach_inferior): Remove extra add_inferior
15226 call.
15227 * server.h: Include mem-break.h. Update inferior.c
15228 prototypes.
15229 * target.c (read_inferior_memory)
15230 (write_inferior_memory): New functions.
15231 * target.h (read_inferior_memory)
15232 (write_inferior_memory): Change macros to prototypes.
15233 (struct target_ops): Update comments. Add const to write_memory
15234 definition.
15235
15236 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15237
15238 * linux-low.c (usr_store_inferior_registers): Support
15239 registers which are allowed to fail to store.
15240 * linux-low.h (linux_target_ops): Likewise.
15241 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15242 (ppc_cannot_store_register): FPSCR may not be storable.
15243
15244 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15245
15246 * server.h: Include <string.h> if HAVE_STRING_H.
15247 * ChangeLog: Correct paths in last ChangeLog entry.
15248
15249 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15250
15251 * linux-low.h: Remove obsolete prototypes.
15252 (struct linux_target_ops): New.
15253 (extern the_low_target): New.
15254 * linux-low.c (num_regs, regmap): Remove declarations.
15255 (register_addr): Use the_low_target explicitly.
15256 (fetch_register): Likewise.
15257 (usr_fetch_inferior_registers): Likewise.
15258 (usr_store_inferior_registers): Likewise.
15259 * linux-arm-low.c (num_regs): Remove.
15260 (arm_num_regs): Define.
15261 (arm_regmap): Renamed from regmap, made static.
15262 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15263 made static.
15264 (arm_cannot_store_register): Renamed from cannot_store_register,
15265 made static.
15266 (the_low_target): New.
15267 * linux-i386-low.c (num_regs): Remove.
15268 (i386_num_regs): Define.
15269 (i386_regmap): Renamed from regmap, made static.
15270 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15271 made static.
15272 (i386_cannot_store_register): Renamed from cannot_store_register,
15273 made static.
15274 (the_low_target): New.
15275 * linux-ia64-low.c (num_regs): Remove.
15276 (ia64_num_regs): Define.
15277 (ia64_regmap): Renamed from regmap, made static.
15278 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15279 made static.
15280 (ia64_cannot_store_register): Renamed from cannot_store_register,
15281 made static.
15282 (the_low_target): New.
15283 * linux-m68k-low.c (num_regs): Remove.
15284 (m68k_num_regs): Define.
15285 (m68k_regmap): Renamed from regmap, made static.
15286 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15287 made static.
15288 (m68k_cannot_store_register): Renamed from cannot_store_register,
15289 made static.
15290 (the_low_target): New.
15291 * linux-mips-low.c (num_regs): Remove.
15292 (mips_num_regs): Define.
15293 (mips_regmap): Renamed from regmap, made static.
15294 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15295 made static.
15296 (mips_cannot_store_register): Renamed from cannot_store_register,
15297 made static.
15298 (the_low_target): New.
15299 * linux-ppc-low.c (num_regs): Remove.
15300 (ppc_num_regs): Define.
15301 (ppc_regmap): Renamed from regmap, made static.
15302 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15303 made static.
15304 (ppc_cannot_store_register): Renamed from cannot_store_register,
15305 made static.
15306 (the_low_target): New.
15307 * linux-s390-low.c (num_regs): Remove.
15308 (s390_num_regs): Define.
15309 (s390_regmap): Renamed from regmap, made static.
15310 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15311 made static.
15312 (s390_cannot_store_register): Renamed from cannot_store_register,
15313 made static.
15314 (the_low_target): New.
15315 * linux-sh-low.c (num_regs): Remove.
15316 (sh_num_regs): Define.
15317 (sh_regmap): Renamed from regmap, made static.
15318 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15319 made static.
15320 (sh_cannot_store_register): Renamed from cannot_store_register,
15321 made static.
15322 (the_low_target): New.
15323 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15324 (the_low_target): New.
15325
15326 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15327
15328 * Makefile.in: Add stamp-h target.
15329 * configure.in: Create stamp-h.
15330 * configure: Regenerated.
15331
15332 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15333
15334 * inferiors.c: New file.
15335 * target.c: New file.
15336 * target.h: New file.
15337 * Makefile.in: Add target.o and inferiors.o. Update
15338 dependencies.
15339 * linux-low.c (inferior_pid): New static variable,
15340 moved from server.c.
15341 (linux_create_inferior): Renamed from create_inferior.
15342 Call add_inferior. Return 0 on success instead of a PID.
15343 (linux_attach): Renamed from myattach.
15344 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15345 (linux_thread_alive): Renamed from mythread_alive.
15346 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15347 child dies.
15348 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15349 (regsets_store_inferior_registers): Correct error message.
15350 Add missing ``return 0''.
15351 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15352 (linux_store_registers): Renamed from store_inferior_registers.
15353 (linux_read_memory): Renamed from read_inferior_memory.
15354 (linux_write_memory): Renamed from write_inferior_memory.
15355 (linux_target_ops): New structure.
15356 (initialize_low): Call set_target_ops ().
15357 * remote-utils.c (unhexify): New function.
15358 (hexify): New function.
15359 (input_interrupt): Send signals to ``signal_pid''.
15360 * server.c (inferior_pid): Remove.
15361 (start_inferior): Update create_inferior call.
15362 (attach_inferior): Call add_inferior.
15363 (handle_query): New function.
15364 (main): Call handle_query for `q' packets.
15365 * server.h: Include "target.h". Remove obsolete prototypes.
15366 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15367
15368 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15369
15370 * Makefile.in: Add WARN_CFLAGS. Update configury
15371 dependencies.
15372 * configure.in: Check for <string.h>
15373 * configure: Regenerate.
15374 * config.in: Regenerate.
15375 * gdbreplay.c: Include needed system headers.
15376 (remote_open): Remove strchr prototype.
15377 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15378 * regcache.c (supply_register): Change buf argument to const void *.
15379 (supply_register_by_name): Likewise.
15380 (collect_register): Change buf argument to void *.
15381 (collect_register_by_name): Likewise.
15382 * regcache.h: Add missing prototypes.
15383 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15384 * server.c (handle_query): New function.
15385 (attached): New static variable, moved out of main.
15386 (main): Quiet longjmp clobber warnings.
15387 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15388 * utils.c (error): Remove NORETURN.
15389 (fatal): Likewise.
This page took 0.709279 seconds and 4 git commands to generate.