]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
mi_load_progress: Restore current_uiout using a scoped_restore
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c4dfafab
SDJ
12017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4 instead of "VEC" for "target_desc.reg_defs".
5 (regcache_cpy): Likewise.
6 (registers_to_string): Likewise.
7 (registers_from_string): Likewise.
8 (find_regno): Likewise.
9 (supply_regblock): Likewise.
10 (regcache_raw_read_unsigned): Likewise.
11 * tdesc.c (init_target_desc): Likewise.
12 (tdesc_create_reg): Likewise.
13 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
14 (struct target_desc) <reg_defs>: Convert to "std::vector".
15 (target_desc): Do not initialize "reg_defs".
16 (~target_desc): Update code to use "std::vector" instead of "VEC"
17 for "target_desc.reg_defs".
18 (operator==): Likewise.
19
124aceb4
SM
202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
21
22 * inferiors.h (thread_to_gdb_id): Remove.
23 * inferiors.c (thread_to_gdb_id): Remove.
24 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
25 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
26 lynx_store_registers, lynx_read_memory, lynx_write_memory):
27 Likewise.
28 * nto-low.c (nto_fetch_registers, nto_store_registers,
29 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
30
96cde54f
SM
312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
32
33 * inferiors.h (gdb_id_to_thread_id): Remove.
34 * inferiors.c (gdb_id_to_thread_id): Remove.
35 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
36 removal. Move pid declaration closer to where it's used.
37
e8ca139e
SM
382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
39
40 * server.c (handle_detach): New function.
41 (process_serial_event): Move code out, call handle_detach.
42
f8a4e119
SM
432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
44
45 * server.c (require_running): Rename to ...
46 (require_running_or_return): ... this ...
47 (require_running_or_break): ... and this.
48 (handle_query, process_serial_event): Adjust.
49
0eb0a407
SM
502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
51
52 * linux-low.c (linux_set_resume_request): Remove unused
53 variables.
54
785922a5
SM
552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
56
57 * server.c (first_thread_of): Remove.
58 (process_serial_event): Replace usage of first_thread_of with
59 find_any_thread_of_pid.
60 * tracepoint.c (same_process_p): Remove.
61 (gdb_agent_about_to_close): Replace usage of same_process_p with
62 find_any_thread_of_pid.
63 * linux-x86-low.c (same_process_callback): Remove.
64 (x86_arch_setup_process_callback): Replace usage of
65 same_process_callback with find_any_thread_of_pid.
66 * thread-db.c (any_thread_of): Remove.
67 (switch_to_process): Replace usage of any_thread_of with
68 find_any_thread_of_pid.
69 * inferiors.c (thread_pid_matches_callback): Remove.
70 (find_thread_process): Adjust to use find_any_thread_of_pid.
71
a059f00c
SDJ
722017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
73
74 * regcache.c (get_thread_regcache): Guard calls to "memset"
75 with "!VEC_empty".
76
cc397f3a
SDJ
772017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
78
79 * linux-low.c (handle_extended_wait): Use
80 "allocate_target_description" instead of "XNEW".
81 * linux-x86-low.c (initialize_low_arch): Likewise.
82
22916b07
YQ
832017-09-05 Yao Qi <yao.qi@linaro.org>
84
85 * configure.srv (srv_i386_regobj): Remove.
86 (srv_amd64_regobj): Remove.
87 (srv_regobj): Set it to "" for x86 non-linux targets.
88 * linux-x86-tdesc.c (i386_linux_read_description):
89 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
90 (init_registers_i386): Remove the declaration.
91 (tdesc_i386): Remove the declaration.
92 (lynx_i386_arch_setup): Call i386_create_target_description.
93 * nto-x86-low.c: Likewise.
94 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
95 [!__x86_64__]: include arch/i386.h.
96 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
97
38602d55
YQ
982017-09-05 Yao Qi <yao.qi@linaro.org>
99
100 * configure.srv (srv_amd64_linux_xmlfiles): Remove
101 i386/amd64-XXX-linux from it.
102
44b886ff
YQ
1032017-09-05 Yao Qi <yao.qi@linaro.org>
104
105 * configure.srv: Empty srv_amd64_linux_regobj if $development is
106 false.
107 (ipa_amd64_linux_regobj): Remove.
108 (ipa_x32_linux_regobj): Remove.
109
b4570e4b
YQ
1102017-09-05 Yao Qi <yao.qi@linaro.org>
111
112 * Makefile.in (arch-amd64.o): New rule.
113 * configure.srv: Append arch-amd64.o.
114 * linux-amd64-ipa.c: Include common/x86-xstate.h.
115 (get_ipa_tdesc): Call amd64_linux_read_description.
116 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
117 and init_registers_amd64_XXX.
118 * linux-x86-low.c (x86_linux_read_description): Call
119 amd64_linux_read_description.
120 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
121 (initialize_low_arch): Don't call init_registers_x32_XXX and
122 init_registers_amd64_XXX.
123 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
124 and tdesc_amd64_XXX.
125 [__x86_64__] (amd64_tdesc_test): New function.
126 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
127 and init_registers_amd64_XXX.
128 * linux-x86-tdesc.c: Include arch/amd64.h.
129 (xcr0_to_tdesc_idx): New function.
130 (i386_linux_read_description): New function.
131 (amd64_get_ipa_tdesc_idx): New function.
132 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
133 (amd64_get_ipa_tdesc): Declare.
134
d1f28ea2
YQ
1352017-09-05 Yao Qi <yao.qi@linaro.org>
136
137 * configure.srv (srv_i386_linux_xmlfiles): Remove
138 i386/i386-XXX-linux.xml from it.
139
25a93583
YQ
1402017-09-05 Yao Qi <yao.qi@linaro.org>
141
142 * configure.srv: Set srv_i386_linux_regobj empty if $development
143 is false.
144 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
145 initialize_low_tdesc.
146 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
147 with #if initialize_low_tdesc.
148 * linux-x86-tdesc-selftest.c: New file.
149 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
150
5f035c07
YQ
1512017-09-05 Yao Qi <yao.qi@linaro.org>
152
153 * Makefile.in (arch-i386.o): New rule.
154 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
155 (x86_64-*-linux*): Likewise.
156 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
157 include arch/i386.h.
158 (i386_linux_read_description): Remove code and call
159 i386_create_target_description.
160 * tdesc.c (allocate_target_description): New function.
161 * tdesc.h (set_tdesc_architecture): Remove declaration.
162 (set_tdesc_osabi): Likewise.
163
0abe8a89
YQ
1642017-09-05 Yao Qi <yao.qi@linaro.org>
165
166 * linux-x86-tdesc.c: Don't include <inttypes.h>.
167 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
168 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
169 .xmltarget.
170 * server.c (get_features_xml): Call tdesc_get_features_xml.
171 * tdesc.c (set_tdesc_architecture): New function.
172 (set_tdesc_osabi): New function.
173 (tdesc_get_features_xml): New function.
174 (tdesc_create_feature): Add an argument.
175 * tdesc.h (struct target_desc) <features>: New field.
176 <arch, osabi>: New field.
177 (~target_desc): xfree features, arch, and osabi.
178 (target_desc::oerator==): Don't compare .xmltarget.
179 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
180 (set_tdesc_osabi): Likewise.
181 (tdesc_get_features_xml): Likewise.
182
0a188386
YQ
1832017-09-05 Yao Qi <yao.qi@linaro.org>
184
185 * linux-x86-tdesc.c: Include selftest.h.
186 (i386_tdesc_test): New function.
187 (initialize_low_tdesc): Call selftests::register_test.
188 * tdesc.h: Include regdef.h.
189 (target_desc): Override operator == and !=.
190
f49ff000
YQ
1912017-09-05 Yao Qi <yao.qi@linaro.org>
192
193 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
194 (ipa_obj): Likewise.
195 * linux-i386-ipa.c: Include common/x86-xstate.h
196 (get_ipa_tdesc): Call i386_linux_read_description.
197 (initialize_low_tracepoint): Don't call init_registers_XXX
198 functions, call initialize_low_tdesc instead.
199 * linux-x86-low.c (x86_linux_read_description): Call
200 i386_linux_read_description.
201 (initialize_low_arch): Don't call init_registers_i386_XXX
202 functions, call initialize_low_tdesc.
203 * linux-x86-tdesc.c: New file.
204 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
205 (i386_get_ipa_tdesc_idx): Declare.
206 (i386_get_ipa_tdesc): Declare.
207 (initialize_low_tdesc): Declare.
208
2b68ef2f
YQ
2092017-09-05 Yao Qi <yao.qi@linaro.org>
210
211 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
212 instead of 0.
213
f7000548
YQ
2142017-09-05 Yao Qi <yao.qi@linaro.org>
215
216 * Makefile.in (IPA_OBJS): Add vec-ipa.o
217 * regcache.c (get_thread_regcache): Use VEC_length.
218 (init_register_cache): Likewise.
219 (regcache_cpy): Likewise.
220 (registers_to_string): Iterate reg_defs via VEC_iterate.
221 (find_regno): Likewise.
222 (find_register_by_number): Use VEC_index.
223 (register_size): Call find_register_by_number.
224 (register_data): Call find_register_by_number.
225 (supply_regblock): Use VEC_length.
226 (regcache_raw_read_unsigned): Likewise.
227 * tdesc.c (init_target_desc): Iterate reg_defs via
228 VEC_iterate.
229 (default_description): Update initializer.
230 (copy_target_description): Don't update field num_registers.
231 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
232 <num_registers>: Remove.
233
50a421ac
SM
2342017-09-04 Simon Marchi <simon.marchi@ericsson.com>
235
236 * Makefile.in (.SECONDARY): Define target.
237
23fdd69e
SM
2382017-09-03 Simon Marchi <simon.marchi@ericsson.com>
239
240 * linux-low.c (linux_wait_1): Adjust.
241 * server.c (queue_stop_reply_callback): Adjust.
242
0a2dde4a
SDJ
2432017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
244
245 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
246 QEnvironmentUnset and QEnvironmentReset packets.
247 (handle_query): Inform remote that QEnvironmentHexEncoded,
248 QEnvironmentUnset and QEnvironmentReset are supported.
249
6afd337d
SM
2502017-08-25 Simon Marchi <simon.marchi@ericsson.com>
251
252 * inferiors.h (inferior_target_data): Rename to ...
253 (thread_target_data): ... this.
254 (inferior_regcache_data): Rename to ...
255 (thread_regcache_data): ... this.
256 (set_inferior_regcache_data): Rename to ...
257 (set_thread_regcache_data): ... this.
258 * inferiors.c (inferior_target_data): Rename to ...
259 (thread_target_data): ... this.
260 (inferior_regcache_data): Rename to ...
261 (thread_regcache_data): ... this.
262 (set_inferior_regcache_data): Rename to ...
263 (set_thread_regcache_data): ... this.
264 (free_one_thread): Update.
265 * linux-low.h (get_thread_lwp): Update.
266 * regcache.c (get_thread_regcache): Update.
267 (regcache_invalidate_thread): Update.
268 (free_register_cache_thread): Update.
269 * win32-i386-low.c (update_debug_registers_callback): Update.
270 (win32_get_current_dr): Update.
271 * win32-low.c (thread_rec): Update.
272 (delete_thread_info): Update.
273 (continue_one_thread): Update.
274 (suspend_one_thread): Update.
275
a160cc46
SM
2762017-08-24 Simon Marchi <simon.marchi@ericsson.com>
277
278 * inferiors.c (set_inferior_target_data): Remove.
279 * inferiors.h (set_inferior_target_data): Remove.
280
6d580b63
YQ
2812017-08-18 Yao Qi <yao.qi@linaro.org>
282
283 * Makefile.in (OBS): Add selftest.o.
284 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
285 * configure, config.in: Re-generated.
286 * server.c: Include common/sefltest.h.
287 (captured_main): Handle option --selftest.
288
f5a29eb0
YQ
2892017-08-09 Yao Qi <yao.qi@linaro.org>
290
291 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
292 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
293 i386-avx-mpx.o and i386-mmx.o.
294 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
295 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
296 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
297 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
298 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
299 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
300 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
301 i386/amd64-avx-mpx.xml.
302
57757c2f
YQ
3032017-08-09 Yao Qi <yao.qi@linaro.org>
304
305 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
306 and x32-avx-avx512.o.
307 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
308 i386/x32-avx-avx512.xml.
309
229d26fc
SM
3102017-07-26 Simon Marchi <simon.marchi@ericsson.com>
311
312 * tracepoint.h (enum class fast_tpoint_collect_result): New
313 enumeration.
314 (fast_tracepoint_collecting): Change return type to
315 fast_tpoint_collect_result.
316 * tracepoint.c (fast_tracepoint_collecting): Likewise.
317 * linux-low.h: Include tracepoint.h.
318 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
319 fast_tpoint_collect_result.
320 * linux-low.c (handle_tracepoints): Adjust.
321 (linux_fast_tracepoint_collecting): Change return type to
322 fast_tpoint_collect_result.
323 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
324 linux_wait_1, stuck_in_jump_pad_callback,
325 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
326 proceed_one_lwp): Adjust to type change.
327
2e1e43e1
YQ
3282017-07-10 Yao Qi <yao.qi@linaro.org>
329
330 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
331
adc764e7
YQ
3322017-06-29 Yao Qi <yao.qi@linaro.org>
333
334 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
335 Remove.
336 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
337
a206891a
SM
3382017-06-20 Simon Marchi <simon.marchi@ericsson.com>
339
340 * Makefile.in (IPA_OBJS): Sort and format one item per line.
341
9a6c7d9c
SDJ
3422017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
343
344 * linux-low.c (linux_create_inferior): Adjust code to access the
345 environment information via 'gdb_environ' class.
346 * lynx-low.c (lynx_create_inferior): Likewise.
347 * server.c (our_environ): Make it an instance of 'gdb_environ'.
348 (get_environ): Return a pointer to 'our_environ'.
349 (captured_main): Initialize 'our_environ'.
350 * server.h (get_environ): Adjust prototype.
351 * spu-low.c (spu_create_inferior): Adjust code to access the
352 environment information via 'gdb_environ' class.
353
ae3e2ccf
SM
3542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
355
356 * linux-low.c (linux_read_memory, linux_write_memory): Remove
357 usage of "register" keyword.
358
3e019bdc
SM
3592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
360
361 * configure: Re-generate.
362
8465943a
SM
3632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
364
365 * configure: Re-generate.
366
cf0dd6f0
SM
3672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
368
369 * Makefile.in (COMPILE.pre): Add "-x c++".
370
9845682b
SDJ
3712017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
372
373 * fork-child.c: Conditionally include <signal.h>.
374
aefd8b33
SDJ
3752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
376
377 * server.c (handle_general_set): Handle new packet
378 "QStartupWithShell".
379 (handle_query): Add "QStartupWithShell" to the list of supported
380 packets.
381 (gdbserver_usage): Add help text explaining the
382 new "--startup-with-shell" and "--no-startup-with-shell" CLI
383 options.
384 (captured_main): Recognize and act upon the presence of the new
385 CLI options.
386
2090129c
SDJ
3872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
388 Pedro Alves <palves@redhat.com>
389
390 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
391 * configure: Regenerate.
392 * configure.srv (srv_linux_obj): Add "fork-child.o" and
393 "fork-inferior.o".
394 (i[34567]86-*-lynxos*): Likewise.
395 (spu*-*-*): Likewise.
396 * fork-child.c: New file.
397 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
398 and "environ.h".
399 (linux_ptrace_fun): New function.
400 (linux_create_inferior): Adjust function prototype to reflect
401 change on "target.h". Adjust function code to use
402 "fork_inferior".
403 (linux_request_interrupt): Delete "signal_pid".
404 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
405 (lynx_ptrace_fun): New function.
406 (lynx_create_inferior): Adjust function prototype to reflect
407 change on "target.h". Adjust function code to use
408 "fork_inferior".
409 * nto-low.c (nto_create_inferior): Adjust function prototype and
410 code to reflect change on "target.h". Update comments.
411 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
412 "common-terminal.h" and "environ.h".
413 (terminal_fd): Moved to fork-child.c.
414 (old_foreground_pgrp): Likewise.
415 (restore_old_foreground_pgrp): Likewise.
416 (last_status): Make it global.
417 (last_ptid): Likewise.
418 (our_environ): New variable.
419 (startup_with_shell): Likewise.
420 (program_name): Likewise.
421 (program_argv): Rename to...
422 (program_args): ...this.
423 (wrapper_argv): New variable.
424 (start_inferior): Delete function.
425 (get_exec_wrapper): New function.
426 (get_exec_file): Likewise.
427 (get_environ): Likewise.
428 (prefork_hook): Likewise.
429 (post_fork_inferior): Likewise.
430 (postfork_hook): Likewise.
431 (postfork_child_hook): Likewise.
432 (handle_v_run): Update code to deal with arguments coming from the
433 remote host. Update calls from "start_inferior" to
434 "create_inferior".
435 (captured_main): Likewise. Initialize environment variable. Call
436 "have_job_control".
437 * server.h (post_fork_inferior): New prototype.
438 (get_environ): Likewise.
439 (last_status): Declare.
440 (last_ptid): Likewise.
441 (signal_pid): Likewise.
442 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
443 (spu_ptrace_fun): New function.
444 (spu_create_inferior): Adjust function prototype to reflect change
445 on "target.h". Adjust function code to use "fork_inferior".
446 * target.c (target_terminal_init): New function.
447 (target_terminal_inferior): Likewise.
448 (target_terminal_ours): Likewise.
449 * target.h: Include <vector>.
450 (struct target_ops) <create_inferior>: Update prototype.
451 (create_inferior): Update macro.
452 * utils.c (gdb_flush_out_err): New function.
453 * win32-low.c (win32_create_inferior): Adjust function prototype
454 and code to reflect change on "target.h".
455
043a4934
SDJ
4562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
457
458 * inferiors.c (switch_to_thread): New function.
459
15652511
SDJ
4602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
461
462 * Makefile.in (SFILE): Add "common/job-control.c".
463 (OBS): Add "job-control.o".
464
21ea5acd
SDJ
4652017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
466
467 * Makefile: Remove "@host_makefile_frag@".
468
e13cb306
PA
4692017-05-05 Pedro Alves <palves@redhat.com>
470
471 * configure: Regenerate.
472
c94fee56
SDJ
4732017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 * configure: Regenerate.
476
a0ff9e1a
SM
4772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
478
479 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
480 software_single_step change of return type to
481 std::vector<CORE_ADDR>.
482 * linux-low.c (install_software_single_step_breakpoints):
483 Likewise.
484 * linux-low.h (install_software_single_step_breakpoints):
485 Likewise.
486
be628ab8
SDJ
4872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
488
489 * remote-utils.c: Include "gdb_termios.h" instead of
490 "terminal.h".
491 * terminal.h: Delete file.
492
7c5ded6a
SDJ
4932017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
494
495 * server.c: Include <vector>.
496 <program_argv, wrapper_argv>: Convert to std::vector.
497 (start_inferior): Rewrite function to use C++.
498 (handle_v_run): Likewise. Update code that calculates the argv
499 based on the vRun packet; use C++.
500 (captured_main): Likewise.
501
436252de
SM
5022017-04-06 Simon Marchi <simon.marchi@ericsson.com>
503
504 * server.c (handle_v_cont): Initialize thread_resume::thread
505 with null_ptid.
506
9bf2a700
PA
5072017-04-05 Pedro Alves <palves@redhat.com>
508
509 * configure: Regenerate.
510
a121b7c1
PA
5112017-04-05 Pedro Alves <palves@redhat.com>
512
513 * gdbreplay.c (sync_error): Constify.
514 * linux-x86-low.c (push_opcode): Constify.
515
21c8a587
PA
5162017-04-05 Pedro Alves <palves@redhat.com>
517
518 * win32-low.c (get_child_debug_event)
519 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
520 Report TARGET_WAITKIND_SPURIOUS instead.
521
fb32b4f7
PA
5222017-04-05 Pedro Alves <palves@redhat.com>
523
524 * remote-utils.c (remote_prepare, remote_open): Constify.
525 * remote-utils.h (remote_prepare, remote_open): Constify.
526 * server.c (captured_main): Constify 'port' handling.
527
65dd1e59
SM
5282017-04-04 Simon Marchi <simon.marchi@ericsson.com>
529
530 * Makefile.in (clean): Clear .deps.
531
8fa5b777
SM
5322017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
533
534 * .gitignore: Remove generated files, replace with wildcard.
535 * (clean): Replace removal of generated files with wildcard.
536 (version.c): Replace with...
537 (version-generated.c): ...this.
538 (xml-builtin.c): Replace with...
539 (xml-builtin-generated.c): ...this.
540 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
541 (%.c: *regformats*): Replace with...
542 (%-generated.c: *regformats*): ...this.
543
a12e714b
MF
5442017-03-27 Max Filippov <jcmvbkbc@gmail.com>
545
546 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
547 (xtensa_fill_gregset): Call collect_register_by_name for
548 threadptr register.
549 (xtensa_store_gregset): Call supply_register_by_name for
550 threadptr register.
551
1a09b50a
MF
5522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
553
554 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
555 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
556 (xtensa_store_gregset): Call supply_register for all registers in
557 a0_regnum..a0_regnum + C0_NREGS range.
558
1a01e7c6
SM
5592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
560
561 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
562 (ax-ipa.o: ax.c): Remove.
563 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
564 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
565 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
566 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
567 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
568
36bc18a8
SM
5692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
570
571 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
572 (print-utils-ipa.o: ../common/print-utils.c): Remove.
573 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
574 (errors-ipa.o: ../common/errors.c): Remove.
575 (format-ipa.o: ../common/format.c): Remove.
576 (common-utils-ipa.o: ../common/common-utils.c): Remove.
577
a8ebe3d5
SM
5782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
579
580 * Makefile.in (%-ipa.o: %.c): New rule.
581 (tracepoint-ipa.o: tracepoint.c): Remove.
582 (utils-ipa.o: utils.c): Remove.
583 (remote-utils-ipa.o: remote-utils.c): Remove.
584 (regcache-ipa.o: regcache.c): Remove.
585 (i386-linux-ipa.o: i386-linux.c): Remove.
586 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
587 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
588 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
589 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
590 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
591 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
592 (amd64-linux-ipa.o: amd64-linux.c): Remove.
593 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
594 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
595 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
596 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
597 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
598 (aarch64-ipa.o: aarch64.c): Remove.
599 (s390-linux32-ipa.o: s390-linux32.c): Remove.
600 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
601 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
602 (s390-linux64-ipa.o: s390-linux64.c): Remove.
603 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
604 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
605 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
606 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
607 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
608 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
609 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
610 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
611 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
612 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
613 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
614 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
615 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
616 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
617 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
618 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
619 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
620 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
621 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
622 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
623 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
624 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
625 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
626 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
627 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
628 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
629 (tdesc-ipa.o: tdesc.c): Remove.
630 (x32-linux-ipa.o: x32-linux.c): Remove.
631 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
632 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
633
50cfacb7
SM
6342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
635
636 * Makefile.in (%.o: ../arch/%.c): New rule.
637 (arm.o: ../arch/arm.c): Remove.
638 (arm-linux.o: ../arch/arm-linux.c): Remove.
639 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
640 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
641
c5a22423
SM
6422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
643
644 * Makefile.in (%.o: ../nat/%.c): New rule.
645 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
646 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
647 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
648 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
649 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
650 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
651 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
652 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
653 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
654 (linux-personality.o: ../nat/linux-personality.c): Remove.
655 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
656 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
657 (x86-linux.o: ../nat/x86-linux.c): Remove.
658 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
659 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
660
6bda016b
SM
6612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
662
663 * Makefile.in (%.o: ../common/%.c): New rule.
664 (signals.o: ../common/signals.c): Remove.
665 (print-utils.o: ../common/print-utils.c): Remove.
666 (rsp-low.o: ../common/rsp-low.c): Remove.
667 (common-utils.o: ../common/common-utils.c): Remove.
668 (posix-strerror.o: ../common/posix-strerror.c): Remove.
669 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
670 (vec.o: ../common/vec.c): Remove.
671 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
672 (xml-utils.o: ../common/xml-utils.c): Remove.
673 (ptid.o: ../common/ptid.c): Remove.
674 (buffer.o: ../common/buffer.c): Remove.
675 (format.o: ../common/format.c): Remove.
676 (filestuff.o: ../common/filestuff.c): Remove.
677 (agent.o: ../common/agent.c): Remove.
678 (errors.o: ../common/errors.c): Remove.
679 (environ.o: ../common/environ.c): Remove.
680 (common-debug.o: ../common/common-debug.c): Remove.
681 (cleanups.o: ../common/cleanups.c): Remove.
682 (common-exceptions.o: ../common/common-exceptions.c): Remove.
683 (fileio.o: ../common/fileio.c): Remove.
684 (common-regcache.o: ../common/common-regcache.c): Remove.
685 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
686 (new-op.o: ../common/new-op.c): Remove.
687 (btrace-common.o: ../common/btrace-common.c): Remove.
688
21122961
SM
6892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * Makefile.in (%.o: ../target/%.c): New rule.
692 (waitstatus.o: ../target/waitstatus.c): Remove.
693
c362e621
SM
6942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
695
696 * Makefile.in
697 (%.c: ../regformats/%.dat,
698 (%.c: ../regformats/arm/%.dat,
699 (%.c: ../regformats/i386/%.dat,
700 (%.c: ../regformats/rs6000/%.dat): New rules.
701 (aarch64.c): Remove.
702 (reg-arm.c): Remove.
703 (arm-with-iwmmxt.c): Remove.
704 (arm-with-vfpv2.c): Remove.
705 (arm-with-vfpv3.c): Remove.
706 (arm-with-neon.c): Remove.
707 (reg-bfin.c): Remove.
708 (reg-cris.c): Remove.
709 (reg-crisv32.c): Remove.
710 (i386.c): Remove.
711 (i386-linux.c): Remove.
712 (i386-avx.c): Remove.
713 (i386-avx-linux.c): Remove.
714 (i386-avx-avx512.c): Remove.
715 (i386-avx-avx512-linux.c): Remove.
716 (i386-mpx.c): Remove.
717 (i386-mpx-linux.c): Remove.
718 (i386-avx-mpx-avx512-pku.c): Remove.
719 (i386-avx-mpx-avx512-pku-linux.c): Remove.
720 (i386-avx-mpx.c): Remove.
721 (i386-avx-mpx-linux.c): Remove.
722 (i386-mmx.c): Remove.
723 (i386-mmx-linux.c): Remove.
724 (reg-ia64.c): Remove.
725 (reg-m32r.c): Remove.
726 (reg-m68k.c): Remove.
727 (reg-cf.c): Remove.
728 (mips-linux.c): Remove.
729 (mips-dsp-linux.c): Remove.
730 (mips64-linux.c): Remove.
731 (mips64-dsp-linux.c): Remove.
732 (nios2-linux.c): Remove.
733 (powerpc-32.c): Remove.
734 (powerpc-32l.c): Remove.
735 (powerpc-altivec32l.c): Remove.
736 (powerpc-cell32l.c): Remove.
737 (powerpc-vsx32l.c): Remove.
738 (powerpc-isa205-32l.c): Remove.
739 (powerpc-isa205-altivec32l.c): Remove.
740 (powerpc-isa205-vsx32l.c): Remove.
741 (powerpc-e500l.c): Remove.
742 (powerpc-64l.c): Remove.
743 (powerpc-altivec64l.c): Remove.
744 (powerpc-cell64l.c): Remove.
745 (powerpc-vsx64l.c): Remove.
746 (powerpc-isa205-64l.c): Remove.
747 (powerpc-isa205-altivec64l.c): Remove.
748 (powerpc-isa205-vsx64l.c): Remove.
749 (s390-linux32.c): Remove.
750 (s390-linux32v1.c): Remove.
751 (s390-linux32v2.c): Remove.
752 (s390-linux64.c): Remove.
753 (s390-linux64v1.c): Remove.
754 (s390-linux64v2.c): Remove.
755 (s390-te-linux64.c): Remove.
756 (s390-vx-linux64.c): Remove.
757 (s390-tevx-linux64.c): Remove.
758 (s390x-linux64.c): Remove.
759 (s390x-linux64v1.c): Remove.
760 (s390x-linux64v2.c): Remove.
761 (s390x-te-linux64.c): Remove.
762 (s390x-vx-linux64.c): Remove.
763 (s390x-tevx-linux64.c): Remove.
764 (tic6x-c64xp-linux.c): Remove.
765 (tic6x-c64x-linux.c): Remove.
766 (tic6x-c62x-linux.c): Remove.
767 (reg-sh.c): Remove.
768 (reg-sparc64.c): Remove.
769 (reg-spu.c): Remove.
770 (amd64.c): Remove.
771 (amd64-linux.c): Remove.
772 (amd64-avx.c): Remove.
773 (amd64-avx-linux.c): Remove.
774 (amd64-avx-avx512.c): Remove.
775 (amd64-avx-avx512-linux.c): Remove.
776 (amd64-mpx.c): Remove.
777 (amd64-mpx-linux.c): Remove.
778 (amd64-avx-mpx-avx512-pku.c): Remove.
779 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
780 (amd64-avx-mpx.c): Remove.
781 (amd64-avx-mpx-linux.c): Remove.
782 (x32.c): Remove.
783 (x32-linux.c): Remove.
784 (x32-avx.c): Remove.
785 (x32-avx-linux.c): Remove.
786 (x32-avx-avx512.c): Remove.
787 (x32-avx-avx512-linux.c): Remove.
788 (reg-xtensa.c): Remove.
789 (reg-tilegx.c): Remove.
790 (reg-tilegx32.c): Remove.
791
1672e0d9
SDJ
7922017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
793
794 * Makefile.in (SFILES): Add "common/environ.c".
795 (OBJS): Add "common/environ.h".
796
239b6d10
WT
7972017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
798
799 * configure.ac: Check if the fs_base and gs_base members of
800 `struct user_regs_struct' exist.
801 * config.in: Regenerated.
802 * configure: Likewise.
803
694b382c
AT
8042017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
805
806 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
807 target_read_memory.
808 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
809 (get_next_pcs_syscall_next_pc): Likewise.
810
7dc53023
LM
8112016-12-23 Luis Machado <lgustavo@codesourcery.com>
812
813 * win32-i386-low.c: Fix incorrect reference to a couple source files.
814 * nto-x86-low.c: Likewise.
815
ad02e4fe
SM
8162016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
817
818 * Makefile.in: Include disable-implicit-rules.mk.
819
dcb07cfa
PA
8202016-11-23 Pedro Alves <palves@redhat.com>
821
822 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
823 (debug_vprintf): Use std::chrono::steady_clock instead of
824 gettimeofday. Use '.' instead of ':'.
825 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
826 (get_timestamp): Use std::chrono::steady_clock instead of
827 gettimeofday.
828
8629c02c
SM
8292016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
830
831 * Makefile.in: Fix whitespace formatting.
832
b593ecca
SM
8332016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
834
835 * Makefile.in (SFILES, OBS): Flatten list and order
836 alphabetically.
837
9986ba08
PA
8382016-11-23 Pedro Alves <palves@redhat.com>
839
840 * event-loop.c (handle_file_event): Use warning.
841 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
842 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
843 Use warning.
844
4eefa7bc
PA
8452016-11-23 Pedro Alves <palves@redhat.com>
846
847 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
848 output.
849 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
850 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
851 debug_printf and debug_flush for debug output.
852 * server.c (handle_general_set): Likewise.
853 * thread-db.c (try_thread_db_load): Use debug_printf for debug
854 output.
855
5443506e
SM
8562016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
857
858 * Makefile.in (.c.o): Replace rule with ...
859 (%.o: %.c): ... this one.
860
3b165252
SM
8612016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
864 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
865 make.
866 * configure.ac: Remove checks for the make program.
867 * configure: Re-generate.
868
0bcda685
PA
8692016-10-28 Pedro Alves <palves@redhat.com>
870
871 * Makefile.in (CXX_DIALECT): Get from configure.
872 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
873 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
874 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
875 * config.in: Regenerate.
876 * configure: Regenerate.
877
c3805894
YQ
8782016-10-27 Yao Qi <yao.qi@linaro.org>
879
880 * linux-low.c (linux_supports_range_stepping): Return true if
881 can_software_single_step return true.
882
89342618
YQ
8832016-10-27 Yao Qi <yao.qi@linaro.org>
884
885 * inferiors.c (find_inferior_in_random): New function.
886 * inferiors.h (find_inferior_in_random): Declare.
887 * linux-low.c (linux_wait_for_event_filtered): Call
888 find_inferior_in_random instead of find_inferior.
889
e3652c84
YQ
8902016-10-27 Yao Qi <yao.qi@linaro.org>
891
892 * linux-low.c (linux_wait_1): If single-step breakpoints are
893 inserted, remove them.
894
5a04c4cf
PA
8952016-10-26 Pedro Alves <palves@redhat.com>
896
897 * linux-low.c (handle_extended_wait): Link parent/child fork
898 threads.
899 (linux_wait_1): Unlink them.
900 (linux_set_resume_request): Ignore resume requests for
901 already-resumed and unhandled fork child threads.
902 * linux-low.h (struct lwp_info) <fork_relative>: New field.
903 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
904 New functions.
905 (handle_v_requests) <vCont>: Don't call require_running.
906 * server.h (in_queued_stop_replies): New declaration.
907
cb93dc7f
YQ
9082016-10-24 Yao Qi <yao.qi@linaro.org>
909
910 PR server/20733
911 * linux-aarch64-low.c (append_insns): Cast the return value to
912 'uint32_t *'.
913
a1078bea
YQ
9142016-10-10 Yao Qi <yao.qi@linaro.org>
915
916 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
917
1fb77080
SDJ
9182016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
919
920 * target.c (target_supports_multi_process): New function, moved
921 from...
922 * target.h (target_supports_multi_process): ... here. Remove
923 macro.
924
39b5a3b9
TT
9252016-10-05 Tom Tromey <tom@tromey.com>
926
927 PR remote/20655:
928 * tracepoint.c (handle_tracepoint_bkpts): Check
929 ipa_error_tracepoint, not ipa_stopping_tracepoint.
930
c1d0b70a
YQ
9312016-10-05 Yao Qi <yao.qi@linaro.org>
932
933 * configure.srv: Update the path of arm-*.xml files.
934
0a69eedb
YQ
9352016-10-05 Terry Guo <terry.guo@arm.com>
936 Yao Qi <yao.qi@linaro.org>
937
938 * Makefile.in: Adjust the path of rules.
939 * configure.srv: Update the path of xml files.
940 * regformats/arm-with-iwmmxt.dat: Regenerated.
941 * regformats/arm-with-neon.dat: Likewise.
942 * regformats/arm-with-vfpv2.dat: Likewise.
943 * regformats/arm-with-vfpv3.dat Likewise.
944
17e16485
YQ
9452016-09-30 Yao Qi <yao.qi@linaro.org>
946
947 PR gdbserver/20627
948 * target.c (target_stop_and_wait): Don't call
949 target_continue_no_signal, use resume_stop instead.
950
edeeb602
YQ
9512016-09-26 Yao Qi <yao.qi@linaro.org>
952
953 * linux-low.c (linux_wait_1): Call debug_exit.
954
503b1c39
PA
9552016-09-23 Pedro Alves <palves@redhat.com>
956
957 * Makefile.in (SFILES): Add common/new-op.c.
958 (OBS): Add common/new-op.o.
959 (new-op.o): New rule.
960
74172ecf
SM
9612016-09-21 Simon Marchi <simon.marchi@ericsson.com>
962
963 * .gitinore: Ignore more files.
964
fc6cda2e
YQ
9652016-09-21 Yao Qi <yao.qi@linaro.org>
966
967 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
968 23.
969
bc1e6c81
SDJ
9702016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
971
972 * server.c (start_inferior): Call target_mourn_inferior instead of
973 mourn_inferior; pass ptid_t argument to it.
974 (resume): Likewise.
975 (handle_target_event): Likewise.
976 * target.c (target_mourn_inferior): New function.
977 * target.h (mourn_inferior): Delete macro.
978
0e00e962
AA
9792016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
980
981 * linux-low.c (lwp_is_stepping): New function.
982
1d8cb77d
CL
9832016-09-06 Carl Love <cel@us.ibm.com>
984
985 * server.c (start_inferior): Fixed comment, requested comment change
986 didn't get updated correctly. Removed reference to ptrace () call as
987 it is only true on Linux systems.
988
7313bced
CL
9892016-09-06 Carl Love <cel@us.ibm.com>
990
991 * server.c (start_inferior): Do not call
992 function target_post_create_inferior () if the
993 inferior process has already exited.
994
cf6de44d
PA
9952016-09-05 Pedro Alves <palves@redhat.com>
996
997 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
998 (COMPILE.pre, CC_LD): Use CXX directly.
999 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1000 * acinclude.m4: Don't include build-with-cxx.m4.
1001 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1002 * configure: Regenerate.
1003
c1da6748
AT
10042016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1005
1006 PR gdb/19495
1007 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1008 call writing data to own_buf.
1009
f2b9e3df
SDJ
10102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1011
1012 * target.c (mywait): Call target_wait instead of
1013 the_target->wait.
1014 (target_wait): New function.
1015
049a8570
SDJ
10162016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1017
1018 * server.c (start_inferior): New variable 'ptid'. Replace calls
1019 to the_target->resume by target_continue{,_no_signal}, depending
1020 on the case.
1021 * target.c (target_stop_and_wait): Call target_continue_no_signal
1022 instead of the_target->resume.
1023 (target_continue): New function.
1024
3aa5cfa0
AT
10252016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1026
1027 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1028
754653a7
AZ
10292016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1030
1031 PR server/20491
1032 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1033 ps_prochandle.
1034 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1035 * linux-arm-low.c (ps_get_thread_area): Likewise.
1036 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1037 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1038 * linux-mips-low.c (ps_get_thread_area): Likewise.
1039 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1040 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1041 * linux-x86-low.c (ps_get_thread_area): Likewise.
1042 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1043
ed036b40
PA
10442016-08-19 Pedro Alves <palves@redhat.com>
1045
1046 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1047
c8ef42ee
PA
10482016-08-19 Pedro Alves <palves@redhat.com>
1049
1050 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1051 comment. Use memcpy instead of casting through unsigned long.
1052
9c235a72
PA
10532016-08-19 Pedro Alves <palves@redhat.com>
1054
1055 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1056 allocating around 0x80000000.
1057
201506da
PA
10582016-08-19 Pedro Alves <palves@redhat.com>
1059
1060 PR gdb/20415
1061 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1062 (x32-avx512-linux-ipa.o): New rules.
1063 * configure.ac (x86_64-*-linux*): New x32 check.
1064 * configure.srv (ipa_x32_linux_regobj): New.
1065 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1066 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1067 descriptions.
1068 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1069 descriptions.
1070 * configure: Regenerate.
1071
f348d89a
PA
10722016-08-09 Pedro Alves <palves@redhat.com>
1073
1074 PR gdb/18653
1075 * Makefile.in (OBS): Add signals-state-save-restore.o.
1076 (signals-state-save-restore.o): New rule.
1077 * config.in: Regenerate.
1078 * configure: Regenerate.
1079 * linux-low.c: Include "signals-state-save-restore.h".
1080 (linux_create_inferior): Call
1081 restore_original_signals_state.
1082 * server.c: Include "dispositions-save-restore.h".
1083 (captured_main): Call save_original_signals_state.
1084
1baf5149
PA
10852016-08-05 Pedro Alves <palves@redhat.com>
1086
1087 * configure: Regenerate.
1088
fcd4a73d
YQ
10892016-08-04 Yao Qi <yao.qi@linaro.org>
1090
1091 * linux-low.c (regsets_fetch_inferior_registers): Check
1092 errno is ESRCH or not.
1093
979659d0
YQ
10942016-08-02 Yao Qi <yao.qi@linaro.org>
1095
1096 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1097 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1098 (thread_db_load_search): Update.
1099 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1100 td_ta_set_event and td_ta_event_getmsg.
1101
6598661d
PA
11022016-07-26 Pedro Alves <palves@redhat.com>
1103
1104 PR server/20414
1105 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1106 of unsigned long for 64-bit registers and use uint32_t instead of
1107 unsigned int for 32-bit registers.
1108
9cf12d57
PA
11092016-07-26 Pedro Alves <palves@redhat.com>
1110
1111 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1112 to 'ptrace'.
1113
305450ed
TT
11142016-07-21 Tom Tromey <tom@tromey.com>
1115
1116 * configure: Rebuild.
1117
2583da7c
YQ
11182016-07-21 Yao Qi <yao.qi@linaro.org>
1119
1120 * mem-break.c (find_gdb_breakpoint): Cast bp to
1121 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1122
21536b36
YQ
11232016-07-21 Yao Qi <yao.qi@linaro.org>
1124
1125 * server.c (handle_v_requests): Support s and S actions
1126 if target_supports_software_single_step return true.
1127
8901d193
YQ
11282016-07-21 Yao Qi <yao.qi@linaro.org>
1129
1130 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1131 is resume_step, call maybe_hw_step.
1132 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1133 and unstop them.
1134 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1135 breakpoints or not.
1136 (proceed_one_lwp): If resume request is resume_step, install
1137 reinsert breakpoints and call maybe_hw_step.
1138
0e9a339e
YQ
11392016-07-21 Yao Qi <yao.qi@linaro.org>
1140
1141 * linux-low.c (proceed_one_lwp): Declare.
1142 (linux_resume_one_thread): Remove local variable 'step'.
1143 Lift code enqueue signal. Call proceed_one_lwp instead of
1144 linux_resume_one_lwp.
1145
4281b351
YQ
11462016-07-21 Yao Qi <yao.qi@linaro.org>
1147
1148 * linux-low.c (linux_resume_one_thread): Call
1149 enqueue_pending_signal.
1150
984a2c04
YQ
11512016-07-21 Yao Qi <yao.qi@linaro.org>
1152
1153 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1154 * inferiors.c (do_restore_current_thread_cleanup): New function.
1155 (make_cleanup_restore_current_thread): Likewise.
1156 * linux-low.c (install_software_single_step_breakpoints): Call
1157 make_cleanup_restore_current_thread. Switch current_thread to
1158 thread.
1159
bec903c9
YQ
11602016-07-21 Yao Qi <yao.qi@linaro.org>
1161
1162 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1163 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1164 (clone_one_breakpoint): Likewise.
1165 (delete_reinsert_breakpoints): Change parameter to thread.
1166 Callers updated.
1167 (has_reinsert_breakpoints): Likewise.
1168 (uninsert_reinsert_breakpoints): Likewise.
1169 (reinsert_reinsert_breakpoints): Likewise.
1170 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1171 (delete_reinsert_breakpoints): Likewise.
1172 (reinsert_reinsert_breakpoints): Likewise.
1173 (uninsert_reinsert_breakpoints): Likewise.
1174 (has_reinsert_breakpoints): Likewise.
1175
63c40ec7
YQ
11762016-07-21 Yao Qi <yao.qi@linaro.org>
1177
1178 * inferiors.c (get_thread_process): Make parameter const.
1179 * inferiors.h (get_thread_process): Update declaration.
1180 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1181 Add new parameters child_thread and parent_thread. Callers
1182 updated.
1183 * mem-break.h (clone_all_breakpoints): Update declaration.
1184
9aa76cd0
YQ
11852016-07-21 Yao Qi <yao.qi@linaro.org>
1186
1187 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1188 <command_list, handler>: Remove.
1189 (struct gdb_breakpoint): New.
1190 (struct other_breakpoint): New.
1191 (struct reinsert_breakpoint): New.
1192 (is_gdb_breakpoint): New function.
1193 (any_persistent_commands): Update command_list if
1194 is_gdb_breakpoint returns true.
1195 (set_breakpoint): Create breakpoints according to their types.
1196 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1197 (set_gdb_breakpoint_1): Likewise.
1198 (set_gdb_breakpoint): Likewise.
1199 (clear_breakpoint_conditions): Change parameter type to
1200 'struct gdb_breakpoint *'.
1201 (clear_breakpoint_commands): Likewise.
1202 (clear_breakpoint_conditions_and_commands): Likewise.
1203 (add_condition_to_breakpoint): Likewise.
1204 (add_breakpoint_condition): Likewise.
1205 (add_commands_to_breakpoint): Likewise.
1206 (check_breakpoints): Check other_breakpoint.
1207 (clone_one_breakpoint): Clone breakpopint according to its type.
1208 * mem-break.h (struct gdb_breakpoint): Declare.
1209 (set_gdb_breakpoint): Update declaration.
1210 (clear_breakpoint_conditions_and_commands): Likewise.
1211 (add_breakpoint_condition): Likewise.
1212 (add_breakpoint_commands): Likewise.
1213 * server.c (process_point_options): Change parameter type to
1214 'struct gdb_breakpoint *'.
1215
811f8301
YQ
12162016-07-21 Yao Qi <yao.qi@linaro.org>
1217
1218 * mem-break.c (set_breakpoint_at): Rename it to ...
1219 (set_breakpoint_type_at): ... it.
1220 (set_breakpoint_at): Call set_breakpoint_type_at.
1221 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1222 * mem-break.h (set_breakpoint_at): Update comments.
1223
b1c51e36
CLT
12242016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1225
1226 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1227 to buf parameter.
1228 (nios2_store_gregset): Likewise.
1229
ced2dffb
PA
12302016-07-01 Pedro Alves <palves@redhat.com>
1231 Antoine Tremblay <antoine.tremblay@ericsson.com>
1232
1233 * linux-low.c: Change interface to take the target lwp_info
1234 pointer directly and return void. Handle detaching from a zombie
1235 thread.
1236 (linux_detach_lwp_callback): New function.
1237 (linux_detach): Detach from the leader thread after detaching from
1238 the clone threads.
1239
2ac09a5b
YQ
12402016-06-28 Yao Qi <yao.qi@linaro.org>
1241
1242 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1243 for variable new_offset.
1244 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1245 (aarch64_ftrace_insn_reloc_cb): Likewise.
1246 (aarch64_ftrace_insn_reloc_tb): Likewise.
1247 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1248 PRIx64 instead of PRIx32.
1249
79e7fd4f
YQ
12502016-06-28 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1253 (the_low_target): Install arm_get_syscall_trapinfo.
1254
061fc021
YQ
12552016-06-28 Yao Qi <yao.qi@linaro.org>
1256
1257 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1258 function.
1259 (the_low_target): Install aarch64_get_syscall_trapinfo.
1260
4cc32bec
YQ
12612016-06-28 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1264 Callers updated.
1265 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1266 Remove parameter sysno.
1267 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1268 sysret.
1269
782c1122
AA
12702016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1271
1272 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1273 (s390_emit_ne_goto): Likewise.
1274 (s390_emit_lt_goto): Likewise.
1275 (s390_emit_le_goto): Likewise.
1276 (s390_emit_gt_goto): Likewise.
1277 (s390_emit_ge_goto): Likewise.
1278 (s390x_emit_eq_goto): Likewise.
1279 (s390x_emit_ne_goto): Likewise.
1280 (s390x_emit_lt_goto): Likewise.
1281 (s390x_emit_le_goto): Likewise.
1282 (s390x_emit_gt_goto): Likewise.
1283 (s390x_emit_ge_goto): Likewise.
1284 (s390_emit_ops_impl): Mark variable static.
1285 (s390x_emit_ops): Likewise.
1286
2e7b624b
YQ
12872016-06-17 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-low.c (handle_extended_wait): Call
1290 uninsert_reinsert_breakpoints for the parent process. Remove
1291 reinsert breakpoints from the child process. Reinsert them to
1292 the parent process when vfork is done.
1293 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1294 (reinsert_reinsert_breakpoints): New function.
1295 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1296 (reinsert_reinsert_breakpoints): Declare.
1297
8a81c5d7
YQ
12982016-06-17 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-low.c (handle_extended_wait): If the parent is doing
1301 step-over, remove the reinsert breakpoints from the forked child.
1302
f50bf8e5
YQ
13032016-06-17 Yao Qi <yao.qi@linaro.org>
1304
1305 * linux-low.c (unsuspend_all_lwps): Declare.
1306 (linux_low_filter_event): If thread exited, call finish_step_over.
1307 If step-over is finished, unsuspend other threads.
1308
8376a3cb
YQ
13092016-06-17 Yao Qi <yao.qi@linaro.org>
1310
1311 * linux-low.c (linux_resume_one_lwp_throw): Assert
1312 has_reinsert_breakpoints returns false.
1313 * mem-break.c (delete_disabled_breakpoints): Assert
1314 bp type isn't reinsert_breakpoint.
1315
f79b145d
YQ
13162016-06-17 Yao Qi <yao.qi@linaro.org>
1317
1318 * linux-low.c (maybe_hw_step): New function.
1319 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1320 (finish_step_over): Switch current_thread to lwp temporarily,
1321 and assert has_reinsert_breakpoints returns true.
1322 (proceed_one_lwp): Call maybe_hw_step.
1323 * mem-break.c (has_reinsert_breakpoints): New function.
1324 * mem-break.h (has_reinsert_breakpoints): Declare.
1325
0ae534d2
JT
13262016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1327
1328 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1329
fcdad592
YQ
13302016-05-17 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1333 instead of find_inferior.
1334
9e784964
YQ
13352016-05-05 Yao Qi <yao.qi@linaro.org>
1336
1337 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1338 Initialize res to zero.
1339
cf2ebb6e
YQ
13402016-05-05 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1343 to uint32_t.
1344
c1aebf87
UW
13452016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1346
1347 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1348 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1349 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1350
35fd2deb 13512016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1352 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1353
1354 * tracepoint.c (write_inferior_int8): New function.
1355 (cmd_qtenable_disable): Write enable flag using
1356 write_inferior_int8.
1357
484b3c32
YQ
13582016-04-25 Yao Qi <yao.qi@linaro.org>
1359
1360 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1361 (need_step_over_p): Return zero if the LWP has pending signals
1362 can be delivered on software single step target.
1363
85ba7d86
YQ
13642016-04-25 Yao Qi <yao.qi@linaro.org>
1365
1366 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1367 return instead of error.
1368
3539aa13
YQ
13692016-04-22 Yao Qi <yao.qi@linaro.org>
1370
1371 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1372 to 23.
1373
5b061e98
YQ
13742016-04-22 Yao Qi <yao.qi@linaro.org>
1375
1376 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1377 signal when stepping over breakpoint with software single
1378 step.
1379
3451269c
PA
13802016-04-21 Pedro Alves <palves@redhat.com>
1381
1382 * linux-s390-low.c (s390_collect_ptrace_register)
1383 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1384 add casts.
1385 (s390_check_regset): Use void * instead of gdb_byte *.
1386
a2358508
PA
13872016-04-20 Pedro Alves <palves@redhat.com>
1388
1389 * configure: Renegerate.
1390
6885166d
YQ
13912016-04-20 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1394 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1395 number 16.
1396 (arm_store_gregset): Likewise.
1397
2b863f51
WT
13982016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1399
1400 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1401 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1402 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1403 (amd64-avx-mpx-linux.c): New rules.
1404 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1405 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1406 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1407 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1408 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1409 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1410 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1411 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1412 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1413 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1414 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1415 * linux-x86-low.c (x86_linux_read_description): Add case for
1416 X86_XSTATE_AVX_MPX_MASK.
1417 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1418 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1419 init_registers_i386_avx_mpx_linux.
1420 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1421 (initialize_low_tracepoint): Call
1422 init_registers_i386_avx_mpx_linux.
1423 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1424 (initialize_low_tracepoint): Call
1425 init_registers_amd64_avx_mpx_linux.
1426 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1427 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1428 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1429 declarations.
1430
9b30624b
PA
14312016-04-18 Pedro Alves <palves@redhat.com>
1432
1433 * configure: Regenerate.
1434
45e3745e
AT
14352016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1436
1437 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1438 (aarch64_emit_sub): Likewise.
1439
2afc13ff
PA
14402016-04-12 Pedro Alves <palves@redhat.com>
1441
1442 * utils.c (prepare_to_throw_exception): Delete.
1443
6e774b13
SM
14442016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1445
1446 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1447
4dca19f8
MK
14482016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1449
1450 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1451
d0a9981f
MK
14522016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1453
1454 * linux-aarch64-ipa.c: Add <elf.h> include.
1455 * linux-ppc-ipa.c: Add <elf.h> include.
1456 * linux-s390-ipa.c: Add <elf.h> include.
1457
252db07e
MK
14582016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1459
1460 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1461 (get_raw_reg_ptr): Likewise.
1462 (get_trace_state_variable_value_ptr): Likewise.
1463 (set_trace_state_variable_value_ptr): Likewise.
1464 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1465 char *.
1466
14e2b6d9
MK
14672016-03-31 Wei-cheng Wang <cole945@gmail.com>
1468 Marcin Kościelnicki <koriakin@0x04.net>
1469
1470 PR/17221
1471 * linux-ppc-low.c (emit_insns): New function.
1472 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1473 (ppc_emit_prologue): New function.
1474 (ppc_emit_epilogue): New function.
1475 (ppc_emit_add): New function.
1476 (ppc_emit_sub): New function.
1477 (ppc_emit_mul): New function.
1478 (ppc_emit_lsh): New function.
1479 (ppc_emit_rsh_signed): New function.
1480 (ppc_emit_rsh_unsigned): New function.
1481 (ppc_emit_ext): New function.
1482 (ppc_emit_zero_ext): New function.
1483 (ppc_emit_log_not): New function.
1484 (ppc_emit_bit_and): New function.
1485 (ppc_emit_bit_or): New function.
1486 (ppc_emit_bit_xor): New function.
1487 (ppc_emit_bit_not): New function.
1488 (ppc_emit_equal): New function.
1489 (ppc_emit_less_signed): New function.
1490 (ppc_emit_less_unsigned): New function.
1491 (ppc_emit_ref): New function.
1492 (ppc_emit_const): New function.
1493 (ppc_emit_reg): New function.
1494 (ppc_emit_pop): New function.
1495 (ppc_emit_stack_flush): New function.
1496 (ppc_emit_swap): New function.
1497 (ppc_emit_stack_adjust): New function.
1498 (ppc_emit_call): New function.
1499 (ppc_emit_int_call_1): New function.
1500 (ppc_emit_void_call_2): New function.
1501 (ppc_emit_if_goto): New function.
1502 (ppc_emit_goto): New function.
1503 (ppc_emit_eq_goto): New function.
1504 (ppc_emit_ne_goto): New function.
1505 (ppc_emit_lt_goto): New function.
1506 (ppc_emit_le_goto): New function.
1507 (ppc_emit_gt_goto): New function.
1508 (ppc_emit_ge_goto): New function.
1509 (ppc_write_goto_address): New function.
1510 (ppc_emit_ops_impl): New static variable.
1511 (ppc64v1_emit_prologue): New function.
1512 (ppc64v2_emit_prologue): New function.
1513 (ppc64_emit_epilogue): New function.
1514 (ppc64_emit_add): New function.
1515 (ppc64_emit_sub): New function.
1516 (ppc64_emit_mul): New function.
1517 (ppc64_emit_lsh): New function.
1518 (ppc64_emit_rsh_signed): New function.
1519 (ppc64_emit_rsh_unsigned): New function.
1520 (ppc64_emit_ext): New function.
1521 (ppc64_emit_zero_ext): New function.
1522 (ppc64_emit_log_not): New function.
1523 (ppc64_emit_bit_and): New function.
1524 (ppc64_emit_bit_or): New function.
1525 (ppc64_emit_bit_xor): New function.
1526 (ppc64_emit_bit_not): New function.
1527 (ppc64_emit_equal): New function.
1528 (ppc64_emit_less_signed): New function.
1529 (ppc64_emit_less_unsigned): New function.
1530 (ppc64_emit_ref): New function.
1531 (ppc64_emit_const): New function.
1532 (ppc64v1_emit_reg): New function.
1533 (ppc64v2_emit_reg): New function.
1534 (ppc64_emit_pop): New function.
1535 (ppc64_emit_stack_flush): New function.
1536 (ppc64_emit_swap): New function.
1537 (ppc64v1_emit_call): New function.
1538 (ppc64v2_emit_call): New function.
1539 (ppc64v1_emit_int_call_1): New function.
1540 (ppc64v2_emit_int_call_1): New function.
1541 (ppc64v1_emit_void_call_2): New function.
1542 (ppc64v2_emit_void_call_2): New function.
1543 (ppc64_emit_if_goto): New function.
1544 (ppc64_emit_eq_goto): New function.
1545 (ppc64_emit_ne_goto): New function.
1546 (ppc64_emit_lt_goto): New function.
1547 (ppc64_emit_le_goto): New function.
1548 (ppc64_emit_gt_goto): New function.
1549 (ppc64_emit_ge_goto): New function.
1550 (ppc64v1_emit_ops_impl): New static variable.
1551 (ppc64v2_emit_ops_impl): New static variable.
1552 (ppc_emit_ops): New function.
1553 (linux_low_target): Wire in ppc_emit_ops.
1554
a2174ba4
MK
15552016-03-31 Wei-cheng Wang <cole945@gmail.com>
1556 Marcin Kościelnicki <koriakin@0x04.net>
1557
1558 PR/17221
1559 * Makefile.in: Add powerpc-*-ipa.o
1560 * configure.srv: Add ipa_obj for powerpc*-linux.
1561 * linux-ppc-ipa.c: New file.
1562 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1563 includes.
1564 (PPC_FIELD): New macro.
1565 (PPC_SEXT): New macro.
1566 (PPC_OP6): New macro.
1567 (PPC_BO): New macro.
1568 (PPC_LI): New macro.
1569 (PPC_BD): New macro.
1570 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1571 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1572 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1573 (ppc_get_thread_area): New function.
1574 (is_elfv2_inferior): New function.
1575 (gen_ds_form): New function.
1576 (GEN_STD): New macro.
1577 (GEN_STDU): New macro.
1578 (GEN_LD): New macro.
1579 (GEN_LDU): New macro.
1580 (gen_d_form): New function.
1581 (GEN_ADDI): New macro.
1582 (GEN_ADDIS): New macro.
1583 (GEN_LI): New macro.
1584 (GEN_LIS): New macro.
1585 (GEN_ORI): New macro.
1586 (GEN_ORIS): New macro.
1587 (GEN_LWZ): New macro.
1588 (GEN_STW): New macro.
1589 (GEN_STWU): New macro.
1590 (gen_xfx_form): New function.
1591 (GEN_MFSPR): New macro.
1592 (GEN_MTSPR): New macro.
1593 (GEN_MFCR): New macro.
1594 (GEN_MTCR): New macro.
1595 (GEN_SYNC): New macro.
1596 (GEN_LWSYNC): New macro.
1597 (gen_x_form): New function.
1598 (GEN_OR): New macro.
1599 (GEN_MR): New macro.
1600 (GEN_LWARX): New macro.
1601 (GEN_STWCX): New macro.
1602 (GEN_CMPW): New macro.
1603 (gen_md_form): New function.
1604 (GEN_RLDICL): New macro.
1605 (GEN_RLDICR): New macro.
1606 (gen_i_form): New function.
1607 (GEN_B): New macro.
1608 (GEN_BL): New macro.
1609 (gen_b_form): New function.
1610 (GEN_BNE): New macro.
1611 (GEN_LOAD): New macro.
1612 (GEN_STORE): New macro.
1613 (gen_limm): New function.
1614 (gen_atomic_xchg): New function.
1615 (gen_call): New function.
1616 (ppc_relocate_instruction): New function.
1617 (ppc_install_fast_tracepoint_jump_pad): New function.
1618 (ppc_get_min_fast_tracepoint_insn_len): New function.
1619 (ppc_get_ipa_tdesc_idx): New function.
1620 (the_low_target): Wire in the new functions.
1621 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1622 tdescs.
1623 * linux-ppc-tdesc.h: New file.
1624
a13c4696
MK
16252016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1626
1627 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1628 (alloc_jump_pad_buffer): New function.
1629 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1630 (alloc_jump_pad_buffer): New function.
1631 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1632 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1633 (alloc_jump_pad_buffer): New function.
1634 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1635 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1636 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1637 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1638
1cda1512
MK
16392016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1640
1641 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1642 * linux-amd64-ipa.c: Likewise.
1643 * linux-i386-ipa.c: Likewise.
1644 * linux-s390-ipa.c: Likewise.
1645 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1646 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1647 set_trace_state_variable_value_ptr.
1648 (struct ipa_sym_addresses): Likewise.
1649 (symbol_list): Likewise.
1650 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1651 accessing gdb_collect directly.
1652 (gdb_collect_ptr_type): New typedef.
1653 (get_raw_reg_ptr_type): New typedef.
1654 (get_trace_state_variable_value_ptr_type): New typedef.
1655 (set_trace_state_variable_value_ptr_type): New typedef.
1656 (gdb_collect_ptr): New global.
1657 (get_raw_reg_ptr): New global.
1658 (get_trace_state_variable_value_ptr): New global.
1659 (set_trace_state_variable_value_ptr): New global.
1660 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1661 accessing get_raw_reg directly.
1662 (get_get_tsv_func_addr): Likewise for
1663 get_trace_state_variable_value_ptr.
1664 (get_set_tsv_func_addr): Likewise for
1665 set_trace_state_variable_value_ptr.
1666 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1667
72fb5488
SM
16682016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1669
1670 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1671
28170b88
MK
16722016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1673
1674 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1675 packets.
1676 (relocate_instruction): Remove own_buf.
1677 * server.c (own_buf): Make global.
1678 (handle_v_requests): Make global.
1679 * server.h (own_buf): New declaration.
1680 (handle_v_requests): New prototype.
1681
f39e8743
MK
16822016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1683
1684 PR 18377
1685 * linux-s390-low.c (add_insns): New function.
1686 (s390_emit_prologue): New function.
1687 (s390_emit_epilogue): New function.
1688 (s390_emit_add): New function.
1689 (s390_emit_sub): New function.
1690 (s390_emit_mul): New function.
1691 (s390_emit_lsh): New function.
1692 (s390_emit_rsh_signed): New function.
1693 (s390_emit_rsh_unsigned): New function.
1694 (s390_emit_ext): New function.
1695 (s390_emit_log_not): New function.
1696 (s390_emit_bit_and): New function.
1697 (s390_emit_bit_or): New function.
1698 (s390_emit_bit_xor): New function.
1699 (s390_emit_bit_not): New function.
1700 (s390_emit_equal): New function.
1701 (s390_emit_less_signed): New function.
1702 (s390_emit_less_unsigned): New function.
1703 (s390_emit_ref): New function.
1704 (s390_emit_if_goto): New function.
1705 (s390_emit_goto): New function.
1706 (s390_write_goto_address): New function.
1707 (s390_emit_litpool): New function.
1708 (s390_emit_const): New function.
1709 (s390_emit_call): New function.
1710 (s390_emit_reg): New function.
1711 (s390_emit_pop): New function.
1712 (s390_emit_stack_flush): New function.
1713 (s390_emit_zero_ext): New function.
1714 (s390_emit_swap): New function.
1715 (s390_emit_stack_adjust): New function.
1716 (s390_emit_set_r2): New function.
1717 (s390_emit_int_call_1): New function.
1718 (s390_emit_void_call_2): New function.
1719 (s390_emit_eq_goto): New function.
1720 (s390_emit_ne_goto): New function.
1721 (s390_emit_lt_goto): New function.
1722 (s390_emit_le_goto): New function.
1723 (s390_emit_gt_goto): New function.
1724 (s390_emit_ge_goto): New function.
1725 (s390x_emit_prologue): New function.
1726 (s390x_emit_epilogue): New function.
1727 (s390x_emit_add): New function.
1728 (s390x_emit_sub): New function.
1729 (s390x_emit_mul): New function.
1730 (s390x_emit_lsh): New function.
1731 (s390x_emit_rsh_signed): New function.
1732 (s390x_emit_rsh_unsigned): New function.
1733 (s390x_emit_ext): New function.
1734 (s390x_emit_log_not): New function.
1735 (s390x_emit_bit_and): New function.
1736 (s390x_emit_bit_or): New function.
1737 (s390x_emit_bit_xor): New function.
1738 (s390x_emit_bit_not): New function.
1739 (s390x_emit_equal): New function.
1740 (s390x_emit_less_signed): New function.
1741 (s390x_emit_less_unsigned): New function.
1742 (s390x_emit_ref): New function.
1743 (s390x_emit_if_goto): New function.
1744 (s390x_emit_const): New function.
1745 (s390x_emit_call): New function.
1746 (s390x_emit_reg): New function.
1747 (s390x_emit_pop): New function.
1748 (s390x_emit_stack_flush): New function.
1749 (s390x_emit_zero_ext): New function.
1750 (s390x_emit_swap): New function.
1751 (s390x_emit_stack_adjust): New function.
1752 (s390x_emit_int_call_1): New function.
1753 (s390x_emit_void_call_2): New function.
1754 (s390x_emit_eq_goto): New function.
1755 (s390x_emit_ne_goto): New function.
1756 (s390x_emit_lt_goto): New function.
1757 (s390x_emit_le_goto): New function.
1758 (s390x_emit_gt_goto): New function.
1759 (s390x_emit_ge_goto): New function.
1760 (s390_emit_ops): New function.
1761 (struct linux_target_ops): Fill in emit_ops hook.
1762
abd9baf9
MK
17632016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1764
1765 PR 18377
1766 * Makefile.in: Add s390 IPA files.
1767 * configure.srv: Build IPA for s390.
1768 * linux-s390-ipa.c: New file.
1769 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1770 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1771 (tdesc_s390_linux32): Likewise.
1772 (init_registers_s390_linux32v1): Likewise.
1773 (tdesc_s390_linux32v1): Likewise.
1774 (init_registers_s390_linux32v2): Likewise.
1775 (tdesc_s390_linux32v2): Likewise.
1776 (init_registers_s390_linux64): Likewise.
1777 (tdesc_s390_linux64): Likewise.
1778 (init_registers_s390_linux64v1): Likewise.
1779 (tdesc_s390_linux64v1): Likewise.
1780 (init_registers_s390_linux64v2): Likewise.
1781 (tdesc_s390_linux64v2): Likewise.
1782 (init_registers_s390_te_linux64): Likewise.
1783 (tdesc_s390_te_linux64): Likewise.
1784 (init_registers_s390_vx_linux64): Likewise.
1785 (tdesc_s390_vx_linux64): Likewise.
1786 (init_registers_s390_tevx_linux64): Likewise.
1787 (tdesc_s390_tevx_linux64): Likewise.
1788 (init_registers_s390x_linux64): Likewise.
1789 (tdesc_s390x_linux64): Likewise.
1790 (init_registers_s390x_linux64v1): Likewise.
1791 (tdesc_s390x_linux64v1): Likewise.
1792 (init_registers_s390x_linux64v2): Likewise.
1793 (tdesc_s390x_linux64v2): Likewise.
1794 (init_registers_s390x_te_linux64): Likewise.
1795 (tdesc_s390x_te_linux64): Likewise.
1796 (init_registers_s390x_vx_linux64): Likewise.
1797 (tdesc_s390x_vx_linux64): Likewise.
1798 (init_registers_s390x_tevx_linux64): Likewise.
1799 (tdesc_s390x_tevx_linux64): Likewise.
1800 (have_hwcap_s390_vx): New static variable.
1801 (s390_arch_setup): Fill have_hwcap_s390_vx.
1802 (s390_get_thread_area): New function.
1803 (s390_ft_entry_gpr_esa): New const.
1804 (s390_ft_entry_gpr_zarch): New const.
1805 (s390_ft_entry_misc): New const.
1806 (s390_ft_entry_fr): New const.
1807 (s390_ft_entry_vr): New const.
1808 (s390_ft_main_31): New const.
1809 (s390_ft_main_64): New const.
1810 (s390_ft_exit_fr): New const.
1811 (s390_ft_exit_vr): New const.
1812 (s390_ft_exit_misc): New const.
1813 (s390_ft_exit_gpr_esa): New const.
1814 (s390_ft_exit_gpr_zarch): New const.
1815 (append_insns): New function.
1816 (s390_relocate_instruction): New function.
1817 (s390_install_fast_tracepoint_jump_pad): New function.
1818 (s390_get_min_fast_tracepoint_insn_len): New function.
1819 (s390_get_ipa_tdesc_idx): New function.
1820 (struct linux_target_ops): Wire in the above functions.
1821 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1822 * linux-s390-tdesc.h: New file.
1823
a4105d04
MK
18242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1825
1826 * linux-s390-low.c (s390_supports_tracepoints): New function.
1827 (struct linux_target_ops): Fill supports_tracepoints hook.
1828
35ac8b3e
YQ
18292016-03-18 Yao Qi <yao.qi@linaro.org>
1830
1831 * linux-low.c (lwp_signal_can_be_delivered): New function.
1832 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1833
94610ec4
YQ
18342016-03-18 Yao Qi <yao.qi@linaro.org>
1835
1836 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1837 0 if signal is enqueued. Remove 'signal' from one debugging
1838 message. Move one debugging message to some lines below.
1839 Remove code setting 'signal' to 0.
1840
80aea927
YQ
18412016-03-18 Yao Qi <yao.qi@linaro.org>
1842
1843 * linux-low.c (linux_low_filter_event): Remove redundant
1844 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1845
b04fd3be
MK
18462016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1847
1848 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1849 (struct linux_target_ops): Wire in the above.
1850
c40c8d4b
YQ
18512016-03-03 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-low.c: Update comments to start_step_over.
1854
0f8288ae
YQ
18552016-03-03 Yao Qi <yao.qi@linaro.org>
1856
1857 PR server/19736
1858 * linux-low.c (handle_extended_wait): Set child suspended
1859 if event_lwp->bp_reinsert isn't zero.
1860
fdbd04a8
YQ
18612016-03-02 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1864 enqueue_pending_signal.
1865
6896a8fa
MK
18662016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1867
1868 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1869 is actually loaded.
1870
ab503087
MK
18712016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1872
1873 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1874 (s390_regmap_3264) [!__s390x__]: New global.
1875 (s390_collect_ptrace_register): Skip map entries containing -1.
1876 (s390_supply_ptrace_register): Ditto.
1877 (s390_fill_gprs_high): New function.
1878 (s390_store_gprs_high): New function.
1879 (s390_regsets): Add NT_S390_HIGH_GPRS.
1880 (s390_get_hwcap): Enable on 31-bit.
1881 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1882 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1883 Detect NT_S390_HIGH_GPRS.
1884 (s390_usrregs_info_3264): Enable on 31-bit.
1885 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1886 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1887
ae91f625
MK
18882016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1889
1890 PR gdb/13808
1891 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1892 * configure.srv: Ditto.
1893 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1894 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1895 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1896 (init_registers_amd64_linux): Remove prototype.
1897 (tdesc_amd64_linux): Remove declaration.
1898 (get_ipa_tdesc): New function.
1899 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1900 initialize remaining tdescs.
1901 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1902 (init_registers_i386_linux): Remove prototype.
1903 (tdesc_i386_linux): Remove declaration.
1904 (get_ipa_tdesc): New function.
1905 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1906 initialize remaining tdescs.
1907 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1908 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1909 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1910 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1911 (x86_get_ipa_tdesc_idx): New function.
1912 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1913 * linux-x86-tdesc.h: New file.
1914 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1915 (target_get_ipa_tdesc_idx): New macro.
1916 * tracepoint.c (ipa_tdesc_idx): New macro.
1917 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1918 (symbol_list): Add ipa_tdesc_idx.
1919 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1920 (ipa_tdesc): Remove.
1921 (ipa_tdesc_idx): New variable.
1922 (get_context_regcache): Use get_ipa_tdesc.
1923 (gdb_collect): Ditto.
1924 (gdb_probe): Ditto.
1925 * tracepoint.h (get_ipa_tdesc): New prototype.
1926 (ipa_tdesc): Remove.
1927
e7ad2f14
PA
19282016-02-24 Pedro Alves <palves@redhat.com>
1929
1930 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1931 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1932 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1933 Factor out common code between the USE_SIGTRAP_SIGINFO and
1934 !USE_SIGTRAP_SIGINFO blocks.
1935 (linux_low_filter_event): Call save_stop_reason instead of
1936 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1937 Update comments.
1938 (linux_wait_1): Update comments.
1939
657f9cde
WW
19402016-02-24 Wei-cheng Wang <cole945@gmail.com>
1941
1942 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1943 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1944 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1945 ppc_insert_point, ppc_remove_point.
1946
b00b61e1
MK
19472016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1948
1949 * linux-s390-low.c (s390_supports_z_point_type): New function.
1950 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1951
553cb527
YQ
19522016-02-16 Yao Qi <yao.qi@linaro.org>
1953
1954 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1955 PC. Get pc from regcache_read_pc.
1956
a5652c21
YQ
19572016-02-12 Yao Qi <yao.qi@linaro.org>
1958
1959 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1960 or linux_get_pc_32bit.
1961 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1962
ed443b61
YQ
19632016-02-12 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1966 arm_linux_get_next_pcs_fixup.
1967
020ecd38
MK
19682016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1969
1970 * tracepoint.c (x_tracepoint_action_download): Change
1971 write_inferior_data_ptr to write_inferior_data_pointer.
1972 (cmd_qtstart): Likewise.
1973 (write_inferior_data_ptr): Remove.
1974 (download_agent_expr): Change write_inferior_data_ptr to
1975 write_inferior_data_pointer.
1976 (download_tracepoint_1): Likewise.
1977 (download_tracepoint): Likewise.
1978 (download_trace_state_variables): Likewise.
1979
7cae9051
WW
19802016-02-11 Wei-cheng Wang <cole945@gmail.com>
1981 Marcin Kościelnicki <koriakin@0x04.net>
1982
1983 * tracepoint.c (struct tracepoint_action_ops): Remove.
1984 (struct tracepoint_action): Remove ops.
1985 (m_tracepoint_action_download, r_tracepoint_action_download)
1986 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1987 size and offset accordingly.
1988 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1989 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1990 (tracepoint_action_send, tracepoint_action_download): New functions.
1991 Helpers for trace action handlers.
1992 (add_tracepoint_action): Remove setup actions ops.
1993 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1994
9f6a71b4
YQ
19952016-02-10 Yao Qi <yao.qi@linaro.org>
1996
1997 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1998
1e94266c
SM
19992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2002 to AC_OUTPUT.
2003 * configure: Regenerate.
2004
8adce034
SM
20052016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2006
2007 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2008 void * to gdb_byte *.
2009 * linux-low.c (siginfo_fixup): Likewise.
2010 (linux_xfer_siginfo): Likewise.
2011 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2012 Likewise.
2013 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2014
93813b37
WT
20152016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2016
2017 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2018 to srv_tgtobj.
2019 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2020 to srv_tgtobj.
2021 * linux-x86-low.c [__x86_64__]: Include
2022 "nat/amd64-linux-siginfo.h".
2023 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2024 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2025 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2026 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2027 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2028 (cpt_si_fd, si_timerid, si_overrun): Move from
2029 nat/amd64-linux-siginfo.c.
2030 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2031
8424cc97
SM
20322016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2033
2034 * server.c (skip_to_semicolon): Remove.
2035 (process_point_options): Use strchrnul instead of
2036 skip_to_semicolon.
2037
4d18591b
YQ
20382016-01-26 Yao Qi <yao.qi@linaro.org>
2039
2040 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2041 * linux-low.c (install_software_single_step_breakpoints): Don't
2042 call regcache_read_pc.
2043 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2044 argument pc.
2045
d8020970
YQ
20462016-01-26 Yao Qi <yao.qi@linaro.org>
2047
2048 * linux-low.c (install_software_single_step_breakpoints): Call
2049 regcache_read_pc instead of get_pc.
2050
8b207339
YQ
20512016-01-26 Yao Qi <yao.qi@linaro.org>
2052
2053 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2054 (unblock_async_io): Rename to ...
2055 (block_unblock_async_io): ... it. New function.
2056 (enable_async_io): Don't install SIGIO handler. Unblock it
2057 instead.
2058 (disable_async_io): Don't ignore SIGIO. Block it instead.
2059 (initialize_async_io): Install SIGIO handler. Don't call
2060 unblock_async_io.
2061
18879fef
YQ
20622016-01-26 Yao Qi <yao.qi@linaro.org>
2063
2064 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2065 first character is '\003', call *the_target->request_interrupt.
2066
a0f8e08a
YQ
20672016-01-25 Yao Qi <yao.qi@linaro.org>
2068
2069 * remote-utils.c (new_thread_notify): Remove.
2070 (dead_thread_notify): Likewise.
2071 * remote-utils.h (new_thread_notify): Remove declaration.
2072 (dead_thread_notify): Likewise.
2073
cc5fd9ab
MK
20742016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2075
2076 * gdb.trace/pending.exp: Fix expected message on continue.
2077
99e8eb11
MK
20782016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2079
2080 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2081 it works properly on big-endian machines where sizeof (CORE_ADDR)
2082 != sizeof (void *).
2083
a994041d
PA
20842016-01-21 Pedro Alves <palves@redhat.com>
2085
2086 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2087 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2088 * configure: Regenerate.
2089
f7a6a40d
YQ
20902016-01-21 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2093 is_thumb and set it according to CPSR saved on the stack.
2094 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2095 arm_sigreturn_next_pc.
2096
6f69e520
YQ
20972016-01-18 Yao Qi <yao.qi@linaro.org>
2098
2099 * linux-low.c (linux_set_pc_64bit): New function.
2100 (linux_get_pc_64bit): New function.
2101 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2102 Declare.
2103 * linux-sparc-low.c (debug_threads): Remove declaration.
2104 (sparc_get_pc): Remove.
2105 (the_low_target): Use linux_get_pc_64bit instead of
2106 sparc_get_pc.
2107 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2108 (the_low_target): Use linux_get_pc_64bit and
2109 linux_set_pc_64bit.
2110
276d4552
YQ
21112016-01-18 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-arm-low.c (debug_threads): Remove declaration.
2114 (arm_get_pc, arm_set_pc): Remove.
2115 (the_low_target): Use linux_get_pc_32bit and
2116 linux_set_pc_32bit.
2117 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2118 (the_low_target): Use linux_get_pc_32bit and
2119 linux_set_pc_32bit.
2120 * linux-cris-low.c (debug_threads): Remove declaration.
2121 (cris_get_pc, cris_set_pc,): Remove.
2122 (the_low_target): Use linux_get_pc_32bit and
2123 linux_set_pc_32bit.
2124 * linux-crisv32-low.c (debug_threads): Remove declaration.
2125 (cris_get_pc, cris_set_pc): Remove.
2126 (the_low_target): Use linux_get_pc_32bit and
2127 linux_set_pc_32bit.
2128 * linux-low.c: Include inttypes.h.
2129 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2130 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2131 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2132 (the_low_target): Use linux_get_pc_32bit and
2133 linux_set_pc_32bit.
2134 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2135 (the_low_target): Use linux_get_pc_32bit and
2136 linux_set_pc_32bit.
2137 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2138 (the_low_target): Use linux_get_pc_32bit and
2139 linux_set_pc_32bit.
2140 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2141 (the_low_target): Use linux_get_pc_32bit and
2142 linux_set_pc_32bit.
2143 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2144 (the_low_target): Use linux_get_pc_32bit and
2145 linux_set_pc_32bit.
2146
eb0edac8
GB
21472016-01-18 Gary Benson <gbenson@redhat.com>
2148
2149 * configure.ac (AC_FUNC_FORK): New check.
2150 * config.in: Regenerate.
2151 * configure: Likewise.
2152
1b451dda
YQ
21532016-01-14 Yao Qi <yao.qi@linaro.org>
2154
2155 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2156 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2157 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2158 arm_get_next_pcs_ctor.
2159
82075af2
JS
21602016-01-12 Josh Stone <jistone@redhat.com>
2161 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2162
2163 * inferiors.h: Include "gdb_vecs.h".
2164 (struct process_info): Add syscalls_to_catch.
2165 * inferiors.c (remove_process): Free syscalls_to_catch.
2166 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2167 syscall_return stops.
2168 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2169 * server.c (handle_general_set): Handle QCatchSyscalls.
2170 (handle_query): Report support for QCatchSyscalls.
2171 * target.h (struct target_ops): Add supports_catch_syscall.
2172 (target_supports_catch_syscall): New macro.
2173 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2174 (struct lwp_info): Add syscall_state.
2175 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2176 Maintain syscall_state and syscalls_to_catch across exec.
2177 (get_syscall_trapinfo): New function, proxy to the_low_target.
2178 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2179 (linux_low_filter_event): Toggle syscall_state entry/return for
2180 syscall traps, and set it ignored for all others.
2181 (gdb_catching_syscalls_p): New function.
2182 (gdb_catch_this_syscall_p): New function.
2183 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2184 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2185 (linux_supports_catch_syscall): New function.
2186 (linux_target_ops): Install it.
2187 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2188 (the_low_target): Install it.
2189
8f13a3ce
MF
21902016-01-12 Mike Frysinger <vapier@gentoo.org>
2191
2192 * acinclude.m4: Include new ../warning.m4 file.
2193 * configure: Regenerated.
2194 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2195
5b3da067
MF
21962016-01-12 Mike Frysinger <vapier@gentoo.org>
2197
2198 * ax.c (is_goto_target): Mark static.
2199 * linux-low.c (register_addr): Likewise.
2200 (linux_fetch_registers, linux_store_registers): Likewise.
2201 * mem-break.c (any_persistent_commands): Fix old prototype.
2202 (add_commands_to_breakpoint): Mark static.
2203 * regcache.c (find_register_by_name): Delete unused func.
2204 * remote-utils.c (hex_or_minus_one): Mark static.
2205 * server.c (monitor_show_help): Mark static.
2206 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2207 handle_v_requests): Likewise.
2208
bc504a31
PA
22092016-01-12 Pedro Alves <palves@redhat.com>
2210
2211 Remove use of the registered trademark symbol throughout.
2212
5a0dd67a
YQ
22132016-01-08 Yao Qi <yao.qi@linaro.org>
2214
2215 * remote-utils.c (getpkt): If c is '\003', call target hook
2216 request_interrupt.
2217
b2ca446f
YQ
22182016-01-06 Yao Qi <yao.qi@linaro.org>
2219
2220 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2221 linux-aarch32-low.c.
2222 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2223 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2224 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2225 (thumb2_breakpoint): Declare.
2226 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2227 linux-aarch32-low.h.
2228 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2229 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2230 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2231
edd88788
JB
22322016-01-01 Joel Brobecker <brobecker@adacore.com>
2233
2234 * gdbreplay.c (gdbreplay_version): Change copyright year in
2235 version message.
2236 * server.c (gdbserver_version): Likewise.
2237
65da7f14
PP
22382015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2239
2240 * server.c (crc32_table): Delete.
2241 (crc32): Use libiberty's xcrc32 function.
2242
4abd5ed2
JB
22432015-12-22 Joel Brobecker <brobecker@adacore.com>
2244
2245 * lynx-low.c (lynx_delete_thread_callback): New function.
2246 (lynx_mourn): Properly delete our process and all of its
2247 threads. Remove call to clear_inferiors.
2248
0e50fe5c
JB
22492015-12-22 Joel Brobecker <brobecker@adacore.com>
2250
2251 * target.c (thread_search_callback): Add check that
2252 the thread_stopped target callback is not NULL before
2253 calling it.
2254
35adc03f
YQ
22552015-12-21 Yao Qi <yao.qi@linaro.org>
2256
2257 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2258 arm breakpoint.
2259
bd2b2909
AT
22602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2261
2262 * server.c (handle_query): Call target_supports_software_single_step.
2263
7fe5e27e
AT
22642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2265
2266 * linux-low.c (single_step): New function.
2267 (linux_resume_one_lwp_throw): Call single_step.
2268 (start_step_over): Likewise.
2269
d9311bfa
AT
22702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2271
2272 * Makefile.in (SFILES): Append arch/arm-linux.c,
2273 arch/arm-get-next-pcs.c.
2274 (arm-linux.o): New rule.
2275 (arm-get-next-pcs.o): New rule.
2276 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2277 arm-linux.o.
2278 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2279 to linux-aarch32-low.c.
2280 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2281 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2282 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2283 (thumb2_breakpoint_len): Likewise.
2284 (arm_is_thumb_mode): Make non-static.
2285 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2286 from linux-aarch32-low.c.
2287 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2288 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2289 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2290 (thumb2_breakpoint_len): Likewise.
2291 (arm_is_thumb_mode): New declaration.
2292 * linux-arm-low.c: Include arch/arm-linux.h
2293 aarch/arm-get-next-pcs.h, sys/syscall.h.
2294 (get_next_pcs_ops): New struct.
2295 (get_next_pcs_addr_bits_remove): New function.
2296 (get_next_pcs_is_thumb): New function.
2297 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2298 (arm_sigreturn_next_pc): Likewise.
2299 (get_next_pcs_syscall_next_pc): Likewise.
2300 (arm_gdbserver_get_next_pcs): Likewise.
2301 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2302 Initialize.
2303 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2304 * server.h: Include gdb_vecs.h.
2305
68ce2059
AT
23062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2307
2308 * Makefile.in (SFILES): Append common/common-regcache.c.
2309 (OBS): Append common-regcache.o.
2310 (common-regcache.o): New rule.
2311 * regcache.c (init_register_cache): Initialize cache to
2312 REG_UNAVAILABLE.
2313 (regcache_raw_read_unsigned): New function.
2314 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2315 register_status enum.
2316
fa5308bd
AT
23172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2318
2319 * linux-aarch64-low.c (the_low_targets): Rename
2320 breakpoint_reinsert_addr to get_next_pcs.
2321 * linux-arm-low.c (the_low_targets): Likewise.
2322 * linux-bfin-low.c (the_low_targets): Likewise.
2323 * linux-cris-low.c (the_low_targets): Likewise.
2324 * linux-crisv32-low.c (the_low_targets): Likewise.
2325 * linux-low.c (can_software_single_step): Likewise.
2326 (install_software_single_step_breakpoints): New function.
2327 (start_step_over): Use install_software_single_step_breakpoints.
2328 * linux-low.h: New CORE_ADDR vector.
2329 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2330 get_next_pcs.
2331 * linux-mips-low.c (the_low_targets): Likewise.
2332 * linux-nios2-low.c (the_low_targets): Likewise.
2333 * linux-sparc-low.c (the_low_targets): Likewise.
2334
4a6ed09b
PA
23352015-12-17 Pedro Alves <palves@redhat.com>
2336
2337 * linux-low.c (linux_kill_one_lwp): Remove references to
2338 LinuxThreads.
2339 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2340 to 'kill'.
2341 (linux_init_signals): Delete.
2342 (initialize_low): Adjust.
2343 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2344
7544db95
PA
23452015-12-16 Pedro Alves <palves@redhat.com>
2346
2347 * configure.ac (compiler warning flags): When testing a
2348 -Wno-foo option, check whether -Wfoo works instead.
2349 * configure: Regenerate.
2350
8020350c
DB
23512015-12-11 Don Breazeal <donb@codesourcery.com>
2352
2353 * server.c (process_serial_event): Don't exit from gdbserver
2354 in remote mode if there are still active inferiors.
2355
db91f502
YQ
23562015-12-11 Yao Qi <yao.qi@linaro.org>
2357
2358 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2359 arm_breakpoint_at if the process is 32-bit.
2360
b37a6290
YQ
23612015-12-11 Yao Qi <yao.qi@linaro.org>
2362
2363 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2364 arm breakpoint.
2365
17b1509a
YQ
23662015-12-07 Yao Qi <yao.qi@linaro.org>
2367
2368 * configure.srv: Append arm.o to srv_tgtobj for
2369 aarch64*-*-linux* target.
2370 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2371 from linux-arm-low.c.
2372 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2373 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2374 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2375 (thumb2_breakpoint_len): Likewise.
2376 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2377 (arm_breakpoint_kinds): Likewise.
2378 (arm_breakpoint_kind_from_pc): Likewise.
2379 (arm_sw_breakpoint_from_kind): Likewise.
2380 (arm_breakpoint_kind_from_current_state): Likewise.
2381 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2382 (arm_sw_breakpoint_from_kind): Declare.
2383 (arm_breakpoint_kind_from_current_state): Declare.
2384 (arm_breakpoint_at): Declare.
2385 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2386 arm_sw_breakpoint_from_kind if process is 32-bit.
2387 (aarch64_breakpoint_kind_from_pc): New function.
2388 (aarch64_breakpoint_kind_from_current_state): New function.
2389 (the_low_target): Initialize fields breakpoint_kind_from_pc
2390 and breakpoint_kind_from_current_state.
2391 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2392 linux-aarch32-low.c.
2393 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2394 (arm_breakpoint, arm_breakpoint_len): Likewise.
2395 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2396 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2397 (arm_is_thumb_mode): Likewise.
2398 (arm_breakpoint_at): Likewise.
2399 (arm_breakpoint_kind_from_pc): Likewise.
2400 (arm_sw_breakpoint_from_kind): Likewise.
2401 (arm_breakpoint_kind_from_current_state): Likewise.
2402
2403 Revert:
2404 2015-08-04 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2407 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2408 * server.c (extended_protocol): Remove "static".
2409 * server.h (extended_protocol): Declare it.
2410
ece66d65
JS
24112015-12-04 Josh Stone <jistone@redhat.com>
2412
2413 * target.h (struct target_ops) <arch_setup>: Rename to ...
2414 (struct target_ops) <post_create_inferior>: ... this.
2415 (target_arch_setup): Rename to ...
2416 (target_post_create_inferior): ... this, calling post_create_inferior.
2417 * server.c (start_inferior): Update target_arch_setup calls to
2418 target_post_create_inferior.
2419 * linux-low.c (linux_low_ptrace_options): Forward declare.
2420 (linux_arch_setup): Update its comment for general use.
2421 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2422 (struct linux_target_ops): Use linux_post_create_inferior.
2423 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2424 to post_create_inferior.
2425 * nto-low.c (struct nto_target_ops): Likewise.
2426 * spu-low.c (struct spu_target_ops): Likewise.
2427 * win32-low.c (struct win32_target_ops): Likewise.
2428
e58c48b4
AT
24292015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2430
2431 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2432
fbec8956
AT
24332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2434
2435 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2436 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2437 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2438 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2439 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2440 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2441 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2442 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2443 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2444 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2445 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2446 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2447
9b4c5f87
AT
24482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2449
2450 * linux-low.c (linux_look_up_symbols): Don't call
2451 linux_supports_traceclone.
2452 * linux-low.h (thread_db_init): Remove use_events argument.
2453 * thread-db.c (thread_db_use_event): Remove global variable.
2454 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2455 (struct thread_db) <td_create_bp>: Remove field.
2456 (thread_db_create_event): Remove function.
2457 (thread_db_enable_reporting): Likewise.
2458 (find_one_thread): Don't check for thread_db_use_events.
2459 (attach_thread): Likewise.
2460 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2461 (try_thread_db_load_1): Don't check for thread_db_use_events.
2462 (thread_db_init): Remove use_events argument and thread events
2463 handling.
2464 (remove_thread_event_breakpoints): Remove function.
2465 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2466
7d00775e
AT
24672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2468
2469 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2470 New function.
2471 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2472 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2474 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2475 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2476 Initialize.
2477 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2478 New function.
2479 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2480 * linux-low.c (can_hardware_single_step): Use
2481 supports_hardware_single_step.
2482 (can_software_single_step): New function.
2483 (start_step_over): Call can_software_single_step.
2484 (linux_supports_hardware_single_step): New function.
2485 (struct target_ops) <supports_software_single_step>: Initialize.
2486 * linux-low.h (struct linux_target_ops)
2487 <supports_hardware_single_step>: Initialize.
2488 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2489 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2490 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2491 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2492 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2493 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2494 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2495 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2496 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2497 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2498 Initialize.
2499 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2500 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2501 Initialize.
2502 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2503 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2504 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2505 New function.
2506 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2507 * target.h (struct target_ops): <supports_software_single_step>:
2508 New field.
2509 (target_supports_software_single_step): New macro.
2510
2d97cd35
AT
25112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2512
2513 * linux-low.c (linux_wait_1): Fix pc advance condition.
2514 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2515 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2516
769ef81f
AT
25172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2518
2519 * linux-arm-low.c (arm_is_thumb_mode): New function.
2520 (arm_breakpoint_at): Use arm_is_thumb_mode.
2521 (arm_breakpoint_kind_from_current_state): New function.
2522 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2523 Initialize.
2524 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2525 (linux_breakpoint_kind_from_current_state): New function.
2526 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2527 * linux-low.h (struct linux_target_ops)
2528 <breakpoint_kind_from_current_state>: New field.
2529 * target.h (struct target_ops): Likewise.
2530 (target_breakpoint_kind_from_current_state): New macro.
2531
1bebeeca
PA
25322015-11-30 Pedro Alves <palves@redhat.com>
2533
2534 * linux-low.c (linux_resume): Wake up the event loop before
2535 returning.
2536
a67a9fae
PA
25372015-11-30 Pedro Alves <palves@redhat.com>
2538
2539 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2540 check.
2541 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2542 to -1.
2543 * target.c (struct thread_search): New structure.
2544 (thread_search_callback): New function.
2545 (prev_general_thread): New global.
2546 (prepare_to_access_memory, done_accessing_memory): New functions.
2547 * target.h (prepare_to_access_memory, done_accessing_memory):
2548 Replace macros with function declarations.
2549
f2faf941
PA
25502015-11-30 Pedro Alves <palves@redhat.com>
2551
2552 PR 14618
2553 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2554 report TARGET_WAITKIND_NO_RESUMED.
2555 * remote-utils.c (prepare_resume_reply): Handle
2556 TARGET_WAITKIND_NO_RESUMED.
2557 * server.c (report_no_resumed): New global.
2558 (handle_query) <qSupported>: Handle "no-resumed+". Report
2559 "no-resumed+" support.
2560 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2561 return error if the client doesn't support no-resumed events.
2562 (push_stop_notification): New function.
2563 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2564 events if the client supports them.
2565
a681f9c9
PA
25662015-11-30 Pedro Alves <palves@redhat.com>
2567
2568 * linux-low.c (thread_still_has_status_pending_p): Don't check
2569 vCont;t here.
2570 (lwp_resumed): New function.
2571 (status_pending_p_callback): Return early if the LWP is not
2572 supposed to be resumed.
2573
65706a29
PA
25742015-11-30 Pedro Alves <palves@redhat.com>
2575
2576 * linux-low.c (handle_extended_wait): Assert that the LWP's
2577 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2578 thread create events, leave the new child's status pending.
2579 (linux_low_filter_event): If GDB wants to hear about thread exit
2580 events, leave the LWP marked dead and don't delete it.
2581 (linux_wait_for_event_filtered): Don't check for thread exit.
2582 (filter_exit_event): New function.
2583 (linux_wait_1): Use it, when returning an exit event.
2584 (linux_resume_one_lwp_throw): Assert that the LWP's
2585 waitstatus is TARGET_WAITKIND_IGNORE.
2586 * remote-utils.c (prepare_resume_reply): Handle
2587 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2588 * server.c (report_thread_events): New global.
2589 (handle_general_set): Handle QThreadEvents.
2590 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2591 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2592 TARGET_WAITKIND_THREAD_EXITED.
2593 * server.h (report_thread_events): Declare.
2594
56cf4bed
PA
25952015-11-30 Pedro Alves <palves@redhat.com>
2596
2597 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2598 the thread's last_resume_kind was resume_stop.
2599
500c1d85
PA
26002015-11-30 Pedro Alves <palves@redhat.com>
2601
2602 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2603 before returning.
2604
de979965
PA
26052015-11-30 Pedro Alves <palves@redhat.com>
2606
2607 * server.c (handle_v_requests): Handle vCtrlC.
2608
34c65914
PA
26092015-11-30 Pedro Alves <palves@redhat.com>
2610
2611 * gdbthread.h (find_any_thread_of_pid): Declare.
2612 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2613 functions.
2614 * server.c (handle_query): If current_thread is NULL, look for
2615 another thread of the selected process.
2616
79efa585 26172015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2618 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2619
2620 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2621 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2622 name in reply.
2623 * target.h (struct target_ops) <thread_name>: New field.
2624 (target_thread_name): New macro.
2625
80d82c19
JB
26262015-11-23 Joel Brobecker <brobecker@adacore.com>
2627
2628 * regcache.h (regcache_invalidate_pid): Add declaration.
2629 * regcache.c (regcache_invalidate_pid): New function, extracted
2630 from regcache_invalidate.
2631 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2632 Add trivial documentation comment.
2633 * lynx-low.c: Use regcache_invalidate_pid instead of
2634 regcache_invalidate.
2635
64da5dd5
JB
26362015-11-23 Joel Brobecker <brobecker@adacore.com>
2637
2638 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2639 and Elf64_auxv_t if the target is Android.
2640
37ce4055
DE
26412015-11-22 Doug Evans <xdje42@gmail.com>
2642
2643 * target.h: #include <sys/types.h>.
2644
06e03fff
PA
26452015-11-19 Pedro Alves <palves@redhat.com>
2646
2647 * linux-low.c (linux_process_qsupported): Change prototype.
2648 Adjust.
2649 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2650 Change prototype.
2651 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2652 and adjust to loop over all features.
2653 * server.c (handle_query) <qSupported>: Adjust to call
2654 target_process_qsupported once, passing it a vector of unprocessed
2655 features.
2656 * target.h (struct target_ops) <process_qsupported>: Change
2657 prototype.
2658 (target_process_qsupported): Adjust.
2659
9a084706
PA
26602015-11-19 Pedro Alves <palves@redhat.com>
2661
2662 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2663 mode.
2664 * configure: Regenerate.
2665
dad44a1f
PA
26662015-11-19 Pedro Alves <palves@redhat.com>
2667
2668 * configure: Regenerate.
2669
231c0592
YQ
26702015-11-19 Yao Qi <yao.qi@linaro.org>
2671
2672 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2673 type to uint32_t.
2674
6c1c9a8b
YQ
26752015-11-19 Yao Qi <yao.qi@linaro.org>
2676
2677 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2678 (struct aarch64_operand): Move enum out.
2679
9caa3311
YQ
26802015-11-19 Yao Qi <yao.qi@linaro.org>
2681
2682 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2683 struct user_fpsimd_state *.
2684 (aarch64_store_fpregset): Likewise.
2685
6a69a054
YQ
26862015-11-19 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2689 struct user_pt_regs *.
2690 (aarch64_store_gregset): Likewise.
2691
1798301e
PA
26922015-11-18 Pedro Alves <palves@redhat.com>
2693
2694 * Makefile.in (all_object_files): Add $IPA_OBJS.
2695
ce7715e2
PA
26962015-11-17 Pedro Alves <palves@redhat.com>
2697
2698 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2699 GDB_SIGNAL_0 and gdb_signal_to_string.
2700
c0879059
PA
27012015-11-17 Pedro Alves <palves@redhat.com>
2702
2703 * win32-low.c (handle_output_debug_string): Remove parameter.
2704 (win32_kill): Remove our_status local and adjust call to
2705 handle_output_debug_string.
2706 (get_child_debug_event): Adjust call to
2707 handle_output_debug_string.
2708
1996e237
SM
27092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2710
2711 * linux-mips-low.c (mips_fill_gregset): Add cast.
2712 (mips_store_gregset): Likewise.
2713 (mips_fill_fpregset): Likewise.
2714 (mips_store_fpregset): Likewise.
2715
cbec665b
SM
27162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2717
2718 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2719 priv.
2720
eb3e3c67
SM
27212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2722
2723 * linux-mips-low.c (mips_linux_new_thread): Change type of
2724 watch_type to enum target_hw_bp_type.
2725
171de4b8
SM
27262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2727
2728 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2729 Change return type to arm_hwbp_type.
2730
04248ead
SM
27312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2732
2733 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2734 (arm_store_gregset): Likewise.
2735 * linux-arm-low.c (arm_get_hwcap): Likewise.
2736 (arm_read_description): Likewise.
2737
04b3479c
SM
27382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2739
2740 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2741
2bc84e8a
SM
27422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2743
2744 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2745 (ppc_fill_vsxregset): Likewise.
2746 (ppc_store_vsxregset): Likewise.
2747 (ppc_fill_vrregset): Likewise.
2748 (ppc_store_vrregset): Likewise.
2749 (ppc_fill_evrregset): Likewise.
2750 (ppc_store_evrregset): Likewise.
2751
e6c5bb05
SM
27522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2753
2754 * linux-ppc-low.c (ppc_usrregs_info): Remove
2755 forward-declaration.
2756 (ppc_arch_setup): Move lower in file.
2757
7ea45d72
SM
27582015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2759
2760 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2761 (ps_pdwrite): Likewise.
2762
69291610
HW
27632015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2764
2765 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2766 to after assert checks.
2767
b42945fd
SM
27682015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2769
2770 * proc-service.c (ps_pdread): Add/adjust casts.
2771 (ps_pdwrite): Add/adjust casts.
2772
d6f85c84
SM
27732015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2774
2775 * server.c (handle_search_memory_1): Cast return value of
2776 memmem.
2777
f98cd059
SM
27782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2779
2780 * server.c (write_qxfer_response): Change type of data to
2781 gdb_byte *.
2782
d2412fa5
PA
27832015-10-29 Pedro Alves <palves@redhat.com>
2784
2785 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2786
c17414a2
PA
27872015-10-29 Pedro Alves <palves@redhat.com>
2788
2789 * tracepoint.c (clear_installed_tracepoints): Add casts.
2790
e053fbc4
PA
27912015-10-29 Pedro Alves <palves@redhat.com>
2792
2793 * server.c (handle_v_cont, process_serial_event): Add enum
2794 gdb_signal casts to signal parsing code.
2795
add67df8
PA
27962015-10-29 Pedro Alves <palves@redhat.com>
2797
2798 * linux-low.h (NULL_REGSET): Define.
2799 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2800 * linux-arm-low.c (arm_regsets): Likewise.
2801 * linux-crisv32-low.c (cris_regsets): Likewise.
2802 * linux-m68k-low.c (m68k_regsets): Likewise.
2803 * linux-mips-low.c (mips_regsets): Likewise.
2804 * linux-nios2-low.c (nios2_regsets): Likewise.
2805 * linux-ppc-low.c (ppc_regsets): Likewise.
2806 * linux-s390-low.c (s390_regsets): Likewise.
2807 * linux-sh-low.c (sh_regsets): Likewise.
2808 * linux-sparc-low.c (sparc_regsets): Likewise.
2809 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2810 * linux-tile-low.c (tile_regsets): Likewise.
2811 * linux-x86-low.c (x86_regsets): Likewise.
2812 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2813
50bc912a
PA
28142015-10-29 Pedro Alves <palves@redhat.com>
2815
2816 * linux-low.h (NULL_REGSET): Define.
2817 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2818 * linux-arm-low.c (arm_regsets): Likewise.
2819 * linux-crisv32-low.c (cris_regsets): Likewise.
2820 * linux-m68k-low.c (m68k_regsets): Likewise.
2821 * linux-mips-low.c (mips_regsets): Likewise.
2822 * linux-nios2-low.c (nios2_regsets): Likewise.
2823 * linux-ppc-low.c (ppc_regsets): Likewise.
2824 * linux-s390-low.c (s390_regsets): Likewise.
2825 * linux-sh-low.c (sh_regsets): Likewise.
2826 * linux-sparc-low.c (sparc_regsets): Likewise.
2827 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2828 * linux-tile-low.c (tile_regsets): Likewise.
2829 * linux-x86-low.c (x86_regsets): Likewise.
2830 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2831
682b2546
DE
28322015-10-26 Doug Evans <dje@google.com>
2833
2834 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2835
963843d4
DE
28362015-10-26 Doug Evans <dje@google.com>
2837
2838 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2839
d41401ac
DE
28402015-10-26 Doug Evans <dje@google.com>
2841
2842 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2843 for debug_printf.
2844 (attach_thread, find_new_threads_callback): Ditto.
2845
3db28855
AT
28462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2847
2848 * mem-break.h (set_breakpoint_data): Remove.
2849
fb78e89c
AT
28502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2851
2852 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2853 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2854 (initialize_low): Remove set_breakpoint_data call.
2855 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2856 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2857 (initialize_low): Remove set_breakpoint_data call.
2858 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2859 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2860 (initialize_low): Remove set_breakpoint_data call.
2861
2e6ee069
AT
28622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2863
2864 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2865 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2866 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2867 * target.h (target_breakpoint_kind_from_pc): New macro.
2868
1652a986
AT
28692015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2872 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2873 the default breakpoint kind.
2874
abeead09
AT
28752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2876
2877 * linux-arm-low.c (arm_supports_z_point_type): Add software
2878 breakpoint support.
2879
b0b4b501
AT
28802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2881
2882 * linux-arm-low.c: Refactor breakpoint definitions.
2883 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2884 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2885
8689682c
AT
28862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2887
2888 * Makefile.in: Add arm.c/o.
2889 * configure.srv: Likewise.
2890 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2891 (arm_breakpoint_kind_from_pc): New function.
2892 (arm_sw_breakpoint_from_kind): Return proper kind.
2893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2894
27165294
AT
28952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2896
2897 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2898 removal.
2899 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2900 (struct raw_breakpoint) <size>: Remove.
2901 (struct raw_breakpoint) <kind>: Add.
2902 (bp_size): New function.
2903 (bp_opcode): Likewise.
2904 (find_raw_breakpoint_at): Adjust for kind.
2905 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2906 (remove_memory_breakpoint): Adjust for kind call bp_size.
2907 (set_raw_breakpoint_at): Adjust for kind.
2908 (set_breakpoint): Likewise.
2909 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2910 (delete_raw_breakpoint): Adjust for kind.
2911 (delete_breakpoint): Likewise.
2912 (find_gdb_breakpoint): Likewise.
2913 (set_gdb_breakpoint_1): Likewise.
2914 (set_gdb_breakpoint): Likewise.
2915 (delete_gdb_breakpoint_1): Likewise.
2916 (delete_gdb_breakpoint): Likewise.
2917 (uninsert_raw_breakpoint): Likewise.
2918 (reinsert_raw_breakpoint): Likewise.
2919 (set_breakpoint_data): Remove.
2920 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2921 (check_mem_read): Adjust for kind call bp_size.
2922 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2923 (clone_one_breakpoint): Adjust for kind.
2924 * mem-break.h (set_gdb_breakpoint): Likewise.
2925 (delete_gdb_breakpoint): Likewise.
2926 * server.c (process_serial_event): Likewise.
2927
dd373349
AT
29282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2929
2930 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2936 (arm_sw_breakpoint_from_kind): New function.
2937 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2938 (struct linux_target_ops) <breakpoint>: Remove.
2939 (struct linux_target_ops) <breakpoint_len>: Remove.
2940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2942 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2943 (struct linux_target_ops) <breakpoint>: Remove.
2944 (struct linux_target_ops) <breakpoint_len>: Remove.
2945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2947 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2948 (struct linux_target_ops) <breakpoint>: Remove.
2949 (struct linux_target_ops) <breakpoint_len>: Remove.
2950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2952 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2953 and sw_breakpoint_from_kind to increment the pc.
2954 (linux_breakpoint_kind_from_pc): New function.
2955 (linux_sw_breakpoint_from_kind): New function.
2956 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2957 (initialize_low): Call breakpoint_kind_from_pc and
2958 sw_breakpoint_from_kind to replace breakpoint_data/len.
2959 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2960 New field.
2961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2962 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2963 (struct linux_target_ops) <breakpoint>: Remove.
2964 (struct linux_target_ops) <breakpoint_len>: Remove.
2965 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2967 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2968 (struct linux_target_ops) <breakpoint>: Remove.
2969 (struct linux_target_ops) <breakpoint_len>: Remove.
2970 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2971 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2972 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2973 (struct linux_target_ops) <breakpoint>: Remove.
2974 (struct linux_target_ops) <breakpoint_len>: Remove.
2975 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2976 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2977 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2978 (struct linux_target_ops) <breakpoint>: Remove.
2979 (struct linux_target_ops) <breakpoint_len>: Remove.
2980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2982 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2983 (struct linux_target_ops) <breakpoint>: Remove.
2984 (struct linux_target_ops) <breakpoint_len>: Remove.
2985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2987 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2988 (struct linux_target_ops) <breakpoint>: Remove.
2989 (struct linux_target_ops) <breakpoint_len>: Remove.
2990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2992 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2993 (struct linux_target_ops) <breakpoint>: Remove.
2994 (struct linux_target_ops) <breakpoint_len>: Remove.
2995 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2996 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2997 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2998 (struct linux_target_ops) <breakpoint>: Remove.
2999 (struct linux_target_ops) <breakpoint_len>: Remove.
3000 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3002 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3003 (struct linux_target_ops) <breakpoint>: Remove.
3004 (struct linux_target_ops) <breakpoint_len>: Remove.
3005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3007 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3008 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3009 (struct linux_target_ops) <breakpoint>: Remove.
3010 (struct linux_target_ops) <breakpoint_len>: Remove.
3011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3013 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3014 (struct linux_target_ops) <breakpoint>: Remove.
3015 (struct linux_target_ops) <breakpoint_len>: Remove.
3016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3018
4cd98a19
AT
30192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3020
3021 * linux-cris-low.c (cris_get_pc): Remove void arg.
3022
774ee6d2
AR
30232015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3024
3025 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3026 variable name.
3027
833dcd29
AR
30282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3029
3030 * inferiors.c (thread_pid_matches_callback): New function.
3031 (find_thread_process): New function.
3032 (remove_thread): Reset current_thread.
3033 (remove_process): Assert threads have been removed first.
3034
8d689ee5
YQ
30352015-10-15 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3038 if it is 3.
3039 (aarch64_remove_point): Likewise.
3040 * regcache.c (regcache_register_size): New function.
3041
1c2e1515
YQ
30422015-10-12 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-aarch64-low.c: Update all callers as emit_load_store
3045 is renamed to aarch64_emit_load_store.
3046
e1c587c3
YQ
30472015-10-12 Yao Qi <yao.qi@linaro.org>
3048
3049 * linux-aarch64-low.c: Update all callers of function renaming
3050 from emit_insn to aarch64_emit_insn.
3051
b6542f81
YQ
30522015-10-12 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3055 arch/aarch64-insn.h.
3056 (struct aarch64_memory_operand): Likewise.
3057 (ENCODE): Likewise.
3058 (emit_insn): Move to arch/aarch64-insn.c.
3059 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3060 (emit_load_store): Move to arch/aarch64-insn.c.
3061 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3062 (can_encode_int32): Remove.
3063
246994ce
YQ
30642015-10-12 Yao Qi <yao.qi@linaro.org>
3065
3066 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3067 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3068 (aarch64_relocate_instruction): Likewise.
3069 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3070 (struct aarch64_insn_visitor): Likewise.
3071
0badd99f
YQ
30722015-10-12 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3075 (struct aarch64_insn_visitor): New.
3076 (struct aarch64_insn_relocation_data): New.
3077 (aarch64_ftrace_insn_reloc_b): New function.
3078 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3079 (aarch64_ftrace_insn_reloc_cb): Likewise.
3080 (aarch64_ftrace_insn_reloc_tb): Likewise.
3081 (aarch64_ftrace_insn_reloc_adr): Likewise.
3082 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3083 (aarch64_ftrace_insn_reloc_others): Likewise.
3084 (visitor): New.
3085 (aarch64_relocate_instruction): Use visitor.
3086
dfaffe9d
YQ
30872015-10-12 Yao Qi <yao.qi@linaro.org>
3088
3089 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3090 int. Add argument buf.
3091 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3092 aarch64_relocate_instruction.
3093
70b439f0
YQ
30942015-10-12 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3097 argument insn. Remove local variable insn. Don't call
3098 target_read_uint32.
3099 (aarch64_install_fast_tracepoint_jump_pad): Call
3100 target_read_uint32.
3101
7781c06f
YQ
31022015-09-30 Yao Qi <yao.qi@linaro.org>
3103
3104 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3105 (emit_load_store_pair): Likewise.
3106
9a3c8263
SM
31072015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3108
3109 * dll.c (match_dll): Add cast(s).
3110 (unloaded_dll): Likewise.
3111 * linux-low.c (second_thread_of_pid_p): Likewise.
3112 (delete_lwp_callback): Likewise.
3113 (count_events_callback): Likewise.
3114 (select_event_lwp_callback): Likewise.
3115 (linux_set_resume_request): Likewise.
3116 * server.c (accumulate_file_name_length): Likewise.
3117 (emit_dll_description): Likewise.
3118 (handle_qxfer_threads_worker): Likewise.
3119 (visit_actioned_threads): Likewise.
3120 * thread-db.c (any_thread_of): Likewise.
3121 * tracepoint.c (same_process_p): Likewise.
3122 (match_blocktype): Likewise.
3123 (build_traceframe_info_xml): Likewise.
3124
224c3ddb
SM
31252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3126
3127 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3128 assignment.
3129 (gdb_unparse_agent_expr): Likewise.
3130 * hostio.c (require_data): Likewise.
3131 (handle_pread): Likewise.
3132 * linux-low.c (disable_regset): Likewise.
3133 (fetch_register): Likewise.
3134 (store_register): Likewise.
3135 (get_dynamic): Likewise.
3136 (linux_qxfer_libraries_svr4): Likewise.
3137 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3138 (set_fast_tracepoint_jump): Likewise.
3139 (uninsert_fast_tracepoint_jumps_at): Likewise.
3140 (reinsert_fast_tracepoint_jumps_at): Likewise.
3141 (validate_inserted_breakpoint): Likewise.
3142 (clone_agent_expr): Likewise.
3143 * regcache.c (init_register_cache): Likewise.
3144 * remote-utils.c (putpkt_binary_1): Likewise.
3145 (decode_M_packet): Likewise.
3146 (decode_X_packet): Likewise.
3147 (look_up_one_symbol): Likewise.
3148 (relocate_instruction): Likewise.
3149 (monitor_output): Likewise.
3150 * server.c (handle_search_memory): Likewise.
3151 (handle_qxfer_exec_file): Likewise.
3152 (handle_qxfer_libraries): Likewise.
3153 (handle_qxfer): Likewise.
3154 (handle_query): Likewise.
3155 (handle_v_cont): Likewise.
3156 (handle_v_run): Likewise.
3157 (captured_main): Likewise.
3158 * target.c (write_inferior_memory): Likewise.
3159 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3160 * tracepoint.c (init_trace_buffer): Likewise.
3161 (add_tracepoint_action): Likewise.
3162 (add_traceframe): Likewise.
3163 (add_traceframe_block): Likewise.
3164 (cmd_qtdpsrc): Likewise.
3165 (cmd_qtdv): Likewise.
3166 (cmd_qtstatus): Likewise.
3167 (response_source): Likewise.
3168 (response_tsv): Likewise.
3169 (cmd_qtnotes): Likewise.
3170 (gdb_collect): Likewise.
3171 (initialize_tracepoint): Likewise.
3172
afbe19f8
PL
31732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3174
3175 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3176 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3177 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3178 <NOP>: New.
3179 (enum aarch64_condition_codes): New enum.
3180 (w0): New static global.
3181 (fp): Likewise.
3182 (lr): Likewise.
3183 (struct aarch64_memory_operand) <type>: New
3184 MEMORY_OPERAND_POSTINDEX type.
3185 (postindex_memory_operand): New helper function.
3186 (emit_ret): New function.
3187 (emit_load_store_pair): New function, factored out of emit_stp
3188 with support for MEMORY_OPERAND_POSTINDEX.
3189 (emit_stp): Rewrite using emit_load_store_pair.
3190 (emit_ldp): New function.
3191 (emit_load_store): Likewise.
3192 (emit_ldr): Mention post-index instruction in comment.
3193 (emit_ldrh): New function.
3194 (emit_ldrb): New function.
3195 (emit_ldrsw): Mention post-index instruction in comment.
3196 (emit_str): Likewise.
3197 (emit_subs): New function.
3198 (emit_cmp): Likewise.
3199 (emit_and): Likewise.
3200 (emit_orr): Likewise.
3201 (emit_orn): Likewise.
3202 (emit_eor): Likewise.
3203 (emit_mvn): Likewise.
3204 (emit_lslv): Likewise.
3205 (emit_lsrv): Likewise.
3206 (emit_asrv): Likewise.
3207 (emit_mul): Likewise.
3208 (emit_sbfm): Likewise.
3209 (emit_sbfx): Likewise.
3210 (emit_ubfm): Likewise.
3211 (emit_ubfx): Likewise.
3212 (emit_csinc): Likewise.
3213 (emit_cset): Likewise.
3214 (emit_nop): Likewise.
3215 (emit_ops_insns): New helper function.
3216 (emit_pop): Likewise.
3217 (emit_push): Likewise.
3218 (aarch64_emit_prologue): New function.
3219 (aarch64_emit_epilogue): Likewise.
3220 (aarch64_emit_add): Likewise.
3221 (aarch64_emit_sub): Likewise.
3222 (aarch64_emit_mul): Likewise.
3223 (aarch64_emit_lsh): Likewise.
3224 (aarch64_emit_rsh_signed): Likewise.
3225 (aarch64_emit_rsh_unsigned): Likewise.
3226 (aarch64_emit_ext): Likewise.
3227 (aarch64_emit_log_not): Likewise.
3228 (aarch64_emit_bit_and): Likewise.
3229 (aarch64_emit_bit_or): Likewise.
3230 (aarch64_emit_bit_xor): Likewise.
3231 (aarch64_emit_bit_not): Likewise.
3232 (aarch64_emit_equal): Likewise.
3233 (aarch64_emit_less_signed): Likewise.
3234 (aarch64_emit_less_unsigned): Likewise.
3235 (aarch64_emit_ref): Likewise.
3236 (aarch64_emit_if_goto): Likewise.
3237 (aarch64_emit_goto): Likewise.
3238 (aarch64_write_goto_address): Likewise.
3239 (aarch64_emit_const): Likewise.
3240 (aarch64_emit_call): Likewise.
3241 (aarch64_emit_reg): Likewise.
3242 (aarch64_emit_pop): Likewise.
3243 (aarch64_emit_stack_flush): Likewise.
3244 (aarch64_emit_zero_ext): Likewise.
3245 (aarch64_emit_swap): Likewise.
3246 (aarch64_emit_stack_adjust): Likewise.
3247 (aarch64_emit_int_call_1): Likewise.
3248 (aarch64_emit_void_call_2): Likewise.
3249 (aarch64_emit_eq_goto): Likewise.
3250 (aarch64_emit_ne_goto): Likewise.
3251 (aarch64_emit_lt_goto): Likewise.
3252 (aarch64_emit_le_goto): Likewise.
3253 (aarch64_emit_gt_goto): Likewise.
3254 (aarch64_emit_ge_got): Likewise.
3255 (aarch64_emit_ops_impl): New static global variable.
3256 (aarch64_emit_ops): New target function, return
3257 &aarch64_emit_ops_impl.
3258 (struct linux_target_ops): Install it.
3259
bb903df0
PL
32602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3261
3262 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3263 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3264 aarch64-ipa.o.
3265 * linux-aarch64-ipa.c: New file.
3266 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3267 and endian.h.
3268 (aarch64_get_thread_area): New target method.
3269 (extract_signed_bitfield): New helper function.
3270 (aarch64_decode_ldr_literal): New function.
3271 (enum aarch64_opcodes): New enum.
3272 (struct aarch64_register): New struct.
3273 (struct aarch64_operand): New struct.
3274 (x0): New static global.
3275 (x1): Likewise.
3276 (x2): Likewise.
3277 (x3): Likewise.
3278 (x4): Likewise.
3279 (w2): Likewise.
3280 (ip0): Likewise.
3281 (sp): Likewise.
3282 (xzr): Likewise.
3283 (aarch64_register): New helper function.
3284 (register_operand): Likewise.
3285 (immediate_operand): Likewise.
3286 (struct aarch64_memory_operand): New struct.
3287 (offset_memory_operand): New helper function.
3288 (preindex_memory_operand): Likewise.
3289 (enum aarch64_system_control_registers): New enum.
3290 (ENCODE): New macro.
3291 (emit_insn): New helper function.
3292 (emit_b): New function.
3293 (emit_bcond): Likewise.
3294 (emit_cb): Likewise.
3295 (emit_tb): Likewise.
3296 (emit_blr): Likewise.
3297 (emit_stp): Likewise.
3298 (emit_ldp_q_offset): Likewise.
3299 (emit_stp_q_offset): Likewise.
3300 (emit_load_store): Likewise.
3301 (emit_ldr): Likewise.
3302 (emit_ldrsw): Likewise.
3303 (emit_str): Likewise.
3304 (emit_ldaxr): Likewise.
3305 (emit_stxr): Likewise.
3306 (emit_stlr): Likewise.
3307 (emit_data_processing_reg): Likewise.
3308 (emit_data_processing): Likewise.
3309 (emit_add): Likewise.
3310 (emit_sub): Likewise.
3311 (emit_mov): Likewise.
3312 (emit_movk): Likewise.
3313 (emit_mov_addr): Likewise.
3314 (emit_mrs): Likewise.
3315 (emit_msr): Likewise.
3316 (emit_sevl): Likewise.
3317 (emit_wfe): Likewise.
3318 (append_insns): Likewise.
3319 (can_encode_int32_in): New helper function.
3320 (aarch64_relocate_instruction): New function.
3321 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3322 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3323 (struct linux_target_ops): Install aarch64_get_thread_area,
3324 aarch64_install_fast_tracepoint_jump_pad and
3325 aarch64_get_min_fast_tracepoint_insn_len.
3326
787749ea
PL
33272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3328
3329 * Makefile.in (aarch64-insn.o): New rule.
3330 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3331
9812b2e6
YQ
33322015-09-21 Yao Qi <yao.qi@linaro.org>
3333
3334 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3335
18fe412b
YQ
33362015-09-21 Yao Qi <yao.qi@linaro.org>
3337
3338 * tracepoint.c (max_jump_pad_size): Remove.
3339
a0cc84cd
YQ
33402015-09-18 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-aarch64-low.c: Don't include sys/uio.h.
3343 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3344
d78908cf
WW
33452015-09-16 Wei-cheng Wang <cole945@gmail.com>
3346
3347 * tracepoint.c (eval_result_type): Change prototype.
3348 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3349
d57e0d50
PA
33502015-09-15 Pedro Alves <palves@redhat.com>
3351
3352 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3353 Check whether to report exec events instead of checking whether
3354 multiprocess is enabled.
3355
5a676acc
PA
33562015-09-15 Pedro Alves <palves@redhat.com>
3357
3358 PR remote/18965
3359 * remote-utils.c (prepare_resume_reply): Merge
3360 TARGET_WAITKIND_VFORK_DONE switch case with the
3361 TARGET_WAITKIND_FORKED case.
3362
7c5d0fad
YQ
33632015-09-15 Yao Qi <yao.qi@linaro.org>
3364
3365 * server.c (handle_query): Check string comparison using
3366 "else if" instead of "if".
3367
750ce8d1
YQ
33682015-09-15 Yao Qi <yao.qi@linaro.org>
3369
3370 * server.c (vCont_supported): New global variable.
3371 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3372 matches. Append ";vContSupported+" to own_buf.
3373 (handle_v_requests): Append ";s;S" to own_buf if target supports
3374 hardware single step or vCont_supported is false.
3375 (capture_main): Set vCont_supported to zero.
3376
70b90b91
YQ
33772015-09-15 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3380 it to ...
3381 (linux_supports_hardware_single_step): ... New function.
3382 (linux_target_ops): Update.
3383 * lynx-low.c (lynx_target_ops): Set field
3384 supports_hardware_single_step to target_can_do_hardware_single_step.
3385 * nto-low.c (nto_target_ops): Likewise.
3386 * spu-low.c (spu_target_ops): Likewise.
3387 * win32-low.c (win32_target_ops): Likewise.
3388 * target.c (target_can_do_hardware_single_step): New function.
3389 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3390 Remove. <supports_hardware_single_step>: New field.
3391 (target_supports_conditional_breakpoints): Remove.
3392 (target_supports_hardware_single_step): New macro.
3393 (target_can_do_hardware_single_step): Declare.
3394 * server.c (handle_query): Use target_supports_hardware_single_step
3395 instead of target_supports_conditional_breakpoints.
3396
ade90bde
YQ
33972015-09-15 Yao Qi <yao.qi@linaro.org>
3398
3399 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3400 function.
3401 (struct linux_target_ops the_low_target): Install
3402 aarch64_linux_siginfo_fixup.
3403
94585166
DB
34042015-09-11 Don Breazeal <donb@codesourcery.com>
3405 Luis Machado <lgustavo@codesourcery.com>
3406
3407 * linux-low.c (linux_mourn): Static declaration.
3408 (linux_arch_setup): Move in front of
3409 handle_extended_wait.
3410 (linux_arch_setup_thread): New function.
3411 (handle_extended_wait): Handle exec events. Call
3412 linux_arch_setup_thread. Make event_lwp argument a
3413 pointer-to-a-pointer.
3414 (check_zombie_leaders): Do not check stopped threads.
3415 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3416 (linux_low_filter_event): Add lwp and thread for exec'ing
3417 non-leader thread if leader thread has been deleted.
3418 Refactor code into linux_arch_setup_thread and call it.
3419 Pass child lwp pointer by reference to handle_extended_wait.
3420 (linux_wait_for_event_filtered): Update comment.
3421 (linux_wait_1): Prevent clobbering exec event status.
3422 (linux_supports_exec_events): New function.
3423 (linux_target_ops) <supports_exec_events>: Initialize new member.
3424 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3425 new member.
3426 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3427 * server.c (report_exec_events): New global variable.
3428 (handle_query): Handle qSupported query for exec-events feature.
3429 (captured_main): Initialize report_exec_events.
3430 * server.h (report_exec_events): Declare new global variable.
3431 * target.h (struct target_ops) <supports_exec_events>: New
3432 member.
3433 (target_supports_exec_events): New macro.
3434 * win32-low.c (win32_target_ops) <supports_exec_events>:
3435 Initialize new member.
3436
0568462b
MM
34372015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3438
3439 * linux-low.c (linux_low_enable_btrace): Remove.
3440 (linux_target_ops): Replace linux_low_enable_btrace with
3441 linux_enable_btrace.
3442
39edd165
YQ
34432015-09-03 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c (aarch64_insert_point): Call
3446 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3447 returns true.
3448
1db33b5a
UW
34492015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3450
3451 * linux-low.c (check_stopped_by_breakpoint): Use
3452 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3453
ab290430
PA
34542015-08-27 Pedro Alves <palves@redhat.com>
3455
3456 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3457
8d749320
SM
34582015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3459
6711b7f8
SM
3460 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3461 the XNEW-family equivalent.
8d749320
SM
3462 (compile_bytecodes): Likewise.
3463 * dll.c (loaded_dll): Likewise.
3464 * event-loop.c (append_callback_event): Likewise.
3465 (create_file_handler): Likewise.
3466 (create_file_event): Likewise.
3467 * hostio.c (handle_open): Likewise.
3468 * inferiors.c (add_thread): Likewise.
3469 (add_process): Likewise.
3470 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3471 * linux-arm-low.c (arm_new_process): Likewise.
3472 (arm_new_thread): Likewise.
3473 * linux-low.c (add_to_pid_list): Likewise.
3474 (linux_add_process): Likewise.
3475 (handle_extended_wait): Likewise.
3476 (add_lwp): Likewise.
3477 (enqueue_one_deferred_signal): Likewise.
3478 (enqueue_pending_signal): Likewise.
3479 (linux_resume_one_lwp_throw): Likewise.
3480 (linux_resume_one_thread): Likewise.
3481 (linux_read_memory): Likewise.
3482 (linux_write_memory): Likewise.
3483 * linux-mips-low.c (mips_linux_new_process): Likewise.
3484 (mips_linux_new_thread): Likewise.
3485 (mips_add_watchpoint): Likewise.
3486 * linux-x86-low.c (initialize_low_arch): Likewise.
3487 * lynx-low.c (lynx_add_process): Likewise.
3488 * mem-break.c (set_raw_breakpoint_at): Likewise.
3489 (set_breakpoint): Likewise.
3490 (add_condition_to_breakpoint): Likewise.
3491 (add_commands_to_breakpoint): Likewise.
3492 (clone_agent_expr): Likewise.
3493 (clone_one_breakpoint): Likewise.
3494 * regcache.c (new_register_cache): Likewise.
3495 * remote-utils.c (look_up_one_symbol): Likewise.
3496 * server.c (queue_stop_reply): Likewise.
3497 (start_inferior): Likewise.
3498 (queue_stop_reply_callback): Likewise.
3499 (handle_target_event): Likewise.
3500 * spu-low.c (fetch_ppc_memory): Likewise.
3501 (store_ppc_memory): Likewise.
3502 * target.c (set_target_ops): Likewise.
3503 * thread-db.c (thread_db_load_search): Likewise.
3504 (try_thread_db_load_1): Likewise.
3505 * tracepoint.c (add_tracepoint): Likewise.
3506 (add_tracepoint_action): Likewise.
3507 (create_trace_state_variable): Likewise.
3508 (cmd_qtdpsrc): Likewise.
3509 (cmd_qtro): Likewise.
3510 (add_while_stepping_state): Likewise.
3511 * win32-low.c (child_add_thread): Likewise.
3512 (get_image_name): Likewise.
3513
ed8b7b42
YQ
35142015-08-25 Yao Qi <yao.qi@linaro.org>
3515
3516 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3517
db3cb7cb
YQ
35182015-08-25 Yao Qi <yao.qi@linaro.org>
3519
3520 * Makefile.in (aarch64-linux.o): New rule.
3521 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3522 srv_tgtobj.
3523 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3524 (aarch64_init_debug_reg_state): Make it extern.
3525 (aarch64_linux_prepare_to_resume): Remove.
3526
f6011a1c
YQ
35272015-08-25 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3530 lwp_arch_private_info and ptid_of_lwp.
3531
88e2cf7e
YQ
35322015-08-25 Yao Qi <yao.qi@linaro.org>
3533
3534 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3535 Find proc_info by find_process_pid. All callers updated.
3536
5e35436e
YQ
35372015-08-25 Yao Qi <yao.qi@linaro.org>
3538
3539 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3540 Remove.
3541 (debug_reg_change_callback): Remove.
3542 (aarch64_notify_debug_reg_change): Remove.
3543
4a8a7965
YQ
35442015-08-25 Yao Qi <yao.qi@linaro.org>
3545
3546 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3547 Call current_lwp_ptid.
3548
32a271ee
YQ
35492015-08-25 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-aarch64-low.c (debug_reg_change_callback): Use
3552 debug_printf.
3553
0d51c8d7
YQ
35542015-08-25 Yao Qi <yao.qi@linaro.org>
3555
3556 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3557
31a43dd5
YQ
35582015-08-25 Yao Qi <yao.qi@linaro.org>
3559
3560 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3561
8ee52567
YQ
35622015-08-25 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3565 the code.
3566
ff3f0f45
YQ
35672015-08-25 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3570 Remove.
3571 (debug_reg_change_callback): Remove argument entry and add argument
3572 lwp. Remove local variable thread. Don't print thread id in the
3573 debugging output. Don't check whether pid of thread equals to pid.
3574 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3575 iterate_over_lwps instead find_inferior.
3576
3d40fbb5
PA
35772015-08-24 Pedro Alves <palves@redhat.com>
3578
3579 * inferiors.c (get_first_process): New function.
3580 * inferiors.h (get_first_process): New declaration.
3581 * remote-utils.c (read_ptid): Default to the first process in the
3582 list, instead of to the current thread's process.
3583
438e1e42
PA
35842015-08-24 Pedro Alves <palves@redhat.com>
3585
3586 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3587 * event-loop.c: Likewise.
3588 * remote-utils.c: Likewise.
3589 * tracepoint.c: Likewise.
3590
a8c6d4fc
PA
35912015-08-24 Pedro Alves <palves@redhat.com>
3592
3593 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3594 ptid_get_lwp.
3595
99b0bb12
PA
35962015-08-21 Pedro Alves <palves@redhat.com>
3597
3598 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3599 instead of literal 1.
3600
f8904751
PA
36012015-08-21 Pedro Alves <palves@redhat.com>
3602
3603 * tdesc.c (default_description): Explicitly zero-initialize.
3604
465a859e
PA
36052015-08-21 Pedro Alves <palves@redhat.com>
3606
3607 PR gdb/18749
3608 * inferiors.c (remove_thread): Discard any pending stop reply for
3609 this thread.
3610 * server.c (remove_all_on_match_pid): Rename to ...
3611 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3612 instead of a pid.
3613 (discard_queued_stop_replies): Change parameter to a ptid. Now
3614 extern.
3615 (handle_v_kill, kill_inferior_callback, captured_main)
3616 (process_serial_event): Adjust.
3617 * server.h (discard_queued_stop_replies): Declare.
3618
f0db101d
PA
36192015-08-21 Pedro Alves <palves@redhat.com>
3620
3621 * linux-low.c (wait_for_sigstop): Always switch to no thread
3622 selected if the previously current thread dies.
3623 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3624 process instead of the current thread's.
3625 * remote-utils.c (input_interrupt): Don't check if there's no
3626 current thread.
3627 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3628 current thread to the general thread fails, error out.
3629 (handle_qxfer_auxv, handle_qxfer_libraries)
3630 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3631 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3632 (handle_query): Check if there's a thread selected instead of
3633 checking whether there's any thread in the thread list.
3634 (handle_qxfer_threads, handle_qxfer_btrace)
3635 (handle_qxfer_btrace_conf): Don't error out early if there's no
3636 thread in the thread list.
3637 (handle_v_cont, myresume): Don't set the current thread to the
3638 continue thread.
3639 (process_serial_event) <Hg handling>: Also set thread_id if the
3640 previous general thread is still alive.
3641 (process_serial_event) <g/G handling>: If setting the current
3642 thread to the general thread fails, error out.
3643 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3644 thread's lwp instead of the current thread's.
3645 * target.c (set_desired_thread): If the desired thread was not
3646 found, leave the current thread pointing to NULL. Return an int
3647 (boolean) indicating success.
3648 * target.h (set_desired_thread): Change return type to int.
3649
40045d91
MF
36502015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3651
3652 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3653 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3654 #includes.
3655 (ps_get_thread_area): New function.
3656
45face3b
GB
36572015-08-19 Gary Benson <gbenson@redhat.com>
3658
3659 * hostio.c (handle_pread): Do not attempt to read more data
3660 than hostio_reply_with_data can fit in a packet.
3661
16d5f642
JB
36622015-08-18 Joel Brobecker <brobecker@adacore.com>
3663
3664 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3665
a738da3a
MF
36662015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3667
3668 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3669
33ebda9d
PA
36702015-08-06 Pedro Alves <palves@redhat.com>
3671
3672 * tracepoint.c (expr_eval_result): Now an int.
3673
a44892be
PA
36742015-08-06 Pedro Alves <palves@redhat.com>
3675
3676 * gdbthread.h (struct regcache): Forward declare.
3677 (struct thread_info) <regcache_data>: Now a struct regcache
3678 pointer.
3679 * inferiors.c (inferior_regcache_data)
3680 (set_inferior_regcache_data): Now work with struct regcache
3681 pointers.
3682 * inferiors.h (struct regcache): Forward declare.
3683 (inferior_regcache_data, set_inferior_regcache_data): Now work
3684 with struct regcache pointers.
3685 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3686 (free_register_cache_thread): Remove struct regcache pointer
3687 casts.
3688
608a1e46
PA
36892015-08-06 Pedro Alves <palves@redhat.com>
3690
3691 * server.c (captured_main): On error, print the exception message
3692 to stderr, and if run_once is set, throw a quit.
3693
f0ce0d3a
PA
36942015-08-06 Pedro Alves <palves@redhat.com>
3695
3696 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3697 the current thread.
3698
bf47e248
PA
36992015-08-06 Pedro Alves <palves@redhat.com>
3700
3701 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3702 reading beyond the passed in buffer length.
3703
b6b9ffcc
PL
37042015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3705
3706 * tracepoint.c (symbol_list) <required>: Remove.
3707
863d01bd
PA
37082015-08-06 Pedro Alves <palves@redhat.com>
3709
3710 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3711 count if stopping and suspending threads.
3712 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3713 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3714 (linux_detach): Complete an ongoing step-over.
3715 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3716 throughout.
3717 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3718 (linux_wait_1): If passing a signal to the inferior after
3719 finishing a step-over, unsuspend and re-resume all lwps. If we
3720 see a single-step event but the thread should be continuing, don't
3721 pass the trap to gdb.
3722 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3723 internal_error instead of gdb_assert.
3724 (enqueue_pending_signal): New function.
3725 (check_ptrace_stopped_lwp_gone): Add debug output.
3726 (start_step_over): Use internal_error instead of gdb_assert.
3727 (complete_ongoing_step_over): New function.
3728 (linux_resume_one_thread): Don't resume a suspended thread.
3729 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3730 it stepping.
3731
00db26fa
PA
37322015-08-06 Pedro Alves <palves@redhat.com>
3733
3734 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3735 (linux_thread_alive): Use lwp_is_marked_dead.
3736 (extended_event_reported): Delete.
3737 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3738 instead of extended_event_reported.
3739 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3740 as well.
3741 (lwp_is_marked_dead): New function.
3742 (lwp_running): Use lwp_is_marked_dead.
3743 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3744 comment.
3745
ad071a30
PA
37462015-08-06 Pedro Alves <palves@redhat.com>
3747
3748 * linux-low.c (linux_wait_1): Move fork event output out of the
3749 !report_to_gdb check. Pass event_child->waitstatus to
3750 target_waitstatus_to_string instead of ourstatus.
3751
524b57e6
YQ
37522015-08-04 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3755 if current_thread is 32 bit.
3756
6085d6f6
YQ
37572015-08-04 Yao Qi <yao.qi@linaro.org>
3758
3759 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3760 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3761 * server.c (extended_protocol): Remove "static".
3762 * server.h (extended_protocol): Declare it.
3763
8a7e4587
YQ
37642015-08-04 Yao Qi <yao.qi@linaro.org>
3765
3766 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3767 both aarch64 and aarch32.
3768 (aarch64_set_pc): Likewise.
3769
3b53ae99
YQ
37702015-08-04 Yao Qi <yao.qi@linaro.org>
3771
3772 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3773 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3774 arm-with-neon.xml to srv_xmlfiles.
3775 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3776 (is_64bit_tdesc): New function.
3777 (aarch64_linux_read_description): New function.
3778 (aarch64_arch_setup): Call aarch64_linux_read_description.
3779 (regs_info): Rename to regs_info_aarch64.
3780 (aarch64_regs_info): Return right regs_info.
3781 (initialize_low_arch): Call initialize_low_arch_aarch32.
3782
bd9e6534
YQ
37832015-08-04 Yao Qi <yao.qi@linaro.org>
3784
3785 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3786 * linux-aarch32-low.c: New file.
3787 * linux-aarch32-low.h: New file.
3788 * linux-arm-low.c (arm_fill_gregset): Move it to
3789 linux-aarch32-low.c.
3790 (arm_store_gregset): Likewise.
3791 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3792 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3793 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3794 (regs_info): Rename to regs_info_arm.
3795 (arm_regs_info): Return regs_info_aarch32 if
3796 have_ptrace_getregset is 1 and target description is
3797 arm_with_neon or arm_with_vfpv3.
3798 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3799 Call initialize_low_arch_aarch32 instead.
3800
ded48a5e
YQ
38012015-08-04 Yao Qi <yao.qi@linaro.org>
3802
3803 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3804 * linux-low.c: ... here.
3805 * linux-low.h (have_ptrace_getregset): Declare it.
3806
96e9210f
PA
38072015-08-04 Pedro Alves <palves@redhat.com>
3808
3809 * thread-db.c (struct thread_db): Use new typedefs.
3810 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3811 CHK calls.
3812 (disable_thread_event_reporting): Cast result of dlsym to
3813 destination function pointer type.
3814 (thread_db_mourn): Use td_ta_delete_ftype.
3815
af60a1ef
SL
38162015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3817
3818 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3819 arch variant.
3820 (CDX_BREAKPOINT): Define for R2.
3821 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3822 (the_low_target): Add comments.
3823
e8b41681
YQ
38242015-07-30 Yao Qi <yao.qi@linaro.org>
3825
3826 * linux-arm-low.c (arm_hwcap): Remove it.
3827 (arm_read_description): New local variable arm_hwcap. Don't
3828 set arm_hwcap to zero.
3829
89abb039
YQ
38302015-07-30 Yao Qi <yao.qi@linaro.org>
3831
3832 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3833 Use regcache->tdesc instead.
3834 (arm_store_wmmxregset): Likewise.
3835 (arm_fill_vfpregset): Likewise.
3836 (arm_store_vfpregset): Likewise.
3837
deca266c
YQ
38382015-07-30 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-arm-low.c: Include arch/arm.h.
3841 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3842 (arm_store_gregset): Likewise.
3843
aa58a496
SM
38442015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3845
3846 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3847 ptrace's 4th parameter.
3848
50904b25
YQ
38492015-07-27 Yao Qi <yao.qi@linaro.org>
3850
3851 * configure.srv (case aarch64*-*-linux*): Don't set
3852 srv_linux_usrregs.
3853
5826e159
PA
38542015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3855
3856 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3857 sys/ptrace.h.
3858 * linux-arm-low.c: Likewise.
3859 * linux-cris-low.c: Likewise.
3860 * linux-crisv32-low.c: Likewise.
3861 * linux-low.c: Likewise.
3862 * linux-m68k-low.c: Likewise.
3863 * linux-mips-low.c: Likewise.
3864 * linux-nios2-low.c: Likewise.
3865 * linux-s390-low.c: Likewise.
3866 * linux-sparc-low.c: Likewise.
3867 * linux-tic6x-low.c: Likewise.
3868 * linux-tile-low.c: Likewise.
3869 * linux-x86-low.c: Likewise.
3870
54019719
PA
38712015-07-24 Pedro Alves <palves@redhat.com>
3872
3873 * config.in: Regenerate.
3874 * configure: Regenerate.
3875
eb7aa561
PA
38762015-07-24 Pedro Alves <palves@redhat.com>
3877
3878 * acinclude.m4: Include ../ptrace.m4.
3879 * configure.ac: Call GDB_AC_PTRACE.
3880 * config.in, configure: Regenerate.
3881
55d7b841
YQ
38822015-07-24 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-low.c (linux_create_inferior): Remove setting to
3885 proc->priv->new_inferior.
3886 (linux_attach): Likewise.
3887 (linux_low_filter_event): Likewise.
3888 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3889
c06cbd92
YQ
38902015-07-24 Yao Qi <yao.qi@linaro.org>
3891
3892 * linux-low.c (linux_arch_setup): New function.
3893 (linux_low_filter_event): If proc->tdesc is NULL and
3894 proc->attached is true, call the_low_target.arch_setup.
3895 Otherwise, keep status pending, and return.
3896 (linux_resume_one_lwp_throw): Don't call get_pc if
3897 thread->while_stepping isn't NULL. Don't call
3898 get_thread_regcache if proc->tdesc is NULL.
3899 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3900 (linux_target_ops): Install arch_setup.
3901 * server.c (start_inferior): Call the_target->arch_setup.
3902 * target.h (struct target_ops) <arch_setup>: New field.
3903 (target_arch_setup): New marco.
3904 * lynx-low.c (lynx_target_ops): Update.
3905 * nto-low.c (nto_target_ops): Update.
3906 * spu-low.c (spu_target_ops): Update.
3907 * win32-low.c (win32_target_ops): Update.
3908
5ae3ebba
YQ
39092015-07-24 Yao Qi <yao.qi@linaro.org>
3910
3911 * linux-low.c (linux_add_process): Don't set
3912 proc->priv->new_inferior.
3913 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3914 (linux_attach): Likewise.
3915
eb97750b
YQ
39162015-07-24 Yao Qi <yao.qi@linaro.org>
3917
3918 * server.c (start_inferior): Code refactor.
3919
51aee833
YQ
39202015-07-24 Yao Qi <yao.qi@linaro.org>
3921
3922 * server.c (process_serial_event): Set general_thread.
3923
af1b22f3
YQ
39242015-07-21 Yao Qi <yao.qi@linaro.org>
3925
3926 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3927 aarch64_linux_get_debug_reg_capacity.
3928
554717a3
YQ
39292015-07-17 Yao Qi <yao.qi@linaro.org>
3930
3931 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3932 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3933 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3934 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3935 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3936 (AARCH64_HWP_ALIGNMENT): Likewise.
3937 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3938 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3939 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3940 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3941 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3942 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3943 (struct aarch64_debug_reg_state): Likewise.
3944 (struct arch_lwp_info): Likewise.
3945 (aarch64_align_watchpoint): Likewise.
3946 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3947 (aarch64_watchpoint_length): Likewise.
3948 (aarch64_point_encode_ctrl_reg): Likewise
3949 (aarch64_point_is_aligned): Likewise.
3950 (aarch64_align_watchpoint): Likewise.
3951 (aarch64_linux_set_debug_regs):
3952 (aarch64_dr_state_insert_one_point): Likewise.
3953 (aarch64_dr_state_remove_one_point): Likewise.
3954 (aarch64_handle_breakpoint): Likewise.
3955 (aarch64_handle_aligned_watchpoint): Likewise.
3956 (aarch64_handle_unaligned_watchpoint): Likewise.
3957 (aarch64_handle_watchpoint): Likewise.
3958
c67ca4de
YQ
39592015-07-17 Yao Qi <yao.qi@linaro.org>
3960
3961 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3962 and don't aarch64_get_debug_reg_state. All callers update.
3963 (aarch64_handle_aligned_watchpoint): Likewise.
3964 (aarch64_handle_unaligned_watchpoint): Likewise.
3965 (aarch64_handle_watchpoint): Likewise.
3966 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3967 (aarch64_remove_point): Likewise.
3968
25abf979
YQ
39692015-07-17 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3972 debug_printf.
3973 (aarch64_handle_unaligned_watchpoint): Likewise.
3974
db1ff28b
JK
39752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3976
3977 Revert the previous 3 commits:
3978 Move gdb_regex* to common/
3979 Move linux_find_memory_regions_full & co.
3980 gdbserver build-id attribute generator
3981
700ca40f
JK
39822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3983 Jan Kratochvil <jan.kratochvil@redhat.com>
3984
3985 gdbserver build-id attribute generator.
3986 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3987 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3988 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3989 (find_phdr): New.
3990 (get_dynamic): Use find_pdhr to traverse program headers.
3991 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3992 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3993 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3994 (get_hex_build_id): New.
3995 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3996 to reply XML document.
3997
9904185c
JK
39982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3999 Jan Kratochvil <jan.kratochvil@redhat.com>
4000
4001 * target.c: Include target/target-utils.h and fcntl.h.
4002 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4003 (target_fileio_read_stralloc): New functions.
4004
6e5b4429
JK
40052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4006
4007 * Makefile.in (OBS): Add gdb_regex.o.
4008 (gdb_regex.o): New.
4009 * config.in: Rebuilt.
4010 * configure: Rebuilt.
4011
ddc98fbf
JK
40122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4013 Jan Kratochvil <jan.kratochvil@redhat.com>
4014
4015 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4016 * Makefile.in (OBS): Add target-utils.o.
4017 (linux-maps.o, target-utils.o): New.
4018 * configure.srv (srv_linux_obj): Add linux-maps.o.
4019
e57bb7a0
PL
40202015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4021
4022 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4023 function, return 1.
4024 (the_low_target): Install it.
4025
586b02a9
PA
40262015-07-14 Pedro Alves <palves@redhat.com>
4027
4028 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4029 Instead, ignore ECHILD, and throw an error for other errnos.
4030
58c1b36c
PA
40312015-07-10 Pedro Alves <palves@redhat.com>
4032
4033 * event-loop.c (struct callback_event) <data>: Change type to
4034 gdb_client_data instance instead of gdb_client_data pointer.
4035 (append_callback_event): Adjust.
4036
421530db
PL
40372015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4038
4039 * linux-aarch64-low.c: Add comments for each linux_target_ops
4040 method. Remove comments already covered in target_ops and
4041 linux_target_ops definitions.
4042 (the_low_target): Add comments for each unimplemented method.
4043
c2d65f38
YQ
40442015-07-09 Yao Qi <yao.qi@linaro.org>
4045
4046 * linux-aarch64-low.c (aarch64_regmap): Remove.
4047 (aarch64_usrregs_info): Remove.
4048 (regs_info): Set field usrregs to NULL.
4049
b20a6524
MM
40502015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4051
4052 * linux-low.c: Include "rsp-low.h"
4053 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4054 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4055 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4056 (handle_btrace_enable_pt): New.
4057 (handle_btrace_general_set): Support "pt".
4058 (handle_btrace_conf_general_set): Support "pt:size".
4059
96c97461
PL
40602015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4061
4062 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4063 Z_PACKET_SW_BP.
4064
37d66942
PL
40652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4066
4067 * linux-aarch64-low.c: Remove comment about endianness.
4068 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4069 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4070 memcmp.
4071
dc06243f
GB
40722015-06-24 Gary Benson <gbenson@redhat.com>
4073
4074 * linux-i386-ipa.c (stdint.h): Do not include.
4075 * lynx-i386-low.c (stdint.h): Likewise.
4076 * lynx-ppc-low.c (stdint.h): Likewise.
4077 * mem-break.c (stdint.h): Likewise.
4078 * thread-db.c (stdint.h): Likewise.
4079 * tracepoint.c (stdint.h): Likewise.
4080 * win32-low.c (stdint.h): Likewise.
4081
124e13d9
SM
40822015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4083
4084 * server.c (write_qxfer_response): Update call to
4085 remote_escape_output.
4086
909c2cda
JK
40872015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4088 Jan Kratochvil <jan.kratochvil@redhat.com>
4089
4090 Merge multiple hex conversions.
4091 * gdbreplay.c (tohex): Rename to 'fromhex'.
4092 (logchar): Use fromhex.
4093
24c05f46
JK
40942015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4095
4096 * server.c (handle_qxfer_libraries): Set `version' attribute for
4097 <library-list>.
4098
14d2069a
GB
40992015-06-10 Gary Benson <gbenson@redhat.com>
4100
4101 * target.h (struct target_ops) <multifs_open>: New field.
4102 <multifs_unlink>: Likewise.
4103 <multifs_readlink>: Likewise.
4104 * linux-low.c (nat/linux-namespaces.h): New include.
4105 (linux_target_ops): Initialize the_target->multifs_open,
4106 the_target->multifs_unlink and the_target->multifs_readlink.
4107 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4108 * hostio.c (hostio_fs_pid): New static variable.
4109 (hostio_handle_new_gdb_connection): New function.
4110 (handle_setfs): Likewise.
4111 (handle_open): Use the_target->multifs_open as appropriate.
4112 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4113 (handle_readlink): Use the_target->multifs_readlink as
4114 appropriate.
4115 (handle_vFile): Handle vFile:setfs packets.
4116 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4117 after target_handle_new_gdb_connection.
4118
4b8b5e72
GB
41192015-06-10 Gary Benson <gbenson@redhat.com>
4120
4121 * configure.ac (AC_CHECK_FUNCS): Add setns.
4122 * config.in: Regenerate.
4123 * configure: Likewise.
4124 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4125 (linux-namespaces.o): New rule.
4126 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4127
3ac2e371
GB
41282015-06-09 Gary Benson <gbenson@redhat.com>
4129
4130 * hostio.c (handle_open): Process mode argument with
4131 fileio_to_host_mode.
4132
ca9b78ce
YQ
41332015-06-01 Yao Qi <yao.qi@linaro.org>
4134
4135 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4136 * linux-x86-low.c: Likewise.
4137
bfacd19d
DB
41382015-05-28 Don Breazeal <donb@codesourcery.com>
4139
4140 * linux-low.c (handle_extended_wait): Initialize
4141 thread_info.last_resume_kind for new fork children.
4142
452003ef
PA
41432015-05-15 Pedro Alves <palves@redhat.com>
4144
4145 * target.h (target_handle_new_gdb_connection): Rewrite using if
4146 wrapped in do/while.
4147
1041a03c
JB
41482015-05-14 Joel Brobecker <brobecker@adacore.com>
4149
4150 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4151 * configure, config.in: Regenerate.
4152 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4153 Declare typedef.
4154
c269dbdb
DB
41552015-05-12 Don Breazeal <donb@codesourcery.com>
4156
4157 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4158 PTRACE_EVENT_VFORK_DONE.
4159 (linux_low_ptrace_options, extended_event_reported): Add vfork
4160 events.
4161 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4162 and "vforkdone" for RSP 'T' Stop Reply Packet.
4163 * server.h (report_vfork_events): Declare
4164 global variable.
4165
3a8a0396
DB
41662015-05-12 Don Breazeal <donb@codesourcery.com>
4167
4168 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4169 (the_low_target) <new_fork>: Initialize new member.
4170 * linux-arm-low.c (arm_new_fork): New function.
4171 (the_low_target) <new_fork>: Initialize new member.
4172 * linux-low.c (handle_extended_wait): Call new target function
4173 new_fork.
4174 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4175 * linux-mips-low.c (mips_add_watchpoint): New function
4176 extracted from mips_insert_point.
4177 (the_low_target) <new_fork>: Initialize new member.
4178 (mips_linux_new_fork): New function.
4179 (mips_insert_point): Call mips_add_watchpoint.
4180 * linux-x86-low.c (x86_linux_new_fork): New function.
4181 (the_low_target) <new_fork>: Initialize new member.
4182
de0d863e
DB
41832015-05-12 Don Breazeal <donb@codesourcery.com>
4184
4185 * linux-low.c (handle_extended_wait): Implement return value,
4186 rename argument 'event_child' to 'event_lwp', handle
4187 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4188 (linux_low_ptrace_options): New function.
4189 (linux_low_filter_event): Call linux_low_ptrace_options,
4190 use different argument fo linux_enable_event_reporting,
4191 use return value from handle_extended_wait.
4192 (extended_event_reported): New function.
4193 (linux_wait_1): Call extended_event_reported and set
4194 status to report fork events.
4195 (linux_write_memory): Add pid to debug message.
4196 (reset_lwp_ptrace_options_callback): New function.
4197 (linux_handle_new_gdb_connection): New function.
4198 (linux_target_ops): Initialize new structure member.
4199 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4200 * lynx-low.c: Initialize new structure member.
4201 * remote-utils.c (prepare_resume_reply): Implement stop reason
4202 "fork" for "T" stop message.
4203 * server.c (handle_query): Call handle_new_gdb_connection.
4204 * server.h (report_fork_events): Declare global flag.
4205 * target.h (struct target_ops) <handle_new_gdb_connection>:
4206 New member.
4207 (target_handle_new_gdb_connection): New macro.
4208 * win32-low.c: Initialize new structure member.
4209
ddcbc397
DB
42102015-05-12 Don Breazeal <donb@codesourcery.com>
4211
4212 * mem-break.c (APPEND_TO_LIST): Define macro.
4213 (clone_agent_expr): New function.
4214 (clone_one_breakpoint): New function.
4215 (clone_all_breakpoints): New function.
4216 * mem-break.h: Declare new functions.
4217
89245bc0
DB
42182015-05-12 Don Breazeal <donb@codesourcery.com>
4219
4220 * linux-low.c (linux_supports_fork_events): New function.
4221 (linux_supports_vfork_events): New function.
4222 (linux_target_ops): Initialize new structure members.
4223 (initialize_low): Call linux_check_ptrace_features.
4224 * lynx-low.c (lynx_target_ops): Initialize new structure
4225 members.
4226 * server.c (report_fork_events, report_vfork_events):
4227 New global flags.
4228 (handle_query): Add new features to qSupported packet and
4229 response.
4230 (captured_main): Initialize new global variables.
4231 * target.h (struct target_ops) <supports_fork_events>:
4232 New member.
4233 <supports_vfork_events>: New member.
4234 (target_supports_fork_events): New macro.
4235 (target_supports_vfork_events): New macro.
4236 * win32-low.c (win32_target_ops): Initialize new structure
4237 members.
4238
835205d0
GB
42392015-05-12 Gary Benson <gbenson@redhat.com>
4240
4241 * server.c (handle_qxfer_exec_file): Use current process
4242 if annex is empty.
4243
21e94bd9
SL
42442015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4245
4246 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4247 Remove HAVE_PTRACE_GETREGS conditionals.
4248 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4249 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4250
45614f15
YQ
42512015-05-08 Yao Qi <yao.qi@linaro.org>
4252
4253 * linux-low.c (linux_supports_conditional_breakpoints): New
4254 function.
4255 (linux_target_ops): Install new target method.
4256 * lynx-low.c (lynx_target_ops): Install NULL hook for
4257 supports_conditional_breakpoints.
4258 * nto-low.c (nto_target_ops): Likewise.
4259 * spu-low.c (spu_target_ops): Likewise.
4260 * win32-low.c (win32_target_ops): Likewise.
4261 * server.c (handle_query): Check
4262 target_supports_conditional_breakpoints.
4263 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4264 New field.
4265 (target_supports_conditional_breakpoints): New macro.
4266
80ad801e
PA
42672015-05-06 Pedro Alves <palves@redhat.com>
4268
4269 PR server/18081
4270 * server.c (start_inferior): If the process exits, mourn it.
4271
819843c7
GB
42722015-04-21 Gary Benson <gbenson@redhat.com>
4273
4274 * hostio.c (fileio_open_flags_to_host): Factored out to
4275 fileio_to_host_openflags in common/fileio.c. Single use
4276 updated.
4277
a2d5a9d7
MF
42782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4279
4280 * linux-xtensa-low.c (xtensa_fill_gregset)
4281 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4282 XCHAL_HAVE_LOOP.
4283
deb44829
MF
42842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4285
4286 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4287 (regs_info): Replace usrregs pointer with NULL.
4288
e57f1de3
GB
42892015-04-17 Gary Benson <gbenson@redhat.com>
4290
4291 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4292 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4293 * server.c (handle_qxfer_exec_file): New function.
4294 (qxfer_packets): Add exec-file entry.
4295 (handle_query): Report qXfer:exec-file:read as supported packet.
4296
62828379
RN
42972015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4298
4299 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4300
b88bb450
GB
43012015-04-09 Gary Benson <gbenson@redhat.com>
4302
4303 * hostio-errno.c (errno_to_fileio_error): Remove function.
4304 Update caller to use remote_fileio_to_fio_error.
4305
c8f4bfdd
YQ
43062015-04-09 Yao Qi <yao.qi@linaro.org>
4307
4308 * linux-low.c (linux_insert_point): Call
4309 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4310 (linux_remove_point): Call remove_memory_breakpoint if type is
4311 raw_bkpt_type_sw.
4312 * linux-x86-low.c (x86_insert_point): Don't call
4313 insert_memory_breakpoint.
4314 (x86_remove_point): Don't call remove_memory_breakpoint.
4315
41f98f02
PA
43162015-04-01 Pedro Alves <palves@redhat.com>
4317 Cleber Rosa <crosa@redhat.com>
4318
4319 * server.c (gdbserver_usage): Reorganize and extend the usage
4320 message.
4321
2bf6fb9d
PA
43222015-03-24 Pedro Alves <palves@redhat.com>
4323
4324 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4325 output. Also dump TRAP_TRACE.
4326 (linux_low_filter_event): In debug output, distinguish a
4327 resume_stop SIGSTOP from a delayed SIGSTOP.
4328
369f6daa
GB
43292015-03-24 Gary Benson <gbenson@redhat.com>
4330
4331 * linux-x86-low.c (x86_linux_new_thread): Moved to
4332 nat/x86-linux.c.
4333 (x86_linux_prepare_to_resume): Likewise.
4334
8e5d4070
GB
43352015-03-24 Gary Benson <gbenson@redhat.com>
4336
4337 * Makefile.in (x86-linux-dregs.o): New rule.
4338 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4339 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4340 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4341 (x86_linux_dr_get): Likewise.
4342 (x86_linux_dr_set): Likewise.
4343 (update_debug_registers_callback): Likewise.
4344 (x86_linux_dr_set_addr): Likewise.
4345 (x86_linux_dr_get_addr): Likewise.
4346 (x86_linux_dr_set_control): Likewise.
4347 (x86_linux_dr_get_control): Likewise.
4348 (x86_linux_dr_get_status): Likewise.
4349 (x86_linux_update_debug_registers): Likewise.
4350
2b95d440
GB
43512015-03-24 Gary Benson <gbenson@redhat.com>
4352
4353 * linux-x86-low.c (x86_linux_update_debug_registers):
4354 New function, factored out from...
4355 (x86_linux_prepare_to_resume): ...this.
4356
14b0bc68
GB
43572015-03-24 Gary Benson <gbenson@redhat.com>
4358
4359 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4360 (x86_linux_dr_set): Likewise.
4361 (update_debug_registers_callback): Likewise.
4362 (x86_linux_dr_set_addr): Likewise.
4363 (x86_linux_dr_get_addr): Likewise.
4364 (x86_linux_dr_set_control): Likewise.
4365 (x86_linux_dr_get_control): Likewise.
4366 (x86_linux_dr_get_status): Likewise.
4367 (x86_linux_prepare_to_resume): Likewise.
4368
5dfe6ca8
GB
43692015-03-24 Gary Benson <gbenson@redhat.com>
4370
4371 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4372 Use perror_with_name. Pass string through gettext.
4373 (x86_linux_dr_set): Likewise.
4374
d33472ad
GB
43752015-03-24 Gary Benson <gbenson@redhat.com>
4376
4377 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4378 (x86_linux_dr_set_addr): ...this.
4379 (x86_dr_low_get_addr): Rename to...
4380 (x86_linux_dr_get_addr): ...this.
4381 (x86_dr_low_set_control): Rename to...
4382 (x86_linux_dr_set_control): ...this.
4383 (x86_dr_low_get_control): Rename to...
4384 (x86_linux_dr_get_control): ...this.
4385 (x86_dr_low_get_status): Rename to...
4386 (x86_linux_dr_get_status): ...this.
4387 (x86_dr_low): Update with new function names.
4388
4b134ca1
GB
43892015-03-24 Gary Benson <gbenson@redhat.com>
4390
4391 * Makefile.in (x86-linux.o): New rule.
4392 * configure.srv: Add x86-linux.o to relevant targets.
4393 * linux-low.c (lwp_set_arch_private_info): New function.
4394 (lwp_arch_private_info): Likewise.
4395 * linux-x86-low.c: Include nat/x86-linux.h.
4396 (arch_lwp_info): Removed structure.
4397 (update_debug_registers_callback):
4398 Use lwp_set_debug_registers_changed.
4399 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4400 and lwp_set_debug_registers_changed.
4401 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4402
34c703da
GB
44032015-03-24 Gary Benson <gbenson@redhat.com>
4404
4405 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4406 * linux-arm-low.c (arm_new_thread): Likewise.
4407 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4408 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4409 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4410 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4411
cff068da
GB
44122015-03-24 Gary Benson <gbenson@redhat.com>
4413
4414 * linux-low.c (ptid_of_lwp): New function.
4415 (lwp_is_stopped): Likewise.
4416 (lwp_stop_reason): Likewise.
4417 * linux-x86-low.c (update_debug_registers_callback):
4418 Use lwp_is_stopped.
4419 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4420 lwp_stop_reason.
4421
b2f7c7e8
GB
44222015-03-24 Gary Benson <gbenson@redhat.com>
4423
4424 * linux-low.h (linux_stop_lwp): Remove declaration.
4425
6d4ee8c6
GB
44262015-03-24 Gary Benson <gbenson@redhat.com>
4427
4428 * linux-low.h: Include nat/linux-nat.h.
4429 * linux-low.c (iterate_over_lwps_args): New structure.
4430 (iterate_over_lwps_filter): New function.
4431 (iterate_over_lwps): Likewise.
4432 * linux-x86-low.c (update_debug_registers_callback):
4433 Update signature to what iterate_over_lwps expects.
4434 Remove PID check that iterate_over_lwps now performs.
4435 (x86_dr_low_set_addr): Use iterate_over_lwps.
4436 (x86_dr_low_set_control): Likewise.
4437
70a0bb6b
GB
44382015-03-24 Gary Benson <gbenson@redhat.com>
4439
4440 * linux-x86-low.c (x86_debug_reg_state): New function.
4441 (x86_linux_prepare_to_resume): Use the above.
4442
7b669087
GB
44432015-03-24 Gary Benson <gbenson@redhat.com>
4444
4445 * linux-low.c (current_lwp_ptid): New function.
4446 * linux-x86-low.c: Include nat/linux-nat.h.
4447 (x86_dr_low_get_addr): Use current_lwp_ptid.
4448 (x86_dr_low_get_control): Likewise.
4449 (x86_dr_low_get_status): Likewise.
4450
eef49a3d
PA
44512015-03-20 Pedro Alves <palves@redhat.com>
4452
4453 * tracepoint.c (cmd_qtstatus): Make "str" const.
4454
b2333d22
PA
44552015-03-20 Pedro Alves <palves@redhat.com>
4456
4457 * server.c (handle_general_set): Make "req_str" const.
4458
23f238d3
PA
44592015-03-19 Pedro Alves <palves@redhat.com>
4460
4461 * linux-low.c (linux_resume_one_lwp): Rename to ...
4462 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4463 instead call perror_with_name.
4464 (check_ptrace_stopped_lwp_gone): New function.
4465 (linux_resume_one_lwp): Reimplement as wrapper around
4466 linux_resume_one_lwp_throw that swallows errors if the LWP is
4467 gone.
4468
91baf43f
PA
44692015-03-19 Pedro Alves <palves@redhat.com>
4470
4471 * linux-low.c (count_events_callback, select_event_lwp_callback):
4472 No longer check whether the thread has resume_stop as last resume
4473 kind.
4474
8bf3b159
PA
44752015-03-19 Pedro Alves <palves@redhat.com>
4476
4477 * linux-low.c (count_events_callback, select_event_lwp_callback):
4478 Use the lwp's status_pending_p field, not the thread's.
4479
b90fc188
PA
44802015-03-19 Pedro Alves <palves@redhat.com>
4481
4482 * linux-low.c (select_event_lwp_callback): Update comments to
4483 no longer mention SIGTRAP.
4484
464b0089
GB
44852015-03-18 Gary Benson <gbenson@redhat.com>
4486
4487 * server.c (handle_query): Do not report vFile:fstat as supported.
4488
aa9e327f
GB
44892015-03-11 Gary Benson <gbenson@redhat.com>
4490
4491 * hostio.c (sys/types.h): New include.
4492 (sys/stat.h): Likewise.
4493 (common-remote-fileio.h): Likewise.
4494 (handle_fstat): New function.
4495 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4496
791c0056
GB
44972015-03-11 Gary Benson <gbenson@redhat.com>
4498
4499 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4500 struct stat.st_blocks and struct stat.st_blksize.
4501 * configure: Regenerate.
4502 * config.in: Likewise.
4503 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4504 (OBS): Add common-remote-fileio.o.
4505 (common-remote-fileio.o): New rule.
4506
9a9df970
PA
45072015-03-09 Pedro Alves <palves@redhat.com>
4508
4509 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4510 'struct sockaddr' pointer in 'accept' call.
4511
9eb1356e
PA
45122015-03-09 Pedro Alves <palves@redhat.com>
4513
4514 Revert:
4515 2015-03-07 Pedro Alves <palves@redhat.com>
4516 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4517 or <winsock2.h> here. Instead include "gdb_socket.h".
4518 (remote_open): Use union gdb_sockaddr_u.
4519 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4520 or <winsock2.h> here. Instead include "gdb_socket.h".
4521 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4522 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4523 or <sys/un.h>.
4524 (init_named_socket, gdb_agent_helper_thread): Use union
4525 gdb_sockaddr_u.
4526
aac331e4
PA
45272015-03-07 Pedro Alves <palves@redhat.com>
4528
4529 * configure.ac (build_warnings): Move
4530 -Wdeclaration-after-statement to the C-specific set.
4531 * configure: Regenerate.
4532
366c75fc
PA
45332015-03-07 Pedro Alves <palves@redhat.com>
4534
4535 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4536 or <winsock2.h> here. Instead include "gdb_socket.h".
4537 (remote_open): Use union gdb_sockaddr_u.
4538 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4539 or <winsock2.h> here. Instead include "gdb_socket.h".
4540 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4541 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4542 or <sys/un.h>.
4543 (init_named_socket, gdb_agent_helper_thread): Use union
4544 gdb_sockaddr_u.
4545
492d29ea
PA
45462015-03-07 Pedro Alves <palves@redhat.com>
4547
4548 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4549 instead.
4550
60a191ed
YQ
45512015-03-06 Yao Qi <yao.qi@linaro.org>
4552
4553 * linux-aarch64-low.c (aarch64_insert_point): Use
4554 show_debug_regs as a boolean.
4555 (aarch64_remove_point): Likewise.
4556
f5771b1d
PA
45572015-03-05 Pedro Alves <palves@redhat.com>
4558
4559 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4560 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4561 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4562 * nto-low.c (nto_target_ops): Likewise.
4563 * spu-low.c (spu_target_ops): Likewise.
4564 * win32-low.c (win32_target_ops): Likewise.
4565
3e572f71
PA
45662015-03-04 Pedro Alves <palves@redhat.com>
4567
72f4393d 4568 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4569 Decide whether a breakpoint triggered based on the SIGTRAP's
4570 siginfo.si_code.
72f4393d
L
4571 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4572 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4573 (linux_low_filter_event): Check for breakpoints before checking
4574 watchpoints.
4575 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4576 siginfo.si_code.
72f4393d
L
4577 (linux_stopped_by_sw_breakpoint)
4578 (linux_supports_stopped_by_sw_breakpoint)
4579 (linux_stopped_by_hw_breakpoint)
4580 (linux_supports_stopped_by_hw_breakpoint): New functions.
4581 (linux_target_ops): Install new target methods.
3e572f71 4582
1ec68e26
PA
45832015-03-04 Pedro Alves <palves@redhat.com>
4584
4585 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4586 * server.c (swbreak_feature, hwbreak_feature): New globals.
4587 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4588 (captured_main): Clear swbreak_feature and hwbreak_feature.
4589 * server.h (swbreak_feature, hwbreak_feature): Declare.
4590 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4591 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4592 supports_stopped_by_hw_breakpoint>: New fields.
4593 (target_supports_stopped_by_sw_breakpoint)
4594 (target_stopped_by_sw_breakpoint)
4595 (target_supports_stopped_by_hw_breakpoint)
4596 (target_stopped_by_hw_breakpoint): Declare.
4597
15c66dd6
PA
45982015-03-04 Pedro Alves <palves@redhat.com>
4599
4600 enum lwp_stop_reason -> enum target_stop_reason
4601 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4602 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4603 (linux_wait_1, stuck_in_jump_pad_callback)
4604 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4605 (linux_stopped_by_watchpoint):
4606 * linux-low.h (enum lwp_stop_reason): Delete.
4607 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4608 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4609
98fc70d6
YQ
46102015-03-04 Yao Qi <yao.qi@linaro.org>
4611
4612 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4613
dd2ac174
GB
46142015-03-03 Gary Benson <gbenson@redhat.com>
4615
4616 * hostio.c (handle_vFile): Fix prefix lengths.
4617
d68e53f4
MM
46182015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4619
4620 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4621 ptr_bits.
4622
bf2d68ab
AA
46232015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4624
4625 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4626 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4627 (clean): Add "rm -f" for above C files.
4628 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4629 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4630 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4631 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4632 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4633 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4634 (init_registers_s390x_vx_linux64)
4635 (init_registers_s390x_tevx_linux64)
4636 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4637 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4638 declarations.
4639 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4640 (s390_store_vxrs_high): New functions.
4641 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4642 NT_S390_VXRS_HIGH.
4643 (s390_arch_setup): Add logic for selecting one of the new target
4644 descriptions. Activate the new vector regsets if applicable.
4645 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4646 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4647 and init_registers_s390x_tevx_linux64.
4648
c966a859
PA
46492015-03-01 Pedro Alves <palves@redhat.com>
4650
4651 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4652 parameter.
4653
4180215b
PA
46542015-02-27 Pedro Alves <palves@redhat.com>
4655
4656 * linux-x86-low.c (u_debugreg_offset): New function.
4657 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4658
749bab01
PA
46592015-02-27 Pedro Alves <palves@redhat.com>
4660
4661 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4662 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4663 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4664 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4665 (ps_lsetfpregs, ps_getpid)
4666 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4667 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4668 (ps_lsetxregs, ps_plog): Declare.
4669
3c14e5a3
PA
46702015-02-27 Pedro Alves <palves@redhat.com>
4671
4672 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4673 IP_AGENT_EXPORT_FUNC.
4674 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4675 IP_AGENT_EXPORT_FUNC.
4676 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4677 (IP_AGENT_EXPORT): Delete.
4678 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4679 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4680 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4681 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4682 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4683 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4684 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4685 (traceframe_read_count, traceframe_write_count)
4686 (traceframes_created, trace_state_variables, get_raw_reg)
4687 (get_trace_state_variable_value, set_trace_state_variable_value)
4688 (ust_loaded, helper_thread_id, cmd_buf): Use
4689 IPA_SYM_EXPORTED_NAME.
4690 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4691 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4692 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4693 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4694 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4695 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4696 EXTERN_C_PUSH/EXTERN_C_POP.
4697 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4698 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4699 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4700 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4701 (traceframe_write_count, traceframe_read_count)
4702 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4703 (about_to_request_buffer_space, get_trace_state_variable_value)
4704 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4705 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4706 EXTERN_C_PUSH/EXTERN_C_POP.
4707 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4708 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4709 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4710 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4711 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4712 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4713 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4714 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4715 Define.
4716 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4717 (IP_AGENT_EXPORT_VAR_DECL): Define.
4718 (tracing): Declare.
4719 (gdb_agent_get_raw_reg): Declare.
4720
fe978cb0
PA
47212015-02-27 Tom Tromey <tromey@redhat.com>
4722 Pedro Alves <palves@redhat.com>
4723
4724 Rename symbols whose names are reserved C++ keywords throughout.
4725
3bc3d82a
PA
47262015-02-27 Pedro Alves <palves@redhat.com>
4727
4728 * Makefile.in (COMPILER): New, get it from autoconf.
4729 (CXX): Get from autoconf instead.
4730 (COMPILE.pre): Use COMPILER.
4731 (CC-LD): Rename to ...
4732 (CC_LD): ... this. Use COMPILER.
4733 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4734 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4735 * acinclude.m4: Include build-with-cxx.m4.
4736 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4737 Disable -Werror by default if building in C++ mode.
4738 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4739 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4740 the C++ compiler. Save/restore CXXFLAGS too.
4741 * configure: Regenerate.
4742
07697489
PA
47432015-02-27 Pedro Alves <palves@redhat.com>
4744
4745 * acinclude.m4: Include libiberty.m4.
4746 * configure.ac: Call libiberty_INIT.
4747 * config.in, configure: Regenerate.
4748
9beb7c4e
PA
47492015-02-26 Pedro Alves <palves@redhat.com>
4750
4751 * linux-low.c (linux_wait_1): When incrementing the PC past a
4752 program breakpoint always use the_low_target.breakpoint_len as
4753 increment, rather than the maximum between that and
4754 the_low_target.decr_pc_after_break.
4755
8090aef2
PA
47562015-02-23 Pedro Alves <palves@redhat.com>
4757
4758 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4759 thread was doing a step-over; always adjust the PC if
4760 we stepped over a permanent breakpoint.
4761 (linux_wait_1): If we stepped over breakpoint that was on top of a
4762 permanent breakpoint, manually advance the PC past it.
4763
bc9540e8
PA
47642015-02-23 Pedro Alves <palves@redhat.com>
4765
4766 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4767 modes.
4768 (x86_fill_gregset, x86_store_gregset): Use it when handling
4769 $orig_eax.
4770
2db9a427
PA
47712015-02-20 Pedro Alves <palves@redhat.com>
4772
4773 * thread-db.c: Include "nat/linux-procfs.h".
4774 (thread_db_init): Skip listing new threads if the kernel supports
4775 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4776
afa8d396
PA
47772015-02-20 Pedro Alves <palves@redhat.com>
4778
4779 * linux-low.c (status_pending_p_callback): Use ptid_match.
4780
c9587f88
AT
47812015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4782
4783 PR breakpoints/16812
4784 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4785 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4786 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4787
b05ec7a5
AT
47882015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4789
4790 PR breakpoints/15956
4791 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4792
d33501a5
MM
47932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4794
4795 * linux-low.c (linux_low_btrace_conf): Print size.
4796 * server.c (handle_btrace_conf_general_set): New.
4797 (hanle_general_set): Call handle_btrace_conf_general_set.
4798 (handle_query): Report Qbtrace-conf:bts:size as supported.
4799
f4abbc16
MM
48002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4801
4802 * linux-low.c (linux_low_enable_btrace): Update parameters.
4803 (linux_low_btrace_conf): New.
4804 (linux_target_ops)<to_btrace_conf>: Initialize.
4805 * server.c (current_btrace_conf): New.
4806 (handle_btrace_enable): Rename to ...
4807 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4808 to target_enable_btrace. Update comment. Update users.
4809 (handle_qxfer_btrace_conf): New.
4810 (qxfer_packets): Add btrace-conf entry.
4811 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4812 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4813 (target_ops)<read_btrace_conf>: New.
4814 (target_enable_btrace): Update parameters.
4815 (target_read_btrace_conf): New.
4816
043c3577
MM
48172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4818
4819 * server.c (handle_btrace_general_set): Remove call to
4820 target_supports_btrace.
4821 (supported_btrace_packets): New.
4822 (handle_query): Call supported_btrace_packets.
4823 * target.h: include btrace-common.h.
4824 (btrace_target_info): Removed.
4825 (supports_btrace, target_supports_btrace): Update parameters.
4826
734b0e4b
MM
48272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4828
4829 * Makefile.in (SFILES): Add common/btrace-common.c.
4830 (OBS): Add common/btrace-common.o.
4831 (btrace-common.o): Add build rules.
4832 * linux-low: Include btrace-common.h.
4833 (linux_low_read_btrace): Use struct btrace_data. Call
4834 btrace_data_init and btrace_data_fini.
4835
d6c146e9
PA
48362015-02-06 Pedro Alves <palves@redhat.com>
4837
4838 * thread-db.c (find_new_threads_callback): Add debug output.
4839
20ba1ce6
PA
48402015-02-04 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4843 (resume_stopped_resumed_lwps): New function.
4844 (linux_wait_for_event_filtered): Use it.
4845
8cc73a39
SDJ
48462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4847
4848 * Makefile.in (SFILES): Add linux-personality.c.
4849 (linux-personality.o): New rule.
4850 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4851 list of objects to be built.
4852 * linux-low.c: Include nat/linux-personality.h.
4853 (linux_create_inferior): Remove code to disable address space
4854 randomization (moved to ../nat/linux-personality.c). Create
4855 cleanup to disable address space randomization.
4856
fb23d554
SDJ
48572015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4858
4859 * Makefile.in (posix-strerror.o): New rule.
4860 (mingw-strerror.o): Likewise.
4861 * configure: Regenerated.
4862 * configure.ac: Source file ../common/common.host. Initialize new
4863 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4864
cdf43629
YQ
48652015-01-14 Yao Qi <yao@codesourcery.com>
4866
4867 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4868 (ppc-linux.o): New rule.
4869 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4870 * configure.ac: AC_CHECK_FUNCS(getauxval).
4871 * config.in: Re-generated.
4872 * configure: Re-generated.
4873 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4874 ppc64_64bit_inferior_p
4875
514c5338
YQ
48762015-01-14 Yao Qi <yao@codesourcery.com>
4877
4878 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4879 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4880 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4881 (PT_ORIG_R3, PT_TRAP): Likewise.
4882 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4883 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4884 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4885
3368c1e5
JB
48862015-01-10 Joel Brobecker <brobecker@adacore.com>
4887
4888 * i387-fp.c (i387_cache_to_xsave): In look over
4889 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4890 zmmh_low_space field by use of zmmh_high_space.
4891
582511be
PA
48922015-01-09 Pedro Alves <palves@redhat.com>
4893
4894 * linux-low.c (step_over_bkpt): Move higher up in the file.
4895 (handle_extended_wait): Don't store the stop_pc here.
4896 (get_stop_pc): Adjust comments and rename to ...
4897 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4898 stopped for a software breakpoint or hardware breakpoint.
4899 (thread_still_has_status_pending_p): New function.
4900 (status_pending_p_callback): Use
4901 thread_still_has_status_pending_p. If the event is no longer
4902 interesting, resume the LWP.
4903 (handle_tracepoints): Add assert.
4904 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4905 (wstatus_maybe_breakpoint): New function.
4906 (cancel_breakpoint): Delete function.
4907 (check_stopped_by_watchpoint): New function, factored out from
4908 linux_low_filter_event.
4909 (lp_status_maybe_breakpoint): Delete function.
4910 (linux_low_filter_event): Remove filter_ptid argument.
4911 Leave thread group exits pending here. Store the LWP's stop PC.
4912 Always leave events pending.
4913 (linux_wait_for_event_filtered): Pull all events out of the
4914 kernel, and leave them all pending.
4915 (count_events_callback, select_event_lwp_callback): Consider all
4916 events.
4917 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4918 (select_event_lwp): Only give preference to the stepping LWP in
4919 all-stop mode. Adjust comments.
4920 (ignore_event): New function.
4921 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4922 references to cancel_breakpoints. Adjust to renames. Also give
4923 equal priority to all LWPs that have had events in non-stop mode.
4924 If reporting a software breakpoint event, unadjust the LWP's PC.
4925 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4926 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4927 Adjust.
4928 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4929 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4930 (linux_stopped_by_watchpoint): Adjust.
4931 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4932 * linux-low.h (enum lwp_stop_reason): New.
4933 (struct lwp_info) <stop_pc>: Adjust comment.
4934 <stopped_by_watchpoint>: Delete field.
4935 <stop_reason>: New field.
4936 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4937 * mem-break.c (software_breakpoint_inserted_here)
4938 (hardware_breakpoint_inserted_here): New function.
4939 * mem-break.h (software_breakpoint_inserted_here)
4940 (hardware_breakpoint_inserted_here): Declare.
4941 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4942 (cancel_breakpoints): Delete.
4943 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4944 (upload_fast_traceframes): Remove references to
4945 cancel_breakpoints.
4946
a33e3959
PA
49472015-01-09 Pedro Alves <palves@redhat.com>
4948
4949 * thread-db.c (find_new_threads_callback): Ignore thread if the
4950 kernel thread ID is -1.
4951
8784d563
PA
49522015-01-09 Pedro Alves <palves@redhat.com>
4953
4954 * linux-low.c (linux_attach_fail_reason_string): Move to
4955 nat/linux-ptrace.c, and rename.
4956 (linux_attach_lwp): Update comment.
4957 (attach_proc_task_lwp_callback): New function.
4958 (linux_attach): Adjust to rename and use
4959 linux_proc_attach_tgid_threads.
4960 (linux_attach_fail_reason_string): Delete declaration.
4961
76f2b779
JB
49622015-01-01 Joel Brobecker <brobecker@adacore.com>
4963
4964 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4965 * server.c (gdbserver_version): Likewise.
4966
fafcc06a
SDJ
49672014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4968
4969 * remote-utils.c: Include ctype.h.
4970 (input_interrupt): Explicitly handle the case when the char
4971 received is the NUL byte. Improve the printing of non-ASCII
4972 characters.
4973
beed38b8
JB
49742014-12-16 Joel Brobecker <brobecker@adacore.com>
4975
4976 * linux-low.c (linux_low_filter_event): Update call to
4977 linux_enable_event_reporting following the addition of
4978 a new parameter to that function.
4979
bf330350
CU
49802014-12-16 Catalin Udma <catalin.udma@freescale.com>
4981
4982 PR server/17457
4983 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4984 (AARCH64_FPCR_REGNO): Likewise.
4985 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4986 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4987 (aarch64_store_fpregset): Likewise.
4988
5227d625
JB
49892014-12-15 Joel Brobecker <brobecker@adacore.com>
4990
4991 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4992 Remove FIXME comment about assumption about N.
4993
f93b65a0
JB
49942014-12-13 Joel Brobecker <brobecker@adacore.com>
4995
4996 * configure.ac: If large-file support is disabled in GDBserver,
4997 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4998 * configure: Regenerate.
4999
e5a9158d
AA
50002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5001
5002 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5003 warning upon ENODATA from ptrace.
5004 * linux-s390-low.c (s390_store_tdb): New.
5005 (s390_regsets): Add regset for NT_S390_TDB.
5006
feea5f36
AA
50072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5008
5009 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5010 without a fill_function.
5011 * linux-s390-low.c (s390_fill_last_break): Remove.
5012 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5013 (s390_arch_setup): Use regset's size instead of fill_function for
5014 loop end condition.
5015
098dbe61
AA
50162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5017
5018 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5019 the regset's store function when ptrace returned an error.
5020 * regcache.c (get_thread_regcache): Invalidate register cache
5021 before fetching inferior's registers.
5022
28eef672
AA
50232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5024
5025 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5026 while-loop as for-loop.
5027 (regsets_store_inferior_registers): Likewise.
5028
bdca27a2
YQ
50292014-11-28 Yao Qi <yao@codesourcery.com>
5030
5031 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5032 * config.in, configure: Re-generate.
5033 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5034 is defined.
5035
9c232dda
YQ
50362014-11-21 Yao Qi <yao@codesourcery.com>
5037
5038 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5039 (AC_CHECK_HEADERS): Remove malloc.h.
5040 * configure: Re-generated.
5041 * config.in: Re-generated.
5042 * server.h: Don't include alloca.h and malloc.h.
5043 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5044 Don't include malloc.h.
5045
43968415
JB
50462014-11-17 Joel Brobecker <brobecker@adacore.com>
5047
5048 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5049 corresponding ERRNO check in same block.
5050
40e91bc7
PA
50512014-11-12 Pedro Alves <palves@redhat.com>
5052
5053 * server.c (cont_thread): Update comment.
5054 (start_inferior, attach_inferior): No longer clear cont_thread.
5055 (handle_v_cont): No longer set cont_thread.
5056 (captured_main): Clear cont_thread each time a GDB connects.
5057
c2c118cf
PA
50582014-11-12 Pedro Alves <palves@redhat.com>
5059
5060 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5061 thread, and don't resume all threads if the Hc thread has exited.
5062
78708b7c
PA
50632014-11-12 Pedro Alves <palves@redhat.com>
5064
5065 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5066 the process group instead of to a specific LWP.
5067
a2abc7de
PA
50682014-10-15 Pedro Alves <palves@redhat.com>
5069
5070 PR server/17487
5071 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5072 parameter.
5073 (arm_set_thread_context): Delete.
5074 (the_low_target): Adjust.
5075 * win32-i386-low.c (debug_registers_changed)
5076 (debug_registers_used): Delete.
5077 (update_debug_registers_callback): New function.
5078 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5079 needing to update their debug registers.
5080 (win32_get_current_dr): New function.
5081 (x86_dr_low_get_addr, x86_dr_low_get_control)
5082 (x86_dr_low_get_status): Fetch the debug register from the thread
5083 record's context.
5084 (i386_initial_stuff): Adjust.
5085 (i386_get_thread_context): Remove current_event parameter. Don't
5086 clear debug_registers_changed nor copy DR values to
5087 debug_reg_state.
5088 (i386_set_thread_context): Delete.
5089 (i386_prepare_to_resume): New function.
5090 (i386_thread_added): Mark the thread as needing to update irs
5091 debug registers.
5092 (the_low_target): Remove i386_set_thread_context and install
5093 i386_prepare_to_resume.
5094 * win32-low.c (win32_get_thread_context): Adjust.
5095 (win32_set_thread_context): Use SetThreadContext
5096 directly.
5097 (win32_prepare_to_resume): New function.
5098 (win32_require_context): New function, factored out from ...
5099 (thread_rec): ... this.
5100 (continue_one_thread): Call win32_prepare_to_resume on each thread
5101 we're about to continue.
5102 (win32_resume): Call win32_prepare_to_resume on the event thread.
5103 * win32-low.h (struct win32_thread_info)
5104 <debug_registers_changed>: New field.
5105 (struct win32_target_ops): Change prototype of set_thread_context,
5106 delete set_thread_context and add prepare_to_resume.
5107 (win32_require_context): New declaration.
5108
a442d071
GB
51092014-10-08 Gary Benson <gbenson@redhat.com>
5110
5111 * server.h: Do not include common-exceptions.h.
5112
6f1947e8
GB
51132014-10-08 Gary Benson <gbenson@redhat.com>
5114
5115 * server.h: Do not include cleanups.h.
5116
63b434a4
JH
51172014-09-30 James Hogan <james.hogan@imgtec.com>
5118
5119 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5120 mips64-dsp-linux.c.
5121
c4d9ceb6
YQ
51222014-09-23 Yao Qi <yao@codesourcery.com>
5123
5124 * linux-low.c (lp_status_maybe_breakpoint): New function.
5125 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5126 (count_events_callback): Likewise.
5127 (select_event_lwp_callback): Likewise.
5128 (cancel_breakpoints_callback): Likewise.
5129
89a5711c
DB
51302014-09-19 Don Breazeal <donb@codesourcery.com>
5131
5132 * linux-low.c (handle_extended_wait): Call
5133 linux_ptrace_get_extended_event.
5134 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5135 linux_is_extended_waitstatus.
5136
bffc0964
JB
51372014-09-16 Joel Brobecker <brobecker@adacore.com>
5138
5139 * Makefile.in (CPPFLAGS): Define.
5140 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5141 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5142
0bfdf32f
GB
51432014-09-16 Gary Benson <gbenson@redhat.com>
5144
5145 * inferiors.h (current_inferior): Renamed as...
5146 (current_thread): New variable. All uses updated.
5147 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5148 (maybe_move_out_of_jump_pad): Likewise.
5149 (cancel_breakpoint): Likewise.
5150 (linux_low_filter_event): Likewise.
5151 (wait_for_sigstop): Likewise.
5152 (linux_resume_one_lwp): Likewise.
5153 (need_step_over_p): Likewise.
5154 (start_step_over): Likewise.
5155 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5156 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5157 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5158 and save_inferior as saved_thread.
5159 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5160 saved_thread.
5161 (regcache_invalidate_thread): Likewise.
5162 * remote-utils.c (prepare_resume_reply): Likewise.
5163 * thread-db.c (thread_db_get_tls_address): Likewise.
5164 (disable_thread_event_reporting): Likewise.
5165 (remove_thread_event_breakpoints): Likewise.
5166 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5167 as saved_thread.
5168 * target.h (set_desired_inferior): Renamed as...
5169 (set_desired_thread): New declaration. All uses updated.
5170 * server.c (myresume): Updated comment to reference thread instead
5171 of inferior.
5172 (handle_serial_event): Likewise.
5173 (handle_target_event): Likewise.
5174
361c8ade
GB
51752014-09-12 Tom Tromey <tromey@redhat.com>
5176 Gary Benson <gbenson@redhat.com>
5177
5178 * regcache.h: Include common-regcache.h.
5179 (regcache_read_pc): Don't declare.
5180 * regcache.c (get_thread_regcache_for_ptid): New function.
5181
bd9269f7
GB
51822014-09-11 Tom Tromey <tromey@redhat.com>
5183 Gary Benson <gbenson@redhat.com>
5184
5185 * symbol.c: New file.
5186 * Makefile.in (SFILES): Add symbol.c.
5187 (OBS): Add symbol.o.
5188
f8c1d06b
GB
51892014-09-11 Gary Benson <gbenson@redhat.com>
5190
5191 * target.c (target_stop_ptid, target_continue_ptid): New
5192 functions.
5193
721ec300
GB
51942014-09-11 Tom Tromey <tromey@redhat.com>
5195 Gary Benson <gbenson@redhat.com>
5196
5197 * target.h: Include target/target.h.
5198 * target.c (target_read_memory, target_read_uint32)
5199 (target_write_memory): New functions.
5200
c5e92cca
GB
52012014-09-11 Gary Benson <gbenson@redhat.com>
5202
5203 * server.h (debug_hw_points): Don't declare.
5204 * server.c (debug_hw_points): Don't define. Replace all uses
5205 with show_debug_regs.
5206 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5207 all uses with show_debug_regs.
5208
2e4bb98a
EBM
52092014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5210
5211 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5212 endianness into account.
5213 (ppc_supply_ptrace_register): Likewise.
5214
ac740bc7
JH
52152014-09-03 James Hogan <james.hogan@imgtec.com>
5216
5217 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5218 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5219
97ea6506
GB
52202014-09-03 Gary Benson <gbenson@redhat.com>
5221
5222 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5223 ALL_DEBUG_ADDRESS_REGISTERS.
5224
df7e5265
GB
52252014-09-02 Gary Benson <gbenson@redhat.com>
5226
5227 * i386-low.h: Renamed as...
5228 * x86-low.h: New file. All type, function and variable name
5229 prefixes changed from "i386_" to "x86_". All references updated.
5230 * i386-low.c: Renamed as...
5231 * x86-low.c: New file. All type, function and variable name
5232 prefixes changed from "i386_" to "x86_". All references updated.
5233
ed859da7
GB
52342014-09-02 Gary Benson <gbenson@redhat.com>
5235
5236 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5237 (x86_linux_new_thread): Likewise.
5238
860789c7
GB
52392014-08-29 Gary Benson <gbenson@redhat.com>
5240
5241 * server.h (setjmp.h): Do not include.
5242 (toplevel): Do not declare.
5243 (common-exceptions.h): Include.
5244 (cleanups.h): Likewise.
5245 * server.c (toplevel): Do not define.
5246 (exit_code): New static global.
5247 (detach_or_kill_for_exit_cleanup): New function.
5248 (main): New function. Original main renamed to...
5249 (captured_main): New function.
5250 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5251
ff55e1b5
GB
52522014-08-29 Gary Benson <gbenson@redhat.com>
5253
5254 * Makefile.in (SFILES): Add common/common-exceptions.c.
5255 (OBS): Add common-exceptions.o.
5256 (common-exceptions.o): New rule.
5257 * utils.c (prepare_to_throw_exception): New function.
5258
e9bcb658
GB
52592014-08-29 Gary Benson <gbenson@redhat.com>
5260
5261 * config.in: Regenerate.
5262 * configure: Likewise.
5263
e3180625
GB
52642014-08-29 Gary Benson <gbenson@redhat.com>
5265
5266 * Makefile.in (SFILES): Add common/cleanups.c.
5267 (OBS): cleanups.o.
5268 (cleanups.o): New rule.
5269
e3d6ba5d
GB
52702014-08-29 Gary Benson <gbenson@redhat.com>
5271
5272 * utils.c (internal_vwarning): New function.
5273
7096e886
GB
52742014-08-28 Gary Benson <gbenson@redhat.com>
5275
5276 * utils.h (fatal): Remove declaration.
5277 * utils.c (fatal): Remove function.
5278
14ce3192
GB
52792014-08-28 Gary Benson <gbenson@redhat.com>
5280
5281 * tracepoint.c (gdb_agent_init): Replace fatal with
5282 perror_with_name.
5283 (initialize_tracepoint): Likewise.
5284
50278d59
GB
52852014-08-28 Gary Benson <gbenson@redhat.com>
5286
5287 * remote-utils.c (remote_prepare): Replace fatal with error.
5288
aa96c426
GB
52892014-08-28 Gary Benson <gbenson@redhat.com>
5290
5291 * linux-low.c (linux_async): Replace fatal with warning.
5292 Tidy up and return.
5293 (linux_start_non_stop): Return -1 if linux_async failed.
5294
f7160e97
GB
52952014-08-28 Gary Benson <gbenson@redhat.com>
5296
5297 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5298 gdb_assert.
5299 (i386_dr_low_get_addr): Remove vague comment.
5300 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5301 gdb_assert.
5302
38e08fca
GB
53032014-08-28 Gary Benson <gbenson@redhat.com>
5304
5305 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5306 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5307 internal_error.
5308 (linux_resume_one_lwp): Likewise.
5309 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5310 gdb_assert.
5311 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5312 with internal_error.
5313 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5314 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5315 (find_register_by_name): Replace fatal with internal_error.
5316 (find_regno): Likewise.
5317 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5318 * thread-db.c (thread_db_create_event): Likewise.
5319 (thread_db_load_search): Likewise.
5320 (try_thread_db_load_1): Likewise.
5321 * tracepoint.c (get_jump_space_head): Replace fatal with
5322 internal_error.
5323 (claim_trampoline_space): Likewise.
5324 (have_fast_tracepoint_trampoline_buffer): Likewise.
5325 (cmd_qtstart): Likewise.
5326 (stop_tracing): Likewise.
5327 (fast_tracepoint_collecting): Likewise.
5328 (target_malloc): Likewise.
5329 (download_tracepoint): Likewise.
5330 (download_trace_state_variables): Replace check with gdb_assert.
5331 (upload_fast_traceframes): Replace fatal with internal_error.
5332
34abf635
GB
53332014-08-19 Tom Tromey <tromey@redhat.com>
5334 Gary Benson <gbenson@redhat.com>
5335
5336 * Makefile.in (SFILES): Add common/common-debug.c.
5337 (OBS): Add common-debug.o.
5338 (common-debug.o): New rule.
5339 * debug.h (debug_printf): Don't declare.
5340 * debug.c (debug_printf): Renamed and rewritten as...
5341 (debug_vprintf): New function.
5342
f6e94d78
GB
53432014-08-19 Gary Benson <gbenson@redhat.com>
5344
5345 * utils.h: Do not include print-utils.h.
5346
9239eeab
GB
53472014-08-19 Tom Tromey <tromey@redhat.com>
5348 Gary Benson <gbenson@redhat.com>
5349
5350 * server.h: Add static assertion.
5351 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5352
ef87c8bb
GB
53532014-08-19 Tom Tromey <tromey@redhat.com>
5354 Gary Benson <gbenson@redhat.com>
5355
5356 * Makefile.in (SFILES): Add common/errors.c.
5357 (OBS): Add errors.o.
5358 (IPA_OBS): Add errors-ipa.o.
5359 (errors.o): New rule.
5360 (errors-ipa.o): Likewise.
5361 * utils.h (perror_with_name, error, warning): Don't declare.
5362 * utils.c (warning): Renamed and rewritten as...
5363 (vwarning): New function.
5364 (error): Renamed and rewritten as...
5365 (verror): New function.
5366 (internal_error): Renamed and rewritten as...
5367 (internal_verror): New function.
5368
bb974a24
GB
53692014-08-07 Gary Benson <gbenson@redhat.com>
5370
5371 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5372 * configure: Regenerate.
5373 * config.in: Likewise.
5374 * server.h: Do not include errno.h.
5375 * event-loop.c: Likewise.
5376 * hostio-errno.c: Likewise.
5377 * linux-low.c: Likewise.
5378 * remote-utils.c: Likewise.
5379 * spu-low.c: Likewise.
5380 * utils.c: Likewise.
5381 * gdbreplay.c: Unconditionally include errno.h.
5382
6d3d12eb
GB
53832014-08-07 Gary Benson <gbenson@redhat.com>
5384
5385 * server.h: Do not include string.h.
5386 * event-loop.c: Likewise.
5387 * linux-low.c: Likewise.
5388 * regcache.c: Likewise.
5389 * remote-utils.c: Likewise.
5390 * spu-low.c: Likewise.
5391 * utils.c: Likewise.
5392
dccbb609
GB
53932014-08-07 Gary Benson <gbenson@redhat.com>
5394
5395 * server.h: Do not include gdb_assert.h.
5396
e76df0d0
GB
53972014-08-07 Gary Benson <gbenson@redhat.com>
5398
5399 * server.h: Do not include common-utils.h.
5400
4cb9c816
GB
54012014-08-07 Gary Benson <gbenson@redhat.com>
5402
5403 * server.h: Do not include ptid.h.
5404 * notif.h: Likewise.
5405
3995eeee
GB
54062014-08-07 Gary Benson <gbenson@redhat.com>
5407
5408 * server.h: Do not include gdb_locale.h.
5409
cb9f1a9b
GB
54102014-08-07 Gary Benson <gbenson@redhat.com>
5411
5412 * server.h: Do not include gdb/signals.h.
5413 * win32-low.c: Likewise.
5414
a5fceff8
GB
54152014-08-07 Gary Benson <gbenson@redhat.com>
5416
5417 * server.h: Do not include pathmax.h.
5418
b9391142
GB
54192014-08-07 Gary Benson <gbenson@redhat.com>
5420
5421 * server.h: Do not include libiberty.h.
5422 * linux-bfin-low.c: Likewise.
5423
0e443c87
GB
54242014-08-07 Gary Benson <gbenson@redhat.com>
5425
5426 * server.h: Do not include ansidecl.h.
5427
8ebb3f56
GB
54282014-08-07 Gary Benson <gbenson@redhat.com>
5429
5430 * linux-x86-low.c: Do not include stddef.h.
5431 * lynx-ppc-low.c: Likewise.
5432 * tracepoint.c: Likewise.
5433
8980bdf6
GB
54342014-08-07 Gary Benson <gbenson@redhat.com>
5435
5436 * server.h: Do not include stdarg.h.
5437 * nto-low.c: Likewise.
5438
d7096f71
GB
54392014-08-07 Gary Benson <gbenson@redhat.com>
5440
5441 * server.h: Do not include stdlib.h.
5442 * inferiors.c: Likewise.
5443 * linux-low.c: Likewise.
5444 * regcache.c: Likewise.
5445 * spu-low.c: Likewise.
5446 * tracepoint.c: Likewise.
5447 * utils.c: Likewise.
5448
d02f550d
GB
54492014-08-07 Gary Benson <gbenson@redhat.com>
5450
5451 * server.h: Do not include stdio.h.
5452 * linux-low.c: Likewise.
5453 * remote-utils.c: Likewise.
5454 * spu-low.c: Likewise.
5455 * utils.c: Likewise.
5456 * wincecompat.c: Likewise.
5457
87f6c4e3
GB
54582014-08-06 Gary Benson <gbenson@redhat.com>
5459
5460 * regcache.c (init_register_cache): Move conditionals inside if.
5461
7089dca4
GB
54622014-08-06 Gary Benson <gbenson@redhat.com>
5463
5464 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5465
462f517e
GB
54662014-07-31 Gary Benson <gbenson@redhat.com>
5467
5468 * ax.h: Do not include server.h.
5469 * gdbthread.h: Likewise.
5470 * lynx-low.h: Likewise.
5471 * notif.h: Likewise.
5472
976411d6
GB
54732014-07-30 Gary Benson <gbenson@redhat.com>
5474
5475 * server.h: Include common-defs.h.
5476 Do not include config.h or build-gnulib-gdbserver/config.h.
5477
d41f6d8e
GB
54782014-07-30 Gary Benson <gbenson@redhat.com>
5479
5480 * hostio-errno.c: Move server.h to top of includes list.
5481 * inferiors.c: Likewise.
5482 * linux-x86-low.c: Likewise.
5483 * notif.c: Include server.h.
5484
314c6a35
TT
54852014-07-24 Tom Tromey <tromey@redhat.com>
5486 Gary Benson <gbenson@redhat.com>
5487
5488 * server.h (CORE_ADDR): Now unsigned.
5489
69ff6be5
PA
54902014-07-16 Pedro Alves <palves@redhat.com>
5491
5492 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5493
ce9e3fe7
PA
54942014-07-15 Pedro Alves <palves@redhat.com>
5495
5496 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5497 copy.
5498
e76126e8
PA
54992014-07-11 Pedro Alves <palves@redhat.com>
5500
5501 * linux-low.c (kill_wait_lwp): New function, based on
5502 kill_one_lwp_callback, but use my_waitpid directly.
5503 (kill_one_lwp_callback, linux_kill): Use it.
5504
8e9db26e
PA
55052014-06-23 Pedro Alves <palves@redhat.com>
5506
5507 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5508 before setting DR0..DR3.
5509
698b3e08
GB
55102014-06-20 Gary Benson <gbenson@redhat.com>
5511
5512 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5513 * configure: Regenerated.
5514 * config.in: Likewise.
5515
125f8a3d
GB
55162014-06-20 Gary Benson <gbenson@redhat.com>
5517
5518 * Makefile.in (SFILES): Update locations for files moved
5519 from common to nat.
5520 (object file files): Reordered.
5521
42995dbd
GB
55222014-06-20 Gary Benson <gbenson@redhat.com>
5523
5524 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5525 (i386_dr_low_set_addr): Likewise.
5526 (i386_dr_low_get_addr): Likewise.
5527 (i386_dr_low_can_set_control): Likewise.
5528 (i386_dr_low_set_control): Likewise.
5529 (i386_dr_low_get_control): Likewise.
5530 (i386_dr_low_get_status): Likewise.
5531 (i386_get_debug_register_length): Likewise.
5532 * linux-x86-low.c (i386_dr_low_set_addr):
5533 Changed signature. Made static.
5534 (i386_dr_low_get_addr): Likewise.
5535 (i386_dr_low_set_control): Likewise.
5536 (i386_dr_low_get_control): Likewise.
5537 (i386_dr_low_get_status): Likewise.
5538 (i386_dr_low): New global variable.
5539 * win32-i386-low.c (i386_dr_low_set_addr):
5540 Changed signature. Made static.
5541 (i386_dr_low_get_addr): Likewise.
5542 (i386_dr_low_set_control): Likewise.
5543 (i386_dr_low_get_control): Likewise.
5544 (i386_dr_low_get_status): Likewise.
5545 (i386_dr_low): New global variable.
5546
e1d2394b
MS
55472014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5548
5549 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5550 * Makefile.in (AR, AR_FLAGS): Define.
5551 * configure: Regenerate.
5552
3a8ee006
GB
55532014-06-19 Gary Benson <gbenson@redhat.com>
5554
5555 * Makefile.in (i386-dregs.o): New rule.
5556 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5557 * i386-low.c (target.h): Remove include.
5558 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5559 (DR_CONTROL_SHIFT): Likewise.
5560 (DR_CONTROL_SIZE): Likewise.
5561 (DR_RW_EXECUTE): Likewise.
5562 (DR_RW_WRITE): Likewise.
5563 (DR_RW_READ): Likewise.
5564 (DR_RW_IORW): Likewise.
5565 (DR_LEN_1): Likewise.
5566 (DR_LEN_2): Likewise.
5567 (DR_LEN_4): Likewise.
5568 (DR_LEN_8): Likewise.
5569 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5570 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5571 (DR_ENABLE_SIZE): Likewise.
5572 (DR_LOCAL_SLOWDOWN): Likewise.
5573 (DR_GLOBAL_SLOWDOWN): Likewise.
5574 (DR_CONTROL_RESERVED): Likewise.
5575 (I386_DR_CONTROL_MASK): Likewise.
5576 (I386_DR_VACANT): Likewise.
5577 (I386_DR_LOCAL_ENABLE): Likewise.
5578 (I386_DR_GLOBAL_ENABLE): Likewise.
5579 (I386_DR_DISABLE): Likewise.
5580 (I386_DR_SET_RW_LEN): Likewise.
5581 (I386_DR_GET_RW_LEN): Likewise.
5582 (I386_DR_WATCH_HIT): Likewise.
5583 (i386_wp_op_t): Likewise.
5584 (i386_show_dr): Likewise.
5585 (i386_length_and_rw_bits): Likewise.
5586 (i386_insert_aligned_watchpoint): Likewise.
5587 (i386_remove_aligned_watchpoint): Likewise.
5588 (i386_handle_nonaligned_watchpoint): Likewise.
5589 i386_update_inferior_debug_regs(): Likewise.
5590 (i386_dr_insert_watchpoint): Likewise.
5591 (i386_dr_remove_watchpoint): Likewise.
5592 (i386_dr_region_ok_for_watchpoint): Likewise.
5593 (i386_dr_stopped_data_address): Likewise.
5594 (i386_dr_stopped_by_watchpoint): Likewise.
5595
8f26655c
GB
55962014-06-19 Gary Benson <gbenson@redhat.com>
5597
5598 * i386-low.c (i386_dr_show): Renamed to
5599 i386_show_dr and made static. All uses updated.
5600 (i386_dr_length_and_rw_bits): Renamed to
5601 i386_length_and_rw_bits and made static.
5602 All uses updated.
5603 (i386_dr_insert_aligned_watchpoint): Renamed to
5604 i386_insert_aligned_watchpoint and made static.
5605 All uses updated.
5606 (i386_dr_remove_aligned_watchpoint): Renamed to
5607 i386_remove_aligned_watchpoint and made static.
5608 All uses updated.
5609 (i386_dr_update_inferior_debug_regs): Renamed to
5610 i386_update_inferior_debug_regs and made static.
5611 All uses updated.
5612
b9228891
GB
56132014-06-18 Gary Benson <gbenson@redhat.com>
5614
5171def3
GB
5615 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5616 (i386_dr_low_can_set_control): Likewise.
5617 (i386_get_debug_register_length): Likewise.
5618 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5619 (i386_dr_low_can_set_control): Likewise.
5620 (i386_get_debug_register_length): Likewise.
5621
56222014-06-17 Gary Benson <gbenson@redhat.com>
5623
b9228891
GB
5624 * i386-low.h (i386-dregs.h): New include.
5625 (DR_FIRSTADDR): Now in i386-dregs.h.
5626 (DR_LASTADDR): Likewise.
5627 (DR_NADDR): Likewise.
5628 (DR_STATUS): Likewise.
5629 (DR_CONTROL): Likewise.
5630 (i386_debug_reg_state): Likewise.
5631 (i386_dr_insert_watchpoint): Likewise.
5632 (i386_dr_remove_watchpoint): Likewise.
5633 (i386_dr_region_ok_for_watchpoint): Likewise.
5634 (i386_dr_stopped_data_address): Likewise.
5635 (i386_dr_stopped_by_watchpoint): Likewise.
5636 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5637
4be83cc2
GB
56382014-06-18 Gary Benson <gbenson@redhat.com>
5639
5640 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5641 i386_dr_insert_watchpoint.
5642 (i386_low_remove_watchpoint): Renamed to
5643 i386_dr_remove_watchpoint.
5644 (i386_low_region_ok_for_watchpoint): Renamed to
5645 i386_dr_region_ok_for_watchpoint.
5646 (i386_low_stopped_data_address): Renamed to
5647 i386_dr_stopped_data_address.
5648 (i386_low_stopped_by_watchpoint): Renamed to
5649 i386_dr_stopped_by_watchpoint.
5650 * i386-low.c (i386_show_dr): Renamed to
5651 i386_dr_show and made nonstatic. All uses updated.
5652 (i386_length_and_rw_bits): Renamed to
5653 i386_dr_length_and_rw_bits and made nonstatic.
5654 All uses updated.
5655 (i386_insert_aligned_watchpoint): Renamed to
5656 i386_dr_insert_aligned_watchpoint and made nonstatic.
5657 All uses updated.
5658 (i386_remove_aligned_watchpoint): Renamed to
5659 i386_dr_remove_aligned_watchpoint and made nonstatic.
5660 All uses updated.
5661 (i386_update_inferior_debug_regs): Renamed to
5662 i386_dr_update_inferior_debug_regs and made nonstatic.
5663 All uses updated.
5664 (i386_low_insert_watchpoint): Renamed to
5665 i386_dr_insert_watchpoint. All uses updated.
5666 (i386_low_remove_watchpoint): Renamed to
5667 i386_dr_remove_watchpoint. All uses updated.
5668 (i386_low_region_ok_for_watchpoint): Renamed to
5669 i386_dr_region_ok_for_watchpoint. All uses updated.
5670 (i386_low_stopped_data_address): Renamed to
5671 i386_dr_stopped_data_address. All uses updated.
5672 (i386_low_stopped_by_watchpoint): Renamed to
5673 i386_dr_stopped_by_watchpoint. All uses updated.
5674
131aa0d4
GB
56752014-06-18 Gary Benson <gbenson@redhat.com>
5676
5677 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5678 (i386_dr_low_can_set_control): Likewise.
5679 (i386_insert_aligned_watchpoint): New check.
5680
d9305f7f
GB
56812014-06-18 Gary Benson <gbenson@redhat.com>
5682
5683 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5684 Renamed to state.
5685
e927c9fc
GB
56862014-06-18 Gary Benson <gbenson@redhat.com>
5687
5688 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5689 instead of fatal and error.
5690 (i386_handle_nonaligned_watchpoint): Likewise.
5691
1b6d4134
GB
56922014-06-18 Gary Benson <gbenson@redhat.com>
5693
5694 * i386-low.c (i386_get_debug_register_length): New macro.
5695 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5696 (i386_show_dr): Use debug_printf instead of fprintf. Use
5697 phex to format values.
5698
6e62758f
GB
56992014-06-18 Gary Benson <gbenson@redhat.com>
5700
5701 * i386-low.h: Comment changes.
5702 * i386-low.c: Likewise.
5703
fc6e2f03
GB
57042014-06-18 Gary Benson <gbenson@redhat.com>
5705
5706 * i386-low.c: Whitespace changes.
5707
f9d1eeed
TT
57082014-06-12 Tom Tromey <tromey@redhat.com>
5709
5710 * utils.c (freeargv): Remove.
5711
0b04e523
TT
57122014-06-12 Tom Tromey <tromey@redhat.com>
5713
5714 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5715 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5716 (parse_debug_format_options): Likewise.
5717 (gdbserver_usage): Likewise.
5718 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5719 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5720 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5721 against libiberty.
5722 ($(LIBGNU)): Depend on libiberty.
5723 (all-lib): Recurse into all subdirs.
5724 (install-only): Invoke "install" target in subdirs.
5725 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5726 targets.
5727 * configure: Rebuild.
5728 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5729 for vasprintf, vsnprintf, or gettimeofday.
5730 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5731 srv_tgtobj.
5732
270c9937
JB
57332014-06-05 Joel Brobecker <brobecker@adacore.com>
5734
5735 * development.sh: Delete.
5736 * Makefile.in (config.status): Adjust dependency on development.sh.
5737 * configure.ac: Adjust development.sh source call.
5738 * configure: Regenerate.
5739
0a261ed8
PA
57402014-06-02 Pedro Alves <palves@redhat.com>
5741
5742 * ax.c (gdb_free_agent_expr): New function.
5743 * ax.h (gdb_free_agent_expr): New declaration.
5744 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5745 list.
5746 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5747 static.
5748 (clear_breakpoint_conditions_and_commands): New function.
5749 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5750 (clear_breakpoint_conditions_and_commands): New declaration.
5751
e9dae05e
RR
57522014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5753
5754 * linux-aarch64-low.c (asm/ptrace.h): Include.
5755
5876f503
JK
57562014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5757
5758 Fix TLS access for -static -pthread.
5759 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5760 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5761 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5762
802e8e6d
PA
57632014-05-20 Pedro Alves <palves@redhat.com>
5764
5765 * linux-aarch64-low.c (aarch64_insert_point)
5766 (aarch64_remove_point): No longer check whether the type is
5767 supported here. Adjust to new interface.
5768 (the_low_target): Install aarch64_supports_z_point_type as
5769 supports_z_point_type method.
5770 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5771 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5772 instead of a Z packet char. Adjust.
5773 (arm_supports_z_point_type): New function.
5774 (arm_insert_point, arm_remove_point): Adjust to new interface.
5775 (the_low_target): Install arm_supports_z_point_type.
5776 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5777 (cris_insert_point, cris_remove_point): Adjust to new interface.
5778 Don't check whether the type is supported here.
5779 (the_low_target): Install cris_supports_z_point_type.
5780 * linux-low.c (linux_supports_z_point_type): New function.
5781 (linux_insert_point, linux_remove_point): Adjust to new interface.
5782 * linux-low.h (struct linux_target_ops) <insert_point,
5783 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5784 raw_breakpoint pointer parameter.
5785 <supports_z_point_type>: New method.
5786 * linux-mips-low.c (mips_supports_z_point_type): New function.
5787 (mips_insert_point, mips_remove_point): Adjust to new interface.
5788 Use mips_supports_z_point_type.
5789 (the_low_target): Install mips_supports_z_point_type.
5790 * linux-ppc-low.c (the_low_target): Install NULL as
5791 supports_z_point_type method.
5792 * linux-s390-low.c (the_low_target): Install NULL as
5793 supports_z_point_type method.
5794 * linux-sparc-low.c (the_low_target): Install NULL as
5795 supports_z_point_type method.
5796 * linux-x86-low.c (x86_supports_z_point_type): New function.
5797 (x86_insert_point): Adjust to new insert_point interface. Use
5798 insert_memory_breakpoint. Adjust to new
5799 i386_low_insert_watchpoint interface.
5800 (x86_remove_point): Adjust to remove_point interface. Use
5801 remove_memory_breakpoint. Adjust to new
5802 i386_low_remove_watchpoint interface.
5803 (the_low_target): Install x86_supports_z_point_type.
5804 * lynx-low.c (lynx_target_ops): Install NULL as
5805 supports_z_point_type callback.
5806 * nto-low.c (nto_supports_z_point_type): New.
5807 (nto_insert_point, nto_remove_point): Adjust to new interface.
5808 (nto_target_ops): Install nto_supports_z_point_type.
5809 * mem-break.c: Adjust intro comment.
5810 (struct raw_breakpoint) <raw_type, size>: New fields.
5811 <inserted>: Update comment.
5812 <shlib_disabled>: Delete field.
5813 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5814 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5815 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5816 (raw_bkpt_type_to_target_hw_bp_type): New function.
5817 (find_enabled_raw_code_breakpoint_at): New function.
5818 (find_raw_breakpoint_at): New type and size parameters. Use them.
5819 (insert_memory_breakpoint): New function, based off
5820 set_raw_breakpoint_at.
5821 (remove_memory_breakpoint): New function.
5822 (set_raw_breakpoint_at): Reimplement.
5823 (set_breakpoint): New, based on set_breakpoint_at.
5824 (set_breakpoint_at): Reimplement.
5825 (delete_raw_breakpoint): Go through the_target->remove_point
5826 instead of assuming memory breakpoints.
5827 (find_gdb_breakpoint_at): Delete.
5828 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5829 (find_gdb_breakpoint): New function.
5830 (set_gdb_breakpoint_at): Delete.
5831 (z_type_supported): New function.
5832 (set_gdb_breakpoint_1): New function, loosely based off
5833 set_gdb_breakpoint_at.
5834 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5835 (delete_gdb_breakpoint_at): Delete.
5836 (delete_gdb_breakpoint_1): New function, loosely based off
5837 delete_gdb_breakpoint_at.
5838 (delete_gdb_breakpoint): New function.
5839 (clear_gdb_breakpoint_conditions): Rename to ...
5840 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5841 breakpoint.
5842 (add_condition_to_breakpoint): Make static.
5843 (add_breakpoint_condition): Take a struct breakpoint pointer
5844 instead of an address. Adjust.
5845 (gdb_condition_true_at_breakpoint): Rename to ...
5846 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5847 z_type parameter.
5848 (gdb_condition_true_at_breakpoint): Reimplement.
5849 (add_breakpoint_commands): Take a struct breakpoint pointer
5850 instead of an address. Adjust.
5851 (gdb_no_commands_at_breakpoint): Rename to ...
5852 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5853 parameter. Return true if no breakpoint was found. Change debug
5854 output.
5855 (gdb_no_commands_at_breakpoint): Reimplement.
5856 (run_breakpoint_commands): Rename to ...
5857 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5858 and change return type to boolean.
5859 (run_breakpoint_commands): New function.
5860 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5861 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5862 breakpoint. Go through the_target->remove_point instead of
5863 assuming memory breakpoint.
5864 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5865 software and hardware breakpoints.
5866 (reinsert_raw_breakpoint): Go through the_target->insert_point
5867 instead of assuming memory breakpoint.
5868 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5869 software and hardware breakpoints.
5870 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5871 Check both software and hardware breakpoints.
5872 (validate_inserted_breakpoint): Assert the breakpoint is a
5873 software breakpoint. Set the inserted flag to -1 instead of
5874 setting shlib_disabled.
5875 (delete_disabled_breakpoints): Adjust.
5876 (validate_breakpoints): Only validate software breakpoints.
5877 Adjust to inserted flag change.
5878 (check_mem_read, check_mem_write): Skip breakpoint types other
5879 than software breakpoints. Adjust to inserted flag change.
5880 * mem-break.h (enum raw_bkpt_type): New enum.
5881 (raw_breakpoint, struct process_info): Forward declare.
5882 (Z_packet_to_target_hw_bp_type): Delete declaration.
5883 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5884 (set_gdb_breakpoint, delete_gdb_breakpoint)
5885 (clear_breakpoint_conditions): New declarations.
5886 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5887 (breakpoint_inserted_here): Update comment.
5888 (add_breakpoint_condition, add_breakpoint_commands): Replace
5889 address parameter with a breakpoint pointer parameter.
5890 (gdb_breakpoint_here): Update comment.
5891 (delete_gdb_breakpoint_at): Delete.
5892 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5893 * server.c (process_point_options): Take a struct breakpoint
5894 pointer instead of an address. Adjust.
5895 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5896 delete_gdb_breakpoint.
5897 * spu-low.c (spu_target_ops): Install NULL as
5898 supports_z_point_type method.
5899 * target.h: Include mem-break.h.
5900 (struct target_ops) <prepare_to_access_memory>: Update comment.
5901 <supports_z_point_type>: New field.
5902 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5903 instead of a char. Also take a raw breakpoint pointer.
5904 * win32-arm-low.c (the_low_target): Install NULL as
5905 supports_z_point_type.
5906 * win32-i386-low.c (i386_supports_z_point_type): New function.
5907 (i386_insert_point, i386_remove_point): Adjust to new interface.
5908 (the_low_target): Install i386_supports_z_point_type.
5909 * win32-low.c (win32_supports_z_point_type): New function.
5910 (win32_insert_point, win32_remove_point): Adjust to new interface.
5911 (win32_target_ops): Install win32_supports_z_point_type.
5912 * win32-low.h (struct win32_target_ops):
5913 <supports_z_point_type>: New method.
5914 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5915 instead of a char. Also take a raw breakpoint pointer.
5916
932539e3
PA
59172014-05-20 Pedro Alves <palves@redhat.com>
5918
5919 * mem-break.h: Include break-common.h.
5920 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5921 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5922 (Z_packet_to_target_hw_bp_type): New declaration.
5923 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5924 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5925 (Z_PACKET_ACCESS_WP): Delete macros.
5926 (Z_packet_to_hw_type): Delete function.
5927 * i386-low.h: Don't include break-common.h here.
5928 (Z_packet_to_hw_type): Delete declaration.
5929 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5930 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5931 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5932 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5933 * linux-aarch64-low.c: Don't include break-common.h here.
5934 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5935 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5936 (Z_packet_to_target_hw_bp_type): Delete function.
5937 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5938 function.
5939 (mips_insert_point, mips_remove_point): Use
5940 Z_packet_to_target_hw_bp_type.
5941
4ff0d3d8
PA
59422014-05-20 Pedro Alves <palves@redhat.com>
5943
5944 * linux-aarch64-low.c: Include break-common.h.
5945 (enum target_point_type): Delete.
5946 (Z_packet_to_point_type): Rename to ...
5947 (Z_packet_to_target_hw_bp_type): ... this, and return a
5948 target_hw_bp_type instead.
5949 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5950 instead of an enum target_point_type.
5951 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5952 breakpoint type.
5953 (aarch64_dr_state_insert_one_point)
5954 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5955 (aarch64_handle_aligned_watchpoint)
5956 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5957 Take an enum target_hw_bp_type instead of an enum
5958 target_point_type.
5959 (aarch64_supports_z_point_type): New function.
5960 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5961 use Z_packet_to_target_hw_bp_type.
5962
786dc519
JB
59632014-05-20 Joel Brobecker <brobecker@adacore.com>
5964
5965 * configure.ac: Only use -Werror by default when DEVELOPMENT
5966 is true.
5967 * configure: Regenerate.
5968
9e0aa64f
JK
59692014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5970
5971 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5972 * linux-x86-low.c (X86_64_USER_REGS): New.
5973 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5974
2b577b92
YQ
59752014-04-28 Yao Qi <yao@codesourcery.com>
5976
5977 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5978 name.
5979
94611da2
PA
59802014-04-25 Pedro Alves <palves@redhat.com>
5981
5982 PR server/16255
5983 * linux-low.c (linux_attach_fail_reason_string): New function.
5984 (linux_attach_lwp): Delete.
5985 (linux_attach_lwp_1): Rename to ...
5986 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5987 argument. Remove "initial" parameter. Return int instead of
5988 void. Don't error or warn here.
5989 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5990 failure to attach to the tgid. Call warning when failing to
5991 attach to an lwp.
5992 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5993 argument. Remove "initial" parameter. Return int instead of
5994 void. Don't error or warn here.
5995 (linux_attach_fail_reason_string): New declaration.
5996 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5997 interface change. Use linux_attach_fail_reason_string.
5998
01f9f808
MS
59992014-04-24 Michael Sturm <michael.sturm@mintel.com>
6000 Walfred Tedeschi <walfred.tedeschi@intel.com>
6001
6002 * Makefile.in: Added rules to handle new files
6003 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6004 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6005 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6006 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6007 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6008 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6009 x32-avx512-linux.o.
6010 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6011 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6012 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6013 i386/x32-avx512.xml.
6014 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6015 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6016 i386/x32-avx512-linux.xml.
6017 * i387-fp.c (num_avx512_k_registers): New constant for number
6018 of K registers.
6019 (num_avx512_zmmh_low_registers): New constant for number of
6020 lower ZMM registers (0-15).
6021 (num_avx512_zmmh_high_registers): New constant for number of
6022 higher ZMM registers (16-31).
6023 (num_avx512_ymmh_registers): New contant for number of higher
6024 YMM registers (ymm16-31 added by avx521 on x86_64).
6025 (num_avx512_xmm_registers): New constant for number of higher
6026 XMM registers (xmm16-31 added by AVX512 on x86_64).
6027 (struct i387_xsave): Add space for AVX512 registers.
6028 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6029 Add code to handle AVX512 registers.
6030 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6031 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6032 prototypei from generated file.
6033 (tdesc_amd64_avx512_linux): Likewise.
6034 (init_registers_x32_avx512_linux): Likewise.
6035 (tdesc_x32_avx512_linux): Likewise.
6036 (init_registers_i386_avx512_linux): Likewise.
6037 (tdesc_i386_avx512_linux): Likewise.
6038 (x86_64_regmap): Add AVX512 registers.
6039 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6040 mask.
6041 (initialize_low_arch): Add code to initialize AVX512 registers.
6042
51aa91f9
PA
60432014-04-23 Pedro Alves <palves@redhat.com>
6044
6045 * mem-break.c (find_gdb_breakpoint_at): Make static.
6046 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6047
a4165e94
PA
60482014-04-23 Pedro Alves <palves@redhat.com>
6049
6050 * i386-low.c: Don't include break-common.h here.
6051 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6052 prototype to take target_hw_bp_type as argument instead of a Z
6053 packet char.
6054 * i386-low.h: Include break-common.h here.
6055 (Z_packet_to_hw_type): Declare.
6056 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6057 prototypes.
6058 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6059 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6060 (x86_remove_point): Convert the packet number to a
6061 target_hw_bp_type before calling i386_low_remove_watchpoint.
6062 * win32-i386-low.c (i386_insert_point): Convert the packet number
6063 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6064 (i386_remove_point): Convert the packet number to a
6065 target_hw_bp_type before calling i386_low_remove_watchpoint.
6066
b8acf843
PA
60672014-04-23 Pedro Alves <palves@redhat.com>
6068
6069 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6070
d708bcd1
PA
60712014-04-10 Pedro Alves <palves@redhat.com>
6072
6073 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6074 Check if the condition or command is NULL before checking if the
6075 breakpoint is known. On success, return true.
6076 * mem-break.h (add_breakpoint_condition): Document return.
6077 (add_breakpoint_commands): Add describing comment.
6078 * server.c (skip_to_semicolon): New function.
6079 (process_point_options): Use it.
6080
2eec7d5b
PA
60812014-04-09 Pedro Alves <palves@redhat.com>
6082
6083 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6084 to lwpid_of.
6085
fa96cb38
PA
60862014-02-27 Pedro Alves <palves@redhat.com>
6087
6088 PR 12702
6089 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6090 macros.
6091 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6092 output.
6093 (last_thread_of_process_p): Take a PID argument instead of a
6094 thread pointer.
6095 (linux_wait_for_lwp): Delete.
6096 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6097 functions.
6098 (linux_low_filter_event): New function, party factored out from
6099 linux_wait_for_event.
6100 (linux_wait_for_event): Rename to ...
6101 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6102 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6103 sigsuspend. Check for zombie leaders.
6104 (linux_wait_for_event): Reimplement as wrapper around
6105 linux_wait_for_event_filtered.
6106 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6107 a normal or signal exit is seen, it's the whole process exiting.
6108 (wait_for_sigstop): No longer a for_each_inferior callback.
6109 Rewrite on top of linux_wait_for_event_filtered.
6110 (stop_all_lwps): Call wait_for_sigstop directly.
6111 * server.c (resume, handle_target_event): Handle
6112 TARGET_WAITKIND_NO_RESUMED.
6113
d763de10
JB
61142014-02-26 Joel Brobecker <brobecker@adacore.com>
6115
6116 * win32-low.c (psapi_get_dll_name,
6117 * win32_CreateToolhelp32Snapshot): Delete.
6118 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6119 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6120 Delete.
6121 (handle_load_dll): Add function description.
6122 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6123
850a0f76
JB
61242014-02-26 Joel Brobecker <brobecker@adacore.com>
6125
6126 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6127 Add comment.
6128 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6129 base address when calling win32_add_one_solib.
6130 (handle_load_dll): Delete local variable load_addr.
6131 Remove 0x1000 offset applied to DLL base address when calling
6132 win32_add_one_solib.
6133 (handle_unload_dll): Add comment.
6134
f25b3fc3
JB
61352014-02-26 Joel Brobecker <brobecker@adacore.com>
6136
6137 * win32-low.c (win32_add_all_dlls): Renames
6138 win32_ensure_ntdll_loaded. Rewrite function documentation.
6139 Adjust implementation to always load all DLLs.
6140 Add 0x1000 offset to DLL base address when calling
6141 win32_add_one_solib.
6142 (child_initialization_done): New static global.
6143 (do_initial_child_stuff): Set child_initialization_done to
6144 zero during child initialization, and 1 after. Replace call
6145 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6146 Add comment.
6147 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6148 (handle_unload_dll): Add function documentation.
6149 (get_child_debug_event): Ignore load and unload DLL events
6150 during child initialization.
6151
d86d4aaf
DE
61522014-02-20 Doug Evans <dje@google.com>
6153
3bc32da3 6154 Remove global all_lwps.
d86d4aaf
DE
6155 * inferiors.h (ptid_of): Move here from linux-low.h.
6156 (pid_of, lwpid_of): Ditto.
6157 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6158 parameter is a struct thread_info * now.
6159 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6160 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6161 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6162 directly.
6163 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6164 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6165 * linux-arm-low.c (update_registers_callback): Update, "entry"
6166 parameter is a struct thread_info * now.
6167 Fetch lwpid from current_inferior directly.
6168 (arm_insert_point): Pass &all_threads to find_inferior instead of
6169 &all_lwps.
6170 (arm_remove_point): Ditto.
6171 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6172 (arm_prepare_to_resume): Fetch pid from thread.
6173 (arm_read_description): Fetch lwpid from current_inferior directly.
6174 * linux-low.c (all_lwps): Delete.
6175 (delete_lwp): Delete call to remove_inferior.
6176 (handle_extended_wait): Fetch lwpid from thread.
6177 (add_lwp): Don't set lwp->entry.id. Remove call to
6178 add_inferior_to_list.
6179 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6180 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6181 (kill_one_lwp_callback): Ditto.
6182 (linux_kill): Don't dereference NULL pointer.
6183 Fetch ptid,lwpid from thread.
6184 (get_detach_signal): Fetch ptid from thread.
6185 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6186 Simplify call to regcache_invalidate_thread.
6187 (delete_lwp_callback): Update, "entry" parameter is a
6188 struct thread_info * now. Fetch pid from thread.
6189 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6190 (status_pending_p_callback): Update, "entry" parameter is a
6191 struct thread_info * now. Fetch ptid from thread.
6192 (find_lwp_pid): Update, "entry" parameter is a
6193 struct thread_info * now.
6194 (linux_wait_for_lwp): Fetch pid from thread.
6195 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6196 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6197 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6198 (dequeue_one_deferred_signal): Ditto.
6199 (cancel_breakpoint): Fetch ptid from current_inferior.
6200 (linux_wait_for_event): Pass &all_threads to find_inferior,
6201 not &all_lwps. Fetch ptid, lwpid from thread.
6202 (count_events_callback): Update, "entry" parameter is a
6203 struct thread_info * now.
6204 (select_singlestep_lwp_callback): Ditto.
6205 (select_event_lwp_callback): Ditto.
6206 (cancel_breakpoints_callback): Ditto.
6207 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6208 not &all_lwps.
6209 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6210 (unsuspend_one_lwp): Update, "entry" parameter is a
6211 struct thread_info * now.
6212 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6213 not &all_lwps.
6214 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6215 Fetch lwpid from thread, not lwp.
6216 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6217 Pass &all_threads to find_inferior, not &all_lwps.
6218 (send_sigstop): Fetch lwpid from thread, not lwp.
6219 (send_sigstop_callback): Update, "entry" parameter is a
6220 struct thread_info * now.
6221 (suspend_and_send_sigstop_callback): Ditto.
6222 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6223 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6224 struct thread_info * now.
6225 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6226 from thread, lwp.
6227 (lwp_running): Update, "entry" parameter is a
6228 struct thread_info * now.
6229 (stop_all_lwps): Fetch ptid from thread.
6230 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6231 (linux_resume_one_lwp): Fetch lwpid from thread.
6232 (linux_set_resume_request): Update, "entry" parameter is a
6233 struct thread_info * now. Fetch pid, lwpid from thread.
6234 (resume_status_pending_p): Update, "entry" parameter is a
6235 struct thread_info * now.
6236 (need_step_over_p): Ditto. Fetch lwpid from thread.
6237 (start_step_over): Fetch lwpid from thread.
6238 (linux_resume_one_thread): Update, "entry" parameter is a
6239 struct thread_info * now. Fetch lwpid from thread.
6240 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6241 (proceed_one_lwp): Update, "entry" parameter is a
6242 struct thread_info * now. Fetch lwpid from thread.
6243 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6244 struct thread_info * now.
6245 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6246 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6247 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6248 directly.
6249 (regsets_store_inferior_registers): Ditto.
6250 (fetch_register, store_register): Ditto.
6251 (linux_read_memory, linux_write_memory): Ditto.
6252 (linux_request_interrupt): Ditto.
6253 (linux_read_auxv): Ditto.
6254 (linux_xfer_siginfo): Ditto.
6255 (linux_qxfer_spu): Ditto.
6256 (linux_qxfer_libraries_svr4): Ditto.
6257 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6258 moved to inferiors.h.
6259 (get_lwp): Delete.
6260 (get_thread_lwp): Update.
6261 (struct lwp_info): Delete member "entry". Simplify comment for
6262 member "thread".
6263 (all_lwps): Delete.
6264 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6265 current_inferior directly.
6266 (update_watch_registers_callback): Update, "entry" parameter is a
6267 struct thread_info * now. Fetch pid from thread.
6268 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6269 (mips_insert_point): Fetch lwpid from current_inferior.
6270 Pass &all_threads to find_inferior, not &all_lwps.
6271 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6272 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6273 directly.
6274 (mips_stopped_data_address): Ditto.
6275 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6276 directly.
6277 * linux-tile-low.c (tile_arch_setup): Ditto.
6278 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6279 (update_debug_registers_callback): Update, "entry" parameter is a
6280 struct thread_info * now. Fetch pid from thread.
6281 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6282 Pass &all_threads to find_inferior, not &all_lwps.
6283 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6284 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6285 Pass &all_threads to find_inferior, not &all_lwps.
6286 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6287 (i386_dr_low_get_status): Ditto.
6288 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6289 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6290 (x86_linux_read_description): Ditto.
6291 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6292
3b8361aa
DE
62932014-02-20 Doug Evans <dje@google.com>
6294
6295 * inferiors.c (get_first_inferior): Fix buglet.
6296
f7667f0d
DE
62972014-02-19 Doug Evans <dje@google.com>
6298
6299 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6300 * inferiors.c (add_thread): Change result type to struct thread_info *.
6301 All callers updated.
6302 (add_lwp): Call add_thread here instead of in callers.
6303 All callers updated.
6304 * linux-low.h (get_lwp_thread): Rewrite.
6305 (struct lwp_info): New member "thread".
6306
b3312d80
DE
63072014-02-19 Doug Evans <dje@google.com>
6308
6309 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6310 All callers updated.
6311
ecc6f45c
DE
63122014-02-19 Doug Evans <dje@google.com>
6313
6314 * inferiors.c (add_thread): Fix whitespace.
6315
649ebbca
DE
63162014-02-19 Doug Evans <dje@google.com>
6317
6318 * dll.c (clear_dlls): Replace accessing list implemention details
6319 with API function.
6320 * gdbthread.h (get_first_thread): Declare.
6321 * inferiors.c (for_each_inferior_with_data): New function.
6322 (get_first_thread): New function.
6323 (find_thread_ptid): Simplify.
6324 (get_first_inferior): New function.
6325 (clear_list): Delete.
6326 (one_inferior_p): New function.
6327 (clear_inferior_list): New function.
6328 (clear_inferiors): Update.
6329 * inferiors.h (for_each_inferior_with_data): Declare.
6330 (clear_inferior_list): Declare.
6331 (one_inferior_p): Declare.
6332 (get_first_inferior): Declare.
6333 * linux-low.c (linux_wait_for_event): Replace accessing list
6334 implemention details with API function.
6335 * server.c (target_running): Ditto.
6336 (accumulate_file_name_length): New function.
6337 (emit_dll_description): New function.
6338 (handle_qxfer_libraries): Replace accessing list implemention
6339 details with API function.
6340 (handle_qxfer_threads_worker): New function.
6341 (handle_qxfer_threads_proper): Replace accessing list implemention
6342 details with API function.
6343 (handle_query): Ditto.
6344 (visit_actioned_threads_callback_ftype): New typedef.
6345 (visit_actioned_threads_data): New struct.
6346 (visit_actioned_threads): Rewrite to be find_inferior callback.
6347 (resume): Call find_inferior.
6348 (handle_status): Replace accessing list implemention
6349 details with API function.
6350 (process_serial_event): Replace accessing list implemention details
6351 with API function.
6352 * target.c (set_desired_inferior): Replace accessing list implemention
6353 details with API function.
6354 * tracepoint.c (same_process_p): New function.
6355 (gdb_agent_about_to_close): Replace accessing list implemention
6356 details with API function.
6357 * win32-low.c (child_delete_thread): Replace accessing list
6358 implemention details with API function.
6359 (match_dll_by_basename): New function.
6360 (dll_is_loaded_by_basename): New function.
6361 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6362 details call to dll_is_loaded_by_basename.
6363
80894984
DE
63642014-02-19 Doug Evans <dje@google.com>
6365
6366 * dll.h (struct dll_info): Add comment.
6367 * gdbthread.h (struct thread_info): Add comment.
6368 (current_ptid): Simplify.
6369 * inferiors.c (add_process): Update.
6370 (remove_process): Update.
6371 * inferiors.h (struct process_info): Rename member "head" to "entry".
6372 * linux-low.c (delete_lwp): Update.
6373 (add_lwp): Update.
6374 (last_thread_of_process_p): Update.
6375 (kill_one_lwp_callback, linux_kill): Update.
6376 (status_pending_p_callback): Update.
6377 (wait_for_sigstop): Update. Simplify read of ptid.
6378 (start_step_over): Update.
6379 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6380 (get_lwp_thread): Update.
6381 (struct lwp_info): Rename member "head" to "entry".
6382 * regcache.h (inferior_list_entry): Delete.
6383 * server.c (kill_inferior_callback): Update.
6384 (detach_or_kill_inferior_callback): Update.
6385 (print_started_pid): Update.
6386 (print_attached_pid): Update.
6387 (process_serial_event): Simplify read of ptid.
6388 * thread-db.c (thread_db_create_event): Update.
6389 (thread_db_get_tls_address): Update.
6390 * win32-low.c (current_inferior_ptid): Simplify.
6391
46917d26
TT
63922014-02-19 Tom Tromey <tromey@redhat.com>
6393
6394 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6395 argument.
6396 (target_supports_btrace): Update.
6397
0759a81e
YQ
63982014-02-14 Yao Qi <yao@codesourcery.com>
6399
6400 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6401 (rsp-low-ipa.o): New target.
6402
a7191e8b
TT
64032014-02-12 Tom Tromey <tromey@redhat.com>
6404
6405 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6406 convert_ascii_to_int.
6407 * regcache.c (registers_to_string): Likewise.
6408 * remote-utils.c (decode_M_packet): Likewise.
6409 * server.c (process_serial_event): Likewise.
6410
ff0e980e
TT
64112014-02-12 Tom Tromey <tromey@redhat.com>
6412
6413 * server.c (handle_query, handle_v_run): Use hex2bin, not
6414 unhexify.
6415 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6416
e9371aff
TT
64172014-02-12 Tom Tromey <tromey@redhat.com>
6418
6419 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6420 convert_int_to_ascii.
6421 * regcache.c (registers_to_string, collect_register_as_string):
6422 Likewise.
6423 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6424 Likewise.
6425 * server.c (process_serial_event): Likewise.
6426 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6427 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6428
971dc0b8
TT
64292014-02-12 Tom Tromey <tromey@redhat.com>
6430
6431 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6432 bin2hex, not hexify.
6433 * tracepoint.c (cmd_qtstatus): Likewise.
6434
0a822afb
TT
64352014-02-12 Tom Tromey <tromey@redhat.com>
6436
6437 * remote-utils.c (monitor_output): Pass explicit length to
6438 hexify.
6439
9c3d6531
TT
64402014-02-12 Tom Tromey <tromey@redhat.com>
6441
6442 * tracepoint.c: Include rsp-low.h.
6443 * server.c: Include rsp-low.h.
6444 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6445 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6446 declare.
6447 * remote-utils.c: Include rsp-low.h.
6448 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6449 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6450 (convert_int_to_ascii, convert_ascii_to_int): Move to
6451 common/rsp-low.c.
6452 * regcache.c: Include rsp-low.h.
6453 * ax.c: Include rsp-low.h.
6454 * Makefile.in (SFILES): Add common/rsp-low.c.
6455 (OBS): Add rsp-low.o.
6456 (rsp-low.o): New target.
6457
01fd3ea5
TT
64582014-02-12 Tom Tromey <tromey@redhat.com>
6459
6460 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6461 Include print-utils.h.
6462 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6463 (plongest, thirty_two, phex_nz): Remove.
6464 * Makefile.in (SFILES): Add common/print-utils.c.
6465 (OBS): Add print-utils.o.
6466 (print-utils-ipa.o): New target.
6467 (print-utils.o): New target.
6468 (IPA_OBJS): Add print-utils-ipa.o.
6469
e99dc820
TT
64702014-02-06 Tom Tromey <tromey@redhat.com>
6471
6472 * Makefile.in (SFILES): Fix indentation.
6473
ee1e2d4f
DE
64742014-02-05 Doug Evans <dje@google.com>
6475
6476 * linux-low.c (linux_wait_for_event): Improve comment.
6477 (linux_wait_1): Keep current_inferior in sync with event_child.
6478
f5a02773
DE
64792014-01-22 Doug Evans <dje@google.com>
6480
6481 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6482
87ce2a04
DE
64832014-01-22 Doug Evans <dje@google.com>
6484
6485 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6486 * configure: Regenerate.
6487 * config.in: Regenerate.
6488 * Makefile.in (SFILES): Add debug.c.
6489 (OBS): Add debug.o.
6490 * debug.c: New file.
6491 * debug.h: New file.
6492 * linux-aarch64-low.c (*): Update all debugging printfs to use
6493 debug_printf instead of fprintf.
6494 * linux-arm-low.c (*): Ditto.
6495 * linux-cris-low.c (*): Ditto.
6496 * linux-crisv32-low.c (*): Ditto.
6497 * linux-m32r-low.c (*): Ditto.
6498 * linux-sparc-low.c (*): Ditto.
6499 * linux-x86.c (*): Ditto.
6500 * linux-low.c (*): Ditto.
6501 (linux_wait_1): Add calls to debug_enter, debug_exit.
6502 (linux_wait): Remove redundant debugging printf.
6503 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6504 (linux_resume, unstop_all_lwps): Ditto.
6505 * mem-break.c (*): Update all debugging printfs to use
6506 debug_printf instead of fprintf.
6507 * remote-utils.c (*): Ditto.
6508 * thread-db.c (*): Ditto.
6509 * server.c #include <ctype.h>, "gdb_vecs.h".
6510 (debug_threads): Moved to debug.c.
6511 (*): Update all debugging printfs to use debug_printf instead of
6512 fprintf.
6513 (start_inferior): Replace call to fflush with call to debug_flush.
6514 (monitor_show_help): Mention set debug-format.
6515 (parse_debug_format_options): New function.
6516 (handle_monitor_command): Handle "monitor set debug-format".
6517 (gdbserver_usage): Mention --debug-format.
6518 (main): Parse --debug-format.
6519 * server.h (debug_threads): Declaration moved to debug.h.
6520 #include "debug.h".
6521 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6522 trace_debug_1 that uses debug_printf.
6523 (tracepoint_look_up_symbols): Update all debugging printfs to use
6524 debug_printf instead of fprintf.
6525
e671835b
BS
65262014-01-20 Baruch Siach <baruch@tkos.co.il>
6527
6528 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6529 sys/ptrace.h.
6530
b5737fa9
PA
65312014-01-17 Pedro Alves <palves@redhat.com>
6532
ea38d2a9 6533 PR build/16445
c7faa97a
PA
6534 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6535 defined after including gdb_proc_service.h.
b5737fa9 6536
40ed484e
DE
65372014-01-16 Doug Evans <dje@google.com>
6538
6539 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6540 (match_dll): Use it.
6541
969c39fb
MM
65422014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6543
6544 * target.h (target_ops) <read_btrace>: Change parameters and
6545 return type to allow error reporting.
6546 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6547 trace reading errors on.
6548 * linux-low.c (linux_low_read_btrace): Pass trace reading
6549 errors on.
6550 (linux_low_disable_btrace): New.
6551
ab7f45ba
DE
65522014-01-15 Doug Evans <dje@google.com>
6553
6554 * inferiors.c (thread_id_to_gdb_id): Delete.
6555 * inferiors.h (thread_id_to_gdb_id): Delete.
6556
66af0f44
EZ
65572014-01-13 Eli Zaretskii <eliz@gnu.org>
6558
6559 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6560 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6561 versions.
6562
9939e131
PA
65632014-01-08 Pedro Alves <palves@redhat.com>
6564
6565 * server.c (handle_status): Don't discard previous queued stop
6566 replies or thread's pending status here.
6567 (main) <disconnection>: Do it here instead.
6568
b7ea362b
PA
65692014-01-08 Pedro Alves <palves@redhat.com>
6570
6571 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6572 * server.c (visit_actioned_threads, handle_pending_status): New
6573 function.
6574 (handle_v_cont): Factor out parts to ...
6575 (resume): ... this new function. If in all-stop, and a thread
6576 being resumed has a pending status, report it without actually
6577 resuming.
6578 (myresume): Adjust to use the new 'resume' function.
6579 (clear_pending_status_callback, set_pending_status_callback)
6580 (find_status_pending_thread_callback): New functions.
6581 (handle_status): Handle the case of multiple threads having
6582 interesting statuses to report. Report threads' real last signal
6583 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6584 with an interesting thread to report the status for, instead of
6585 always reporting the status of the first thread.
6586
28498c42
JB
65872014-01-01 Joel Brobecker <brobecker@adacore.com>
6588
6589 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6590 * gdbreplay.c (gdbreplay_version): Likewise.
6591
f45c82da
YZ
65922013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6593
6594 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6595 iov.iov_len with the real length in use.
6596
379a5e2d
JB
65972013-12-13 Joel Brobecker <brobecker@adacore.com>
6598
6599 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6600 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6601 for all targets that use win32-low.c.
6602 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6603 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6604
4210d83e
PA
66052013-12-13 Pedro Alves <palves@redhat.com>
6606
6607 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6608 if equal to TARGET_WAITKIND_LOADED.
6609 * win32-low.c (cached_status): New static global.
6610 (win32_wait): Add declaration.
6611 (do_initial_child_stuff): Flush all initial pending debug events
6612 up to the initial breakpoint.
6613 (win32_wait): If CACHED_STATUS was set, return that instead
6614 of doing a real wait. Remove the code resuming the execution
6615 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6616 during the initial phase. Also remove the code changing
6617 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6618 TARGET_WAITKIND_STOPPED.
6619
e7f0d979
YQ
66202013-12-11 Yao Qi <yao@codesourcery.com>
6621
6622 * notif.c (handle_notif_ack): Return 0 if no notification
6623 matches.
6624
ebcf782c
DE
66252013-11-20 Doug Evans <dje@google.com>
6626
6627 * linux-low.c (linux_set_resume_request): Fix comment.
6628
20ad9378
DE
66292013-11-20 Doug Evans <dje@google.com>
6630
6631 * linux-low.c (resume_status_pending_p): Tweak comment.
6632
a196ebeb
WT
66332013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6634
6635 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6636 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6637 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6638 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6639 (srv_amd64_regobj): Add amd64-mpx.o.
6640 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6641 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6642 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6643 * i387-fp.c (num_pl_bnd_register) Added constant.
6644 (num_pl_bnd_cfg_registers) Added constant.
6645 (struct i387_xsave) Added reserved area and MPX fields.
6646 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6647 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6648 function.
6649 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6650 (init_registers_amd64_mpx_linux): Declare new function.
6651 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6652 (x86_64_regmap): Add MPX registers.
6653 (x86_linux_read_description): Add MPX case.
6654 (initialize_low_arch): Initialize MPX targets.
6655
0080a2f6
TT
66562013-11-18 Tom Tromey <tromey@redhat.com>
6657
6658 * configure: Rebuild.
6659 * configure.ac: Don't check for stdlib.h.
6660 * gdbreplay.c: Unconditionally include stdlib.h.
6661
2978b111
TT
66622013-11-18 Tom Tromey <tromey@redhat.com>
6663
6664 * config.in: Rebuild.
6665 * configure: Rebuild.
6666 * configure.ac: Don't use AC_HEADER_DIRENT.
6667
a3d08894
TT
66682013-11-18 Tom Tromey <tromey@redhat.com>
6669
6670 * server.h: Don't check HAVE_STRING_H.
6671 * gdbreplay.c: Don't check HAVE_STRING_H.
6672 * configure: Rebuild.
6673
0a5dd17d
TT
66742013-11-18 Tom Tromey <tromey@redhat.com>
6675
6676 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6677 LIBGNU.
6678
1bd2f0ba
TT
66792013-11-08 Tom Tromey <tromey@redhat.com>
6680
6681 * configure, config.in: Rebuild.
6682 * configure.ac: Remove unused configury.
6683
3266f10b
TT
66842013-11-08 Tom Tromey <tromey@redhat.com>
6685
6686 * acinclude.m4: Include common.m4, codeset.m4.
6687 * configure, config.in: Rebuild.
6688 * configure.ac: Use GDB_AC_COMMON.
6689
6682d959
AA
66902013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6691
6692 * linux-s390-low.c (HWCAP_S390_TE): New define.
6693 (s390_arch_setup): Consider the TE field in the HWCAP for
6694 determining 'have_regset_tdb'.
6695
fd0a4d76
SDJ
66962013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6697
6698 PR gdb/16014
6699 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6700 call to sizeof.
6701
1a3d890b
PA
67022013-10-02 Pedro Alves <palves@redhat.com>
6703
6704 * server.c (process_serial_event): Don't output "GDBserver
6705 exiting" if GDB is connected through stdio.
6706 * target.c (mywait): Likewise, be silent if GDB is connected
6707 through stdio.
6708
97ad4581
JB
67092013-10-01 Joel Brobecker <brobecker@adacore.com>
6710
6711 * lynx-low.c (lynx_add_threads_after_attach): New function.
6712 (lynx_attach): Remove call to add_thread. Add call to
6713 lynx_add_threads_after_attach instead.
6714
5b4e221c
MF
67152013-09-28 Mike Frysinger <vapier@gentoo.org>
6716
6717 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6718 * config.in, configure: Regenerated.
6719
ee47b2f8
YQ
67202013-09-18 Yao Qi <yao@codesourcery.com>
6721
6722 PR server/15959
6723 * server.c (start_inferior): Clear 'resume_info'.
6724
d6707650 67252013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6726
d6707650
JW
6727 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6728 for each register.
6729
9243dd0e 67302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6731
9243dd0e
JW
6732 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6733 linux-tile-low.o to srv_tgtobj.
6734
c623a6ef
WN
67352013-09-16 Will Newton <will.newton@linaro.org>
6736
6737 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6738 out regs.
6739
fb71d39e
PA
67402013-09-06 Pedro Alves <palves@redhat.com>
6741
6742 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6743 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6744 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6745 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6746 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6747 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6748
8e7e9910
PA
67492013-09-06 Pedro Alves <palves@redhat.com>
6750
6751 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6752 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6753
7c3a12ca
PA
67542013-09-06 Pedro Alves <palves@redhat.com>
6755
6756 * linux-amd64-ipa.c: Include tracepoint.h.
6757 * linux-i386-ipa.c: Include tracepoint.h.
6758
8eb3d7b6
RW
67592013-09-06 Ricard Wanderlof <ricardw@axis.com>
6760
6761 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6762 (ps_get_thread_area): New function.
6763
eddddb9d
RW
67642013-09-06 Ricard Wanderlof <ricardw@axis.com>
6765
6766 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6767 (initialize_low_arch): Call init_registers_crisv32 rather than
6768 init_register_crisv32.
6769
533b0600
PA
67702013-09-05 Pedro Alves <palves@redhat.com>
6771
6772 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6773 to ...
6774 * hostio.h: ... this new file.
6775 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6776 win32-low.c: Include hostio.h.
6777
0ce3d3b5
PA
67782013-09-05 Pedro Alves <palves@redhat.com>
6779
6780 * server.h (gdb_client_data, handler_func, callback_handler_func)
6781 (delete_file_handler, add_file_handler, append_callback_event)
6782 (delete_callback_event, start_event_loop, initialize_event_loop):
6783 Move to event-loop.h and include it.
6784 * event-loop.h: New file.
6785
799cdc37
PA
67862013-09-05 Pedro Alves <palves@redhat.com>
6787
6788 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6789 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6790 (loaded_dll, unloaded_dll): Move to ...
6791 * dll.h: ... this new file.
6792 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6793
6a6bbd9d
PA
67942013-09-05 Pedro Alves <palves@redhat.com>
6795
6796 * server.h (current_process, get_thread_process, all_processes)
6797 (add_inferior_to_list, for_each_inferior, current_inferior)
6798 (remove_inferior, add_process, remove_process, find_process_pid)
6799 (have_started_inferiors_p, have_attached_inferiors_p)
6800 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6801 (clear_inferiors, find_inferior, find_inferior_id)
6802 (inferior_target_data, set_inferior_target_data)
6803 (inferior_regcache_data, set_inferior_regcache_data): Move to
6804 inferiors.h, and include it.
6805 * inferiors.h: New file.
6806
f699aaba
PA
68072013-09-05 Pedro Alves <palves@redhat.com>
6808
6809 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6810 Move ...
72f4393d 6811 * ax.h: ... here.
f699aaba 6812
c144c7a0
PA
68132013-09-05 Pedro Alves <palves@redhat.com>
6814
6815 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6816 tracepoint.h.
6817 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6818 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6819 (handle_tracepoint_general_set, handle_tracepoint_query)
6820 (tracepoint_finished_step, tracepoint_was_hit)
6821 (release_while_stepping_state_list, current_traceframe)
6822 (in_readonly_region, traceframe_read_mem)
6823 (fetch_traceframe_registers, traceframe_read_sdata)
6824 (traceframe_read_info, struct fast_tpoint_collect_status)
6825 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6826 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6827 (supply_fast_tracepoint_registers)
6828 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6829 (ipa_tdesc, claim_trampoline_space)
6830 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6831 (agent_mem_read, agent_get_trace_state_variable_value)
6832 (agent_set_trace_state_variable_value, agent_tsv_read)
6833 (agent_mem_read_string, get_raw_reg_func_addr)
6834 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6835 * tracepoint.h: ... this new file.
6836
ff42e6ab
PA
68372013-09-05 Pedro Alves <palves@redhat.com>
6838
6839 * server.h (perror_with_name, error, fatal, warning, paddress)
6840 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6841 include it.
6842 * utils.h: New file.
6843
541af0f4
PA
68442013-09-05 Pedro Alves <palves@redhat.com>
6845
6846 * server.h (remote_debug, noack_mode, transport_is_reliable)
6847 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6848 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6849 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6850 (write_enn, initialize_async_io, enable_async_io)
6851 (disable_async_io, check_remote_input_interrupt_request)
6852 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6853 (dead_thread_notify, prepare_resume_reply)
6854 (decode_address_to_semicolon, decode_address, decode_m_packet)
6855 (decode_M_packet, decode_X_packet, decode_xfer_write)
6856 (decode_search_memory_packet, unhexify, hexify)
6857 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6858 (look_up_one_symbol, relocate_instruction)
6859 (monitor_output): Move to remote-utils.h, and include it.
6860 * remote-utils.h: New file.
6861
eebdf26b
PA
68622013-09-05 Pedro Alves <palves@redhat.com>
6863
6864 * server.h (_): Delete.
6865
3aafd2ff
PA
68662013-09-02 Pedro Alves <palves@redhat.com>
6867
6868 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6869 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6870 allocated.
6871 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6872
cee83bcb
PM
68732013-09-02 Pierre Muller <muller@sourceware.org>
6874
6875 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6876 or WriteProcessMemory complete successfully and handle
6877 ERROR_PARTIAL_COPY error.
6878
9a13b2fa
PA
68792013-09-02 Pedro Alves <palves@redhat.com>
6880
6881 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6882 error instead of EIO.
6883
602e3198
JK
68842013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6885
6886 PR server/15604
6887 * linux-low.c: Include filestuff.h.
6888 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6889 * lynx-low.c: Include filestuff.h.
6890 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6891 * server.c: Include filestuff.h.
6892 (main): Call notice_open_fds.
6893 * spu-low.c: Include filestuff.h.
6894 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6895
96d7229d
LM
68962013-08-22 Luis Machado <lgustavo@codesourcery.com>
6897
6898 * Makefile.in: Explain why ../target and ../nat are not
6899 listed as include file search paths.
6900 (linux-waitpid.o): New object file rule.
6901 * configure.srv (srv_native_linux_obj): New variable.
6902 Replace all occurrences of linux native object files with
6903 $srv_native_linux_obj.
6904 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6905 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6906 (linux_enable_event_reporting): Remove declaration.
6907 (my_waitpid): Moved to common/linux-waitpid.c.
6908 (linux_wait_for_event): Pass ptid when calling
6909 linux_enable_event_reporting.
6910 (linux_supports_tracefork_flag): Remove.
6911 (linux_enable_event_reporting): Likewise.
6912 (linux_tracefork_grandchild): Remove.
6913 (STACK_SIZE): Moved to common/linux-ptrace.c.
6914 (linux_tracefork_child): Remove.
6915 (linux_test_for_tracefork): Remove.
6916 (linux_look_up_symbols): Call linux_supports_traceclone.
6917 (initialize_low): Remove call to linux_test_for_tracefork.
6918 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6919 common/linux-ptrace.h.
6920 (PTRACE_TYPE_ARG4): Likewise.
6921 Include linux-ptrace.h.
6922
32940073
PA
69232013-08-21 Pedro Alves <palves@redhat.com>
6924
6925 * config.in: Renegerate.
6926
33b60d58 69272013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6928
33b60d58
LM
6929 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6930 (SFILES): Remove $(srcdir)/common/target-common.c and
6931 add $(srcdir)/target/waitstatus.c.
6932 (OBS): Remove target-common.o and add waitstatus.o.
6933 (server_h): Remove $(srcdir)/../common/target-common.h and
6934 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6935 and $(srcdir)/../target/waitstatus.h.
6936 (target-common.o): Remove.
6937 (waitstatus.o): New target object file.
6938 * target.h: Do not include target-common.h and
6939 include target/resume.h, target/wait.h and
6940 target/waitstatus.h.
6941
b8e1b30e
LM
69422013-08-13 Luis Machado <lgustavo@codesourcery.com>
6943
6944 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6945 to PTRACE_TYPE_ARG3.
6946 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6947 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6948 PTRACE_TYPE_ARG4.
6949 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6950 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6951
7a60ad40
YQ
69522013-07-27 Jie Zhang <jie@codesourcery.com>
6953 Daniel Jacobowitz <dan@codesourcery.com>
6954 Yao Qi <yao@codesourcery.com>
6955
6956 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6957 (mips-linux-watch.o): New rule.
6958 (mips_linux_watch_h): New variable.
6959 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6960 srv_tgtobj.
6961 * linux-mips-low.c: Include mips-linux-watch.h.
6962 (struct arch_process_info, struct arch_lwp_info): New.
6963 (update_watch_registers_callback): New function.
6964 (mips_linux_new_process, mips_linux_new_thread) New functions.
6965 (mips_linux_prepare_to_resume, mips_insert_point): New
6966 functions.
6967 (mips_remove_point, mips_stopped_by_watchpoint): New
6968 functions.
6969 (rsp_bp_type_to_target_hw_bp_type): New function.
6970 (mips_stopped_data_address): New function.
6971 (the_low_target): Add watchpoint support functions.
6972
de6f69ad
YQ
69732013-07-27 Yao Qi <yao@codesourcery.com>
6974
6975 * i386-low.c: Include break-common.h.
6976 (enum target_hw_bp_type): Remove.
6977
3360c0bf
LM
69782013-07-24 Luis Machado <lgustavo@codesourcery.com>
6979
6980 * Makefile.in (SFILES): /common/target-common.c.
6981 (OBS): Add target-common.o.
6982 (server_h): Add $(srcdir)/../common/target-common.h.
6983 (target-common.o): New target.
6984 * server.c (queue_stop_reply_callback): Free
6985 status string after use.
6986 * target.c (target_waitstatus_to_string): Remove.
6987 * target.h: Include target-common.h.
6988 (resume_kind): Likewise.
6989 (target_waitkind): Likewise.
6990 (target_waitstatus): Likewise.
6991 (TARGET_WNOHANG): Likewise.
6992
bd885420
YQ
69932013-07-04 Yao Qi <yao@codesourcery.com>
6994
6995 * Makefile.in (host_alias): Use @host_noncanonical@.
6996 (target_alias): Use @target_noncanonical@.
6997 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6998 ACX_NONCANONICAL_HOST.
6999 * configure: Regenerated.
7000
7001 Revert:
7002 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7003
7004 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7005 * configure: Rebuild.
7006 * Makefile.in (version_host, version_target): Get from configure.
7007 (version.c): Use $(version_host) and $(version_target).
7008
17ef446e
PA
70092013-07-03 Pedro Alves <palves@redhat.com>
7010
7011 * Makefile.in (config.status): Depend on development.sh.
7012 * acinclude.m4: Include libmcheck.m4.
7013 * configure: Regenerate.
7014
7a9a7487
MG
70152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7016
7017 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7018 attribute inside the parentheses.
7019 (winapi_DebugSetProcessKillOnExit): Ditto.
7020 (winapi_DebugBreakProcess): Ditto.
7021 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7022
49b64de6
MG
70232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7024
7025 * notif.h (notif_event): Add a dummy member to avoid compiler
7026 errors.
7027
d5749ee7
PA
70282013-07-01 Pedro Alves <palves@redhat.com>
7029
7030 * hostio.c (HOSTIO_PATH_MAX): Define.
7031 (require_filename, handle_open, handle_unlink, handle_readlink):
7032 Use it.
7033
d8d2a3ee
PA
70342013-07-01 Pedro Alves <palves@redhat.com>
7035
7036 * server.h: Include "pathmax.h".
7037 * linux-low.c: Don't include sys/param.h.
7038 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7039 MAXPATHLEN.
7040 * win32-low.c: Don't include sys/param.h.
7041 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7042
bc7dea8d
PA
70432013-07-01 Pedro Alves <palves@redhat.com>
7044
7045 * event-loop.c: Don't check HAVE_UNISTD_H before including
7046 <unistd.h>.
7047 * gdbreplay.c: Likewise.
7048 * remote-utils.c: Likewise.
7049 * server.c: Likewise.
7050 * configure.ac: Don't check for unistd.h.
7051 * configure: Regenerate.
7052
d6c2da54
TT
70532013-06-28 Tom Tromey <tromey@redhat.com>
7054
7055 * Makefile.in (version.c): Use version.in, not
7056 common/version.in.
7057
257b6bec
MG
70582013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7059
7060 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7061 * configure: Rebuild.
7062 * Makefile.in (version_host, version_target): Get from configure.
7063 (version.c): Use $(version_host) and $(version_target).
7064
86ebe149
DK
70652013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7066
7067 Fix trace-status to output user name without trailing colon.
7068 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7069
f30aa5af
DK
70702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7071
7072 Fix trace-status to output proper start-time and stop-time.
7073 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7074 output start time and stop time in hex as gdb expects.
7075
28a93511
YQ
70762013-06-26 Pedro Alves <pedro@codesourcery.com>
7077
7078 * tracepoint.c (build_traceframe_info_xml): Output trace state
7079 variables present in the trace buffer.
7080
01208463
TT
70812013-06-24 Tom Tromey <tromey@redhat.com>
7082
7083 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7084 create-version.sh.
7085 (version.o): Remove.
7086 * gdbreplay.c: Include version.h.
7087 (version, host_name): Don't declare.
7088 * server.h: Include version.h.
7089 (version, host_name): Don't declare.
7090
760256f9
PA
70912013-06-12 Pedro Alves <palves@redhat.com>
7092
7093 * linux-x86-low.c (linux_is_elf64): Delete global.
7094 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7095 with local linux_pid_exe_is_elf_64_file use.
7096
030031ee
PA
70972013-06-11 Pedro Alves <palves@redhat.com>
7098
7099 * linux-low.c (regset_disabled, disable_regset): New functions.
7100 (regsets_fetch_inferior_registers)
7101 (regsets_store_inferior_registers): Use them.
7102 (initialize_regsets_info); Don't allocate the disabled_regsets
7103 array here.
7104 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7105 comment.
7106
5da6eb0a
PA
71072013-06-11 Pedro Alves <palves@redhat.com>
7108
7109 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7110 xmalloc.
7111
7e5aaa09
PA
71122013-06-11 Pedro Alves <palves@redhat.com>
7113
7114 * linux-x86-low.c (initialize_low_arch): Call
7115 init_registers_x32_avx_linux.
7116
d878444c
JK
71172013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7118
7119 Fix compatibility with Android Bionic.
7120 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7121 it is not empty.
7122
3aee8918
PA
71232013-06-07 Pedro Alves <palves@redhat.com>
7124
5f2b57b5 7125 PR server/14823
3aee8918
PA
7126 * Makefile.in (OBS): Add tdesc.o.
7127 (IPA_OBJS): Add tdesc-ipa.o.
7128 (tdesc-ipa.o): New rule.
7129 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7130 interface.
7131 * linux-low.c (new_inferior): Delete.
7132 (disabled_regsets, num_regsets): Delete.
7133 (linux_add_process): Adjust to set the new per-process
7134 new_inferior flag.
7135 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7136 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7137 was a stop. When calling arch_setup, switch the current inferior
7138 to the thread that got an event.
7139 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7140 (regsets_fetch_inferior_registers)
7141 (regsets_store_inferior_registers): New regsets_info parameter.
7142 Adjust to use it.
7143 (linux_register_in_regsets): New regs_info parameter. Adjust to
7144 use it.
7145 (register_addr, fetch_register, store_register): New usrregs_info
7146 parameter. Adjust to use it.
7147 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7148 parameter regs_info. Adjust to use it.
7149 (linux_fetch_registers): Get the current inferior's regs_info, and
7150 adjust to use it.
7151 (linux_store_registers): Ditto.
7152 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7153 (initialize_low): Don't initialize the target_regsets here. Call
7154 initialize_low_arch.
7155 * linux-low.h (target_regsets): Delete declaration.
7156 (struct regsets_info): New.
7157 (struct usrregs_info): New.
7158 (struct regs_info): New.
7159 (struct process_info_private) <new_inferior>: New field.
7160 (struct linux_target_ops): Delete the num_regs, regmap, and
7161 regset_bitmap fields. New field regs_info.
7162 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7163 * i387-fp.c (num_xmm_registers): Delete.
7164 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7165 calls to new interface.
7166 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7167 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7168 Infer the number of xmm registers from the regcache's target
7169 description.
7170 * i387-fp.h (num_xmm_registers): Delete.
7171 * inferiors.c (add_thread): Don't install the thread's regcache
7172 here.
7173 * proc-service.c (gregset_info): Fetch the current inferior's
7174 regs_info. Adjust to use it.
7175 * regcache.c: Include tdesc.h.
7176 (register_bytes, reg_defs, num_registers)
7177 (gdbserver_expedite_regs): Delete.
7178 (get_thread_regcache): If the thread doesn't have a regcache yet,
7179 create one, instead of aborting gdbserver.
7180 (regcache_invalidate_one): Rename to ...
7181 (regcache_invalidate_thread): ... this.
7182 (regcache_invalidate_one): New.
7183 (regcache_invalidate): Only invalidate registers of the current
7184 process.
7185 (init_register_cache): Add target_desc parameter, and use it.
7186 (new_register_cache): Ditto. Assert the target description has a
7187 non zero registers_size.
7188 (regcache_cpy): Add assertions. Adjust.
7189 (realloc_register_cache, set_register_cache): Delete.
7190 (registers_to_string, registers_from_string): Adjust.
7191 (find_register_by_name, find_regno, find_register_by_number)
7192 (register_cache_size): Add target_desc parameter, and use it.
7193 (free_register_cache_thread, free_register_cache_thread_one)
7194 (regcache_release, register_cache_size): New.
7195 (register_size): Add target_desc parameter, and use it.
7196 (register_data, supply_register, supply_register_zeroed)
7197 (supply_regblock, supply_register_by_name, collect_register)
7198 (collect_register_as_string, collect_register_by_name): Adjust.
7199 * regcache.h (struct target_desc): Forward declare.
7200 (struct regcache) <tdesc>: New field.
7201 (init_register_cache, new_register_cache): Add target_desc
7202 parameter.
7203 (regcache_invalidate_thread): Declare.
7204 (regcache_invalidate_one): Delete declaration.
7205 (regcache_release): Declare.
7206 (find_register_by_number, register_cache_size, register_size)
7207 (find_regno): Add target_desc parameter.
7208 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7209 declarations.
7210 * remote-utils.c: Include tdesc.h.
7211 (outreg, prepare_resume_reply): Adjust.
7212 * server.c: Include tdesc.h.
7213 (gdbserver_xmltarget): Delete declaration.
7214 (get_features_xml, process_serial_event): Adjust.
7215 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7216 declare.
7217 (struct process_info) <tdesc>: New field.
7218 (ipa_tdesc): Declare.
7219 * tdesc.c: New file.
7220 * tdesc.h: New file.
7221 * tracepoint.c: Include tdesc.h.
7222 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7223 (get_context_regcache): Adjust to pass ipa_tdesc down.
7224 (do_action_at_tracepoint): Adjust to get the register cache size
7225 from the context regcache's description.
7226 (traceframe_walk_blocks): Adjust to get the register cache size
7227 from the current trace frame's description.
7228 (traceframe_get_pc): Adjust to get current trace frame's
7229 description and pass it down.
7230 (gdb_collect): Adjust to get the register cache size from the
7231 IPA's description.
7232 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7233 (gdbserver_xmltarget): Delete.
7234 (initialize_low_tracepoint): Set the ipa's target description.
7235 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7236 (initialize_low_tracepoint): Set the ipa's target description.
7237 * linux-x86-low.c: Include tdesc.h.
7238 [__x86_64__] (is_64bit_tdesc): New.
7239 (ps_get_thread_area, x86_get_thread_area): Use it.
7240 (i386_cannot_store_register): Rename to ...
7241 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7242 (i386_cannot_fetch_register): Rename to ...
7243 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7244 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7245 to new interface.
7246 (target_regsets): Rename to ...
7247 (x86_regsets): ... this.
7248 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7249 interface.
7250 (x86_siginfo_fixup): Use is_64bit_tdesc.
7251 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7252 (tdesc_x32_avx_linux, tdesc_x32_linux)
7253 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7254 Declare.
7255 (x86_linux_update_xmltarget): Delete.
7256 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7257 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7258 (AMD64_LINUX_USER64_CS): New.
7259 (x86_linux_read_description): New, based on
7260 x86_linux_update_xmltarget.
7261 (same_process_callback): New.
7262 (x86_arch_setup_process_callback): New.
7263 (x86_linux_update_xmltarget): New.
7264 (x86_regsets_info): New.
7265 (amd64_linux_regs_info): New.
7266 (i386_linux_usrregs_info): New.
7267 (i386_linux_regs_info): New.
7268 (x86_linux_regs_info): New.
7269 (x86_arch_setup): Reimplement.
7270 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7271 (x86_emit_ops): Ditto.
7272 (the_low_target): Adjust. Install x86_linux_regs_info,
7273 x86_cannot_fetch_register, and x86_cannot_store_register.
7274 (initialize_low_arch): New.
7275 * linux-ia64-low.c (tdesc_ia64): Declare.
7276 (ia64_fetch_register): Adjust.
7277 (ia64_usrregs_info, regs_info): New globals.
7278 (ia64_regs_info): New function.
7279 (the_low_target): Adjust.
7280 (initialize_low_arch): New function.
7281 * linux-sparc-low.c (tdesc_sparc64): Declare.
7282 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7283 Adjust.
7284 (sparc_arch_setup): New function.
7285 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7286 (the_low_target): Adjust.
7287 (initialize_low_arch): New function.
7288 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7289 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7290 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7291 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7292 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7293 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7294 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7295 (tdesc_powerpc_isa205_vsx64l): Declare.
7296 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7297 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7298 (ppc_set_pc, ppc_get_hwcap): Adjust.
7299 (ppc_usrregs_info): Forward declare.
7300 (!__powerpc64__) ppc_regmap_adjusted: New global.
7301 (ppc_arch_setup): Adjust to the current process'es target
7302 description.
7303 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7304 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7305 (ppc_store_evrregset): Adjust.
7306 (target_regsets): Rename to ...
7307 (ppc_regsets): ... this, and make static.
7308 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7309 (ppc_regs_info): New function.
7310 (the_low_target): Adjust.
7311 (initialize_low_arch): New function.
7312 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7313 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7314 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7315 (tdesc_s390x_linux64v2): Declare.
7316 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7317 (s390_fill_gregset, s390_store_last_break): Adjust.
7318 (target_regsets): Rename to ...
7319 (s390_regsets): ... this, and make static.
7320 (s390_get_pc, s390_set_pc): Adjust.
7321 (s390_get_hwcap): New target_desc parameter, and use it.
7322 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7323 (s390_arch_setup): Adjust to set the current process'es target
7324 description. Don't adjust the regmap.
7325 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7326 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7327 (regs_info_3264): New globals.
7328 (s390_regs_info): New function.
7329 (the_low_target): Adjust.
7330 (initialize_low_arch): New function.
7331 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7332 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7333 [__mips64] (init_registers_mips_linux)
7334 (init_registers_mips_dsp_linux): Delete defines.
7335 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7336 (have_dsp): New global.
7337 (mips_read_description): New, based on mips_arch_setup.
7338 (mips_arch_setup): Reimplement.
7339 (get_usrregs_info): New function.
7340 (mips_cannot_fetch_register, mips_cannot_store_register)
7341 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7342 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7343 (target_regsets): Rename to ...
7344 (mips_regsets): ... this, and make static.
7345 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7346 (dsp_regs_info, regs_info): New globals.
7347 (mips_regs_info): New function.
7348 (the_low_target): Adjust.
7349 (initialize_low_arch): New function.
7350 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7351 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7352 Declare.
7353 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7354 (arm_read_description): New, with bits factored from
7355 arm_arch_setup.
7356 (arm_arch_setup): Reimplement.
7357 (target_regsets): Rename to ...
7358 (arm_regsets): ... this, and make static.
7359 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7360 (arm_regs_info): New function.
7361 (the_low_target): Adjust.
7362 (initialize_low_arch): New function.
7363 * linux-m68k-low.c (tdesc_m68k): Declare.
7364 (target_regsets): Rename to ...
7365 (m68k_regsets): ... this, and make static.
7366 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7367 (m68k_regs_info): New function.
7368 (m68k_arch_setup): New function.
7369 (the_low_target): Adjust.
7370 (initialize_low_arch): New function.
7371 * linux-sh-low.c (tdesc_sharch): Declare.
7372 (target_regsets): Rename to ...
7373 (sh_regsets): ... this, and make static.
7374 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7375 (sh_regs_info, sh_arch_setup): New functions.
7376 (the_low_target): Adjust.
7377 (initialize_low_arch): New function.
7378 * linux-bfin-low.c (tdesc_bfin): Declare.
7379 (bfin_arch_setup): New function.
7380 (bfin_usrregs_info, regs_info): New globals.
7381 (bfin_regs_info): New function.
7382 (the_low_target): Adjust.
7383 (initialize_low_arch): New function.
7384 * linux-cris-low.c (tdesc_cris): Declare.
7385 (cris_arch_setup): New function.
7386 (cris_usrregs_info, regs_info): New globals.
7387 (cris_regs_info): New function.
7388 (the_low_target): Adjust.
7389 (initialize_low_arch): New function.
7390 * linux-cris-low.c (tdesc_crisv32): Declare.
7391 (cris_arch_setup): New function.
7392 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7393 (cris_regs_info): New function.
7394 (the_low_target): Adjust.
7395 (initialize_low_arch): New function.
7396 * linux-m32r-low.c (tdesc_m32r): Declare.
7397 (m32r_arch_setup): New function.
7398 (m32r_usrregs_info, regs_info): New globals.
7399 (m32r_regs_info): Adjust.
7400 (initialize_low_arch): New function.
7401 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7402 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7403 (tic6x_usrregs_info): Forward declare.
7404 (tic6x_read_description): New function, based on ...
7405 (tic6x_arch_setup): ... this. Reimplement.
7406 (target_regsets): Rename to ...
7407 (tic6x_regsets): ... this, and make static.
7408 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7409 (tic6x_regs_info): New function.
7410 (the_low_target): Adjust.
7411 (initialize_low_arch): New function.
7412 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7413 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7414 (target_regsets): Rename to ...
7415 (xtensa_regsets): ... this, and make static.
7416 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7417 globals.
7418 (xtensa_arch_setup, xtensa_regs_info): New functions.
7419 (the_low_target): Adjust.
7420 (initialize_low_arch): New function.
7421 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7422 (nios2_arch_setup): Set the current process'es tdesc.
7423 (target_regsets): Rename to ...
7424 (nios2_regsets): ... this.
7425 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7426 (nios2_regs_info): New function.
7427 (the_low_target): Adjust.
7428 (initialize_low_arch): New function.
a261b8f5
PA
7429 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7430 (aarch64_arch_setup): Set the current process'es tdesc.
7431 (target_regsets): Rename to ...
7432 (aarch64_regsets): ... this.
7433 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7434 (aarch64_regs_info): New function.
7435 (the_low_target): Adjust.
7436 (initialize_low_arch): New function.
3aee8918
PA
7437 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7438 globals.
7439 (target_regsets): Rename to ...
7440 (tile_regsets): ... this.
7441 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7442 (tile_regs_info): New function.
7443 (tile_arch_setup): Set the current process'es tdesc.
7444 (the_low_target): Adjust.
7445 (initialize_low_arch): New function.
7446 * spu-low.c (tdesc_spu): Declare.
7447 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7448 * win32-arm-low.c (tdesc_arm): Declare.
7449 (arm_arch_setup): New function.
7450 (the_low_target): Install arm_arch_setup instead of
7451 init_registers_arm.
7452 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7453 (init_windows_x86): Rename to ...
7454 (i386_arch_setup): ... this. Set `win32_tdesc'.
7455 (the_low_target): Adjust.
7456 * win32-low.c (win32_tdesc): New global.
7457 (child_add_thread): Don't create the thread cache here.
7458 (do_initial_child_stuff): Set the new process'es tdesc.
7459 * win32-low.h (struct target_desc): Forward declare.
7460 (win32_tdesc): Declare.
7461 * lynx-i386-low.c (tdesc_i386): Declare global.
7462 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7463 * lynx-low.c (lynx_tdesc): New global.
7464 (lynx_add_process): Set the new process'es tdesc.
7465 * lynx-low.h (struct target_desc): Forward declare.
7466 (lynx_tdesc): Declare global.
7467 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7468 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7469 * nto-low.c (nto_tdesc): New global.
7470 (do_attach): Set the new process'es tdesc.
7471 * nto-low.h (struct target_desc): Forward declare.
7472 (nto_tdesc): Declare.
7473 * nto-x86-low.c (tdesc_i386): Declare.
7474 (nto_x86_arch_setup): Set `nto_tdesc'.
7475
b1fbec62
GB
74762013-06-04 Gary Benson <gbenson@redhat.com>
7477
7478 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7479 to qSupported response when appropriate.
7480 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7481 with nonzero-length annex.
7482 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7483 arguments supplied in annex.
7484
d1ec4ce7
DE
74852013-05-31 Doug Evans <dje@google.com>
7486
ac44adcb 7487 PR server/15594
d1ec4ce7
DE
7488 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7489 64 bits in 64-cross-32 environment.
7490
9b25f2d3
PA
74912013-05-28 Pedro Alves <palves@redhat.com>
7492
7493 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7494 (aarch64-without-fpu.c): Delete rule.
7495 * configure.srv (aarch64*-*-linux*): Remove references to
7496 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7497 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7498 declaration.
7499
6740dc9c
PA
75002013-05-24 Pedro Alves <palves@redhat.com>
7501
7502 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7503 instead of strchr/decode_address. Error if the range isn't split
7504 with a ','. Don't assume there's be a ':' in the action.
7505
c2d6af84
PA
75062013-05-23 Yao Qi <yao@codesourcery.com>
7507 Pedro Alves <palves@redhat.com>
7508
7509 * linux-low.c (lwp_in_step_range): New function.
7510 (linux_wait_1): If the thread was range stepping and stopped
7511 outside the stepping range, report the stop to GDB. Otherwise,
7512 continue stepping. Add range stepping debug output.
7513 (linux_set_resume_request): Copy the step range from the resume
7514 request to the lwp.
7515 (linux_supports_range_stepping): New.
7516 (linux_target_ops) <supports_range_stepping>: Set to
7517 linux_supports_range_stepping.
7518 * linux-low.h (struct linux_target_ops)
7519 <supports_range_stepping>: New field.
7520 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7521 * linux-x86-low.c (x86_supports_range_stepping): New.
7522 (the_low_target) <supports_range_stepping>: Set to
7523 x86_supports_range_stepping.
7524 * server.c (handle_v_cont): Handle 'r' action.
7525 (handle_v_requests): Append ";r" if the target supports range
7526 stepping.
7527 * target.h (struct thread_resume) <step_range_start,
7528 step_range_end>: New fields.
7529 (struct target_ops) <supports_range_stepping>:
7530 New field.
7531 (target_supports_range_stepping): New macro.
7532
58794e1a
JB
75332013-05-17 Joel Brobecker <brobecker@adacore.com>
7534
7535 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7536 confusion in comment.
7537
d631c5a7
JB
75382013-05-17 Joel Brobecker <brobecker@adacore.com>
7539
7540 * lynx-low.c (struct process_info_private): New type.
7541 (lynx_add_process): New function.
7542 (lynx_create_inferior, lynx_attach): Replace calls to
7543 add_process by calls to lynx_add_process.
7544 (lynx_resume): If PTID is null, then try using
7545 current_process()->private->last_wait_event_ptid.
7546 Add comments.
7547 (lynx_clear_inferiors): Delete. The contents of that function
7548 has been inlined in lynx_mourn;
7549 (lynx_wait_1): Save the ptid in the process's private data.
7550 (lynx_mourn): Free the process' private data. Replace call
7551 to lynx_clear_inferiors by call to clear_inferiors.
7552
96f7a20f
YQ
75532013-05-17 Yao Qi <yao@codesourcery.com>
7554
7555 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7556 the right place.
7557
db0dfaa0
LM
75582013-05-16 Luis Machado <lgustavo@codesourcery.com>
7559
7560 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7561 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7562 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7563 PT_TEXT_END_ADDR guards. Update comments.
7564 (linux_target_op) <read_offsets>: Conditionally define to
7565 linux_read_offsets if the target is UCLIBC and if it defines
7566 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7567
68f5f838
SL
75682013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7569 Andrew Jenner <andrew@codesourcery.com>
7570
7571 * Makefile.in (SFILES): Add linux-nios2-low.c.
7572 (clean): Add action to delete nios2-linux.c.
7573 (nios2-linux.c): New rule.
7574 * configure.srv: Add nios2*-*-linux*.
7575 * linux-nios2-low.c: New.
7576
1ebff1fd
HAQ
75772013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7578
7579 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7580
f6150862
HZ
75812013-04-25 Hui Zhu <hui@codesourcery.com>
7582
7583 PR gdb/15186
f6150862
HZ
7584 * ax.c (ax_printf): Add fflush.
7585
614c279d
TT
75862013-04-22 Tom Tromey <tromey@redhat.com>
7587
7588 * Makefile.in (SFILES): Add filestuff.c.
7589 (OBS): Add filestuff.o.
7590 (filestuff.o): New target.
7591 * config.in, configure: Rebuild.
7592 * configure.ac: Check for fdwalk, pipe2.
7593
7d4e5717
PA
75942013-04-17 Pedro Alves <palves@redhat.com>
7595
7596 * configure.ac (USE_THREAD_DB): Delete variable.
7597 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7598 Don't AC_SUBST USE_THREAD_DB.
7599 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7600 * config.in, configure: Regenerate.
7601
d5c93e41
PA
76022013-04-16 Pedro Alves <palves@redhat.com>
7603
7604 * linux-low.h (struct lwp_info) <thread_known>: Move under
7605 the USE_THREAD_DB #ifdef.
7606
04f5fe89
PA
76072013-04-16 Pedro Alves <palves@redhat.com>
7608
7609 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7610 (linux-low.o): Delete rule.
7611 * linux-low.h: Always include "gdb_thread_db.h" instead of
7612 conditionally including thread_db.h.
7613 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7614 HAVE_THREAD_DB_H.
7615
480b27bf
JK
76162013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7617
7618 * Makefile.in (install-only): Fix make install regression.
7619
43662968
JK
76202013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7621
7622 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7623 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7624 installation.
7625 * gdbserver.1: Remove.
7626
3e74e146
PA
76272013-03-22 Pedro Alves <palves@redhat.com>
7628
7629 * linux-low.c (handle_extended_wait): Don't call
7630 linux_enable_event_reporting.
7631
a8347a2a
TT
76322013-03-15 Tony Theodore <tonyt@logyst.com>
7633
7634 PR build/9098:
7635 * Makefile.in (SHELL): Use @SHELL@.
7636
eeb56fa7
SDJ
76372013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7638
7639 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7640 compiler warning.
7641
4fa7e2ff
JB
76422013-03-13 Joel Brobecker <brobecker@adacore.com>
7643
7644 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7645 Remove extraneous NULL element.
7646
8ddb1965
YQ
76472013-03-13 Yao Qi <yao@codesourcery.com>
7648
7649 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7650 'V' block in trace frame.
7651
9accd112
MM
76522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7653
7654 * target.h (struct target_ops): Add btrace ops.
7655 (target_supports_btrace): New macro.
7656 (target_enable_btrace): New macro.
7657 (target_disable_btrace): New macro.
7658 (target_read_btrace): New macro.
7659 * gdbthread.h (struct thread_info): Add btrace field.
7660 * server.c: Include btrace-common.h.
7661 (handle_btrace_general_set): New function.
7662 (handle_btrace_enable): New function.
7663 (handle_btrace_disable): New function.
7664 (handle_general_set): Call handle_btrace_general_set.
7665 (handle_qxfer_btrace): New function.
7666 (struct qxfer qxfer_packets[]): Add btrace entry.
7667 * inferiors.c (remove_thread): Disable btrace.
7668 * linux-low: Include linux-btrace.h.
7669 (linux_low_enable_btrace): New function.
7670 (linux_low_read_btrace): New function.
7671 (linux_target_ops): Add btrace ops.
7672 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7673 Add srv_linux_btrace=yes.
7674 (x86_64-*-linux*): Add linux-btrace.o.
7675 Add srv_linux_btrace=yes.
7676 * configure.ac: Define HAVE_LINUX_BTRACE.
7677 * config.in: Regenerated.
7678 * configure: Regenerated.
7679
5cc22e4c
MM
76802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7681
7682 * server.c (handle_qxfer): Preserve error message if -3 is
7683 returned.
7684 (qxfer): Document the -3 return value.
7685
7c97f91e
MM
76862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7687
7688 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7689 (linux_btrace_h): New variable.
7690 (linux-btrace.o): New rule.
7691
be9a119c 76922013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7693 Hafiz Abid Qadeer <abidh@codesourcery.com>
7694
7695 * tracepoint.c (trace_buffer_size): New global.
7696 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7697 (init_trace_buffer): Change to one-argument function. Allocate
7698 trace buffer memory.
7699 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7700 handle QTBuffer:size packet.
7701 (cmd_bigqtbuffer_size): New function.
7702 (initialize_tracepoint): Call init_trace_buffer with
7703 DEFAULT_TRACE_BUFFER_SIZE.
7704 * server.c (handle_query): Add QTBuffer:size in the
7705 supported packets.
7706
e64f7499
YQ
77072013-03-07 Yao Qi <yao@codesourcery.com>
7708
7709 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7710 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7711 of -1.
7712 (cmd_qtsp): Adjust condition. Do post increment.
7713 Set cur_action and cur_step_action back to 0.
7714
f0ae6fc3
PA
77152013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7716
7717 PR server/15236
7718 * linux-low.c (linux_write_memory): Return early success if LEN is
7719 zero.
7720
b5b0b0af
CV
77212013-03-05 Corinna Vinschen <vinschen@redhat.de>
7722
334ad4a8 7723 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7724
589bc927
TT
77252013-02-28 Tom Tromey <tromey@redhat.com>
7726
7727 * configure.ac: Invoke AC_SYS_LARGEFILE.
7728 * configure, config.in: Rebuild.
7729
dfe07582
CV
77302013-02-28 Corinna Vinschen <vinschen@redhat.com>
7731
7732 * win32-low.c: Throughout, fix format strings and casts of
7733 printf-like functions to avoid type related warnings on all
7734 platforms.
7735 (get_child_debug_event): Print dwDebugEventCode as hex since
7736 that's how it's usually documented.
7737
736cd585
YQ
77382013-02-28 Yao Qi <yao@codesourcery.com>
7739
7740 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7741 pulongest.
7742
e1f58301
JW
77432013-02-27 Jiong Wang <jiwang@tilera.com>
7744
7745 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7746 (reg-tilegx32.c): New rule.
7747 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7748 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7749 different register info initializer according to elf class.
7750 (init_registers_tilgx32): New function. The tilegx32 register info
7751 initializer.
7752 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7753 (tile_store_gregset): Likewise.
7754
d171ca78
YQ
77552013-02-27 Yao Qi <yao@codesourcery.com>
7756
7757 * server.c (process_point_options): Print debug message when
7758 debug_threads is true.
7759
282bbdf3
YQ
77602013-02-26 Yao Qi <yao@codesourcery.com>
7761
7762 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7763
aca22551
PA
77642013-02-19 Pedro Alves <palves@redhat.com>
7765 Kai Tietz <ktietz@redhat.com>
7766
7767 PR gdb/15161
7768
7769 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7770 instead of strtoul to extract address from packet.
7771 (process_serial_event) <'z'>: Likewise.
7772
4f3cee1c
YQ
77732013-02-18 Yao Qi <yao@codesourcery.com>
7774
7775 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7776
8e1d55a3
PA
77772013-02-14 Pedro Alves <palves@redhat.com>
7778
7779 Plug memory leak.
7780
7781 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7782 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7783
458820da
PA
77842013-02-14 Pedro Alves <palves@redhat.com>
7785
7786 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7787
baea0dae
PA
77882013-02-14 Pedro Alves <palves@redhat.com>
7789
7790 * tracepoint.c (save_string): Delete.
7791 (add_tracepoint_action): Use savestring instead of save_string.
7792
0b1afbb3
PA
77932013-02-12 Pedro Alves <palves@redhat.com>
7794
7795 * linux-xtensa-low.c: Ditto.
7796 * xtensa-xtregs.c: Ditto.
7797
8a4ac37e
PA
77982013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7799
7800 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7801 thread_db.
7802
148de6bb
MS
78032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7804
7805 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7806 aarch64_num_wp_regs and aarch64_num_bp_regs to
7807 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7808
55fac6e0
MS
78092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7810
7811 * linux-aarch64-low.c (ps_get_thread_area): Replace
7812 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7813
176eb98c
MS
78142013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7815 Marcus Shawcroft <marcus.shawcroft@arm.com>
7816 Nigel Stephens <nigel.stephens@arm.com>
7817 Yufeng Zhang <yufeng.zhang@arm.com>
7818
7819 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7820 (aarch64.c, aarch64-without-fpu.c): New targets.
7821 * configure.srv (aarch64*-*-linux*): New.
7822 * linux-aarch64-low.c: New file.
7823
56f7af9c
MS
78242013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7825
43aaf8b6 7826 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7827 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7828 (dequeue_one_deferred_signal, linux_resume_one_thread)
7829 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7830 (linux_tracefork_grandchild, linux_test_for_tracefork)
7831 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7832 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7833 where the argument is 0.
7834
60f662b0
YQ
78352013-01-25 Yao Qi <yao@codesourcery.com>
7836
7837 * event-loop.c: Include "queue.h".
7838 (gdb_event_p): New typedef.
7839 (struct gdb_event) <next_event>: Remove.
7840 (event_queue): Change to QUEUE(gdb_event_p).
7841 (async_queue_event): Remove.
7842 (gdb_event_xfree): New.
7843 (initialize_event_loop): New.
7844 (process_event): Use API from QUEUE.
7845 (wait_for_event): Likewise.
7846 * server.c (main): Call initialize_event_loop.
7847 * server.h (initialize_event_loop): Declare.
7848
5ae4861a
YQ
78492013-01-18 Yao Qi <yao@codesourcery.com>
7850
7851 * ax.h (struct eval_agent_expr_context): New.
7852 (gdb_eval_agent_expr): Update declaration.
7853 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7854 TFRAME. Add new argument CTX.
7855 * server.h (struct eval_agent_expr_context): Declare.
7856 (agent_mem_read, agent_tsv_read): Update declaration.
7857 (agent_mem_read_string): Likewise.
7858 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7859 (add_traceframe_block): Add new argument TPOINT.
7860 Increase TPOINT->traceframe_usage.
7861 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7862 eval_tracepoint_agent_expr.
7863 (condition_true_at_tracepoint): Likewise.
7864 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7865 (agent_mem_read_string, agent_tsv_read): Likewise.
7866
85e00e85
YQ
78672013-01-16 Yao Qi <yao@codesourcery.com>
7868
7869 * linux-low.c (linux_resume_one_lwp): Don't check
7870 'lwp->bp_reinsert != 0'.
7871
4039cf45
JB
78722013-01-07 Joel Brobecker <brobecker@adacore.com>
7873 Pedro Alves <palves@redhat.com>
7874
7875 * lynx-low.c (ptrace_request_to_str): Define a temporary
7876 macro and use it to simplify this function's implementation.
7877
9044dee2
JB
78782013-01-07 Joel Brobecker <brobecker@adacore.com>
7879
7880 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7881 sets errno.
7882
e6352c8f
JB
78832013-01-07 Joel Brobecker <brobecker@adacore.com>
7884
7885 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7886
50681a27
JB
78872013-01-07 Joel Brobecker <brobecker@adacore.com>
7888
7889 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7890
3f6e77ef
JB
78912013-01-07 Joel Brobecker <brobecker@adacore.com>
7892
7893 * lynx-low.c (lynx_resume): Use the resume_info parameter
7894 to determine the ptid for the lynx_ptrace call, unless
7895 it is equal to minus_one_ptid, in which case we use the
7896 ptid of the current_inferior.
7897 (lynx_wait_1): After having received a thread create/exit
7898 event, resume the inferior's execution using the signaling
7899 thread's ptid, rather than the old ptid.
7900
7fda33ae
JB
79012013-01-07 Joel Brobecker <brobecker@adacore.com>
7902
7903 * lynx-low.c (lynx_resume): Delete variable ret.
7904
b9786c74
JB
79052013-01-01 Joel Brobecker <brobecker@adacore.com>
7906
7907 * gdbreplay.c (gdbreplay_version): Update copyright year.
7908 * server.c (gdbserver_version): Likewise.
7909
8b93d60f
JB
79102012-12-17 Joel Brobecker <brobecker@adacore.com>
7911
7912 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7913 new thread.
7914
037335a7
JB
79152012-12-17 Joel Brobecker <brobecker@adacore.com>
7916
7917 * lynx-low.c (ptrace_request_to_str): Add handling for
7918 PTRACE_GETTRACESIG.
7919
52d4cbd8
JB
79202012-12-17 Joel Brobecker <brobecker@adacore.com>
7921
7922 * lynx-low.c (lynx_attach): Delete variable new_process.
7923
ab8f6ca9
JB
79242012-12-17 Joel Brobecker <brobecker@adacore.com>
7925
7926 * lynx-low.c (lynx_create_inferior): Delete variable
7927 new_process.
7928
78cbc024
JB
79292012-12-17 Joel Brobecker <brobecker@adacore.com>
7930
7931 * lynx-low.c (ptrace_request_to_str): Do not handle
7932 PTRACE_GETTHREADLIST if this macro does not exist.
7933
14a00470
YQ
79342012-12-15 Yao Qi <yao@codesourcery.com>
7935
7936 * Makefile.in (OBS): Add notif.o.
7937 * notif.c, notif.h: New.
7938 * server.c: Include "notif.h".
7939 (struct vstop_notif) <next>: Remove.
7940 <base>: New field.
7941 (queue_stop_reply): Update.
7942 (push_event, send_next_stop_reply): Remove.
7943 (discard_queued_stop_replies): Update.
7944 (notif_stop): New variable.
7945 (handle_v_stopped): Remove.
7946 (handle_v_requests): Don't call handle_v_stopped. Call
7947 handle_ack_notif instead.
7948 (queue_stop_reply_callback): Call notif_event_enque instead
7949 of queue_stop_reply.
7950 (handle_status): Don't call send_next_stop_reply, call
7951 notif_write_event instead.
7952 (kill_inferior_callback): Likewise.
7953 (detach_or_kill_inferior_callback): Likewise.
7954 (main): Call initialize_notif.
7955 (process_serial_event): Call QUEUE_is_empty.
7956 (handle_target_event): Call notif_push instead of push event.
7957 * server.h (push_event): Remove declaration.
7958
61c125b9
TT
79592012-12-10 Tom Tromey <tromey@redhat.com>
7960
7961 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7962 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7963 macros.
7964 (.c.o): Rewrite.
7965 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7966 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7967 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7968 (amd64-linux-ipa.o, ax.o): Rewrite.
7969 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7970 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7971 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7972 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7973 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7974 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7975 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7976 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7977 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7978 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7979 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7980 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7981 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7982 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7983 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7984 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7985 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7986 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7987 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7988 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7989 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7990 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7991 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7992 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7993 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7994 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7995 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7996 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7997 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7998 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7999 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8000 (reg-tilegx.o): Remove.
8001 (all_object_files): New macro.
8002 Include .deps files.
8003 * aclocal.m4, configure: Rebuild.
8004 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8005 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8006 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8007
e90e9ad9
TT
80082012-12-05 Tom Tromey <tromey@redhat.com>
8009
8010 PR gdb/14917:
8011 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8012
02d403bf 80132012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8014
8015 * configure.ac: Check for linux/perf_event.h.
8016 * config.in: Regenerated.
8017 * configure: Regenerated.
8018
0270a750
PA
80192012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8020
8021 * hostio.c (handle_readlink): Decrease buffer size
8022 parameter passed to readlink by one byte.
8023
8c29b58e
YQ
80242012-11-26 Yao Qi <yao@codesourcery.com>
8025
8026 * configure.ac (build_warnings): Append '-Wempty-body'.
8027 * configure: Regenerated.
8028 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8029 body.
8030
8bdce1ff
PM
80312012-11-15 Pierre Muller <muller@sourceware.org>
8032
8033 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8034 * config.in: Regenerate.
8035 * configure: Regenerate.
8036 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8037 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8038 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8039 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8040 header.
8041 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8042 instead of <sys/wait.h> header.
8043 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8044
02d403bf 80452012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8046
8047 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8048 (various make rules): Remove -DGDBSERVER
8049
fbd5db48
YQ
80502012-11-09 Yao Qi <yao@codesourcery.com>
8051
8052 * spu-low.c (current_ptid): Move it to ..
8053 * gdbthread.h: ... here. New.
8054 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8055 * server.c (myresume, process_serial_event): Likewise.
8056 * thread-db.c (thread_db_find_new_threads): Likewise.
8057 * tracepoint.c (run_inferior_command): Likewise.
8058
b3dc46ff
AB
80592012-10-01 Andrew Burgess <aburgess@broadcom.com>
8060
8061 * server.c (handle_search_memory_1): Include access length in
8062 warning message.
8063
07c04788
HPN
80642012-09-05 Michael Brandt <michael.brandt@axis.com>
8065
8066 * linux-crisv32-low.c: Fix compile errors.
8067
918d227b
YQ
80682012-09-04 Yao Qi <yao@codesourcery.com>
8069
8070 * tracepoint.c (cmd_qtsv): Adjust debug message.
8071 Don't check CUR_TPOINT.
8072
18c1b81a
YQ
80732012-08-28 Yao Qi <yao@codesourcery.com>
8074
8075 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8076 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8077 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8078 Remove declarations of xmalloc, xreallloc, xstrdup and
8079 freeargv.
8080 * Makefile.in (libiberty_h): New.
8081 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8082 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8083
dc82f37b
YQ
80842012-08-23 Yao Qi <yao@codesourcery.com>
8085
8086 * server.h: Remove declaration of 'xsnprintf'.
8087
406b1477
KS
80882012-08-22 Keith Seitz <keiths@redhat.com>
8089
8090 * server.h: Include build-gnulib-gbserver/config.h.
8091 * gdbreplay.c: Likewise.
8092
e6712ff1
DE
80932012-08-08 Doug Evans <dje@google.com>
8094
8095 * Makefile.in (SFILES): Add gdb_vecs.c.
8096 (OBS): Add gdb_vecs.o.
8097 (gdb_vecs_h, host_defs_h): New variables.
8098 (thread-db.o): Add $(gdb_vecs_h) dependency.
8099 (gdb_vecs.o): New rule.
8100 * thread-db.c: #include "gdb_vecs.h".
8101 (thread_db_load_search): Use a vector to iterate over path elements.
8102 Handle text appearing after "$pdir".
8103
8104 * configure.ac: Add check for strstr.
8105 * config.in: Regenerate.
8106 * configure: Regenerate.
8107
7c3270ae
UW
81082012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8109
8110 * hostio.c (handle_pread): If pread fails, fall back to attempting
8111 lseek/read.
8112 (handle_pwrite): Likewise for pwrite.
8113
b62e2b27
UW
81142012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8115
8116 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8117 between unsupported TYPE and unimplementable ADDR/LEN combination.
8118 (arm_insert_point): Act on new return value.
8119
78a99e91
PA
81202012-07-31 Pedro Alves <palves@redhat.com>
8121
8122 * server.c (process_point_options): Only skip tokens if we find
8123 one that is unrecognized. Don't treat 'X' specially while
8124 skipping unrecognized tokens.
8125
fcf303ab
UW
81262012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8127
8128 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8129 to 4-byte-align HW breakpoint addresses for Thumb.
8130
7255706c
YQ
81312012-07-27 Yao Qi <yao@codesourcery.com>
8132
8133 PR remote/14161.
8134
8135 * server.h: Declare gdb_agent_about_to_close.
8136 * target.c (kill_inferior): Include "agent.h".
8137 New. Send command 'kill'.
8138 * target.h (kill_inferior): Removed macro.
8139 * tracepoint.c (gdb_agent_about_to_close): New.
8140 (gdb_agent_helper_thread): Handle command 'close'.
8141 Wait endlessly until the inferior stops.
8142 Install gdb_agent_remove_socket to atexit hook.
8143 (agent_socket_name): New static variable.
8144 (gdb_agent_socket_init): Replace local variable 'name' with
8145 'agent_socket_name'.
8146 (gdb_agent_remove_socket): New.
8147
5a3f286f
YQ
81482012-07-27 Yao Qi <yao@codesourcery.com>
8149
8150 * server.c (process_point_options): Stop at 'X' when parsing.
8151
961bd387
ME
81522012-07-19 Michael Eager <eager@eagercon.com>
8153
a261b8f5 8154 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8155 to hw_execute.
8156 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8157 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8158 hardware breakpoint.
8159
aa7c7447
JK
81602012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8161
8162 * gdbserver/linux-low.c (initialize_low): Call
8163 linux_ptrace_init_warnings.
8164
7f216e7c
DE
81652012-07-02 Doug Evans <dje@google.com>
8166
8167 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8168 pointer to int.
8169
d3ce09f5
SS
81702012-07-02 Stan Shebs <stan@codesourcery.com>
8171
8172 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8173 (ax.o): Add it to build rule.
8174 (ax-ipa.o): Ditto.
8175 (OBS): Add format.o.
8176 (IPA_OBS): Add format.o.
8177 * server.c (handle_query): Claim support for breakpoint commands.
8178 (process_point_options): Add command case.
8179 (process_serial_event): Leave running if there are printfs in
8180 effect.
8181 * mem-break.h (any_persistent_commands): Declare.
8182 (add_breakpoint_commands): Declare.
8183 (gdb_no_commands_at_breakpoint): Declare.
8184 (run_breakpoint_commands): Declare.
8185 * mem-break.c (struct point_command_list): New struct.
8186 (struct breakpoint): New field command_list.
8187 (any_persistent_commands): New function.
8188 (add_commands_to_breakpoint): New function.
8189 (add_breakpoint_commands): New function.
8190 (gdb_no_commands_at_breakpoint): New function.
8191 (run_breakpoint_commands): New function.
8192 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8193 locally.
8194 * ax.c: Include format.h.
8195 (ax_printf): New function.
8196 (gdb_eval_agent_expr): Add printf opcode.
8197
2f8f6aed
YQ
81982012-06-13 Yao Qi <yao@codesourcery.com>
8199
8200 * server.c (start_inferior): Remove duplicated writes to fields
8201 'last_resume_kind' and 'last_status' of 'current_inferior'.
8202
0c9070b3
YQ
82032012-06-12 Yao Qi <yao@codesourcery.com>
8204 Pedro Alves <palves@redhat.com>
8205
8206 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8207 comment.
8208 * server.c (handle_v_cont): Extend comment.
8209
c52daf70
YQ
82102012-06-11 Yao Qi <yao@codesourcery.com>
8211
8212 * linux-low.c (linux_attach): Add 'static'.
8213
d38bbb0a
YQ
82142012-06-06 Yao Qi <yao@codesourcery.com>
8215
8216 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8217
89dc0afd
JK
82182012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8219
8220 Fix gcc -flto compilation warning.
8221 * server.c (main): Make variable multi_mode and attach volatile.
8222
75f62ce7
TJB
82232012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8224
8225 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8226 if the platform doesn't know about it.
8227
65f479b6
PA
82282012-05-30 Jeff Kenton <jkenton@tilera.com>
8229
8230 * Makefile.in (SFILES): Add linux-tile-low.c.
8231 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8232 * configure.srv: Handle tilegx-*-linux*.
8233 * linux-tile-low.c: New file.
8234
0c5bf5a9
JK
82352012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8236
8237 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8238
a493e3e2
PA
82392012-05-24 Pedro Alves <palves@redhat.com>
8240
8241 PR gdb/7205
8242
43aaf8b6 8243 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8244
2ea28649
PA
82452012-05-24 Pedro Alves <palves@redhat.com>
8246
8247 PR gdb/7205
8248
8249 Replace target_signal with gdb_signal throughout.
8250
8d409d16
MR
82512012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8252
8253 * linux-low.c (linux_store_registers): Avoid the copying sequence
8254 when no data has been retrieved by ptrace.
8255
23512c01
MGD
82562012-05-22 Will Deacon <will.deacon@arm.com>
8257
8258 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8259 Include asm/ptrace.h.
8260 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8261 already defined.
8262
4934b29e
MR
82632012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8264
8265 * linux-low.c (linux_store_registers): Don't re-retrieve data
8266 with ptrace that has already been obtained from /proc. Always
8267 copy any data retrieved with ptrace to the buffer supplied.
8268
bde24c0a
PA
82692012-05-11 Yao Qi <yao@codesourcery.com>
8270 Pedro Alves <palves@redhat.com>
8271
8272 * linux-low.c (enum stopping_threads_kind): New.
8273 (stopping_threads): Change type to `enum stopping_threads_kind'.
8274 (handle_extended_wait): If stopping and suspending threads, leave
8275 the new_lwp suspended too.
8276 (linux_wait_for_event): Adjust.
8277 (stop_all_lwps): Set `stopping_threads' to
8278 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8279 whether we're suspending threads or just stopping them. Assert no
8280 recursion happens.
8281
623b6bdf
YQ
82822012-04-29 Yao Qi <yao@codesourcery.com>
8283
8284 * server.h: Move some code to ...
8285 * gdbthread.h: ... here. New.
8286 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8287 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8288 (nto-low.o, win32-low.o): Likewise.
8289 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8290 * regcache.c, remote-utils.c, server.c: Likewise.
8291 * target.c, tracepoint.c, win32-low.c: Likewise.
8292
f15f9948
TJB
82932012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8294
8295 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8296 (PTRACE_ARG4_TYPE): Likewise.
8297 (PTRACE_XFER_TYPE): Likewise.
8298 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8299 ptrace to PTRACE_ARG3_TYPE.
8300 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8301 (PTRACE_ARG4_TYPE): Likewise.
8302 (PTRACE_XFER_TYPE): Likewise.
8303 (linux_detach_one_lwp): Cast fourth argument of
8304 ptrace to long then PTRACE_ARG4_TYPE.
8305 (regsets_fetch_inferior_registers): Cast third argument of
8306 ptrace to long then PTRACE_ARG3_TYPE.
8307 (regsets_store_inferior_registers): Likewise.
8308
38ea300a
PA
83092012-04-20 Pedro Alves <palves@redhat.com>
8310
8311 * configure: Regenerate.
8312
c971b7fa
PA
83132012-04-19 Pedro Alves <palves@redhat.com>
8314
43aaf8b6 8315 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8316 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8317 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8318 (all, install-only, uninstall, clean-info, all-lib, clean): No
8319 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8320 (maintainer-clean realclean distclean): Use subdir_do.
8321 (subdir_do): New.
8322 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8323 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8324 * acinclude.m4: Include acx_configure_dir.m4.
8325 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8326 calls. Call AC_PROG_RANLIB. Configure gnulib using
8327 ACX_CONFIGURE_DIR.
8328 (GNULIB): New.
8329 (GNULIB_STDINT_H): Adjust.
8330 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8331 * gdbreplay.c: Include build-gnulib/config.h.
8332 * server.h: Likewise.
8333 * aclocal.m4: Regenerate.
8334 * config.in: Regenerate.
8335 * configure: Regenerate.
c971b7fa 8336
809277f8
PA
83372012-04-19 Pedro Alves <palves@redhat.com>
8338
8339 * Makefile.in (LIBGNU, INCGNU): Adjust.
8340 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8341 (all, install-only, uninstall, clean-info, all-lib, clean)
8342 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8343 * configure.ac: Adjust AC_OUTPUT output.
8344 * aclocal.m4: Regenerate.
8345 * configure: Regenerate.
8346
fd9bb8b8
PA
83472012-04-19 Pedro Alves <palves@redhat.com>
8348
8349 * Makefile.in (generated_files): New.
8350 (server_h): Remove the explicit dependency on config.h, and depend
8351 on $generated_files.
8352
1c298c66
PA
83532012-04-19 Pedro Alves <palves@redhat.com>
8354
8355 * Makefile.in (INCGNU): Add -Ignulib.
8356
57c4b50b
PA
83572012-04-19 Pedro Alves <palves@redhat.com>
8358
8359 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8360 (INCGNU): ... this, and spell out -I here.
8361 (GNULIB_LIB): Rename to ...
8362 (LIBGNU): ... this.
8363 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8364
1030e047
PA
83652012-04-19 Pedro Alves <palves@redhat.com>
8366
8367 * config.in: Regenerate.
8368
447d4319
PA
83692012-04-19 Pedro Alves <palves@redhat.com>
8370
8371 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8372 * server.h (memmem): Remove declaration.
8373 * config.in: Regenerate.
8374 * configure: Regenerate.
8375
aad9eab9
YQ
83762012-04-19 Yao Qi <yao@codesourcery.com>
8377
8378 * Makefile.in (SFILES): Add common/vec.c.
8379 (OBS): Add vec.o.
8380 (vec.o): New rule.
8381
3e10640f
YQ
83822012-04-19 Yao Qi <yao@codesourcery.com>
8383
8384 * remote-utils.c (prepare_resume_reply): Replace with macro
8385 target_core_of_thread.
8386 * server.c (handle_qxfer_threads_proper): Likewise.
8387 * target.h (traget_core_of_thread): New macro.
8388
71622373
PA
83892012-04-18 Pedro Alves <palves@redhat.com>
8390
8391 * aclocal.m4: Regenerate.
8392 * configure: Regenerate.
8393
80d26939
YQ
83942012-04-16 Yao Qi <yao@codesourcery.com>
8395
8396 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8397 duplicated on address.
8398
42476b70
YQ
83992012-04-16 Yao Qi <yao@codesourcery.com>
8400
8401 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8402 (struct tracepoint_action_ops) <send>: New field.
8403 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8404 (agent_expr_send, x_tracepoint_action_send): New.
8405 (l_tracepoint_action_send): New.
8406 (cmd_qtdp): Download and install tracepoint
8407 according to `use_agent'.
8408 (run_inferior_command): Add one more parameter `len'.
8409 Update callers.
8410 (tracepoint_send_agent): New.
8411 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8412
7bc83639
YQ
84132012-04-16 Yao Qi <yao@codesourcery.com>
8414
8415 * tracepoint.c (download_tracepoints): Moved to ...
8416 (cmd_qtstart): ... here.
8417
5f18041e
YQ
84182012-04-14 Yao Qi <yao@codesourcery.com>
8419
8420 * tracepoint.c: Include inttypes.h.
8421 (struct collect_memory_action): Use sized types.
8422 (struct tracepoint): Likewise.
8423 (cmd_qtdp, stop_tracing): Update print specifiers.
8424 (cmd_qtp, response_tracepoint): Likewise.
8425 (collect_data_at_tracepoint): Likewise.
8426 (collect_data_at_step): Likewise.
8427
55a8c076
YQ
84282012-04-14 Yao Qi <yao@codesourcery.com>
8429
8430 Import gnulib module inttypes.
8431 * aclocal.m4, config.in, configure: Regenerated.
8432
dc750257
YQ
84332012-04-14 Yao Qi <yao@codesourcery.com>
8434
8435 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8436 Makefile and config.status at last.
8437
0ab5faf9
YQ
84382012-04-13 Yao Qi <yao@codesourcery.com>
8439
8440 * tracepoint.c: Include stdint.h unconditionally.
8441
18f5fd81
TJB
84422012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8443
8444 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8445 on BFD_HAVE_SYS_PROCFS_TYPE.
8446 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8447 * configure: Regenerate.
8448 * config.in: Likewise.
8449
4d47af5c
L
84502012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8451
8452 * Makefile.in (clean): Also remove x32.c x32-linux.c
8453 x32-avx.c x32-avx-linux.c.
8454 (x32.o): New target.
8455 (x32.c): Likewise.
8456 (x32-linux.o): Likewise.
8457 (x32-linux.c): Likewise.
8458 (x32-avx.o): Likewise.
8459 (x32-avx.c): Likewise.
8460 (x32-avx-linux.o): Likewise.
8461 (x32-avx-linux.c): Likewise.
8462
8463 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8464 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8465 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8466 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8467 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8468 i386/x32-avx-linux.xml.
8469
8470 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8471 (init_registers_x32_avx_linux): Likwise.
8472 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8473 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8474
ecedbe58
PA
84752012-04-13 Pedro Alves <palves@redhat.com>
8476
8477 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8478 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8479 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8480 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8481 the sub-make.
8482
c92b5177
L
84832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8484
8485 * linux-x86-low.c (compat_x32_clock_t): New.
8486 (compat_x32_siginfo_t): Likewise.
8487 (compat_x32_siginfo_from_siginfo): Likewise.
8488 (siginfo_from_compat_x32_siginfo): Likewise.
8489 (linux_is_elf64): Likewise.
8490 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8491 and siginfo_from_compat_x32_siginfo for x32.
8492 (x86_arch_setup): Set linux_is_elf64.
8493
214d508e
L
84942012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8495
8496 PR gdb/13969
8497 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8498 e_machine field.
8499 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8500 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8501 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8502 compatible with process.
8503
c9a1864a
YQ
85042012-04-12 Yao Qi <yao@codesourcery.com>
8505
8506 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8507 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8508 (install-only, install-info, clean): Handle sub dir gnulib.
8509 (all-lib, am--refresh): New targets.
8510 (memmem.o): Remove target.
8511 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8512 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8513 (AC_REPLACE_FUNCS): Remove memmem.
8514 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8515 (AC_OUTPUT): Generate Makefile in gnulib/.
8516 * aclocal.m4, config.in, configure: Regenerated.
8517
367ba2c2
MR
85182012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8519
8520 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8521
9d236627
PA
85222012-04-05 Pedro Alves <palves@redhat.com>
8523
8524 -Werror=strict-aliasing
8525
8526 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8527 pointer.
8528
111217b3
PA
85292012-04-04 Pedro Alves <palves@redhat.com>
8530
8531 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8532 (sparc_store_gregset_from_stack, sparc_store_gregset)
8533 (sparc_breakpoint_at): Fix formatting.
8534
8365dcf5
TJB
85352012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8536
8537 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8538 are available.
8539 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8540 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8541 * config.in: Regenerate.
8542 * configure: Likewise.
8543
689cc2ae
PA
85442012-03-29 Pedro Alves <palves@redhat.com>
8545
8546 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8547 Correct ptrace arguments.
8548
c14dfd32
PA
85492012-03-28 Pedro Alves <palves@redhat.com>
8550
8551 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8552 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8553 (IA64_FR1_REGNUM): New defines.
8554 (ia64_fetch_register): New.
8555 (the_low_target): Install it.
8556 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8557 field.
8558 * linux-low.c (linux_fetch_registers): Try the
8559 the_low_target.fetch_register hook first.
8560
8561 * linux-arm-low.c (the_low_target): Adjust.
8562 * linux-bfin-low.c (the_low_target): Adjust.
8563 * linux-cris-low.c (the_low_target): Adjust.
8564 * linux-crisv32-low.c (the_low_target): Adjust.
8565 * linux-m32r-low.c (the_low_target): Adjust.
8566 * linux-m68k-low.c (the_low_target): Adjust.
8567 * linux-mips-low.c (the_low_target): Adjust.
8568 * linux-ppc-low.c (the_low_target): Adjust.
8569 * linux-s390-low.c (the_low_target): Adjust.
8570 * linux-sh-low.c (the_low_target): Adjust.
8571 * linux-sparc-low.c (the_low_target): Adjust.
8572 * linux-tic6x-low.c (the_low_target): Adjust.
8573 * linux-x86-low.c (the_low_target): Adjust.
8574 * linux-xtensa-low.c (the_low_target): Adjust.
8575
63c88e13
PA
85762012-03-26 Pedro Alves <palves@redhat.com>
8577
8578 * server.c (handle_qxfer_libraries): Don't bail early if
8579 the_target->qxfer_libraries_svr4 is not NULL.
8580
fb723180
PA
85812012-03-26 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8584
0afae3cf
PA
85852012-03-23 Pedro Alves <palves@redhat.com>
8586
8587 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8588 "library-list-svr4" element's start tag when the the DSO list is
8589 empty.
8590
485f1ee4
PA
85912012-03-23 Pedro Alves <palves@redhat.com>
8592
8593 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8594 a variable whose type size is the same as the inferior's pointer
8595 size.
8596
a5362b9a
TS
85972012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8598
8599 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8600 struct siginfo.
8601 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8602 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8603 * linux-low.h: Include <signal.h>.
8604 (struct siginfo): Remove forward declaration.
8605 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8606 struct siginfo.
8607
d226c142
MF
86082012-03-21 Mike Frysinger <vapier@gentoo.org>
8609
8610 * .gitignore: Ignore more files.
8611
122f36ef
PA
86122012-03-19 Pedro Alves <palves@redhat.com>
8613 Jan Kratochvil <jan.kratochvil@redhat.com>
8614
8615 * server.c (cont_thread, general_thread): Add describing comments.
8616 (start_inferior): Clear `cont_thread'.
8617 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8618 of a process.
8619
fc3e5175
YQ
86202012-03-15 Yao Qi <yao@codesourcery.com>
8621
8622 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8623 handling to ...
8624 (cmd_qtdp): ... here.
8625
8d0d92cd
YQ
86262012-03-15 Yao Qi <yao@codesourcery.com>
8627
8628 * tracepoint.c (struct tracepoint_action_ops): New.
8629 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8630 (m_tracepoint_action_download): New.
8631 (r_tracepoint_action_download): New.
8632 (x_tracepoint_action_download): New.
8633 (l_tracepoint_action_download): New.
8634 (add_tracepoint_action): Install `action->ops' according type.
8635 (download_tracepoint_1): Move code `download' function pointer
8636 of various tracepoint_action_ops.
8637
87b0bb13
JK
86382012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8639
8640 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8641 linux_ptrace_attach_warnings.
8642
5f572dec
JK
86432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8644
8645 * Makefile.in (linux-ptrace.o): New.
8646 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8647 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8648 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8649 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8650 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8651 of these targets.
8652 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8653
f4647387
YQ
86542012-03-08 Yao Qi <yao@codesourcery.com>
8655 Pedro Alves <palves@redhat.com>
8656
8657 Fix PR server/13392.
8658 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8659 offset of JMP insn.
8660 * tracepoint.c (remove_tracepoint): New.
8661 (cmd_qtdp): Call remove_tracepoint when failed to install.
8662
9b224c5e
PA
86632012-03-07 Pedro Alves <palves@redhat.com>
8664
8665 * linux-low.c (get_detach_signal): New.
8666 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8667 Pass on pending signals to PTRACE_DETACH. Check the result of the
8668 ptrace call.
8669 * server.c (program_signals, program_signals_p): New.
8670 (handle_general_set): Handle QProgramSignals.
8671 * server.h (program_signals, program_signals_p): Declare.
8672
e237a7e2
JK
86732012-03-05 Pedro Alves <palves@redhat.com>
8674 Jan Kratochvil <jan.kratochvil@redhat.com>
8675
8676 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8677 New comment why.
8678
5808517f
YQ
86792012-03-03 Yao Qi <yao@codesourcery.com>
8680
8681 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8682 agent_look_up_symbols.
8683
58b4daa5
YQ
86842012-03-03 Yao Qi <yao@codesourcery.com>
8685
8686 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8687 (linux-x86-low.o): Likewise.
8688 * server.h: Remove in_process_agent_loaded.
8689 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8690 common/agent.c.
8691 Update callers.
8692
8ffcbaaf
YQ
86932012-03-03 Yao Qi <yao@codesourcery.com>
8694
8695 * tracepoint.c (gdb_agent_capability): New global.
8696 (in_process_agent_loaded_ust): Renamed to
8697 `in_process_agent_supports_ust'.
8698 Update callers.
8699 (in_process_agent_supports_ust): Call agent_capability_check.
8700 (clear_installed_tracepoints): Assert that agent supports
8701 agent.
8702
d1feda86
YQ
87032012-03-03 Yao Qi <yao@codesourcery.com>
8704
8705 * linux-low.c (linux_supports_agent): New.
8706 (linux_target_ops): Initialize field `supports_agent' with
8707 linux_supports_agent.
8708 * target.h (struct target_ops) <supports_agent>: New.
8709 (target_supports_agent): New macro.
8710 * server.c (handle_general_set): Handle packet 'QAgent'.
8711 (handle_query): Send `QAgent+'.
8712 * Makefile.in (server.o): Depends on agent.h.
8713
2fa291ac
YQ
87142012-03-03 Yao Qi <yao@codesourcery.com>
8715
8716 * Makefile.in (OBS): Add agent.o.
8717 Add new rule for agent.o.
8718 Track dependence of tracepoint.c on agent.h.
8719 * tracepoint.c (run_inferior_command_1):
8720 (run_inferior_command): Call agent_run_command.
8721 (gdb_ust_connect_sync_socket): Deleted. Move it to
8722 common/agent.c.
8723 (resume_thread, stop_thread): Likewise.
8724 (gdb_ust_socket_init): Renamed to ...
8725 (gdb_agent_socket_init): ... New.
8726 (gdb_ust_thread): Renamed to ...
8727 (gdb_agent_helper_thread): ... New.
8728 (gdb_ust_init): Move some code to ...
8729 (gdb_agent_init): ... here. New.
8730 [HAVE_UST]: Call gdb_ust_init.
8731 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8732 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8733 * config.in, configure: Regenerated.
8734
05044653
PA
87352012-03-02 Pedro Alves <palves@redhat.com>
8736
8737 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8738 * linux-low.c (struct simple_pid_list): New.
8739 (stopped_pids): New a struct simple_pid_list pointer.
8740 (add_to_pid_list, pull_pid_from_list): New.
8741 (handle_extended_wait): Don't assume the first signal new children
8742 report is SIGSTOP. Adjust call to pull_pid_from_list.
8743 (linux_wait_for_lwp): Adjust.
8744
8d00225b
YQ
87452012-03-02 Yao Qi <yao@codesourcery.com>
8746
8747 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8748 debug log.
8749
19560ba5
YQ
87502012-03-02 Yao Qi <yao@codesourcery.com>
8751
8752 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8753 `stop_pc' and `tpoint'. Update caller.
8754
1faeff08
MR
87552012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8756
8757 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8758 * linux-low.c (use_linux_regsets): New macro.
8759 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8760 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8761 (linux_register_in_regsets): New function.
8762 (usr_fetch_inferior_registers): Skip registers covered by
8763 regsets.
8764 (usr_store_inferior_registers): Likewise.
8765 (usr_fetch_inferior_registers): New macro.
8766 (usr_store_inferior_registers): Likewise.
8767 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8768 (linux_store_registers): Likewise.
8769 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8770 prototype.
8771 (init_registers_mips64_dsp_linux): Likewise.
8772 (init_registers_mips_linux): New macro.
8773 (init_registers_mips_dsp_linux): Likewise.
8774 (mips_dsp_num_regs): Likewise.
8775 (DSP_BASE, DSP_CONTROL): New fallback macros.
8776 (mips_base_regs): New macro.
8777 (mips_regmap): Use it. Fix the size.
8778 (mips_dsp_regmap): New variable.
8779 (mips_dsp_regset_bitmap): Likewise.
8780 (mips_arch_setup): New function.
8781 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8782 than mips_regmap.
8783 (mips_cannot_store_register): Likewise.
8784 (the_low_target): Update .arch_setup, .num_regs and .regmap
8785 initializers. Add .regset_bitmap initializer.
8786 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8787 initializer.
8788 * linux-bfin-low.c (the_low_target): Likewise.
8789 * linux-cris-low.c (the_low_target): Likewise.
8790 * linux-crisv32-low.c (the_low_target): Likewise.
8791 * linux-ia64-low.c (the_low_target): Likewise.
8792 * linux-m32r-low.c (the_low_target): Likewise.
8793 * linux-m68k-low.c (the_low_target): Likewise.
8794 * linux-ppc-low.c (the_low_target): Likewise.
8795 * linux-s390-low.c (the_low_target): Likewise.
8796 * linux-sh-low.c (the_low_target): Likewise.
8797 * linux-sparc-low.c (the_low_target): Likewise.
8798 * linux-tic6x-low.c (the_low_target): Likewise.
8799 * linux-x86-low.c (the_low_target): Likewise.
8800 * linux-xtensa-low.c (the_low_target): Likewise.
8801 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8802 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8803 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8804 srv_xmlfiles.
8805 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8806 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8807
c03e6ccc
YQ
88082012-02-29 Yao Qi <yao@codesourcery.com>
8809 Pedro Alves <palves@redhat.com>
8810
8811 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8812 `step_over_finished' is true.
8813
644cebc9
PA
88142012-02-27 Pedro Alves <palves@redhat.com>
8815
8816 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8817 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8818
c14d7ab2
PA
88192012-02-27 Pedro Alves <palves@redhat.com>
8820
8821 PR server/9684
8822 * linux-low.c (pid_is_stopped): New.
8823 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8824
412c89dd
LM
88252012-02-25 Luis Machado <lgustavo@codesourcery.com>
8826
8827 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8828 of conditions.
8829
b745defe
MR
88302012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8831
8832 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8833
9f3a5c85
LM
88342012-02-24 Luis Machado <lgustavo@codesourcery>
8835
8836 * server.c (handle_query): Advertise support for target-side
8837 breakpoint condition evaluation.
8838 (process_point_options): New function.
8839 (process_serial_event): When inserting a breakpoint, check for
8840 a target-side condition that should be evaluated.
8841
8842 * mem-break.c: Include regcache.h and ax.h.
8843 (point_cond_list_t): New data structure.
8844 (breakpoint) <cond_list>: New field.
8845 (find_gdb_breakpoint_at): Make non-static.
8846 (delete_gdb_breakpoint_at): Clear any target-side
8847 conditions.
8848 (clear_gdb_breakpoint_conditions): New function.
8849 (add_condition_to_breakpoint): Likewise.
8850 (add_breakpoint_condition): Likewise.
8851 (gdb_condition_true_at_breakpoint): Likewise.
8852 (gdb_breakpoint_here): Return result directly instead
8853 of going through a local variable.
8854
8855 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8856 (clear_gdb_breakpoint_conditions): Likewise.
8857 (add_breakpoint_condition): Likewise.
8858 (gdb_condition_true_at_breakpoint): Likewise.
8859
8860 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8861 (need_step_over_p): Take target-side breakpoint condition into
8862 consideration.
8863
5e1dc496
LM
88642012-02-24 Luis Machado <lgustavo@codesourcery>
8865
8866 * server.h: Include tracepoint.h.
8867 (agent_mem_read, agent_get_trace_state_variable_value,
8868 agent_set_trace_state_variable_value,
8869 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8870 get_set_tsv_func_addr): New prototypes.
8871
8872 * ax.h: New include file.
8873 * ax.c: New source file.
8874
8875 * tracepoint.c: Include ax.h.
8876 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8877 agent_expr, eval_result_type): Move to ax.h.
8878 (parse_agent_expr): Rename to ...
8879 (gdb_parse_agent_expr): ... this, make it non-static and move
8880 to ax.h.
8881 (unparse_agent_expr) Rename to ...
8882 (gdb_unparse_agent_expr): ... this, make it non-static and move
8883 to ax.h.
8884 (eval_agent_expr): Rename to ...
8885 (eval_tracepoint_agent_expr): ... this.
8886 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8887 forward declarations.
8888 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8889 (agent_get_trace_state_variable_value): New function.
8890 (agent_set_trace_state_variable_value): New function.
8891 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8892 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8893 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8894 (condition_true_at_tracepoint): Likewise.
8895 (parse_agent_expr): Rename to ...
8896 (gdb_parse_agent_expr): ... this and move to ax.c.
8897 (unparse_agent_expr): Rename to ...
8898 (gdb_unparse_agent_expr): ... this and move to ax.c.
8899 (gdb_agent_op_name): Move to ax.c.
8900 (eval_agent_expr): Rename to ...
8901 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8902 and move to ax.c.
8903 (eval_tracepoint_agent_expr): New function.
8904 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8905 non-static.
5e1dc496
LM
8906 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8907 ax.c.
8908 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8909 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8910 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8911 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8912 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8913 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8914 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8915 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8916 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8917 (compile_bytecodes): Remove forward declaration.
8918 (is_goto_target): Move to ax.c.
8919 (compile_bytecodes): Move to ax.c and call
8920 agent_get_trace_state_variable_value (...) and
8921 agent_set_trace_state_variable_value (...).
8922
8923 * Makefile.in: Update ax.c and IPA dependencies.
8924
277e4e52
PA
89252012-02-24 Pedro Alves <palves@redhat.com>
8926
8927 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8928 (cmd_bigqtbuffer_circular): ... this. Only handle
8929 'QTBuffer:circular:'.
8930 (handle_tracepoint_general_set): Adjust.
8931
bf4c19f7
YQ
89322012-02-16 Yao Qi <yao@codesourcery.com>
8933
8934 * inferiors.c: Move code to ...
8935 * dll.c: .... here. New.
8936 * server.h: Declare clear_dlls.
8937 * Makefile.in (SFILES): Add dll.c.
8938 (OBS): Add dll.o
8939 (dll.o): New rule.
8940
d73f2619
YQ
89412012-02-11 Yao Qi <yao@codesourcery.com>
8942
8943 * server.c: (handle_monitor_command): Add a new parameter
8944 `own_buf'.
8945 (handle_query): Update caller.
8946
f8255c2a
JB
89472012-02-09 Joel Brobecker <brobecker@adacore.com>
8948
8949 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8950 * configure, config.in: Regenerate.
8951 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8952 is not defined.
8953
da84f473
PA
89542012-02-02 Pedro Alves <palves@redhat.com>
8955
8956 Try SIGKILL first, then PTRACE_KILL.
8957 * linux-low.c (linux_kill_one_lwp): New.
8958 (linux_kill_one_lwp): Rename to ...
8959 (kill_one_lwp_callback): ... this. Use the new
8960 linux_kill_one_lwp.
8961
e886a173
PA
89622012-02-02 Pedro Alves <palves@redhat.com>
8963
8964 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8965 inferior.
8966
be07f1a2
PA
89672012-01-27 Pedro Alves <palves@redhat.com>
8968
8969 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8970 (elf_64_file_p): Make static.
8971 (linux_pid_exe_is_elf_64_file): New.
8972 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8973 Delete declarations.
8974 (linux_pid_exe_is_elf_64_file): Declare.
8975 * linux-x86-low.c (x86_arch_setup): Use
8976 linux_pid_exe_is_elf_64_file.
8977
d8301ad1
JK
89782012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8979
8980 * linux-low.c (linux_wait_for_event_1): Rename to ...
8981 (linux_wait_for_event): ... here and merge it with former
8982 linux_wait_for_event - new variable wait_ptid, use it.
8983 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8984
01b17894
PA
89852012-01-23 Pedro Alves <palves@redhat.com>
8986
8987 * server.c (main): Avoid yet another case of infinite loop while
8988 detaching/killing after a longjmp.
8989
e825046f
JK
89902012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8991
8992 Code cleanup.
8993 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8994
b9e7b9c3
UW
89952012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8996
8997 * hostio.c (handle_readlink): New function.
8998 (handle_vFile): Call it to handle "vFile:readlink" packets.
8999
901f9912
UW
90002012-01-20 Pedro Alves <palves@redhat.com>
9001 Ulrich Weigand <ulrich.weigand@linaro.org>
9002
9003 * server.c (handle_v_requests): Only support vAttach and vRun to
9004 start multiple processes when in extended protocol mode.
9005
fc1ab1a0
PA
90062012-01-17 Pedro Alves <palves@redhat.com>
9007
9008 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9009 memalign plus mprotect to allocate the scratch buffer.
9010
7d5d4e98
PA
90112012-01-13 Pedro Alves <palves@redhat.com>
9012
9013 * server.c (attach_inferior): Clear `cont_thread'.
9014
f128d5e9
PA
90152012-01-13 Pedro Alves <palves@redhat.com>
9016
9017 * server.c (main): Avoid infinite loop while detaching/killing
9018 after a longjmp.
9019
06db92f0
DE
90202012-01-09 Doug Evans <dje@google.com>
9021
9022 * server.c (start_inferior): Set last_ptid in --wrapper case.
9023
32d92999
YQ
90242012-01-06 Yao Qi <yao@codesourcery.com>
9025
9026 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9027 defined.
9028 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9029
5e0a92a9
YQ
90302012-01-04 Yao Qi <yao@codesourcery.com>
9031
9032 * tracepoint.c (cmd_qtdp): Print debug message
9033 for static tracepoint.
9034
ae639e8c
YQ
90352012-01-04 Yao Qi <yao@codesourcery.com>
9036
9037 * tracepoint.c (trace_vdebug): Differentiate debug message
9038 between gdbserver and IPA.
9039
f72429c5
YQ
90402012-01-03 Yao Qi <yao@codesourcery.com>
9041
9042 * tracepoint.c (tracepoint_was_hit): Don't collect for
9043 static tracepoint.
9044
12c3e59c
JB
90452012-01-02 Joel Brobecker <brobecker@adacore.com>
9046
9047 * terminal.h: Reformat copyright header.
9048
67827812
JB
90492012-01-02 Joel Brobecker <brobecker@adacore.com>
9050
9051 * server.c (gdbserver_version): Update copyright year.
9052 * gdbreplay.c (gdbreplay_version): Likewise.
9053
3e52c33d
JK
90542011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9055
9056 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9057
9058 Revert:
9059 2011-12-18 Hui Zhu <teawater@gmail.com>
9060 * linux-low.c (linux_create_inferior): Save return value to ret.
9061
66f1260e
HZ
90622011-12-18 Hui Zhu <teawater@gmail.com>
9063
9064 * linux-low.c (linux_create_inferior): Save return value to ret.
9065
e77616d7
DE
90662011-12-16 Doug Evans <dje@google.com>
9067
e7b06c57
DE
9068 * linux-low.c (linux_create_inferior): If stdio connection,
9069 redirect stdin from /dev/null, stdout to stderr.
9070 * remote-utils.c (remote_is_stdio): New static global.
9071 (remote_connection_is_stdio): New function.
9072 (remote_prepare): Handle stdio connection.
9073 (remote_open): Ditto.
9074 (remote_close): Don't close stdin for stdio connections.
9075 (read_prim,write_prim): New functions. Replace all calls to
9076 read/write to these.
9077 * server.c (main): Watch for "-" argument. Move call to
9078 remote_prepare before start_inferior.
9079 * server.h (STDIO_CONNECTION_NAME): New macro.
9080 (remote_connection_is_stdio): Declare.
9081
e77616d7
DE
9082 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9083 in debugging output.
9084
82067193
YQ
90852011-12-15 Yao Qi <yao@codesourcery.com>
9086
9087 * tracepoint.c: Include sys/syscall.h.
9088 (gdb_ust_thread): Remove preprocessor conditional.
9089
82bfbe7e
PA
90902011-12-14 Pedro Alves <pedro@codesourcery.com>
9091
9092 * linux-low.c (linux_detach_one_lwp): Call
9093 the_low_target.prepare_to_resume before detaching.
9094
712c6575
YQ
90952011-12-14 Yao Qi <yao@codesourcery.com>
9096
9097 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9098 of write.
9099
d54d1edf
YQ
91002011-12-14 Yao Qi <yao@codesourcery.com>
9101
9102 * i386-low.c (i386_low_stopped_data_address): Initialize local
9103 variable `control'.
9104
6210a125
PA
91052011-12-13 Pedro Alves <pedro@codesourcery.com>
9106
9107 PR remote/13492
9108
9109 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9110 DR_CONTROL unless necessary. Extend comments.
9111 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9112 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9113
2ece8244
YQ
91142011-12-13 Yao Qi <yao@codesourcery.com>
9115
9116 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9117 macros.
9118 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9119
784867a5
JK
91202011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9121
9122 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9123 Print new debug message for such case.
9124
6bf36717
JK
91252011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9126
9127 Fix overlapping memcpy.
9128 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9129 the read_inferior_memory transfer.
9130 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9131 write_inferior_memory transfer.
9132 (set_fast_tracepoint_jump): New variable buf. Use it for the
9133 read_inferior_memory and write_inferior_memory transfers.
9134 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9135 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9136 Use it for the write_inferior_memory transfer.
9137 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9138 buffers.
9139
50275556
MR
91402011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9141
9142 * linux-low.c (fetch_register, store_register): Make code
9143 consistent, fix formatting.
9144
7325beb4
MR
91452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9146
9147 * linux-low.c (usr_store_inferior_registers): Factor out code
9148 to handle individual registers into...
9149 (store_register): ... this new function.
9150
c642a434
UW
91512011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9152
9153 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9154 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9155 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9156 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9157 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9158 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9159 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9160 (srv_xmlfiles): Add new XML files.
9161
9162 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9163 and <sys/uio.h>.
9164 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9165 (init_registers_s390_linux32v1): Add prototype.
9166 (init_registers_s390_linux32v2): Likewise.
9167 (init_registers_s390_linux64v1): Likewise.
9168 (init_registers_s390_linux64v2): Likewise.
9169 (init_registers_s390x_linux64v1): Likewise.
9170 (init_registers_s390x_linux64v2): Likewise.
9171 (s390_num_regs): Increment to 52.
9172 (s390_regmap): Add orig_r2 register.
9173 (s390_num_regs_3264): Increment to 68.
9174 (s390_regmap_3264): Add orig_r2 register.
9175 (s390_collect_ptrace_register): Handle orig_r2 register.
9176 (s390_supply_ptrace_register): Likewise.
9177 (s390_fill_last_break): New function.
9178 (s390_store_last_break): Likewise.
9179 (s390_fill_system_call): New function.
9180 (s390_store_system_call): Likewise.
9181 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9182 register sets.
9183 (s390_check_regset): New function.
9184 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9185 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9186 Update target_regsets for available register sets.
9187
2268b414
JK
91882011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9189 Jan Kratochvil <jan.kratochvil@redhat.com>
9190
9191 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9192 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9193 New.
9194 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9195 * linux-low.h (struct process_info_private): New member r_debug.
9196 * server.c (handle_qxfer_libraries): Call
9197 the_target->qxfer_libraries_svr4.
9198 (handle_qxfer_libraries_svr4): New function.
9199 (qxfer_packets): New entry "libraries-svr4".
9200 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9201 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9202 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9203 PACKET_qXfer_libraries_svr4.
9204
d6db1fab
UW
92052011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9206
9207 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9208 PSW address/mask between 8-byte and 16-byte formats.
9209 (s390_supply_ptrace_register): Likewise.
9210 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9211 basic addressing mode bit.
9212
242f5f1c
SS
92132011-11-24 Stan Shebs <stan@codesourcery.com>
9214
9215 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9216
f196051f
SS
92172011-11-17 Stan Shebs <stan@codesourcery.com>
9218
9219 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9220 (tracing_start_time): New global.
9221 (tracing_stop_time): New global.
9222 (tracing_user_name): New global.
9223 (tracing_notes): New global.
9224 (tracing_stop_note): New global.
9225 (cmd_qtstart): Set traceframe_usage, start_time.
9226 (stop_tracing): Set stop_time.
9227 (cmd_qtstatus): Report additional status.
9228 (cmd_qtp): New function.
9229 (handle_tracepoint_query): Call it.
9230 (cmd_qtnotes): New function.
9231 (handle_tracepoint_general_set): Call it.
9232 (get_timestamp): Rename from tsv_get_timestamp.
9233
405f8e94
SS
92342011-11-14 Stan Shebs <stan@codesourcery.com>
9235 Kwok Cheung Yeung <kcy@codesourcery.com>
9236
9237 * linux-x86-low.c (small_jump_insn): New.
9238 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9239 trampoline and error message, build a trampoline and issue a small
9240 jump instruction to it.
9241 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9242 trampoline and error message.
9243 (x86_get_min_fast_tracepoint_insn_len): New.
9244 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9245 * linux-low.h (struct linux_target_ops): Add arguments to
9246 install_fast_tracepoint_jump_pad operation, add new operation.
9247 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9248 arguments.
9249 (linux_get_min_fast_tracepoint_insn_len): New function.
9250 (linux_target_op): Add new operation.
9251 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9252 (gdb_trampoline_buffer_end): Ditto.
9253 (gdb_trampoline_buffer_error): Ditto.
9254 (struct ipa_sym_addresses): Add fields for new IPA variables.
9255 (symbol_list): Add entries for new IPA variables.
9256 (struct tracepoint): Add fields to hold the address range of the
9257 trampoline used by the tracepoint.
9258 (trampoline_buffer_head): New static variable.
9259 (trampoline_buffer_tail): Ditto.
9260 (claim_trampoline_space): New function.
9261 (have_fast_tracepoint_trampoline_buffer): New function.
9262 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9263 structure.
9264 (install_fast_tracepoint): Ditto, also add error buffer argument.
9265 (cmd_qtminftpilen): New function.
9266 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9267 (fast_tracepoint_from_trampoline_address): New function.
9268 (fast_tracepoint_collecting): Handle trampoline as part of jump
9269 pad space.
9270 (set_trampoline_buffer_space): New function.
9271 (initialize_tracepoint): Initialize new IPA variables.
9272 * target.h (struct target_ops): Add arguments to
9273 install_fast_tracepoint_jump_pad operation, add new
9274 get_min_fast_tracepoint_insn_len operation.
9275 (target_get_min_fast_tracepoint_insn_len): New.
9276 (install_fast_tracepoint_jump_pad): Add arguments.
9277 * server.h (IPA_BUFSIZ): Define.
9278 * linux-i386-ipa.c: Include extra header files.
9279 (initialize_fast_tracepoint_trampoline_buffer): New function.
9280 (initialize_low_tracepoint): Call it.
9281 * server.h (set_trampoline_buffer_space): Declare.
9282 (claim_trampoline_space): Ditto.
9283 (have_fast_tracepoint_trampoline_buffer): Ditto.
9284
1e4d1764
YQ
92852011-11-14 Yao Qi <yao@codesourcery.com>
9286
9287 * server.c (handle_query): Handle InstallInTrace for qSupported.
9288 * tracepoint.c (add_tracepoint): Sort list.
9289 (install_tracepoint, download_tracepoint): New.
9290 (cmd_qtdp): Call them to install and download tracepoints.
9291 (sort_tracepoints): Removed.
9292 (cmd_qtstart): Update.
9293
5c73ff4e
YQ
92942011-11-14 Yao Qi <yao@codesourcery.com>
9295
9296 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9297 * mem-break.h: Declare.
9298 * tracepoint.c (cmd_qtstart): Move some code to ...
9299 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9300 New.
9301 (download_tracepoints): Move some code to ...
9302 (download_tracepoint_1): ... here. New.
9303
86a30030
YQ
93042011-11-08 Yao Qi <yao@codesourcery.com>
9305
9306 * remote-utils.c (relocate_instruction): A comment fix.
9307
8d26e50c
JB
93082011-11-07 Joel Brobecker <brobecker@adacore.com>
9309
9310 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9311 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9312 dr_status_mirror and dr_control_mirror from debug_reg_state.
9313 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9314 (i386_initial_stuff): Remove use of deleted globals.
9315 (i386_get_thread_context, i386_set_thread_context,
9316 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9317 from debug_reg_state.
9318
a59306a3
YQ
93192011-11-05 Yao Qi <yao@codesourcery.com>
9320
9321 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9322 address as TPOINT's.
9323
3065dfb6
SS
93242011-11-02 Stan Shebs <stan@codesourcery.com>
9325
9326 * tracepoint.c (agent_mem_read_string): New function.
9327 (eval_agent_expr): Call it for tracenz.
9328 * server.c (handle_query): Report support for tracenz.
9329
fd0d8c7c
YQ
93302011-11-02 Yao Qi <yao@codesourcery.com>
9331
9332 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9333
609086b1
YQ
93342011-11-02 Yao Qi <yao@codesourcery.com>
9335
9336 * target.h: Fix a typo in comment.
9337
b9fd1791
PA
93382011-10-31 Pedro Alves <pedro@codesourcery.com>
9339
9340 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9341 clobber the breakpoints' shadows with fast tracepoint jumps.
9342 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9343 * target.c (write_inferior_memory): Also pass MYADDR down to
9344 check_mem_write.
9345
03583c20
UW
93462011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9347
9348 * configure.ac: Check support for personality routine.
9349 * configure: Regenerate.
9350 * config.in: Likewise.
9351 * linux-low.c: Include <sys/personality.h>.
9352 Define ADDR_NO_RANDOMIZE if necessary.
9353 (linux_create_inferior): Disable address space randomization when
9354 forking inferior, if requested.
9355 (linux_supports_disable_randomization): New function.
9356 (linux_target_ops): Install it.
9357 * server.h (disable_randomization): Declare.
9358 * server.c (disable_randomization): New global variable.
9359 (handle_general_set): Handle QDisableRandomization.
9360 (handle_query): Likewise for qSupported.
9361 (main): Support --disable-randomization and --no-disable-randomization
9362 command line arguments.
9363 * target.h (struct target_ops): Add supports_disable_randomization.
9364 (target_supports_disable_randomization): New macro.
9365
723b724b
MF
93662011-09-29 Mike Frysinger <vapier@gentoo.org>
9367
9368 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9369 ifdef check.
9370 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9371 [!PT_GETDSBT] (target_loadmap): New definition.
9372 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9373 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9374 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9375 and PT_GETDSBT to LINUX_LOADMAP.
9376 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9377 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9378
55329a5c 93792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9380
9381 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9382 (arm_linux_hwbp_cap): New static variable.
9383 (arm_linux_get_hwbp_cap): Replace by ...
9384 (arm_linux_init_hwbp_cap): ... this new function.
9385 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9386 (arm_linux_get_hw_watchpoint_count): Likewise.
9387 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9388 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9389 (arm_prepare_to_resume): Use perror_with_name instead of error.
9390
55329a5c 93912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9392
9393 * linux-arm-low.c: Include <signal.h>.
9394 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9395 (struct arm_linux_hwbp_cap): New data type.
9396 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9397 (struct arm_linux_hw_breakpoint): New data type.
9398 (MAX_BPTS, MAX_WPTS): Define.
9399 (struct arch_process_info, struct arch_lwp_info): New data types.
9400 (arm_linux_get_hwbp_cap): New function.
9401 (arm_linux_get_hw_breakpoint_count): Likewise.
9402 (arm_linux_get_hw_watchpoint_count): Likewise.
9403 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9404 (arm_hwbp_control_initialize): Likewise.
9405 (arm_hwbp_control_is_enabled): Likewise.
9406 (arm_hwbp_control_is_initialized): Likewise.
9407 (arm_hwbp_control_disable): Likewise.
9408 (arm_linux_hw_breakpoint_equal): Likewise.
9409 (arm_linux_hw_point_initialize): Likewise.
9410 (struct update_registers_data): New data structure.
9411 (update_registers_callback: New function.
9412 (arm_insert_point): Likewise.
9413 (arm_remove_point): Likewise.
9414 (arm_stopped_by_watchpoint): Likewise.
9415 (arm_stopped_data_address): Likewise.
9416 (arm_new_process): Likewise.
9417 (arm_new_thread): Likewise.
9418 (arm_prepare_to_resume): Likewise.
9419 (the_low_target): Register arm_insert_point, arm_remove_point,
9420 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9421 arm_new_thread, and arm_prepare_to_resume.
9422
6b9801d4
SS
94232011-09-15 Stan Shebs <stan@codesourcery.com>
9424
9425 * server.h (struct emit_ops): Add compare-goto fields.
9426 * tracepoint.c (gdb_agent_op_sizes): New table.
9427 (emit_eq_goto): New function.
9428 (emit_ne_goto): New function.
9429 (emit_lt_goto): New function.
9430 (emit_le_goto): New function.
9431 (emit_gt_goto): New function.
9432 (emit_ge_goto): New function.
9433 (is_goto_target): New function.
9434 (compile_bytecodes): Recognize special cases of compare-goto
9435 combinations and call specialized emitters for them.
9436 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9437 (amd64_emit_ne_goto): New function.
9438 (amd64_emit_lt_goto): New function.
9439 (amd64_emit_le_goto): New function.
9440 (amd64_emit_gt_goto): New function.
9441 (amd64_emit_ge_goto): New function.
9442 (amd64_emit_ops): Add the new functions.
9443 (i386_emit_eq_goto): New function.
9444 (i386_emit_ne_goto): New function.
9445 (i386_emit_lt_goto): New function.
9446 (i386_emit_le_goto): New function.
9447 (i386_emit_gt_goto): New function.
9448 (i386_emit_ge_goto): New function.
9449 (i386_emit_ops): Add the new functions.
9450
bf15cbda
SS
94512011-09-08 Stan Shebs <stan@codesourcery.com>
9452
9453 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9454 (i386_emit_epilogue): Restore %ebx.
9455
943ca1dd
JZ
94562011-08-31 Jie Zhang <jzhang918@gmail.com>
9457
9458 * server.c (step_thread): Remove definition.
9459 (process_serial_event): Don't handle Hs.
9460 * server.h (step_thread): Remove declaration.
9461 * target.c (set_desired_inferior): Remove use of step_thread.
9462
e3deef73
LM
94632011-08-24 Luis Machado <lgustavo@codesourcery.com>
9464
9465 * linux-low.c: Include linux-procfs.h.
9466 (linux_attach_lwp_1): Update comments.
9467 (linux_attach): Scan for existing threads when attaching to a
9468 process that is the tgid.
9469 * Makefile.in: Update dependencies.
9470
13da1c97
LM
94712011-08-24 Luis Machado <lgustavo@codesourcery.com>
9472
9473 * configure.srv: Add linux-procfs.o dependencies.
9474
881127c9
YQ
94752011-08-14 Yao Qi <yao@codesourcery.com>
9476
9477 * target.h (struct target_ops): Fix indent.
9478 * win32-low.c (win32_target_ops): Fix comment.
9479
58dbd541
YQ
94802011-08-14 Andrew Jenner <andrew@codesourcery.com>
9481 Yao Qi <yao@codesourcery.com>
9482
9483 * Makefile.in (clean): Remove tic6x-*.c files.
9484 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9485 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9486 (tic6x-c64xp-linux.c): Likewise.
9487 * configure.srv: Add support for tic6x-*-uclinux.
9488 * linux-tic6x-low.c: New.
9489 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9490
78d85199
YQ
94912011-08-14 Andrew Stubbs <ams@codesourcery.com>
9492 Yao Qi <yao@codesourcery.com>
9493
9494 * target.h (struct target_ops): Add read_loadmap.
9495 * linux-low.c (struct target_loadseg): New type.
9496 (struct target_loadmap): New type.
9497 (linux_read_loadmap): New function.
9498 (linux_target_ops): Add linux_read_loadmap.
9499 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9500 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9501 to NULL.
78d85199 9502
a959a88d
EZ
95032011-08-05 Eli Zaretskii <eliz@gnu.org>
9504
9505 * win32-low.c: Include <stdint.h>.
9506
1ced966e
PA
95072011-07-22 Pedro Alves <pedro@codesourcery.com>
9508
9509 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9510 to the inferior here.
9511 (i386_remove_aligned_watchpoint): Ditto.
9512 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9513 fit part of the watchpoint in the debug registers.
9514 (i386_update_inferior_debug_regs): New.
9515 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9516 registers, and only update the inferior on success.
9517 (i386_low_remove_watchpoint): Ditto.
9518
d26e3629
KY
95192011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9520
9521 * linux-low.c (compare_ints, unique, list_threads, show_process,
9522 linux_core_of_thread): Delete.
9523 (linux_target_ops): Change linux_core_of_thread to
9524 linux_common_core_of_thread.
9525 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9526 * utils.c (malloc_failure): Change type of argument.
9527 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9528 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9529 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9530 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9531 (IPA_OBJS): Add common-utils-ipa.o.
9532 (ptid_h, linux_osdata_h): New macros.
9533 (server_h): Add common/common-utils.h, common/xml-utils.h,
9534 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9535 common/ptid.h.
9536 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9537 ptid.o, buffer.o): New rules.
9538 (linux-low.o): Add common/linux-osdata.h as a dependency.
9539 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9540 * configure.ac: Add AC_HEADER_DIRENT check.
9541 * config.in: Regenerate.
9542 * configure: Regenerate.
9543 * remote-utils.c (xml_escape_text): Delete.
9544 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9545 buffer_xml_printf): Move to common/buffer.c.
9546 * server.c (main): Remove call to initialize_inferiors.
9547 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9548 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9549 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9550 internal_error, gdb_assert, gdb_assert_fail): Delete.
9551 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9552 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9553 common/buffer.h.
9554 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9555 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9556 initialize_inferiors): Delete.
9557
2275a1a7
PA
95582011-07-20 Pedro Alves <pedro@codesourcery.com>
9559
9560 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9561 symbol error.
9562
0a5b1e09
PA
95632011-05-31 Pedro Alves <pedro@codesourcery.com>
9564
9565 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9566 assertion.
9567 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9568
6938fd34
YQ
95692011-05-26 Yao Qi <yao@codesourcery.com>
9570
9571 * Makefile.in (thread-db.o): Track dependence to
9572 common/gdb_thread_db.h.
9573 * thread-db.c: include gdb_thread_db.h from right place.
9574
b481f9e0
TT
95752011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9576
9577 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9578 __FILE__ and __LINE__ to internal_error.
9579
98a5dd13
DE
95802011-05-13 Doug Evans <dje@google.com>
9581
9582 * thread-db.c (try_thread_db_load_from_sdir): New function.
9583 (try_thread_db_load_from_dir): New function.
9584 (thread_db_load_search): Handle $sdir, ignore $pdir.
9585 Remove trying of system directories if search of
9586 libthread-db-search-path fails, that is now done via $sdir.
9587
d248b706
KY
95882011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9589
9590 * server.c (handle_query): Add EnableDisableTracepoints to the list
9591 of supported features.
43aaf8b6 9592 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9593 tracepoints.
43aaf8b6
PA
9594 (cmd_qtenable_disable): New.
9595 (cmd_qtstart): Install tracepoints even if disabled.
9596 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9597 receiving a QTEnable or QTDisable packet.
9598 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9599 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9600 tracepoints.
9601 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9602
84e578fb
DE
96032011-05-10 Doug Evans <dje@google.com>
9604
9605 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9606
71f55dd8
DE
96072011-05-04 Doug Evans <dje@google.com>
9608
9609 * linux-low.c (linux_join): Skip process lookup.
9610 * spu-low.c (spu_join): Ditto.
9611 * server.c (join_inferiors_callback): Delete.
9612 (process_serial_event): For 'D' packet (detach) call join_inferior
9613 directly.
9614
4d393d60
JM
96152011-05-04 Joseph Myers <joseph@codesourcery.com>
9616
9617 * README: Don't mention xscale*-*-linux*.
9618 * configure.srv (xscale*-*-linux*): Don't handle target.
9619
b00ad6ff
NF
96202011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9621
9622 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9623 casting pointers.
9624 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9625 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9626 (i386_emit_void_call_2): Likewise.
9627
af96c192
YQ
96282011-04-26 Yao Qi <yao@codesourcery.com>
9629
43aaf8b6
PA
9630 * linux-low.c: Move common macros to linux-ptrace.h.
9631 Include linux-ptrace.h.
af96c192
YQ
9632 * Makefile.in (linux_ptrace_h): New.
9633 (linux-low.o): Depends on linux-ptrace.h.
9634
03f2bd59
JK
96352011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9636
9637 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9638 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9639 (remote_prepare): New function with most of the TCP code from ...
9640 (remote_open): ... here. Detect PORT here unconditionally. Move also
9641 setting transport_is_reliable.
9642 * server.c (run_once): New variable.
9643 (gdbserver_usage): Document it.
9644 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9645 the first run if RUN_ONCE.
9646 * server.h (run_once, remote_prepare): New declarations.
9647
7a9dd1b2
TT
96482011-04-19 Tom Tromey <tromey@redhat.com>
9649
9650 * win32-low.c (handle_load_dll): Remove duplicate "the".
9651
81239425
PM
96522011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9653
9654 Remove support for old Cygwin 1.5 versions.
9655 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9656 function to avoid warning.
9657 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9658 warning.
9659
9e0627f1
PM
96602011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9661
9662 * gdbserver/server.h (Macro _): Define it if not available.
9663
588eebee
MS
96642011-03-14 Michael Snyder <msnyder@vmware.com>
9665
348af9f7 9666 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9667
43f70d4c
JB
96682011-03-10 Joel Brobecker <brobecker@adacore.com>
9669
9670 * Makefile.in (maintainer-clean realclean distclean): Remove
9671 "make ... subdir_do" command.
9672
348af9f7
MS
96732011-03-10 Michael Snyder <msnyder@vmware.com>
9674
9675 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9676
9677 * server.c (handle_v_run): Free alloced buffer on early return.
9678
e637a4f5
YQ
96792011-03-09 Yao Qi <yao@codesourcery.com>
9680
9681 Revert:
9682 2011-03-04 Yao Qi <yao@codesourcery.com>
9683
9684 * Makefile.in: Remove GNU make feature --directory.
9685
9686 2011-03-05 Yao Qi <yao@codesourcery.com>
9687
9688 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9689 (subdir_do): New make target. Copied from gdb/Makefile.
9690 (maintainer-clean, realclean, distclean, clean): Call corresponding
9691 make targets in common/Makefile.
9692
9693 2011-02-11 Yao Qi <yao@codesourcery.com>
9694
9695 * configure.ac: Call AC_PROG_RANLIB.
9696 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9697 * configure: Regenerate.
9698
e6edda56
JK
96992011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9700
9701 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9702
e5141119
JB
97032011-03-06 Yao Qi <yao@codesourcery.com>
9704
9705 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9706
64794aa4
JB
97072011-03-05 Yao Qi <yao@codesourcery.com>
9708
9709 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9710 (subdir_do): New make target. Copied from gdb/Makefile.
9711 (maintainer-clean, realclean, distclean, clean): Call corresponding
9712 make targets in common/Makefile.
9713
7a762829
YQ
97142011-03-04 Yao Qi <yao@codesourcery.com>
9715
9716 * Makefile.in: Remove GNU make feature --directory.
9717
348af9f7
MS
97182011-03-04 Michael Snyder <msnyder@vmware.com>
9719
9720 * server.c (queue_stop_reply): Call xmalloc not malloc.
9721
97222011-03-02 Michael Snyder <msnyder@vmware.com>
9723
9724 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9725
9f72fee2
MS
97262011-02-28 Michael Snyder <msnyder@vmware.com>
9727
588eebee
MS
9728 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9729 (cmd_qtframe): Ditto.
9730 (cmd_qtbuffer): Ditto.
9731 (cmd_bigqtbuffer): Ditto.
9732
9f72fee2
MS
9733 * utils.c (decimal2str): Initialize 'width' to nine, then
9734 don't mess with it.
9735
8040bd49
UW
97362011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9737
9738 * hostio.c (require_data): Free *data, not data.
9739
7e52cbd0
JK
97402011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9741
9742 * hostio.c (require_data): Use free, not xfree.
9743
9130f83e
MS
97442011-02-27 Michael Snyder <msnyder@vmware.com>
9745
4b812f4e
MS
9746 * server.c (handle_query): Discard unused value.
9747
9130f83e
MS
9748 * hostio.c (require_data): Free malloc memory before returning
9749 error.
9750
69d37113
MS
97512011-02-26 Michael Snyder <msnyder@vmware.com>
9752
9753 * linux-low.c (list_threads): Call closedir for dirent.
9754
35f5825a
MS
97552011-02-27 Michael Snyder <msnyder@vmware.com>
9756
2a589cef
MS
9757 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9758 a case statement falls through.
9759
0adea5f7
MS
9760 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9761
35f5825a
MS
9762 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9763 in comparison.
9764
238f1c74
MS
97652011-02-26 Michael Snyder <msnyder@vmware.com>
9766
9767 * utils.c (decimal2str): Eliminate dead code and dead param.
9768 (pulongest): Drop dead param from call to decimal2str.
9769 (plongest): Ditto.
9770
633ff500
JB
97712011-02-24 Joel Brobecker <brobecker@adacore.com>
9772
9773 Revert the following patch (not approved yet):
9774 2011-02-21 Hui Zhu <teawater@gmail.com>
9775 * tracepoint.c (tp_printf): New function.
9776 (eval_agent_expr): Handle gdb_agent_op_printf.
9777
f9c6ff72
HZ
97782011-02-21 Hui Zhu <teawater@gmail.com>
9779
9780 * tracepoint.c (tp_printf): New function.
9781 (eval_agent_expr): Handle gdb_agent_op_printf.
9782
94d5e490
TT
97832011-02-18 Tom Tromey <tromey@redhat.com>
9784
9785 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9786 (tracepoint.o): Likewise.
9787 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9788 (gdb_agent_op_names): Likewise.
9789
c7f96d2b
TT
97902011-02-18 Tom Tromey <tromey@redhat.com>
9791
9792 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9793 gdb_agent_op_rot>: New constants.
9794 (gdb_agent_op_names): Add pick and roll.
9795 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9796 cases.
9797
0feedb2c
JK
97982011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9799
9800 * aclocal.m4: Regenerated with aclocal-1.11.1.
9801
b3b9301e
PA
98022011-02-14 Pedro Alves <pedro@codesourcery.com>
9803
9804 * server.c (handle_qxfer_traceframe_info): New.
9805 (qxfer_packets): Register "traceframe-info".
9806 (handle_query): Report support for qXfer:traceframe-info:read+.
9807 * tracepoint.c (match_blocktype): New.
9808 (traceframe_find_block_type): Rename to ...
9809 (traceframe_walk_blocks): ... this. Add callback filter argument,
9810 and use it.
9811 (traceframe_find_block_type): New, reimplemented on top of
9812 traceframe_walk_blocks.
9813 (build_traceframe_info_xml): New.
9814 (traceframe_read_info): New.
9815 * server.h (traceframe_read_info): Declare.
9816
4f3e6fb7
YQ
98172011-02-11 Yao Qi <yao@codesourcery.com>
9818
9819 * configure.ac: Call AC_PROG_RANLIB.
9820 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9821 * configure: Regenerate.
9822
764880b7
PA
98232011-02-07 Pedro Alves <pedro@codesourcery.com>
9824
9825 * server.c (gdb_read_memory): Change return semantics to allow
9826 partial transfers.
9827 (handle_search_memory_1): Adjust.
9828 (process_serial_event) <'m' packet>: Handle partial transfers.
9829 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9830
1c79eb8a
PA
98312011-01-28 Pedro Alves <pedro@codesourcery.com>
9832
9833 * regcache.c (init_register_cache): Initialize
9834 regcache->register_status.
9835 (free_register_cache): Release regcache->register_status.
9836 (regcache_cpy): Copy register_status.
9837 (registers_to_string): Print 'x's for unavailable registers.
9838 (supply_register): Mark the register's status valid or
9839 unavailable, depending on whether a buffer was passed in or not.
9840 (supply_register_zeroed): New.
9841 (supply_regblock): Mark the registers' status valid or
9842 unavailable, depending on whether a buffer was passed in or not.
9843 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9844 (struct regcache): New `register_status' field.
9845 (supply_register_zeroed): Declare.
9846 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9847 supply_register_zeroed, rather than passing a NULL buffer to
9848 supply_register.
9849 * tracepoint.c (fetch_traceframe_registers): Update comment.
9850
85724a0e
PA
98512011-01-28 Pedro Alves <pedro@codesourcery.com>
9852
9853 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9854 buffer explicit.
9855
d08aafef
PA
98562011-01-25 Pedro Alves <pedro@codesourcery.com>
9857
9858 * server.h (decode_xfer_write): Change prototype.
9859 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9860 and don't extract the annex here.
9861 * server.c (decode_xfer_read): Remove `annex' parameter,
9862 and don't extract the annex here.
9863 (decode_xfer): New.
9864 (struct qxfer): New.
9865 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9866 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9867 (handle_qxfer_statictrace): New functions, abstracted out from
9868 handle_query, and made to use the struct qxfer interface.
9869 (handle_threads_qxfer_proper): Rename to ...
9870 (handle_qxfer_threads_proper): ... this.
9871 (handle_threads_qxfer): Rename to ...
9872 (handle_qxfer_threads): ... this. Adjust.
9873 (qxfer_packets): New array.
9874 (handle_qxfer): New function.
9875 (handle_query): Use handle_qxfer.
9876
493e2a69
MS
98772011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9878
9879 * gdbreplay.c: Shorten lines of >= 80 columns.
9880 * linux-low.c: Ditto.
9881 * linux-ppc-low.c: Ditto.
9882 * linux-s390-low.c: Ditto.
9883 * linux-sparc-low.c: Ditto.
9884 * linux-x86-low.c: Ditto.
9885 * linux-xtensa-low.c: Ditto.
9886 * mem-break.c: Ditto.
9887 * nto-low.c: Ditto.
9888 * regcache.h: Ditto.
9889 * remote-utils.c: Ditto.
9890 * server.c: Ditto.
9891 * server.h: Ditto.
9892 * thread-db.c: Ditto.
9893 * tracepoint.c: Ditto.
9894 * utils.c: Ditto.
9895 * win32-low.h: Ditto.
9896
44944448
JB
98972011-01-05 Joel Brobecker <brobecker@adacore.com>
9898
9899 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9900 update.
9901
71ce852c
JB
99022011-01-01 Joel Brobecker <brobecker@adacore.com>
9903
9904 * server.c (gdbserver_version): Update copyright year in version
9905 output.
9906 * gdbreplay.c (gdbreplay_version): Ditto.
9907
eb826dc6
MF
99082010-12-29 Jie Zhang <jie.zhang@analog.com>
9909
9910 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9911 * linux-bfin-low.c: New file.
9912 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9913 PT_DATA_ADDR for BFIN targets.
9914 * Makefile.in (SFILES): Add linux-bfin-low.c.
9915 (clean): Remove reg-bfin.c.
9916 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9917 * README: Mention supported Blackfin targets.
9918
39ab222a
MF
99192010-12-23 Mike Frysinger <vapier@gentoo.org>
9920
9921 * .gitignore: New file.
9922
a1f2ce7d
MF
99232010-11-16 Mike Frysinger <vapier@gentoo.org>
9924
9925 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9926
f474844c
JZ
99272010-10-22 Jie Zhang <jie@codesourcery.com>
9928
9929 * Makefile.in: Add FLAGS_TO_PASS variable.
9930 (install): Remove dependency of install-only and recursively
9931 invoke make for install-only.
9932
f1048712
DE
99332010-10-04 Doug Evans <dje@google.com>
9934
9935 * Makefile.in (uninstall): Use $(DESTDIR).
9936
b53a1623
PA
99372010-09-24 Pedro Alves <pedro@codesourcery.com>
9938
e6ee044d
PA
9939 PR gdb/11842
9940
b53a1623
PA
9941 * linux-x86-low.c (compat_siginfo_from_siginfo)
9942 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9943 si_code is < 0. Check for si_code == SI_TIMER before checking for
9944 si_code < 0.
9945
fa1bd1e4
JB
99462010-09-13 Joel Brobecker <brobecker@adacore.com>
9947
9948 * lynx-i386-low.c: New file.
9949 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9950
47fac8f8
JB
99512010-09-13 Joel Brobecker <brobecker@adacore.com>
9952
9953 * lynx-low.c (ptrace_request_to_str): Remove handling for
9954 request values that have been removed in LynxOS 5.x.
9955
1adfc54d
JB
99562010-09-13 Joel Brobecker <brobecker@adacore.com>
9957
9958 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9959 <ptrace.h>
9960
c2a66c29
NS
99612010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9962
9963 * configure.ac: Add --enable-inprocess-agent option.
9964 * configure: Rebuilt.
9965
32fcada3
YQ
99662010-09-06 Yao Qi <yao@codesourcery.com>
9967
9968 * linux-low.c (linux_kill): Remove unused variable.
9969 (linux_stabilize_threads): Likewise.
9970 * server.c (start_inferior): Likewise.
9971 (queue_stop_reply_callback): Likewise.
9972 * tracepoint.c (do_action_at_tracepoint): Likewise.
9973
0cccb683
YQ
99742010-09-06 Yao Qi <yao@codesourcery.com>
9975
9976 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9977 on return.
9978
423ec54c
JK
99792010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9980
9981 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9982
12ac6819
PA
99832010-09-06 Pedro Alves <pedro@codesourcery.com>
9984
9985 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9986 "$(IPA_DEPFILES)".
9987
8ed54b31
JB
99882010-09-01 Joel Brobecker <brobecker@adacore.com>
9989
9990 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9991 gdbserver/lynx-ppc-low.c: New files.
9992 * Makefile.in (lynx_low_h): New variable.
9993 (lynx-low.o, lynx-ppc-low.o): New rules.
9994 * configure.ac: On LynxOS, link with -lnetinet.
9995 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9996 * configure: regenerate.
9997
bb0116a4
JB
99982010-09-01 Joel Brobecker <brobecker@adacore.com>
9999
10000 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10001 * configure.ac: Add check for vasprintf and vsnprintf.
10002 * configure, config.in: Regenerate.
10003 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10004
a778ab81 100052010-09-01 Joel Brobecker <brobecker@adacore.com>
10006
10007 * gdbreplay.c: Move include of alloca.h up, next to include of
10008 malloc.h.
10009 * server.h: Add include of malloc.h.
10010 * mem-break.c: Remove include of malloc.h.
10011 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10012
8b034a19 100132010-09-01 Joel Brobecker <brobecker@adacore.com>
10014
10015 * Makefile.in (memmem.o): Build with -Wno-error.
10016
100172010-09-01 Joel Brobecker <brobecker@adacore.com>
10018
10019 * utils.c (xsnprintf): Make non-static.
10020 * server.h: Add xsnprintf declaration.
10021 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10022 replace calls to snprintf by calls to xsnprintf throughout.
10023
100242010-09-01 Joel Brobecker <brobecker@adacore.com>
10025
10026 * configure.ac: Add configure check for alloca.
10027 * configure, config.in: Regenerate.
10028 * server.h: Include alloca.h if it exists.
10029 * gdbreplay.c: Include alloca.h if it exists.
10030
1a981360
PA
100312010-08-28 Pedro Alves <pedro@codesourcery.com>
10032
10033 * linux-low.c (__SIGRTMIN): Define if not already defined.
10034 (linux_create_inferior): Check for __ANDROID__ rather than
10035 __SIGRTMIN.
10036 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10037 are already deferred.
10038 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10039 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10040 stopped and already has a pending signal to report.
10041 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10042 a pending signal to report or is moving out of a jump pad.
10043 (linux_init_signals): Check for __ANDROID__ rather than
10044 __SIGRTMIN.
10045
b4d51a55
PA
100462010-08-28 Pedro Alves <pedro@codesourcery.com>
10047
10048 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10049 debug_threads check. Avoid a linear search when not doing debug
10050 output.
10051
ec48365d
PA
100522010-08-27 Pedro Alves <pedro@codesourcery.com>
10053
10054 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10055 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10056 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10057 (process_event): Change local fd's type to gdb_fildes_t.
10058 (create_file_handler): Adjust prototype.
10059 (delete_file_handler): Adjust prototype.
10060 (handle_file_event): Adjust prototype. Use pfildes.
10061 (create_file_event): Adjsut prototype.
10062 * remote-utils.c (remote_desc, listen_desc): Change type to
10063 gdb_fildes_t.
10064 * server.h: New gdb_fildes_t typedef.
10065 [USE_WIN32API]: Include winsock2.h.
10066 (delete_file_handler, add_file_handler): Adjust prototypes.
10067 (pfildes): Declare.
10068 * utils.c (pfildes): New.
10069
854d88f0
PA
100702010-08-27 Pedro Alves <pedro@codesourcery.com>
10071
10072 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10073 * configure: Regenerate.
10074
0146f85b
PA
100752010-08-27 Pedro Alves <pedro@codesourcery.com>
10076
10077 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10078 (linux_done_accessing_memory): ... this.
10079 (linux_target_ops): Adjust.
10080 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10081 * nto-low.c (nto_target_ops): Adjust comment.
10082 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10083 * spu-low.c (spu_target_ops): Adjust comment.
10084 * target.h (target_ops): Rename unprepare_to_access_memory field
10085 to done_accessing_memory.
10086 (unprepare_to_access_memory): Rename to ...
10087 (done_accessing_memory): ... this.
10088
90d74c30
PA
100892010-08-26 Pedro Alves <pedro@codesourcery.com>
10090
10091 * linux-low.c (linux_prepare_to_access_memory): New.
10092 (linux_unprepare_to_access_memory): New.
10093 (linux_target_ops): Install them.
10094 * server.c (read_memory): Rename to ...
10095 (gdb_read_memory): ... this. Use
10096 prepare_to_access_memory/prepare_to_access_memory.
10097 (write_memory): Rename to ...
10098 (gdb_write_memory): ... this. Use
10099 prepare_to_access_memory/prepare_to_access_memory.
10100 (handle_search_memory_1): Adjust.
10101 (process_serial_event): Adjust.
10102 * target.h (struct target_ops): New fields
10103 prepare_to_access_memory and unprepare_to_access_memory.
10104 (prepare_to_access_memory, unprepare_to_access_memory): New.
10105 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10106 prepare_to_access_memory/prepare_to_access_memory.
10107 * nto-low.c (nto_target_ops): Adjust.
10108 * spu-low.c (spu_target_ops): Adjust.
10109 * win32-low.c (win32_target_ops): Adjust.
10110
fd467969
PA
101112010-08-26 Pedro Alves <pedro@codesourcery.com>
10112
10113 * Makefile.in (WARN_CFLAGS): Get it from configure.
10114 (WERROR_CFLAGS): New.
10115 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10116 * configure.ac: Introduce --enable-werror, which adds -Werror to
10117 the compiler command line. Enabled by default. Disable with
10118 --disable-werror. Add -Wdeclaration-after-statement
10119 Wpointer-arith and -Wformat-nonliteral to warning flags.
10120 * configure: Regenerate.
10121
331e2f5f
PA
101222010-08-26 Pedro Alves <pedro@codesourcery.com>
10123
10124 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10125
e581f2b4
PA
101262010-08-26 Pedro Alves <pedro@codesourcery.com>
10127
10128 * gdbreplay.c (remote_error): New.
10129 (gdbchar): New.
10130 (expect): Use gdbchar. Check for error reading from GDB.
10131 Clarify sync error output.
10132 (play): Check for errors writing to GDB.
10133 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10134 * remote-utils.c (getpkt): Check for errors writing to the remote
10135 descriptor.
10136
3c11dd79
PA
101372010-08-25 Pedro Alves <pedro@codesourcery.com>
10138
10139 * linux-low.c (linux_wait_1): Move non-debugging code out of
10140 `debug_threads' control.
10141
d20a8ad9
PA
101422010-08-25 Pedro Alves <pedro@codesourcery.com>
10143
10144 * linux-low.c (linux_wait_1): Don't set last_status here.
10145 * server.c (push_event, queue_stop_reply_callback): Assert we're
10146 not pushing a TARGET_WAITKIND_IGNORE event.
10147 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10148 (myresume, handle_target_event): Set the thread's last_resume_kind
10149 and last_status from the target returned status.
10150
964e4306
PA
101512010-08-25 Pedro Alves <pedro@codesourcery.com>
10152
10153 PR threads/10729
10154
10155 * linux-x86-low.c (update_debug_registers_callback): New.
10156 (i386_dr_low_set_addr): Use it.
10157 (i386_dr_low_get_addr): New.
10158 (i386_dr_low_set_control): Use update_debug_registers_callback.
10159 (i386_dr_low_get_control): New.
10160 (i386_dr_low_get_status): Adjust.
10161 * linux-low.c (linux_stop_lwp): New.
10162 * linux-low.h (linux_stop_lwp): Declare.
10163
10164 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10165 argument instead of a i386_debug_reg_state.
10166 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10167 a i386_debug_reg_state.
10168 (i386_insert_aligned_watchpoint): Adjust.
10169 (i386_remove_aligned_watchpoint): Adjust.
10170 (i386_low_stopped_data_address): Read the debug registers from the
10171 inferior instead of from the mirrors.
10172 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10173 (i386_dr_low_get_addr): Declare.
10174 (i386_dr_low_get_control): Declare.
10175 (i386_dr_low_get_status): Change prototype.
10176
10177 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10178 (i386_dr_low_get_addr): New.
10179 (i386_dr_low_get_control): New.
10180 (i386_dr_low_get_status): Adjust prototype. Return
10181 dr_status_mirror.
10182 (i386_initial_stuff): Clear dr_status_mirror and
10183 dr_control_mirror.
10184 (i386_get_thread_context): Adjust.
10185 (i386_set_thread_context): Adjust.
10186 (i386_thread_added): Adjust.
10187
5f21a75b
PA
101882010-08-24 Pedro Alves <pedro@codesourcery.com>
10189
10190 * linux-low.h (linux_thread_area): Delete declaration.
10191
3e4c1235
TS
101922010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10193
10194 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10195 after its termination.
10196
1971b033
PA
101972010-08-09 Pedro Alves <pedro@codesourcery.com>
10198
10199 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10200 (gdb_wants_all_stopped): Delete.
10201 (linux_wait_1): Don't call them.
10202 * server.c (handle_v_cont): Tag all threads as want-stopped.
10203 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10204 stopped as "client-wants-stopped".
10205
310444ac
PA
102062010-07-31 Pedro Alves <pedro@codesourcery.com>
10207
10208 * Makefile.in (signals_h): New.
10209 (server_h): Depend on it.
10210 (server.o): Don't depend on $(signals_def).
10211 (signals.o): Depend on $(signals_def).
10212
a19cae16
JK
102132010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10214
10215 * Makefile.in (signals_def): New.
10216 (server_h): Append include/gdb/signals.h and signals_def.
10217 (server.o): Append signals_def.
10218
30d50328
JK
102192010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10220
10221 * server.c (handle_target_event): Use target_signal_to_host for
10222 resume_info.sig initialization.
10223 * target.h (struct thread_resume) <sig>: New comment.
10224
5c3216e2
OS
102252010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10226
c6f46ca0
OS
10227 * server.c (handle_query): strcpy() the returned string from paddress()
10228 instead of sprintf().
5c3216e2
OS
10229 * utils.c (paddress): Return phex_nz().
10230
6bd31874
JB
102312010-07-07 Joel Brobecker <brobecker@adacore.com>
10232
10233 * server.c (handle_v_cont): Call mourn_inferior if process
10234 just exited.
10235 (myresume): Likewise.
10236
0fb4aa4b
PA
102372010-07-01 Pedro Alves <pedro@codesourcery.com>
10238
10239 Static tracepoints, and integration with UST.
10240
10241 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10242 * mem-break.c (uninsert_all_breakpoints)
10243 (reinsert_all_breakpoints): New.
10244 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10245 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10246 (gdb_agent_ust_loaded, helper_thread_id)
10247 (gdb_agent_helper_thread_id): New macros.
10248 (struct ipa_sym_addresses): Add addr_ust_loaded,
10249 addr_helper_thread_id, addr_cmd_buf.
10250 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10251 (in_process_agent_loaded_ust): New.
10252 (write_e_ust_not_loaded): New.
10253 (maybe_write_ipa_ust_not_loaded): New.
10254 (struct collect_static_trace_data_action): New.
10255 (enum tracepoint_type) <static_tracepoint>: New.
10256 (struct tracepoint) <handle>: Mention static tracepoints.
10257 (struct static_tracepoint_ctx): New.
10258 (CMD_BUF_SIZE): New.
10259 (add_tracepoint_action): Handle static tracepoint actions.
10260 (unprobe_marker_at): New.
10261 (clear_installed_tracepoints): Handle static tracepoints.
10262 (cmd_qtdp): Handle static tracepoints.
10263 (probe_marker_at): New.
10264 (cmd_qtstart): Handle static tracepoints.
10265 (response_tracepoint): Handle static tracepoints.
10266 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10267 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10268 (get_context_regcache): Handle static tracepoints.
10269 (do_action_at_tracepoint): Handle static tracepoint actions.
10270 (traceframe_find_block_type): Handle static trace data blocks.
10271 (traceframe_read_sdata): New.
10272 (download_tracepoints): Download static tracepoint actions.
10273 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10274 (GDB_PROBE_NAME): New.
10275 (ust_ops): New.
10276 (GET_UST_SYM): New.
10277 (USTF): New.
10278 (dlsym_ust): New.
10279 (ust_marker_to_static_tracepoint): New.
10280 (gdb_probe): New.
10281 (collect_ust_data_at_tracepoint): New.
10282 (gdb_ust_probe): New.
10283 (UNIX_PATH_MAX, SOCK_DIR): New.
10284 (gdb_ust_connect_sync_socket): New.
10285 (resume_thread, stop_thread): New.
10286 (run_inferior_command): New.
10287 (init_named_socket): New.
10288 (gdb_ust_socket_init): New.
10289 (cstr_to_hexstr): New.
10290 (next_st): New.
10291 (first_marker, next_marker): New.
10292 (response_ust_marker): New.
10293 (cmd_qtfstm, cmd_qtsstm): New.
10294 (unprobe_marker_at, probe_marker_at): New.
10295 (cmd_qtstmat, gdb_ust_thread): New.
10296 (gdb_ust_init): New.
10297 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10298 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10299 (ST_REGENTRY): New.
10300 (x86_64_st_collect_regmap): New.
10301 (X86_64_NUM_ST_COLLECT_GREGS): New.
10302 (AMD64_RIP_REGNUM): New.
10303 (supply_static_tracepoint_registers): New.
10304 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10305 (ST_REGENTRY): New.
10306 (i386_st_collect_regmap): New.
10307 (i386_NUM_ST_COLLECT_GREGS): New.
10308 (supply_static_tracepoint_registers): New.
10309 * server.c (handle_query): Handle qXfer:statictrace:read.
10310 <qSupported>: Report support for StaticTracepoints, and
10311 qXfer:statictrace:read features.
10312 * server.h (traceframe_read_sdata)
10313 (supply_static_tracepoint_registers): Declare.
10314 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10315 (unpack_varlen_hex): Include in IPA build.
10316 * Makefile.in (ustlibs, ustinc): New.
10317 (IPA_OBJS): Add remote-utils-ipa.o.
10318 ($(IPA_LIB)): Link -ldl and -lpthread.
10319 (UST_CFLAGS): New.
10320 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10321 * config.in, configure: Regenerate.
10322
9e4344e5
PA
103232010-06-20 Ian Lance Taylor <iant@google.com>
10324 Pedro Alves <pedro@codesourcery.com>
10325
10326 * linux-x86-low.c (always_true): Delete.
10327 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10328 trying to fool the compiler with always_true.
10329
c6beb2cb
PA
103302010-06-20 Pedro Alves <pedro@codesourcery.com>
10331
10332 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10333 conditions in gdbserver.
10334
d2ed6730
UW
103352010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10336
10337 * spu-low.c (spu_read_memory): Wrap around local store limit.
10338 (spu_write_memory): Likewise.
10339
4e29fb54
PA
103402010-06-15 Pedro Alves <pedro@codesourcery.com>
10341
10342 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10343 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10344 LONGEST uses.
10345 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10346 uses.
10347 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10348 uses with LONGEST uses.
10349
6a271cae
PA
103502010-06-14 Stan Shebs <stan@codesourcery.com>
10351 Pedro Alves <pedro@codesourcery.com>
10352
10353 Bytecode compiler.
10354
10355 * linux-x86-low.c: Include limits.h.
10356 (add_insns): New.
10357 (always_true): New.
10358 (EMIT_ASM): New.
10359 (EMIT_ASM32): New.
10360 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10361 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10362 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10363 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10364 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10365 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10366 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10367 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10368 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10369 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10370 (amd64_emit_void_call_2): New.
10371 (amd64_emit_ops): New.
10372 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10373 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10374 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10375 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10376 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10377 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10378 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10379 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10380 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10381 (i386_emit_stack_adjust, i386_emit_int_call_1)
10382 (i386_emit_void_call_2): New.
10383 (i386_emit_ops): New.
10384 (x86_emit_ops): New.
10385 (the_low_target): Install x86_emit_ops.
10386 * server.h (struct emit_ops): New.
10387 (get_raw_reg_func_addr): Declare.
10388 (current_insn_ptr, emit_error): Declare.
10389 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10390 (set_trace_state_variable_value): New defines.
10391 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10392 addr_get_trace_state_variable_value and
10393 addr_set_trace_state_variable_value.
10394 (symbol_list): New fields for get_raw_reg,
10395 get_trace_state_variable_value and set_trace_state_variable_value.
10396 (condfn): New typedef.
10397 (struct tracepoint): New field `compiled_cond'.
10398 (do_action_at_tracepoint): Clear compiled_cond.
10399 (get_trace_state_variable_value, set_trace_state_variable_value):
10400 Export in the IPA.
10401 (condition_true_at_tracepoint): If there's a compiled condition,
10402 run that.
10403 (current_insn_ptr, emit_error): New globals.
10404 (struct bytecode_address): New.
10405 (get_raw_reg_func_addr): New.
10406 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10407 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10408 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10409 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10410 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10411 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10412 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10413 (compile_tracepoint_condition, compile_bytecodes): New.
10414 * target.h (emit_ops): Forward declare.
10415 (struct target_ops): New field emit_ops.
10416 (target_emit_ops): New.
10417 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10418 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10419 * linux-low.c (linux_emit_ops): New.
10420 (linux_target_ops): Install it.
10421 * linux-low.h (struct linux_target_ops): New field emit_ops.
10422
92b72907
UW
104232010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10424
10425 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10426 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10427
fa593d66
PA
104282010-06-01 Pedro Alves <pedro@codesourcery.com>
10429 Stan Shebs <stan@codesourcery.com>
10430
10431 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10432 (all): Depend on $(extra_libraries).
10433 (install-only): Install the IPA.
10434 (IPA_OBJS, IPA_LIB): New.
10435 (clean): Remove the IPA lib.
10436 (IPAGENT_CFLAGS): New.
10437 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10438 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10439 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10440 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10441 * configure.ac: Check for atomic builtins support in the compiler.
10442 (IPA_DEPFILES, extra_libraries): Define.
10443 * configure.srv (ipa_obj): Add description.
10444 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10445 (i[34567]86-*-linux*): Set ipa_obj.
10446 (x86_64-*-linux*): Set ipa_obj.
10447 * linux-low.c (stabilizing_threads): New.
10448 (supports_fast_tracepoints): New.
10449 (linux_detach): Stabilize threads before detaching.
10450 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10451 the lwp is either not stabilizing, or is moving out of a jump pad.
10452 (linux_fast_tracepoint_collecting): New.
10453 (maybe_move_out_of_jump_pad): New.
10454 (enqueue_one_deferred_signal): New.
10455 (dequeue_one_deferred_signal): New.
10456 (linux_wait_for_event_1): If moving out of a jump pad, defer
10457 pending signals to later.
10458 (linux_stabilize_threads): New.
10459 (linux_wait_1): Check if threads need moving out of jump pads, and
10460 do it if so.
10461 (stuck_in_jump_pad_callback): New.
10462 (move_out_of_jump_pad_callback): New.
10463 (lwp_running): New.
10464 (linux_resume_one_lwp): Handle moving out of jump pads.
10465 (linux_set_resume_request): Dequeue deferred signals.
10466 (need_step_over_p): Also step over fast tracepoint jumps.
10467 (start_step_over): Also uninsert fast tracepoint jumps.
10468 (finish_step_over): Also reinsert fast tracepoint jumps.
10469 (linux_install_fast_tracepoint_jump): New.
10470 (linux_target_ops): Install linux_stabilize_threads and
10471 linux_install_fast_tracepoint_jump_pad.
10472 * linux-low.h (linux_target_ops) <get_thread_area,
10473 install_fast_tracepoint_jump_pad>: New fields.
10474 (struct lwp_info) <collecting_fast_tracepoint,
10475 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10476 (linux_get_thread_area): Declare.
10477 * linux-x86-low.c (jump_insn): New.
10478 (x86_get_thread_area): New.
10479 (append_insns): New.
10480 (push_opcode): New.
10481 (amd64_install_fast_tracepoint_jump_pad): New.
10482 (i386_install_fast_tracepoint_jump_pad): New.
10483 (x86_install_fast_tracepoint_jump_pad): New.
10484 (the_low_target): Install x86_get_thread_area and
10485 x86_install_fast_tracepoint_jump_pad.
10486 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10487 (struct fast_tracepoint_jump): New.
10488 (fast_tracepoint_jump_insn): New.
10489 (fast_tracepoint_jump_shadow): New.
10490 (find_fast_tracepoint_jump_at): New.
10491 (fast_tracepoint_jump_here): New.
10492 (delete_fast_tracepoint_jump): New.
10493 (set_fast_tracepoint_jump): New.
10494 (uninsert_fast_tracepoint_jumps_at): New.
10495 (reinsert_fast_tracepoint_jumps_at): New.
10496 (set_breakpoint_at): Use write_inferior_memory.
10497 (uninsert_raw_breakpoint): Use write_inferior_memory.
10498 (check_mem_read): Mask out fast tracepoint jumps.
10499 (check_mem_write): Mask out fast tracepoint jumps.
10500 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10501 (set_fast_tracepoint_jump): Declare.
10502 (delete_fast_tracepoint_jump)
10503 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10504 (reinsert_fast_tracepoint_jumps_at): Declare.
10505 * regcache.c: Don't compile many functions when building the
10506 in-process agent library.
10507 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10508 the register buffer in the heap.
10509 (free_register_cache): If the register buffer isn't owned by the
10510 regcache, don't free it.
10511 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10512 pre-existing register caches.
10513 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10514 type.
10515 (convert_ascii_to_int): : Constify `from' parameter type.
10516 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10517 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10518 the needed buffer in-place.
10519 (relocate_instruction): New.
10520 * server.c (handle_query) <qSymbols>: If the target supports
10521 tracepoints, give it a chance of looking up symbols. Report
10522 support for fast tracepoints.
10523 (handle_status): Stabilize threads.
10524 (process_serial_event): Adjust.
10525 * server.h (struct fast_tracepoint_jump): Forward declare.
10526 (struct process_info) <fast_tracepoint_jumps>: New field.
10527 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10528 (decode_X_packet, decode_M_packet): Adjust.
10529 (relocate_instruction): Declare.
10530 (in_process_agent_loaded): Declare.
10531 (tracepoint_look_up_symbols): Declare.
10532 (struct fast_tpoint_collect_status): Declare.
10533 (fast_tracepoint_collecting): Declare.
10534 (force_unlock_trace_buffer): Declare.
10535 (handle_tracepoint_bkpts): Declare.
10536 (initialize_low_tracepoint)
10537 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10538 * target.h (struct target_ops) <stabilize_threads,
10539 install_fast_tracepoint_jump_pad>: New fields.
10540 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10541 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10542 [HAVE_STDINT_H]: Include stdint.h.
10543 (trace_debug_1): Rename to ...
10544 (trace_vdebug): ... this.
10545 (trace_debug): Rename to ...
10546 (trace_debug_1): ... this. Add `level' parameter.
10547 (trace_debug): New.
10548 (ATTR_USED, ATTR_NOINLINE): New.
10549 (IP_AGENT_EXPORT): New.
10550 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10551 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10552 (about_to_request_buffer_space, trace_buffer_is_full)
10553 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10554 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10555 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10556 (traceframe_write_count, traceframes_created)
10557 (trace_state_variables)
10558 New renaming defines.
10559 (struct ipa_sym_addresses): New.
10560 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10561 (symbol_list): New.
10562 (ipa_sym_addrs): New.
10563 (all_tracepoint_symbols_looked_up): New.
10564 (in_process_agent_loaded): New.
10565 (write_e_ipa_not_loaded): New.
10566 (maybe_write_ipa_not_loaded): New.
10567 (tracepoint_look_up_symbols): New.
10568 (debug_threads) [IN_PROCESS_AGENT]: New.
10569 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10570 (UNKNOWN_SIDE_EFFECTS): New.
10571 (stop_tracing): New.
10572 (flush_trace_buffer): New.
10573 (stop_tracing_bkpt): New.
10574 (flush_trace_buffer_bkpt): New.
10575 (read_inferior_integer): New.
10576 (read_inferior_uinteger): New.
10577 (read_inferior_data_pointer): New.
10578 (write_inferior_data_pointer): New.
10579 (write_inferior_integer): New.
10580 (write_inferior_uinteger): New.
10581 (struct collect_static_trace_data_action): Delete.
10582 (enum tracepoint_type): New.
10583 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10584 <actions_str, step_actions, step_actions_str>: Only include in
10585 GDBserver.
fa593d66
PA
10586 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10587 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10588 (tracepoints): Use IP_AGENT_EXPORT.
10589 (last_tracepoint): Don't include in the IPA.
10590 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10591 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10592 (alloced_trace_state_variables): New.
10593 (trace_state_variables): Use IP_AGENT_EXPORT.
10594 (traceframe_t): Delete unused variable.
10595 (circular_trace_buffer): Don't include in the IPA.
10596 (trace_buffer_start): Delete.
10597 (struct trace_buffer_control): New.
10598 (trace_buffer_free): Delete.
10599 (struct ipa_trace_buffer_control): New.
10600 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10601 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10602 New.
10603 (trace_buffer_ctrl): New.
10604 (TRACE_BUFFER_CTRL_CURR): New.
10605 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10606 Reimplement as macros.
10607 (trace_buffer_wrap): Delete.
10608 (traceframe_write_count, traceframe_read_count)
10609 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10610 (struct tracepoint_hit_ctx) <type>: New field.
10611 (struct fast_tracepoint_ctx): New.
10612 (memory_barrier): New.
10613 (cmpxchg): New.
10614 (record_tracepoint_error): Update atomically in the IPA.
10615 (clear_inferior_trace_buffer): New.
10616 (about_to_request_buffer_space): New.
10617 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10618 updating the same buffer.
10619 (add_tracepoint): Default the tracepoint's type to trap
10620 tracepoint, and orig_size to -1.
10621 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10622 internal variables.
10623 (create_trace_state_variable): New parameter `gdb'. Handle it.
10624 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10625 (cmd_qtdp): Handle fast tracepoints.
10626 (cmd_qtdv): Adjust.
10627 (max_jump_pad_size): New.
10628 (gdb_jump_pad_head): New.
10629 (get_jump_space_head): New.
10630 (claim_jump_space): New.
10631 (sort_tracepoints): New.
10632 (MAX_JUMP_SIZE): New.
10633 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10634 IPA.
10635 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10636 support. Upload fast traceframes, and delete internal IPA
10637 breakpoints.
10638 (stop_tracing_handler): New.
10639 (flush_trace_buffer_handler): New.
10640 (cmd_qtstop): Upload fast tracepoints.
10641 (response_tracepoint): Handle fast tracepoints.
10642 (tracepoint_finished_step): Upload fast traceframes. Set the
10643 tracepoint hit context's tracepoint type.
10644 (handle_tracepoint_bkpts): New.
10645 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10646 type. Add comment about fast tracepoints.
10647 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10648 non-existing action_str field.
10649 (get_context_regcache): Handle fast tracepoints.
10650 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10651 to the regcache.
10652 (fast_tracepoint_from_jump_pad_address): New.
10653 (fast_tracepoint_from_ipa_tpoint_address): New.
10654 (collecting_t): New.
10655 (force_unlock_trace_buffer): New.
10656 (fast_tracepoint_collecting): New.
10657 (collecting): New.
10658 (gdb_collect): New.
10659 (write_inferior_data_ptr): New.
10660 (target_tp_heap): New.
10661 (target_malloc): New.
10662 (download_agent_expr): New.
10663 (UALIGN): New.
10664 (download_tracepoints): New.
10665 (download_trace_state_variables): New.
10666 (upload_fast_traceframes): New.
10667 (IPA_FIRST_TRACEFRAME): New.
10668 (IPA_NEXT_TRACEFRAME_1): New.
10669 (IPA_NEXT_TRACEFRAME): New.
10670 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10671 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10672 (gdb_jump_pad_buffer_end): New.
10673 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10674 (initialize_tracepoint): Adjust.
10675 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10676 buffer. Initialize the low module.
10677 * utils.c (PREFIX, TOOLNAME): New.
10678 (malloc_failure): Use PREFIX.
10679 (error): In the IPA, an error causes an exit.
10680 (fatal, warning): Use PREFIX.
10681 (internal_error): Use TOOLNAME.
10682 (NUMCELLS): Increase to 10.
10683 * configure, config.in: Regenerate.
10684
d149dd1d
PA
106852010-06-01 Pedro Alves <pedro@codesourcery.com>
10686
10687 * server.c (handle_query) <qSupported>: Do two passes over the
10688 qSupported string to avoid nesting strtok.
10689
f6528abd
JK
106902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10691
10692 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10693 (CDEPS): New.
10694 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10695 -Wl,--dynamic-list.
10696 * configure: Regenerate.
10697 * proc-service.list: New.
10698
ca2a87a0
JK
106992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10700
10701 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10702 New comment.
10703
363a6e9f
OS
107042010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10705
10706 * gdbreplay.c (remote_open): Check error return from socket() call by
10707 its equality to -1 not by it being negative.
10708 * remote-utils.c (remote_open): Likewise.
10709
d23b6cb1
PA
107102010-05-23 Pedro Alves <pedro@codesourcery.com>
10711
10712 * config.h: Regenerate.
10713
28d3cf85
MK
107142010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10715
10716 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10717 doesn't provide PTRACE_GET_THREAD_AREA.
10718
fea36a59
MK
107192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10720
10721 * linux-m68k-low.c: Include <asm/ptrace.h>
10722 (ps_get_thread_area): Implement.
10723
24b066ba
DE
107242010-05-03 Doug Evans <dje@google.com>
10725
10726 * event-loop.c (struct callback_event): New struct.
10727 (callback_list): New global.
10728 (append_callback_event, delete_callback_event): New functions.
10729 (process_callback): New function.
10730 (start_event_loop): Call it.
10731 * remote-utils.c (NOT_SCHEDULED): Define.
10732 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10733 moved out of readchar.
10734 (readchar): Rewrite. Call reschedule before returning.
10735 (reset_readchar): New function.
10736 (remote_close): Call it.
10737 (process_remaining, reschedule): New functions.
10738 * server.h (callback_handler_func): New typedef.
10739 (append_callback_event, delete_callback_event): Declare.
10740
9836d6ea
PA
107412010-05-03 Pedro Alves <pedro@codesourcery.com>
10742
10743 * proc-service.c (ps_pglobal_lookup): Use
10744 thread_db_look_up_one_symbol.
10745 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10746 parameter. Use it instead of all_symbols_looked_up.
10747 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10748 field.
10749 (all_symbols_looked_up): Don't declare.
10750 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10751 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10752 field.
10753 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10754 Set all_symbols_looked_up here.
10755 (thread_db_look_up_one_symbol): New.
10756 (thread_db_get_tls_address): Adjust.
10757 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10758 thread_db object on the heap, and tentatively set it in the
10759 process structure.
10760 (thread_db_init): Don't set all_symbols_looked_up here.
10761 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10762
7984d532
PA
107632010-05-03 Pedro Alves <pedro@codesourcery.com>
10764
10765 * linux-low.c (linux_kill, linux_detach): Adjust.
10766 (status_pending_p_callback): Remove redundant statement. Check
10767 for !TARGET_WAITIKIND_IGNORE, instead of
10768 TARGET_WAITKIND_STOPPED.
10769 (handle_tracepoints): Make sure LWP is locked. Adjust.
10770 (linux_wait_for_event_1): Adjust.
10771 (linux_cancel_breakpoints): New.
10772 (unsuspend_one_lwp): New.
10773 (unsuspend_all_lwps): New.
10774 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10775 (send_sigstop_callback): Change return type to int, add new
10776 `except' parameter and handle it.
10777 (suspend_and_send_sigstop_callback): New.
10778 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10779 pass them down. If SUSPEND, also increment the lwp's suspend
10780 count.
10781 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10782 (need_step_over_p): Don't consider suspended LWPs.
10783 (start_step_over): Adjust.
10784 (proceed_one_lwp): Change return type to int, add new `except'
10785 parameter and handle it.
10786 (unsuspend_and_proceed_one_lwp): New.
10787 (proceed_all_lwps): Use find_inferior instead of
10788 for_each_inferior.
10789 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10790 also decrement the suspend count of LWPs. Pass `except' down,
10791 instead of hacking its suspend count.
10792 (linux_pause_all): Add `freeze' parameter. Adjust.
10793 (linux_unpause_all): New.
10794 (linux_target_ops): Install linux_unpause_all.
10795 * server.c (handle_status): Adjust.
10796 * target.h (struct target_ops): New fields `unpause_all' and
10797 `cancel_breakpoints'. Add new parameter to `pause_all'.
10798 (pause_all): Add new `freeze' parameter.
10799 (unpause_all): New.
10800 (cancel_breakpoints): New.
10801 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10802 cancel breakpoints.
10803 (cmd_qtstart): Pause threads.
10804 (stop_tracing): Pause threads, and cancel breakpoints.
10805 * win32-low.c (win32_target_ops): Adjust.
10806
e471f25b
PA
108072010-05-03 Pedro Alves <pedro@codesourcery.com>
10808
10809 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10810 the inferior right away from here...
10811 (linux_wait_1): ... to here, and adjust to check the thread's
10812 last_resume_kind instead of the lwp's step or stop_expected flags.
10813
1915ef4f
PA
108142010-05-02 Pedro Alves <pedro@codesourcery.com>
10815
10816 * README: Use consistent `GDB' and `GDBserver' spellings.
10817
f9e39928
PA
108182010-05-02 Pedro Alves <pedro@codesourcery.com>
10819
10820 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10821 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10822 (linux_detach_one_lwp): Assume the lwp is stopped.
10823 (any_thread_of): Delete.
10824 (linux_detach): Stop all lwps here. Don't blindly delete all
10825 breakpoints.
10826 (delete_lwp_callback): New.
10827 (linux_mourn): Delete all lwps of the process that is gone.
10828 (linux_wait_1): Don't delete the last lwp of the process here.
10829 * mem-break.h (mark_breakpoints_out): Declare.
10830 * mem-break.c (mark_breakpoints_out): New.
10831 (free_all_breakpoints): Use it.
10832 * server.c (handle_target_event): If the process is gone, mark
10833 breakpoints out.
10834 * thread-db.c (struct thread_db) <create_bp>: New field.
10835 (thread_db_enable_reporting): Fix prototype. Store a thread event
10836 breakpoint reference in the thread_db struct.
10837 (thread_db_load_search): Clear the thread_db object.
10838 (try_thread_db_load_1): Ditto.
10839 (switch_to_process): New.
10840 (disable_thread_event_reporting): Use it.
10841 (remove_thread_event_breakpoints): New.
10842 (thread_db_detach, thread_db_mourn): Use it.
10843
1e7fc18c
PA
108442010-05-01 Pedro Alves <pedro@codesourcery.com>
10845
10846 * linux-low.c (linux_enable_event_reporting): New.
10847 (linux_wait_for_event_1, handle_extended_wait): Use it.
10848
02fc4de7
PA
108492010-04-30 Pedro Alves <pedro@codesourcery.com>
10850
10851 * linux-low.c (linux_kill_one_lwp, linux_kill)
10852 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10853 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10854 SIGSTOP even if the LWP is stopped.
10855 (send_sigstop_callback): New.
10856 (stop_all_lwps): Use send_sigstop_callback instead.
10857 (linux_resume_one_thread): Adjust.
10858 (proceed_one_lwp): Still proceed an LWP that the client has
10859 requested to stop, if we haven't reported it as stopped yet. Make
10860 sure that LWPs the client want stopped, have a pending SIGSTOP.
10861
bc3b5632
DE
108622010-04-26 Doug Evans <dje@google.com>
10863
ae1ada35
DE
10864 * server.c (handle_general_set): Make static.
10865
bc3b5632
DE
10866 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10867 Print received char after testing for error/eof instead of before.
10868 (input_interrupt): Tweak comment.
10869
65730243
DE
108702010-04-23 Doug Evans <dje@google.com>
10871
10872 * server.c (start_inferior): Print inferior argv if --debug.
10873
a8ae7dc0
AR
108742010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10875
10876 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10877 * nto-x86-low.c: Include server.h
10878
1c07cc19
PM
108792010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10880
10881 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10882 be consistent with other sources of this directory.
10883 (init_registers_amd64): Correct name of source file of this function
10884 in the comment.
10885
e0a61e09
PM
108862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10887
10888 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10889 64-bit executables.
10890
54709339
PM
108912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10892
10893 * win32-i386-low.c: Add 64-bit support.
10894 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10895 (init_registers_amd64): Declare.
10896 (mappings): Add 64-bit version of array.
10897 (init_windows_x86): New function.
10898 (the_low_target): Change init_arch field to init_windows_x86.
10899
e8f0053d
PM
109002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10901
10902 * win32-low.c: Adapt to support also 64-bit architecture.
10903 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10904 (get_image_name): Use SIZE_T type for local variable `done'.
10905 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10906 (toolhelp_get_dll_name): Idem.
10907 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10908 Use uintptr_t typecast to avoid warning.
10909 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10910 (handle_exception): Use phex_nz to avoid warning.
10911 (win32_wait): Remove unused local variable `process'.
10912
c481e77e
PM
109132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10914
10915 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10916 `amd64-avx.o'.
10917
12ea4b69
PM
109182010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10919
10920 * configure.ac: Use `ws2_32' library for srv_mingw.
10921 * configure: Regenerate.
10922 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10923 * remote-utils.c: Likewise.
10924
f6d1620c
L
109252010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10926
10927 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10928 if __x86_64__ is defined.
10929
8e642873
PM
109302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10931
10932 * configure: Regenerate.
10933
711e434b
PM
109342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10935
10936 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10937 * target.h (target_ops): New get_tib_address field.
10938 * win32-low.h (win32_thread_info): Add thread_local_base field.
10939 * win32-low.c (child_add_thread): Add tlb argument.
10940 Set thread_local_base field to TLB.
10941 (get_child_debug_event): Adapt to child_add_thread change.
10942 (win32_get_tib_address): New function.
10943 (win32_target_ops): Set get_tib_address field to
10944 win32_get_tib_address.
10945 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10946
505106cd
PA
109472010-04-12 Pedro Alves <pedro@codesourcery.com>
10948
505106cd
PA
10949 * linux-low.c (linux_mourn): Also remove the process.
10950 * server.c (handle_target_event): Don't remove the process here.
10951 * nto-low.c (nto_mourn): New.
10952 (nto_target_ops): Install it.
10953 * spu-low.c (spu_mourn): New.
10954 (spu_target_ops): Install it.
10955 * win32-low.c (win32_mourn): New.
10956 (win32_target_ops): Install it.
10957
e8470a06
PA
109582010-04-12 Pedro Alves <pedro@codesourcery.com>
10959
10960 * server.h (buffer_xml_printf): Remove redundant `;'.
10961
45ba0d02
PA
109622010-04-12 Pedro Alves <pedro@codesourcery.com>
10963
10964 * regcache.c (set_register_cache): Invalidate regcaches before
10965 changing the register cache layout.
10966 (regcache_invalidate_one): Allow a NULL regcache.
10967 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10968 regcaches before changing the register cache layout or the target
10969 regsets.
10970
59e04013
L
109712010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10972
10973 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10974 variable warning on Linux/x86-64.
10975
8336d594
PA
109762010-04-11 Pedro Alves <pedro@codesourcery.com>
10977
10978 GDBserver disconnected tracing support.
10979
10980 * linux-low.c (linux_remove_process): Delete.
10981 (add_lwp): Don't set last_resume_kind here.
10982 (linux_kill): Use `mourn'.
10983 (linux_detach): Use `thread_db_detach', and `mourn'.
10984 (linux_mourn): New.
10985 (linux_attach_lwp_1): Adjust comment.
10986 (linux_attach): last_resume_kind moved the thread_info; adjust.
10987 (status_pending_p_callback): Adjust.
10988 (linux_wait_for_event_1): Adjust.
10989 (count_events_callback, select_singlestep_lwp_callback)
10990 (select_event_lwp_callback, cancel_breakpoints_callback)
10991 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10992 (proceed_one_lwp): Adjust.
10993 (linux_async): Add debug output.
10994 (linux_thread_stopped): New.
10995 (linux_pause_all): New.
10996 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10997 linux_pause_all.
10998 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10999 (thread_db_free): Delete declaration.
11000 (thread_db_detach, thread_db_mourn): Declare.
11001 * thread-db.c (thread_db_init): Use thread_db_mourn.
11002 (thread_db_free): Delete, split in two.
11003 (disable_thread_event_reporting): New.
11004 (thread_db_detach): New.
11005 (thread_db_mourn): New.
11006
11007 * server.h (struct thread_info) <last_resume_kind>: New field.
11008 <attached>: Add comment.
11009 <gdb_detached>: New field.
11010 (handler_func): Change return type to int.
11011 (handle_serial_event, handle_target_event): Ditto.
11012 (gdb_connected): Declare.
11013 (tracing): Delete.
11014 (disconnected_tracing): Declare.
11015 (stop_tracing): Declare.
11016
11017 * server.c (handle_query) <qSupported>: Report support for
11018 disconnected tracing.
11019 (queue_stop_reply_callback): Account for running threads.
11020 (gdb_wants_thread_stopped): New.
11021 (gdb_wants_all_threads_stopped): New.
11022 (gdb_reattached_process): New.
11023 (handle_status): Clear the `gdb_detached' flag of all processes.
11024 In all-stop, stop all threads.
11025 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11026 (process_serial_event): If the remote connection breaks, or if an
11027 exit was forced with "monitor exit", force an event loop exit.
11028 Handle disconnected tracing on detach.
11029 (handle_serial_event): Adjust.
11030 (handle_target_event): If GDB isn't connected, forward events back
11031 to the inferior, unless the last process exited, in which case,
11032 exit gdbserver. Adjust interface.
11033
11034 * remote-utils.c (remote_open): Don't block in accept. Instead
11035 register an event loop source on the listen socket file
11036 descriptor. Refactor bits into ...
11037 (listen_desc): ... this new global.
11038 (gdb_connected): ... this new function.
11039 (enable_async_notification): ... this new function.
11040 (handle_accept_event): ... this new function.
11041 (remote_close): Clear remote_desc.
11042
11043 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11044
11045 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11046 New fields.
11047 (mourn_inferior): Define.
11048 (target_process_qsupported): Avoid the dangling else problem.
11049 (thread_stopped): Define.
11050 (pause_all): Define.
11051 (target_waitstatus_to_string): Declare.
11052 * target.c (target_waitstatus_to_string): New.
11053
11054 * tracepoint.c (tracing): Make extern.
11055 (disconnected_tracing): New.
11056 (stop_tracing): Make extern. Handle tracing stops due to GDB
11057 disconnecting.
11058 (cmd_qtdisconnected): New.
11059 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11060 (handle_tracepoint_general_set): Handle QTDisconnected.
11061
11062 * event-loop.c (event_handler_func): Change return type to int.
11063 (process_event): Bail out if the event handler wants the event
11064 loop to stop.
11065 (handle_file_event): Ditto.
11066 (start_event_loop): Bail out if the event handler wants the event
11067 loop to stop.
11068
11069 * nto-low.c (nto_target_ops): Adjust.
11070 * spu-low.c (spu_wait): Don't remove the process here.
11071 (spu_target_ops): Adjust.
11072 * win32-low.c (win32_wait): Don't remove the process here.
11073 (win32_target_ops): Adjust.
11074
5d267c4c
PA
110752010-04-11 Pedro Alves <pedro@codesourcery.com>
11076
11077 * regcache.c (realloc_register_cache): Invalidate inferior's
11078 regcache before recreating it.
11079
623ccd72
PA
110802010-04-09 Pedro Alves <pedro@codesourcery.com>
11081
11082 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11083
219f2f23
PA
110842010-04-09 Stan Shebs <stan@codesourcery.com>
11085 Pedro Alves <pedro@codesourcery.com>
11086
11087 * server.h (LONGEST): New.
11088 (struct thread_info) <while_stepping>: New field.
11089 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11090 Declare.
11091 (initialize_tracepoint, handle_tracepoint_general_set)
11092 (handle_tracepoint_query, tracepoint_finished_step)
11093 (tracepoint_was_hit, release_while_stepping_state_list):
11094 (current_traceframe): Declare.
11095 * server.c (handle_general_set): Handle tracepoint packets.
11096 (read_memory): New.
11097 (write_memory): New.
11098 (handle_search_memory_1): Use read_memory.
11099 (handle_query): Report support for conditional tracepoints, trace
11100 state variables, and tracepoint sources. Handle tracepoint
11101 queries.
11102 (main): Initialize the tracepoints module.
11103 (process_serial_event): Handle traceframe reads/writes.
11104
11105 * linux-low.c (handle_tracepoints): New.
11106 (linux_wait_1): Call it.
11107 (linux_resume_one_lwp): Handle while-stepping.
11108 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11109 (linux_target_ops): Install them.
11110 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11111 New field.
11112 * linux-x86-low.c (x86_supports_tracepoints): New.
11113 (the_low_target). Install it.
11114
11115 * mem-break.h (delete_breakpoint): Declare.
11116 * mem-break.c (delete_breakpoint): Make external.
11117
11118 * target.h (struct target_ops): Add `supports_tracepoints',
11119 `read_pc', and `write_pc' fields.
11120 (target_supports_tracepoints): Define.
11121 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11122 (phex_nz): New.
11123
11124 * regcache.h (struct regcache) <registers_owned>: New field.
11125 (init_register_cache, regcache_cpy): Declare.
11126 (regcache_read_pc, regcache_write_pc): Declare.
11127 (register_cache_size): Declare.
11128 (supply_regblock): Declare.
11129 * regcache.c (init_register_cache): New.
11130 (new_register_cache): Use it.
11131 (regcache_cpy): New.
11132 (register_cache_size): New.
11133 (supply_regblock): New.
11134 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11135
219f2f23
PA
11136 * tracepoint.c: New.
11137
11138 * Makefile.in (OBS): Add tracepoint.o.
11139 (tracepoint.o): New rule.
11140
3a13a53b
L
111412010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11142
11143 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11144 (i386-mmx.o): New.
11145 (i386-mmx.c): Likewise.
11146 (i386-mmx-linux.o): Likewise.
11147 (i386-mmx-linux.c): Likewise.
11148
11149 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11150 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11151 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11152 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11153
11154 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11155 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11156 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11157
1570b33e
L
111582010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11159
11160 * Makefile.in (clean): Updated.
11161 (i386-avx.o): New.
11162 (i386-avx.c): Likewise.
11163 (i386-avx-linux.o): Likewise.
11164 (i386-avx-linux.c): Likewise.
11165 (amd64-avx.o): Likewise.
11166 (amd64-avx.c): Likewise.
11167 (amd64-avx-linux.o): Likewise.
11168 (amd64-avx-linux.c): Likewise.
11169
11170 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11171 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11172 (srv_amd64_regobj): Add amd64-avx.o.
11173 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11174 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11175 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11176 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11177 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11178 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11179 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11180
11181 * i387-fp.c: Include "i386-xstate.h".
11182 (i387_xsave): New.
11183 (i387_cache_to_xsave): Likewise.
11184 (i387_xsave_to_cache): Likewise.
11185 (x86_xcr0): Likewise.
11186
11187 * i387-fp.h (i387_cache_to_xsave): Likewise.
11188 (i387_xsave_to_cache): Likewise.
11189 (x86_xcr0): Likewise.
11190
11191 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11192 * linux-crisv32-low.c (target_regsets): Likewise.
11193 * linux-m68k-low.c (target_regsets): Likewise.
11194 * linux-mips-low.c (target_regsets): Likewise.
11195 * linux-ppc-low.c (target_regsets): Likewise.
11196 * linux-s390-low.c (target_regsets): Likewise.
11197 * linux-sh-low.c (target_regsets): Likewise.
11198 * linux-sparc-low.c (target_regsets): Likewise.
11199 * linux-xtensa-low.c (target_regsets): Likewise.
11200
11201 * linux-low.c: Include <sys/uio.h>.
11202 (regsets_fetch_inferior_registers): Support nt_type.
11203 (regsets_store_inferior_registers): Likewise.
11204 (linux_process_qsupported): New.
11205 (linux_target_ops): Add linux_process_qsupported.
11206
11207 * linux-low.h (regset_info): Add nt_type.
11208 (linux_target_ops): Add process_qsupported.
11209
11210 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11211 and <sys/uio.h>.
11212 (init_registers_i386_avx_linux): New.
11213 (init_registers_amd64_avx_linux): Likewise.
11214 (xmltarget_i386_linux_no_xml): Likewise.
11215 (xmltarget_amd64_linux_no_xml): Likewise.
11216 (PTRACE_GETREGSET): Likewise.
11217 (PTRACE_SETREGSET): Likewise.
11218 (x86_fill_xstateregset): Likewise.
11219 (x86_store_xstateregset): Likewise.
11220 (use_xml): Likewise.
11221 (x86_linux_update_xmltarget): Likewise.
11222 (x86_linux_process_qsupported): Likewise.
11223 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11224 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11225 init_registers_i386_linux here. Call
11226 x86_linux_update_xmltarget.
11227 (the_low_target): Add x86_linux_process_qsupported.
11228
11229 * server.c (handle_query): Call target_process_qsupported.
11230
11231 * target.h (target_ops): Add process_qsupported.
11232 (target_process_qsupported): New.
11233
fc7238bb
PA
112342010-04-03 Pedro Alves <pedro@codesourcery.com>
11235
11236 * inferiors.c (add_thread): Set last_status kind to
11237 TARGET_WAITKIND_IGNORE.
11238 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11239 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11240 (linux_wait_1): Move `thread' local definition to block that uses
11241 it. Don't NULL initialize `event_child'.
11242 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11243 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11244 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11245
bdabb078
PA
112462010-04-01 Pedro Alves <pedro@codesourcery.com>
11247
11248 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11249 an extended waitstatus, or by a watchpoint.
11250 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11251 thread was stepping or has been stopped by a watchpoint.
11252
d3bbe7a0
PA
112532010-04-01 Pedro Alves <pedro@codesourcery.com>
11254
11255 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11256 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11257 of another, then delete the previous, and validate all
11258 breakpoints.
11259 (validate_inserted_breakpoint): New.
11260 (delete_disabled_breakpoints): New.
11261 (validate_breakpoints): New.
11262 (check_mem_read): Validate breakpoints before trusting their
11263 shadow. Delete disabled breakpoints.
11264 (check_mem_write): Validate breakpoints before trusting they
11265 should be inserted. Delete disabled breakpoints.
11266 * mem-break.h (validate_breakpoints):
11267 * server.c (handle_query): Validate breakpoints when we see a
11268 qSymbol query.
11269
8b07ae33
PA
112702010-04-01 Pedro Alves <pedro@codesourcery.com>
11271
11272 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11273 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11274 if we could tell there's a GDB breakpoint at stop_pc.
11275 (need_step_over_p): Don't do a step over if we find a GDB
11276 breakpoint at the resume PC.
11277
11278 * mem-break.c (struct raw_breakpoint): New.
11279 (enum bkpt_type): New type `gdb_breakpoint'.
11280 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11281 fields. New field `raw'.
11282 (find_raw_breakpoint_at): New.
11283 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11284 breakpoint instead.
11285 (set_breakpoint_at): Adjust.
11286 (delete_raw_breakpoint): New.
11287 (release_breakpoint): New.
11288 (delete_breakpoint): Rename to...
11289 (delete_breakpoint_1): ... this. Add proc parameter. Use
11290 release_breakpoint. Return ENOENT.
11291 (delete_breakpoint): Reimplement.
11292 (find_breakpoint_at): Delete.
11293 (find_gdb_breakpoint_at): New.
11294 (delete_breakpoint_at): Delete.
11295 (set_gdb_breakpoint_at): New.
11296 (delete_gdb_breakpoint_at): New.
11297 (gdb_breakpoint_here): New.
11298 (set_reinsert_breakpoint): Use release_breakpoint.
11299 (uninsert_breakpoint): Rename to ...
11300 (uninsert_raw_breakpoint): ... this.
11301 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11302 (reinsert_raw_breakpoint): Change parameter type to
11303 raw_breakpoint.
11304 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11305 instead.
11306 (check_breakpoints): Adjust. Use release_breakpoint.
11307 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11308 (breakpoint_inserted_here): Ditto.
11309 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11310 Don't trust the breakpoint's shadow if it is not inserted.
11311 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11312 (delete_all_breakpoints): Adjust.
11313 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11314 use delete_breakpoint_1.
11315
11316 * mem-break.h (breakpoints_supported): Delete declaration.
11317 (set_gdb_breakpoint_at): Declare.
11318 (gdb_breakpoint_here): Declare.
11319 (delete_breakpoint_at): Delete.
11320 (delete_gdb_breakpoint_at): Declare.
11321
11322 * server.h (struct raw_breakpoint): Forward declare.
11323 (struct process_info): New field `raw_breakpoints'.
11324
11325 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11326 breakpoints.
11327
6bf5e0ba
PA
113282010-03-24 Pedro Alves <pedro@codesourcery.com>
11329
11330 * linux-low.c (status_pending_p_callback): Fix comment.
11331 (linux_wait_for_event_1): Move most of the internal breakpoint
11332 handling from here...
11333 (linux_wait_1): ... to here.
11334 (count_events_callback): New.
11335 (select_singlestep_lwp_callback): New.
11336 (select_event_lwp_callback): New.
11337 (cancel_breakpoints_callback): New.
11338 (select_event_lwp): New.
11339 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11340 priority to all LWPs that have had events that should be reported
11341 to the client. Cancel breakpoints when about to reporting the
11342 event to the client, not while stopping lwps. No longer cancel
11343 finished single-steps here.
11344 (cancel_finished_single_step): Delete.
11345 (cancel_finished_single_steps): Delete.
11346
414a389f
PA
113472010-03-24 Pedro Alves <pedro@codesourcery.com>
11348
11349 * mem-break.c (enum bkpt_type): New.
11350 (struct breakpoint): New field `type'.
11351 (set_breakpoint_at): Change return type to struct breakpoint
11352 pointer. Set type to `other_breakpoint' by default.
11353 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11354 in the breakpoint list.
11355 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11356 (reinsert_breakpoint): Rename to ...
11357 (reinsert_raw_breakpoint): ... this.
11358 (reinsert_breakpoints_at): Adjust.
11359 * mem-break.h (struct breakpoint): Declare.
11360 (set_breakpoint_at): Change return type to struct breakpoint
11361 pointer.
11362
2280c721
PA
113632010-03-24 Pedro Alves <pedro@codesourcery.com>
11364
11365 * server.c (handle_query): Assign, not compare.
11366
d50171e4
PA
113672010-03-24 Pedro Alves <pedro@codesourcery.com>
11368
11369 Teach linux gdbserver to step-over-breakpoints.
11370
11371 * linux-low.c (can_hardware_single_step): New.
11372 (supports_breakpoints): New.
11373 (handle_extended_wait): If stopping threads, read the stop pc of
11374 the new cloned LWP.
11375 (get_pc): New.
11376 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11377 low target doesn't support retrieving the PC.
11378 (add_lwp): Set last_resume_kind to resume_continue.
11379 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11380 (linux_attach): Don't clear stop_expected. Set the lwp's
11381 last_resume_kind to resume_stop.
11382 (linux_detach_one_lwp): Don't check for removed breakpoints.
11383 (check_removed_breakpoint): Delete.
11384 (status_pending_p): Rename to ...
11385 (status_pending_p_callback): ... this. Don't check for removed
11386 breakpoints. Don't consider threads that are stopped from GDB's
11387 perspective.
11388 (linux_wait_for_lwp): Always read the stop_pc here.
11389 (cancel_breakpoint): New.
11390 (step_over_bkpt): New global.
11391 (linux_wait_for_event_1): Implement stepping over breakpoints.
11392 (gdb_wants_lwp_stopped): New.
11393 (gdb_wants_all_stopped): New.
11394 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11395 single-step traps here. Store the thread's last reported target
11396 wait status.
11397 (send_sigstop): Don't clear stop_expected. Always set it,
11398 instead.
11399 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11400 (cancel_finished_single_step): New.
11401 (cancel_finished_single_steps): New.
11402 (wait_for_sigstop): Don't cancel finished single-step traps here.
11403 (linux_resume_one_lwp): Don't check for removed breakpoints.
11404 Don't set `step' on non-hardware step archs.
11405 (linux_set_resume_request): Ignore resume_stop requests if already
11406 stopping or stopped. Set the lwp's last_resume_kind.
11407 (resume_status_pending_p): Don't check for removed breakpoints.
11408 (need_step_over_p): New.
11409 (start_step_over): New.
11410 (finish_step_over): New.
11411 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11412 requests. Clear the thread's last reported target waitstatus.
11413 Don't use the `suspended' flag. Don't consider pending breakpoints.
11414 (linux_resume): Start a step-over if necessary.
11415 (proceed_one_lwp): New.
11416 (proceed_all_lwps): New.
11417 (unstop_all_lwps): New.
11418 * linux-low.h (struct lwp_info): Rewrite comment for the
11419 `suspended' flag. Add the `stop_pc' field. Delete the
11420 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11421 Add `'last_resume_kind' and `need_step_over' fields.
11422 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11423 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11424 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11425 (set_raw_breakpoint_at): New.
11426 (set_breakpoint_at): Rewrite to use it.
11427 (reinsert_breakpoint_handler): Delete.
11428 (set_reinsert_breakpoint): New.
11429 (reinsert_breakpoint_by_bp): Delete.
11430 (delete_reinsert_breakpoints): New.
11431 (uninsert_breakpoint): Rewrite.
11432 (uninsert_breakpoints_at): New.
11433 (reinsert_breakpoint): Rewrite.
11434 (reinsert_breakpoints_at): New.
11435 (check_breakpoints): Rewrite.
11436 (breakpoint_here): New.
11437 (breakpoint_inserted_here): New.
11438 (check_mem_read): Adjust.
11439 * mem-break.h (breakpoints_supported, breakpoint_here)
11440 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11441 (reinsert_breakpoint_by_bp): Delete declaration.
11442 (delete_reinsert_breakpoints): Declare.
11443 (reinsert_breakpoint): Delete declaration.
11444 (reinsert_breakpoints_at): Declare.
11445 (uninsert_breakpoint): Delete declaration.
11446 (uninsert_breakpoints_at): Declare.
11447 (check_breakpoints): Adjust prototype.
11448 * server.h: Adjust include order.
11449 (struct thread_info): Declare here. Add a `last_status' field.
11450
30ba68cb
MS
114512010-03-23 Michael Snyder <msnyder@vmware.com>
11452
11453 * server.c (crc32): New function.
11454 (handle_query): Add handling for 'qCRC:' request.
11455
b9a881c2
PA
114562010-03-23 Pedro Alves <pedro@codesourcery.com>
11457
11458 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11459 lwp had been stopped by a watchpoint.
11460
e92d13d5
PA
114612010-03-16 Pedro Alves <pedro@codesourcery.com>
11462
11463 * server.h (internal_error): Declare.
11464 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11465 * utils.c (internal_error): New function.
11466
64daa791
AS
114672010-03-15 Andreas Schwab <schwab@redhat.com>
11468
11469 * configure.srv: Fix typo setting srv_regobj.
11470
f52cd8cd
PA
114712010-03-15 Pedro Alves <pedro@codesourcery.com>
11472
11473 * linux-low.c (fetch_register): Avoid passing a non string literal
11474 format to `error'.
11475 (usr_store_inferior_registers): Ditto.
11476
93ae6fdc
PA
114772010-03-14 Pedro Alves <pedro@codesourcery.com>
11478
11479 * linux-low.c (linux_write_memory): Bail out early if peeking
11480 memory failed.
11481
c3adc08c
PA
114822010-03-14 Pedro Alves <pedro@codesourcery.com>
11483
11484 * linux-low.h (struct lwp_info): New fields
11485 `stopped_by_watchpoint' and `stopped_data_address'.
11486 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11487 here, and cache them in the lwp object.
11488 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11489 directly.
11490 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11491 field.
11492 (linux_stopped_by_watchpoint): Rewrite.
11493 (linux_stopped_data_address): Rewrite.
11494
bce522a2
PA
114952010-03-06 Simo Melenius <simo.melenius@iki.fi>
11496
11497 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11498 switching the current inferior, not before.
11499
90884b2b
L
115002010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11501
11502 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11503 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11504 i386-linux.c and amd64-linux.c.
11505 (reg-i386.o): Removed.
11506 (reg-i386.c): Likewise.
11507 (reg-i386-linux.o): Likewise.
11508 (reg-i386-linux.c): Likewise.
11509 (reg-x86-64.o): Likewise.
11510 (reg-x86-64.c): Likewise.
11511 (reg-x86-64-linux.o): Likewise.
11512 (reg-x86-64-linux.c): Likewise.
11513 (i386.o): New.
11514 (i386.c): Likewise.
11515 (i386-linux.o): Likewise.
11516 (i386-linux.c): Likewise.
11517 (amd64.o): Likewise.
11518 (amd64.c): Likewise.
11519 (amd64-linux.o): Likewise.
11520 (amd64-linux.c): Likewise.
11521
11522 * configure.srv (srv_i386_regobj): New.
11523 (srv_i386_linux_regobj): Likewise.
11524 (srv_amd64_regobj): Likewise.
11525 (srv_amd64_linux_regobj): Likewise.
11526 (srv_i386_32bit_xmlfiles): Likewise.
11527 (srv_i386_64bit_xmlfiles): Likewise.
11528 (srv_i386_xmlfiles): Likewise.
11529 (srv_amd64_xmlfiles): Likewise.
11530 (srv_i386_linux_xmlfiles): Likewise.
11531 (srv_amd64_linux_xmlfiles): Likewise.
11532 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11533 srv_xmlfiles to $srv_i386_xmlfiles.
11534 (i[34567]86-*-mingw32ce*): Likewise.
11535 (i[34567]86-*-mingw*): Likewise.
11536 (i[34567]86-*-nto*): Likewise.
11537 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11538 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11539 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11540 (x86_64-*-linux*): Likewise.
11541
11542 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11543 (init_registers_amd64_linux): New.
11544 (x86_arch_setup): Replace init_registers_x86_64_linux with
11545 init_registers_amd64_linux.
11546
193f13e6
MK
115472010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11548
11549 * configure.ac: Check for libdl. If it is not available link against
11550 static libthread_db.
11551 * configure: Regenerate.
11552
85d721b8
PA
115532010-02-22 Pedro Alves <pedro@codesourcery.com>
11554
11555 PR9605
11556
11557 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11558 handing a read watchpoint.
11559 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11560
6076632b
DE
115612010-02-12 Doug Evans <dje@google.com>
11562
11563 * linux-low.c (linux_supports_tracefork_flag): Document.
11564 (linux_look_up_symbols): Add comment.
11565
3327ccf7
L
115662010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11567
11568 * regcache.c (supply_register): Clear regcache if buf is NULL.
11569
0718675c 115702010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11571 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11572
11573 * inferiors.c (find_inferior): Add function documentation.
11574 (unloaded_dll): Handle the case where the unloaded dll has not
11575 been previously registered in the dll list.
11576
177321bd
DJ
115772010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11578
11579 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11580 (thumb2_breakpoint): New.
11581 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11582
2b009048
DJ
115832010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11584
11585 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11586 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11587 breakpoints.
11588
3be029c7
PA
115892010-01-21 Pedro Alves <pedro@codesourcery.com>
11590
11591 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11592
18f5de3b
JK
115932010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11594
11595 * linux-s390-low.c (s390_collect_ptrace_register)
11596 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11597
3743bb4f
DE
115982010-01-21 Doug Evans <dje@google.com>
11599
14ce3065
DE
11600 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11601 (PTRACE_ARG4_TYPE): New macro.
11602 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11603 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11604 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11605 (usr_store_inferior_registers): Ditto.
11606 (linux_read_memory, linux_write_memory): Ditto.
11607 (linux_test_for_tracefork): Ditto.
11608
3743bb4f
DE
11609 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11610 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11611
8b315be5
PA
116122010-01-21 Pedro Alves <pedro@codesourcery.com>
11613
11614 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11615 target.
11616
85492558
PA
116172010-01-21 Pedro Alves <pedro@codesourcery.com>
11618
11619 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11620 prototype to take a regcache. Adjust.
11621
442ea881
PA
116222010-01-20 Pedro Alves <pedro@codesourcery.com>
11623
11624 * regcache.h (struct thread_info): Forward declare.
11625 (struct regcache): New.
11626 (new_register_cache): Adjust prototype.
11627 (get_thread_regcache): Declare.
11628 (free_register_cache): Adjust prototype.
11629 (registers_to_string, registers_from_string): Ditto.
11630 (supply_register, supply_register_by_name, collect_register)
11631 (collect_register_as_string, collect_register_by_name): Ditto.
11632 * regcache.c (struct inferior_regcache_data): Delete.
11633 (get_regcache): Rename to ...
11634 (get_thread_regcache): ... this. Adjust. Switch inferior before
11635 fetching registers.
11636 (regcache_invalidate_one): Adjust.
11637 (regcache_invalidate): Fix prototype.
11638 (new_register_cache): Return the new register cache.
11639 (free_register_cache): Change prototype.
11640 (realloc_register_cache): Adjust.
11641 (registers_to_string): Change prototype to take a regcache. Adjust.
11642 (registers_from_string): Ditto.
11643 (register_data): Ditto.
11644 (supply_register): Ditto.
11645 (supply_register_by_name): Ditto.
11646 (collect_register): Ditto.
11647 (collect_register_as_string): Ditto.
11648 (collect_register_by_name): Ditto.
11649 * server.c (process_serial_event): Adjust.
11650 * linux-low.h (regset_fill_func, regset_store_func): Change
11651 prototype.
11652 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11653 Change prototype.
11654 * linux-low.c (get_stop_pc): Adjust.
11655 (check_removed_breakpoint): Adjust.
11656 (linux_wait_for_event): Adjust.
11657 (linux_resume_one_lwp): Adjust.
11658 (fetch_register): Add regcache parameter. Adjust.
11659 (usr_store_inferior_registers): Ditto.
11660 (regsets_fetch_inferior_registers): Ditto.
11661 (regsets_store_inferior_registers): Ditto.
11662 (linux_fetch_registers, linux_store_registers): Ditto.
11663 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11664 regcache. Adjust.
43aaf8b6
PA
11665 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11666 Ditto.
442ea881
PA
11667 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11668 prototype to take a regcache.
11669 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11670 * remote-utils.c (convert_ascii_to_int, outreg)
11671 (prepare_resume_reply): Change prototype to take a regcache.
11672 Adjust.
11673 * target.h (struct target_ops) <fetch_registers, store_registers>:
11674 Change prototype to take a regcache.
11675 (fetch_inferior_registers, store_inferior_registers): Change
11676 prototype to take a regcache. Adjust.
11677 * proc-service.c (ps_lgetregs): Adjust.
11678 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11679 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11680 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11681 take a regcache. Adjust.
11682 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11683 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11684 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11685 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11686 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11687 (cris_cannot_fetch_register):
11688 (cris_breakpoint_at): Change prototype to take a regcache.
11689 Adjust.
11690 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11691 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11692 to take a regcache. Adjust.
11693 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11694 Adjust.
11695 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11696 take a regcache. Adjust.
11697 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11698 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11699 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11700 * linux-mips-low.c (mips_get_pc):
11701 (mips_set_pc): Change prototype to take a regcache. Adjust.
11702 (mips_reinsert_addr): Adjust.
11703 (mips_collect_register): Change prototype to take a regcache.
11704 Adjust.
11705 (mips_supply_register):
11706 (mips_collect_register_32bit, mips_supply_register_32bit)
11707 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11708 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11709 * linux-ppc-low.c (ppc_supply_ptrace_register)
11710 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11711 (parse_spufs_run): Adjust.
11712 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11713 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11714 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11715 take a regcache. Adjust.
11716 * linux-s390-low.c (s390_collect_ptrace_register)
11717 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11718 (s390_set_pc): Change prototype to take a regcache. Adjust.
11719 (s390_arch_setup): Adjust.
11720 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11721 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11722 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11723 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11724 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11725 regcache. Adjust.
11726 (sparc_breakpoint_at): Adjust.
11727 * linux-xtensa-low.c (xtensa_fill_gregset):
11728 (xtensa_store_gregset):
11729 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11730 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11731 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11732 prototype to take a regcache. Adjust.
11733 * win32-arm-low.c (arm_fetch_inferior_register)
11734 (arm_store_inferior_register): Change prototype to take a
11735 regcache. Adjust.
11736 * win32-i386-low.c (i386_fetch_inferior_register)
11737 (i386_store_inferior_register): Change prototype to take a
11738 regcache. Adjust.
11739 * win32-low.c (child_fetch_inferior_registers)
11740 (child_store_inferior_registers): Change prototype to take a
11741 regcache. Adjust.
11742 (win32_wait): Adjust.
11743 (win32_fetch_inferior_registers): Change prototype to take a
11744 regcache. Adjust.
11745 (win32_store_inferior_registers): Adjust.
11746 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11747 store_inferior_register>: Change prototype to take a regcache.
11748
60c3d7b0
DE
117492010-01-20 Doug Evans <dje@google.com>
11750
11751 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11752 #ifdef.
11753 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11754 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11755
dc146f7c
VP
117562010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11757
11758 * linux-low.c (linux_core_of_thread): New.
11759 (compare_ints, show_process, list_threads): New.
11760 (linux_qxfer_osdata): Report threads and cores.
11761 (linux_target_op): Register linux_core_of_thread.
11762 * remote-utils.c (prepare_resume_reply): Report the core.
11763 (buffer_xml_printf): Support %d specifier.
11764 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11765 New.
11766 (handle_query): Handle qXfer:threads. Announce availability
11767 thereof.
11768 * target.h (struct target_ops): New field core_of_thread.
11769
7803799a
UW
117702010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11771
11772 * Makefile.in (clean): Remove new generated files.
11773 (reg-s390.o, reg-s390.c): Remove rules.
11774 (reg-s390x.o, reg-s390x.c): Likewise.
11775 (s390-linux32.o, s390-linux32.c): Add rules.
11776 (s390-linux64.o, s390-linux64.c): Likewise.
11777 (s390x-linux64.o, s390x-linux64.c): Likewise.
11778 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11779 * linux-s390-low.c: Include <elf.h>.
11780 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11781 (init_registers_s390): Remove prototype.
11782 (init_registers_s390x): Likewise.
11783 (init_registers_s390_linux32): Add prototype.
11784 (init_registers_s390_linux64): Likewise.
11785 (init_registers_s390x_linux64): Likewise.
11786 (s390_num_regs_3264): New define.
11787 (s390_regmap_3264): New global variable.
11788 (s390_cannot_fetch_register): Remove obsolete check.
11789 (s390_cannot_store_register): Likewise.
11790 (s390_collect_ptrace_register): Handle upper/lower register halves.
11791 (s390_supply_ptrace_register): Likewise.
11792 (s390_fill_gregset): Update to register number changes.
11793 (s390_get_hwcap): New routine.
11794 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11795 Install appropriate regmap and register set.
11796
6e7ffa39
JB
117972010-01-01 Joel Brobecker <brobecker@adacore.com>
11798
11799 * server.c (gdbserver_version): Update copyright year to 2010.
11800 * gdbreplay.c (gdbreplay_version): Likewise.
11801
957f3f49
DE
118022009-12-28 Doug Evans <dje@google.com>
11803
11804 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11805 elf/external.h. Include <elf.h> instead but only if necessary.
11806
ca5c370d
PA
118072009-12-28 Pedro Alves <pedro@codesourcery.com>
11808
11809 * linux-low.c (linux_remove_process): Remove `detaching'
11810 parameter. Don't release/detach from thread_db here.
11811 (linux_kill): Release/detach from thread_db here, ...
11812 (linux_detach): ... and here, before actually detaching.
11813 (linux_wait_1): ... and here, when a process exits.
11814 * thread-db.c (any_thread_of): New.
11815 (thread_db_free): Switch the current inferior to a thread of the
11816 passed in process.
11817
4ee62156
DE
118182009-12-21 Doug Evans <dje@google.com>
11819
d90e6a88
DE
11820 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11821
c5f62d5f
DE
11822 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11823 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11824 warning ifndef __NR_tkill. Move setting of errno there too.
11825 Delete unnecessary resetting of errno after syscall.
11826 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11827
10e86dd7
DE
11828 * configure.ac: Check for dladdr.
11829 * config.in: Regenerate.
11830 * configure: Regenerate.
11831 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11832 (try_thread_db_load): Update.
11833
4ee62156
DE
11834 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11835
00f515da
DE
118362009-12-18 Doug Evans <dje@google.com>
11837
e9464885
DE
11838 * event-loop.c: Include unistd.h if it exists.
11839
07d4f67e
DE
11840 * linux-low.c (my_waitpid): Move definition away from being in
11841 between linux_tracefork_child/linux_test_for_tracefork.
11842
00f515da
DE
11843 * gdb_proc_service.h (psaddr_t): Fix type.
11844 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11845 signature to match glibc.
11846
1de1badb
DE
118472009-12-16 Doug Evans <dje@google.com>
11848
11849 * linux-low.c (linux_read_memory): Fix argument to read.
11850
aeeb81d1
PA
118512009-11-26 Pedro Alves <pedro@codesourcery.com>
11852
11853 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11854 events, don't leave current_inferior pointing at null.
11855
10357975
PA
118562009-11-26 Pedro Alves <pedro@codesourcery.com>
11857
11858 * win32-low.c (LOG): Delete.
11859 (OUTMSG): Output to stderr.
11860 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11861 on compile time LOG macro.
11862 (win32_wait): Fix debug output.
11863
cf6e3471
PA
118642009-11-26 Pedro Alves <pedro@codesourcery.com>
11865
11866 * win32-low.c (win32_add_one_solib): If the dll name is
11867 "ntdll.dll", prepend the system directory to the dll path.
11868
0c85e18e
MK
118692009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11870
11871 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11872
9ac544ce 118732009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11874 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11875
11876 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11877 * configure.ac: Check for __mcoldfire__ and set
11878 gdb_cv_m68k_is_coldfire.
11879 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11880 reg-cf.o and reg-m68k.o.
11881 * configure: Regenerated.
11882
fd7dd3e6
PA
118832009-11-16 Pedro Alves <pedro@codesourcery.com>
11884
11885 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11886 Pass it to thread_db_free.
11887 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11888 proper `detaching' argument to linux_remove_process.
11889 * linux-low.h (thread_db_free): Add `detaching' parameter.
11890 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11891 to thread_db_free.
11892 (thread_db_free): Add `detaching' parameter. Only
11893 call td_ta_clear_event if detaching from process.
11894
75aa492e
MK
118952009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11896
11897 * thread-db.c (thread_db_free): Fix typo.
11898
21e1bee4
PP
118992009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11900
11901 PR gdb/10838
11902 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11903
8838b45e
NS
119042009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11905
11906 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11907 with an i686 compiler.
11908 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11909 needed.
11910 * configure: Rebuilt.
11911
8a35fb51
SL
119122009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11913
11914 PR gdb/10783
11915
11916 * server.c (handle_search_memory_1): Correct read_addr initialization
11917 in loop for searching subsequent chunks.
11918
96f15937
PP
119192009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11920
11921 * configure.ac: New --with-libthread-db option.
11922 * thread-db.c: Allow direct dependence on libthread_db.
11923 (thread_db_free): Adjust.
11924 * config.in: Regenerate.
11925 * configure: Likewise.
889bf7c5 11926
5f7d1694
PP
119272009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11928
11929 PR gdb/10757
11930 * thread-db.c (attach_thread): New function.
11931 (maybe_attach_thread): Return success/failure.
11932 (find_new_threads_callback): Adjust.
889bf7c5
PA
11933 (thread_db_find_new_threads): Loop until no new threads.
11934
88e3b899
PA
119352009-10-13 Pedro Alves <pedro@codesourcery.com>
11936
11937 * proc-service.c (ps_lgetregs): Formatting.
11938
cdbfd419
PP
119392009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11940
11941 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11942 * configure.ac: Adjust.
11943 * linux-low.h (struct process_info_private): Move members to struct
11944 thread_db.
11945 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11946 * linux-low.c (linux_remove_process): Adjust.
11947 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11948 * server.c (handle_query): Move code ...
11949 (handle_monitor_command): ... here. New function.
11950 * target.h (struct target_ops): New member.
11951 * thread-db.c (struct thread_db): New.
11952 (libthread_db_search_path): New variable.
11953 (thread_db_create_event, thread_db_enable_reporting)
11954 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11955 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11956 (try_thread_db_load_1, dladdr_to_soname): New functions.
11957 (try_thread_db_load, thread_db_load_search): New functions.
11958 (thread_db_init): Search for libthread_db.
11959 (thread_db_free): New function.
11960 (thread_db_handle_monitor_command): Likewise.
11961 * config.in: Regenerate.
11962 * configure: Regenerate.
889bf7c5 11963
4168d2d6
UW
119642009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11965
11966 * spu-low.c (spu_kill): Wait for inferior to terminate.
11967 Call clear_inferiors.
11968 (spu_detach): Call clear_inferiors.
11969
81ecdfbb
RW
119702009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11971
11972 * aclocal.m4: Regenerate.
11973 * config.in: Likewise.
11974 * configure: Likewise.
11975
0b9ff2c0
UW
119762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11977
11978 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11979 (parse_spufs_run): New function.
11980 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11981 (ppc_breakpoint_at): Handle SPU breakpoints.
11982
efcbbd14
UW
119832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11984
11985 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11986 (SPUFS_MAGIC): Define.
11987 (spu_enumerate_spu_ids): New function.
11988 (linux_qxfer_spu): New function.
11989 (linux_target_ops): Install linux_qxfer_spu.
11990
f4d9bade
UW
119912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11992
11993 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11994 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11995 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11996 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11997 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11998 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11999 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12000 (init_registers_powerpc_cell32l): Add prototype.
12001 (init_registers_powerpc_cell64l): Likewise.
12002 (ppc_arch_setup): Detect Cell/B.E. architecture.
12003
96e946ca
RW
120042009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12005
12006 * Makefile.in (datarootdir): New variable.
12007
58d6951d
DJ
120082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12009
12010 * linux-low.c (linux_write_memory): Update debugging output.
12011 * Makefile.in (clean): Add new descriptions.
12012 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12013 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12014 * configure.srv: Add new files for arm*-*-linux*.
12015 * linux-arm-low.c: Add new declarations.
12016 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12017 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12018 (HWCAP_VFPv3D16): New.
12019 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12020 instead of __IWMMXT__.
12021 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12022 (arm_arch_setup): New.
12023 (target_regsets): Remove #ifdef. Add VFP regset.
12024 (the_low_target): Use arm_arch_setup.
12025
12b42a12
DJ
120262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12027
12028 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12029 the main thread again.
12030
ac8c974e
AR
120312009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12032
12033 Adding Neutrino gdbserver.
12034 * configure: Regenerated.
12035 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12036 * configure.srv (i[34567]86-*-nto*): New target.
12037 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12038 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12039 (nto_comctrl) [__QNX__]: New function.
12040 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12041
4424e0c3 120422009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12043
12044 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12045 srv_tgtobj.
12046
912cf4ba
PA
120472009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12048 Pedro Alves <pedro@codesourcery.com>
12049
12050 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12051 don't support CONTEXT_EXTENDED_REGISTERS.
12052 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12053 (the_low_target): Install them.
12054 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12055 failing with ERROR_PIPE_NOT_CONNECTED.
12056
aa5ca48f
DE
120572009-06-30 Doug Evans <dje@google.com>
12058 Pierre Muller <muller@ics.u-strasbg.fr>
12059
12060 Add h/w watchpoint support to x86-linux, win32-i386.
12061 * Makefile.in (SFILES): Add i386-low.c
12062 (i386_low_h): Define.
12063 (i386-low.o): Add dependencies.
12064 (linux-x86-low.o): Add i386-low.h dependency.
12065 (win32-i386-low.o): Ditto.
12066 * i386-low.c: New file.
12067 * i386-low.h: New file.
12068 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12069 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12070 * linux-low.c (linux_add_process): Initialize arch_private.
12071 (linux_remove_process): Free arch_private.
12072 (add_lwp): Initialize arch_private.
12073 (delete_lwp): Free arch_private.
12074 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12075 provided.
12076 * linux-low.h (process_info_private): New member arch_private.
12077 (lwp_info): New member arch_private.
12078 (linux_target_ops): New members new_process, new_thread,
12079 prepare_to_resume.
12080 (ptid_of): New macro.
12081 * linux-x86-low.c: Include stddef.h, i386-low.h.
12082 (arch_process_info): New struct.
12083 (arch_lwp_info): New struct.
12084 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12085 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12086 (i386_dr_low_get_status): New function.
12087 (x86_insert_point, x86_remove_point): New functions.
12088 (x86_stopped_by_watchpoint): New function.
12089 (x86_stopped_data_address): New function.
12090 (x86_linux_new_process, x86_linux_new_thread): New functions.
12091 (x86_linux_prepare_to_resume): New function.
12092 (the_low_target): Add entries for insert_point, remove_point,
12093 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12094 prepare_to_resume.
12095 * server.c (debug_hw_points): New global.
12096 (monitor_show_help): Document set debug-hw-points.
12097 (handle_query): Process "set debug-hw-points".
12098 * server.h (debug_hw_points): Declare.
12099 (paddress): Declare.
12100 * utils.c (NUMCELLS, CELLSIZE): New macros.
12101 (get_sell, xsnprintf, paddress): New functions.
12102 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12103 remove_point, stopped_by_watchpoint, stopped_data_address.
12104 * win32-i386-low.c: Include i386-low.h.
12105 (debug_reg_state): Replaces dr.
12106 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12107 (i386_dr_low_get_status): New function.
12108 (i386_insert_point, i386_remove_point): New functions.
12109 (i386_stopped_by_watchpoint): New function.
12110 (i386_stopped_data_address): New function.
12111 (i386_initial_stuff): Update.
12112 (get_thread_context,set_thread_context,i386_thread_added): Update.
12113 (the_low_target): Add entries for insert_point,
12114 remove_point, stopped_by_watchpoint, stopped_data_address.
12115 * win32-low.c (win32_insert_watchpoint): New function.
12116 (win32_remove_watchpoint): New function.
12117 (win32_stopped_by_watchpoint): New function.
12118 (win32_stopped_data_address): New function.
12119 (win32_target_ops): Add entries for insert_watchpoint,
12120 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12121 * win32-low.h (win32_target_ops): New members insert_point,
12122 remove_point, stopped_by_watchpoint, stopped_data_address.
12123
d993e290
PA
121242009-06-25 Pedro Alves <pedro@codesourcery.com>
12125
12126 * server.c (process_serial_event): Re-return unsupported, not
12127 error, if the type isn't recognized. Re-allow supporting only
12128 insert or remove packets. Also call require_running for
12129 breakpoints. Add missing break statement to default case. Tidy.
12130 * target.h (struct target_ops): Rename insert_watchpoint to
12131 insert_point, and remove_watchpoint to remove_point.
12132
12133 * linux-low.h (struct linux_target_ops): Likewise.
12134 * linux-low.c (linux_insert_watchpoint): Rename to ...
12135 (linux_insert_point): ... this. Adjust.
12136 (linux_remove_watchpoint): Rename to ...
12137 (linux_remove_point): ... this. Adjust.
12138 (linux_target_ops): Adjust.
12139 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12140 (cris_insert_point): ... this.
12141 (cris_remove_watchpoint): Rename to ...
12142 (cris_remove_point): ... this.
12143 (the_low_target): Adjust.
12144
0f54c268
PM
121452009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12146
12147 * server.c (handle_v_kill): Pass signal_pid to
12148 kill_inferior if multi_process is zero.
12149
c6314022
AR
121502009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12151
12152 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12153 * target.h (target_ops): Comment for *_watchpoint to make it clear
12154 the functions can get types '0' and '1'.
12155
4463ce24
AR
121562009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12157
12158 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12159 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12160 * regcache.c (get_regcache): Likewise.
12161 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12162 * win32-low.c (child_fetch_inferior_registers): Remove check for
12163 regno 0.
12164
cf8fd78b
PA
121652009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12166 Pedro Alves <pedro@codesourcery.com>
12167
12168 * target.h (struct target_ops) <supports_multi_process>: New
12169 callback.
12170 (target_supports_multi_process): New.
12171 * server.c (handle_query): Even if GDB reports support, only
12172 enable multi-process if the target also supports it. Report
12173 multi-process support only if the target backend supports it.
12174 * linux-low.c (linux_supports_multi_process): New function.
12175 (linux_target_ops): Install it as target_supports_multi_process
12176 callback.
12177
47c0c975
DE
121782009-05-24 Doug Evans <dje@google.com>
12179
e09875d4
DE
12180 Global renaming of find_thread_pid to find_thread_ptid.
12181 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12182 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12183 All callers updated.
12184
e27d73f6
DE
12185 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12186 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12187 directly.
12188
47c0c975
DE
12189 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12190 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12191 (linux_resume_one_lwp): Ditto.
12192
2acc282a
DE
121932009-05-23 Doug Evans <dje@google.com>
12194
12195 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12196 from struct inferior_list_entry * to struct lwp_info *.
12197 All callers updated.
12198
9f1036c1
DE
121992009-05-13 Doug Evans <dje@google.com>
12200
12201 * linux-x86-low.c: Don't include assert.h.
12202 (x86_siginfo_fixup): Use fatal, not assert.
12203 (x86_arch_setup): Fix comment.
12204
d0722149
DE
122052009-05-12 Doug Evans <dje@google.com>
12206
12207 Biarch support for i386/amd64 gdbserver.
12208 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12209 Add linux-x86-low.c.
12210 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12211 (linux-x86-low.o): Add.
12212 * linux-x86-64-low.c: Delete.
12213 * linux-i386-low.c: Delete.
12214 * linux-x86-low.c: New file.
12215 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12216 linux-x86-low.o.
12217 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12218 linux-x86-low.o.
12219 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12220 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12221 (linux_child_pid_to_exec_file): New function.
12222 (elf_64_header_p, elf_64_file_p): New functions.
12223 (siginfo_fixup): New function.
12224 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12225 give target a chance to convert layout.
12226 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12227 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12228
fdeb2a12
DE
122292009-05-07 Doug Evans <dje@google.com>
12230
12231 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12232 (regsets_store_inferior_registers): Ditto.
12233
a6dbe5df
PA
122342009-05-06 Pedro Alves <pedro@codesourcery.com>
12235
12236 PR server/10048
12237
12238 * linux-low.c (must_set_ptrace_flags): Delete.
12239 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12240 of the global.
12241 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12242 `lwp->must_set_ptrace_flags' instead.
ba42693b 12243 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12244 (linux_wait_1): ... not here.
12245
5091eb23
DE
122462009-04-30 Doug Evans <dje@google.com>
12247
9f767825
DE
12248 * inferiors.c (started_inferior_callback): New function.
12249 (attached_inferior_callback): New function.
12250 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12251 * server.c (print_started_pid, print_attached_pid): New functions.
12252 (detach_or_kill_for_exit): New function.
12253 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12254 * server.h (have_started_inferiors_p): Declare.
12255 (have_attached_inferiors_p): Declare.
12256
5091eb23
DE
12257 * inferiors.c (remove_process): Fix memory leak, free process.
12258 * linux-low.c (linux_remove_process): New function.
12259 (linux_kill): Call it instead of remove_process.
12260 (linux_detach, linux_wait_1): Ditto.
12261
155c8968
PA
122622009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12263
12264 * configure.srv: Add x86 Windows CE target.
12265
7fe519cb
UW
122662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12267
12268 * inferiors.c (get_thread_process): Make global.
12269 * server.h (get_thread_process): Add prototype.
12270 * thread-db.c (find_one_thread): Use get_thread_process
12271 instead of current_process.
12272 (thread_db_get_tls_address): Do not crash if called when
12273 thread layer is not yet initialized.
12274
5472f405
UW
122752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12276
12277 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12278 * spu-low.c (current_tid): Rename to ...
12279 (current_ptid): ... this.
12280 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12281 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12282 ptid_get_lwp (current_ptid) instead of current_tid.
12283 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12284 instead of current_tid. Use find_process_pid to verify pid
12285 argument is valid. Pass proper argument to remove_process.
12286 (spu_thread_alive): Compare current_ptid instead of current_tid.
12287 (spu_resume): Likewise.
12288
55ac2b99
PA
122892009-04-02 Pedro Alves <pedro@codesourcery.com>
12290
12291 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12292 variable.
12293
95954743
PA
122942009-04-01 Pedro Alves <pedro@codesourcery.com>
12295
12296 Implement the multiprocess extensions, and add linux multiprocess
12297 support.
12298
12299 * server.h (ULONGEST): Declare.
12300 (struct ptid, ptid_t): New.
12301 (minus_one_ptid, null_ptid): Declare.
12302 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12303 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12304 (struct inferior_list_entry): Change `id' type from unsigned from
12305 to ptid_t.
12306 (struct sym_cache, struct breakpoint, struct
12307 process_info_private): Forward declare.
12308 (struct process_info): Declare.
12309 (current_process): Declare.
12310 (all_processes): Declare.
12311 (initialize_inferiors): Declare.
12312 (add_thread): Adjust to use ptid_t.
12313 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12314 (add_process, remove_process, find_thread_pid): Declare.
12315 (find_inferior_id): Adjust to use ptid_t.
12316 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12317 (multi_process): Declare.
12318 (push_event): Adjust to use ptid_t.
12319 (read_ptid, write_ptid): Declare.
12320 (prepare_resume_reply): Adjust to use ptid_t.
12321 (clear_symbol_cache): Declare.
12322 * inferiors.c (all_processes): New.
12323 (null_ptid, minus_one_ptid): New.
12324 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12325 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12326 (add_thread): Change unsigned long to ptid. Remove gdb_id
12327 parameter. Adjust.
12328 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12329 (gdb_id_to_thread): Rename to ...
12330 (find_thread_pid): ... this. Change unsigned long to ptid.
12331 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12332 (loaded_dll, pull_pid_from_list): Adjust.
12333 (add_process, remove_process, find_process_pid)
12334 (get_thread_process, current_process, initialize_inferiors): New.
12335 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12336 (struct target_waitstatus) <related_pid>: Ditto.
12337 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12338 return type to int.
12339 (struct target_ops) <join>: Add `pid' argument.
12340 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12341 (struct target_ops) <wait>: Add `ptid' field. Change return type
12342 to ptid.
12343 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12344 (mywait): Add `ptid' argument. Change return type to ptid_t.
12345 (target_pid_to_str): Declare.
12346 * target.c (set_desired_inferior): Adjust to use ptids.
12347 (mywait): Add new `ptid' argument. Adjust.
12348 (target_pid_to_str): New.
12349 * mem-break.h (free_all_breakpoints): Declare.
12350 * mem-break.c (breakpoints): Delelete.
12351 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12352 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12353 to use per-process breakpoint list.
12354 (free_all_breakpoints): New.
12355 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12356 (symbol_cache, all_symbols_looked_up): Delete.
12357 (hexchars): New.
12358 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12359 read_ptid): New.
12360 (prepare_resume_reply): Change ptid argument's type from unsigned
12361 long to ptid_t. Adjust. Implement W;process and X;process.
12362 (free_sym_cache, clear_symbol_cache): New.
12363 (look_up_one_symbol): Adjust to per-process symbol cache. *
12364 * server.c (cont_thread, general_thread, step_thread): Change type
12365 to ptid_t.
12366 (attached): Delete.
12367 (multi_process): New.
12368 (last_ptid): Change type to ptid_t.
12369 (struct vstop_notif) <ptid>: Change type to ptid_t.
12370 (queue_stop_reply, push_event): Change `ptid' argument's type to
12371 ptid_t.
12372 (discard_queued_stop_replies): Add `pid' argument.
12373 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12374 changes. Don't reference the `attached' global.
12375 (attach_inferior): Adjust to mywait interface changes.
12376 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12377 features. Handle and report "multiprocess+". Handle
12378 "qAttached:PID".
12379 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12380 changes.
12381 (handle_v_kill): New.
12382 (handle_v_stopped): Adjust to use target_pid_to_str.
12383 (handle_v_requests): Allow multiple attaches and runs when
12384 multiprocess extensions are in effect. Handle "vKill".
12385 (myresume): Adjust to use ptids.
12386 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12387 (handle_status): Adjust to discard_queued_stop_replies interface
12388 change.
12389 (first_thread_of, kill_inferior_callback)
12390 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12391 (main): Call initialize_inferiors. Adjust to use ptids, killing
12392 and detaching from all inferiors. Handle multiprocess packet
12393 variants.
12394 * linux-low.h: Include gdb_proc_service.h.
12395 (struct process_info_private): New.
12396 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12397 <lwpid_of>: Use ptid_get_lwp.
12398 (get_lwp_thread): Adjust.
12399 (struct lwp_info): Add `dead' member.
12400 (find_lwp_pid): Declare.
12401 * linux-low.c (thread_db_active): Delete.
12402 (new_inferior): Adjust comment.
12403 (inferior_pid): Delete.
12404 (linux_add_process): New.
12405 (handle_extended_wait): Adjust.
12406 (add_lwp): Change unsigned long to ptid.
12407 (linux_create_inferior): Add process to processes table. Adjust
12408 to use ptids. Don't set new_inferior here.
12409 (linux_attach_lwp): Rename to ...
12410 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12411 it. Adjust to use ptids.
12412 (linux_attach_lwp): New.
12413 (linux_attach): Add process to processes table. Don't set
12414 new_inferior here.
12415 (struct counter): New.
12416 (second_thread_of_pid_p, last_thread_of_process_p): New.
12417 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12418 multiple processes.
12419 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12420 processes. Remove process from process table.
12421 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12422 to multiple processes.
12423 (any_thread_of): New.
12424 (linux_detach): Add `pid' argument, and handle it. Remove process
12425 from processes table.
12426 (linux_join): Add `pid' argument. Handle it.
12427 (linux_thread_alive): Change unsighed long argument to ptid_t.
12428 Consider dead lwps as not being alive.
12429 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12430 threads we're not interested in.
12431 (same_lwp, find_lwp_pid): New.
12432 (linux_wait_for_lwp): Change `pid' argument's type from int to
12433 ptid_t. Adjust.
12434 (linux_wait_for_event): Rename to ...
12435 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12436 from int to ptid_t. Adjust.
12437 (linux_wait_for_event): New.
12438 (linux_wait_1): Add `ptid' argument. Change return type to
12439 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12440 that exit from the process table.
12441 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12442 Adjust.
12443 (mark_lwp_dead): New.
12444 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12445 stopping all threads, mark its main lwp as dead.
12446 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12447 ptids.
12448 (fetch_register, usr_store_inferior_registers)
12449 (regsets_fetch_inferior_registers)
12450 (regsets_store_inferior_registers, linux_read_memory)
12451 (linux_write_memory): Inline `inferior_pid'.
12452 (linux_look_up_symbols): Adjust to use per-process
12453 `thread_db_active'.
12454 (linux_request_interrupt): Adjust to use ptids.
12455 (linux_read_auxv): Inline `inferior_pid'.
12456 (initialize_low): Don't reference thread_db_active.
12457 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12458 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12459 (ps_getpid): Return the pid of the current inferior.
12460 * thread-db.c (proc_handle, thread_agent): Delete.
12461 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12462 per-process data.
12463 (find_one_thread): Change argument type to ptid_t. Adjust to
12464 per-process data.
12465 (maybe_attach_thread): Adjust to per-process data and ptids.
12466 (thread_db_find_new_threads): Ditto.
12467 (thread_db_init): Ditto.
12468 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12469 processes table. Adjust to use ptids.
12470 (spu_kill, spu_detach): Adjust interface. Remove process from
12471 processes table.
12472 (spu_join, spu_thread_alive): Adjust interface.
12473 (spu_wait): Adjust interface. Remove process from processes
12474 table. Adjust to use ptids.
12475 * win32-low.c (current_inferior_tid): Delete.
12476 (current_inferior_ptid): New.
12477 (debug_event_ptid): New.
12478 (thread_rec): Take a ptid. Adjust.
12479 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12480 (child_delete_thread): Ditto.
12481 (do_initial_child_stuff): Add `attached' argument. Add process to
12482 processes table.
12483 (child_fetch_inferior_registers, child_store_inferior_registers):
12484 Adjust.
12485 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12486 (win32_attach): Pass 1 to do_initial_child_stuff.
12487 (win32_kill): Adjust interface. Remove process from processes
12488 table.
12489 (win32_detach): Ditto.
12490 (win32_join): Adjust interface.
12491 (win32_thread_alive): Take a ptid.
12492 (win32_resume): Adjust to use ptids.
12493 (get_child_debug_event): Ditto.
12494 (win32_wait): Adjust interface. Remove exiting process from
12495 processes table.
12496
bd99dc85
PA
124972009-04-01 Pedro Alves <pedro@codesourcery.com>
12498
12499 Non-stop mode support.
12500
12501 * server.h (non_stop): Declare.
12502 (gdb_client_data, handler_func): Declare.
12503 (delete_file_handler, add_file_handler, start_event_loop):
12504 Declare.
12505 (handle_serial_event, handle_target_event, push_event)
12506 (putpkt_notif): Declare.
12507 * target.h (enum resume_kind): New.
12508 (struct thread_resume): Replace `step' field by `kind' field.
12509 (TARGET_WNOHANG): Define.
12510 (struct target_ops) <wait>: Add `options' argument.
12511 <supports_non_stop, async, start_non_stop>: New fields.
12512 (target_supports_non_stop, target_async): New.
12513 (start_non_stop): Declare.
12514 (mywait): Add `options' argument.
12515 * target.c (mywait): Add `options' argument. Print child exit
12516 notifications here.
12517 (start_non_stop): New.
12518 * server.c (non_stop, own_buf, mem_buf): New globals.
12519 (struct vstop_notif): New.
12520 (notif_queue): New global.
12521 (queue_stop_reply, push_event, discard_queued_stop_replies)
12522 (send_next_stop_reply): New.
12523 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12524 interface changes.
12525 (attach_inferior): In non-stop mode, don't wait for the target
12526 here.
12527 (handle_general_set): Handle QNonStop.
12528 (handle_query): When handling qC, return the current general
12529 thread, instead of the first thread of the list.
12530 (handle_query): If the backend supports non-stop mode, include
12531 QNonStop+ in the qSupported query response.
12532 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12533 and non-stop mode.
12534 (handle_v_attach, handle_v_run): Handle non-stop mode.
12535 (handle_v_stopped): New.
12536 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12537 (myresume): Adjust to use resume_kind. Handle non-stop.
12538 (queue_stop_reply_callback): New.
12539 (handle_status): Handle non-stop mode.
12540 (main): Clear non_stop flag on reconnection. Use the event-loop.
12541 Refactor serial protocol handling from here ...
12542 (process_serial_event): ... to this new function. When GDB
12543 selects any thread, select one here. In non-stop mode, wait until
12544 GDB acks all pending events before exiting.
12545 (handle_serial_event, handle_target_event): New.
12546 * remote-utils.c (remote_open): Install remote_desc in the event
12547 loop.
12548 (remote_close): Remove remote_desc from the event loop.
12549 (putpkt_binary): Rename to...
12550 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12551 (putpkt_binary): New as wrapper around putpkt_binary_1.
12552 (putpkt_notif): New.
12553 (prepare_resume_reply): In non-stop mode, don't change the
12554 general_thread.
12555 * event-loop.c: New.
12556 * Makefile.in (OBJ): Add event-loop.o.
12557 (event-loop.o): New rule.
12558
12559 * linux-low.h (pid_of): Moved here.
12560 (lwpid_of): New.
12561 (get_lwp_thread): Use lwpid_of.
12562 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12563 * linux-low.c (pid_of): Delete.
12564 (inferior_pid): Use lwpid_of.
12565 (linux_event_pipe): New.
12566 (target_is_async_p): New.
12567 (delete_lwp): New.
12568 (handle_extended_wait): Use lwpid_of.
12569 (add_lwp): Don't set lwpid field.
12570 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12571 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12572 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12573 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12574 first. Adjust to linux_wait_for_event interface changes. Use
12575 lwpid_of.
12576 (linux_detach): Don't delete the main lwp here.
12577 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12578 (status_pending_p): Don't consider explicitly suspended lwps.
12579 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12580 pointer. Add OPTIONS argument. Change return type to int. Use
12581 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12582 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12583 pointer. Add status pointer argument. Return a pid instead of a
12584 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12585 changes. In non-stop mode, don't switch to a random thread.
12586 (linux_wait): Rename to...
12587 (linux_wait_1): ... this. Add target_options argument, and handle
12588 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12589 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12590 clean exit and signal exit code. Don't stop all threads in
12591 non-stop mode. In all-stop mode, only stop all threads when
12592 reporting a stop to GDB. Handle explicit thread stop requests.
12593 (async_file_flush, async_file_mark): New.
12594 (linux_wait): New.
12595 (send_sigstop): Use lwpid_of.
12596 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12597 interface changes. In non-stop mode, don't switch to a random
12598 thread.
12599 (linux_resume_one_lwp): Use lwpid_of.
12600 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12601 (linux_resume_one_thread): ... this. Handle resume_stop. In
12602 non-stop mode, don't look for pending flag in all threads.
12603 (resume_status_pending_p): Don't consider explicitly suspended
12604 threads.
12605 (my_waitpid): Reimplement. Emulate __WALL.
12606 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12607 Use lwpid_of.
12608 (sigchld_handler, linux_supports_non_stop, linux_async)
12609 (linux_start_non_stop): New.
12610 (linux_target_ops): Register linux_supports_non_stop, linux_async
12611 and linux_start_non_stop.
12612 (initialize_low): Install SIGCHLD handler.
12613 * thread-db.c (thread_db_create_event, find_one_thread)
12614 (thread_db_get_tls_address): Use lwpid_of.
12615 * win32-low.c (win32_detach): Adjust to use resume_kind.
12616 (win32_wait): Add `options' argument.
12617 * spu-low.c (spu_resume): Adjust to use resume_kind.
12618 (spu_wait): Add `options' argument.
12619
5b1c542e
PA
126202009-04-01 Pedro Alves <pedro@codesourcery.com>
12621
12622 Decouple target code from remote protocol.
12623
12624 * target.h (enum target_waitkind): New.
12625 (struct target_waitstatus): New.
12626 (struct target_ops) <wait>: Return an unsigned long. Take a
12627 target_waitstatus pointer instead of a char pointer.
12628 (mywait): Likewise.
12629 * target.c (mywait): Change prototype to return an unsigned long.
12630 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12631 * server.h (thread_from_wait, old_thread_from_wait): Delete
12632 declarations.
12633 (prepare_resume_reply): Change prototype to take a
12634 target_waitstatus.
12635 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12636 (last_status, last_ptid): New.
12637 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12638 pid instead of a signal.
12639 (attach_inferior): Remove "status" and "signal" parameters.
12640 Adjust.
12641 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12642 not as an address.
12643 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12644 (handle_v_requests, myresume): Remove "status" and "signal"
12645 parameters. Adjust.
12646 (handle_status): New.
12647 (main): Delete local `status'. Adjust.
12648 * remote-utils.c: Include target.h.
12649 (prepare_resume_reply): Change prototype to take a
12650 target_waitstatus. Adjust.
12651
12652 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12653 interface.
12654 * spu-low.c (spu_wait): Adjust.
12655 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12656 Delete.
12657 (win32_wait): Adjust.
12658
2bd7c093
PA
126592009-04-01 Pedro Alves <pedro@codesourcery.com>
12660
12661 * target.h (struct thread_resume): Delete leave_stopped member.
12662 (struct target_ops): Add a `n' argument to the `resume' callback.
12663 * server.c (start_inferior): Adjust.
12664 (handle_v_cont, myresume): Adjust.
12665 * linux-low.c (check_removed_breakpoint): Adjust to resume
12666 interface change, and to removed leave_stopped field.
12667 (resume_ptr): Delete.
12668 (struct thread_resume_array): New.
12669 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12670 resume interface change.
12671 (linux_continue_one_thread, linux_queue_one_thread)
12672 (resume_status_pending_p): Check if the resume field is NULL
12673 instead of checking the leave_stopped member.
12674 (linux_resume): Adjust to the target resume interface change.
12675 * spu-low.c (spu_resume): Adjust to the target resume interface
12676 change.
12677 * win32-low.c (win32_detach, win32_resume): Ditto.
12678
c35fafde
PA
126792009-04-01 Pedro Alves <pedro@codesourcery.com>
12680
12681 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12682 flag.
12683 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12684 pending.
12685 (linux_continue_one_thread): Only preserve the stepping flag if
12686 there's a pending breakpoint.
12687
0a59d50b
PA
126882009-03-31 Pedro Alves <pedro@codesourcery.com>
12689
12690 * server.c (main): After the inferior having exited, call
12691 remote_close before exiting gdbserver.
12692
f04c6d38
TJB
126932009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12694
12695 Fix size of FPSCR in Power 7 processors.
12696 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12697 (PPC_FEATURE_HAS_DFP): New #define.
12698 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12699 size of the FPSCR.
12700
78e5cee6
PA
127012009-03-23 Pedro Alves <pedro@codesourcery.com>
12702
12703 * server.c (handle_query) Whitespace and formatting.
12704
1b3f6016
PA
127052009-03-22 Pedro Alves <pedro@codesourcery.com>
12706
12707 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12708 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12709 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12710 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12711 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12712 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12713 Makefile.in, configure.ac: Fix whitespace throughout.
12714 * configure: Regenerate.
12715
a07b2135
PA
127162009-03-22 Pedro Alves <pedro@codesourcery.com>
12717
12718 * inferiors.c (find_inferior): Make it safe for the callback
12719 function to delete the currently iterated inferior.
12720
67cc2626
PA
127212009-03-22 Pedro Alves <pedro@codesourcery.com>
12722
12723 * Makefile.in (linuw_low_h): Move higher.
12724 (thread-db.o): Depend on $(linux_low_h).
12725
54a0b537
PA
127262009-03-17 Pedro Alves <pedro@codesourcery.com>
12727
12728 Rename "process" to "lwp" throughout.
12729
12730 * linux-low.c (all_processes): Rename to...
12731 (all_lwps): ... this.
12732 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12733 (add_process): Rename to ...
12734 (add_lwp): ... this. Adjust.
12735 (linux_create_inferior): Adjust.
12736 (linux_attach_lwp): Adjust.
12737 (linux_attach): Adjust.
12738 (linux_kill_one_process): Rename to ...
12739 (linux_kill_one_lwp): ... this. Adjust.
12740 (linux_kill): Adjust.
12741 (linux_detach_one_process): Rename to ...
12742 (linux_detach_one_lwp): ... this. Adjust.
12743 (linux_detach): Adjust.
12744 (check_removed_breakpoint): Adjust.
12745 (status_pending_p): Adjust.
12746 (linux_wait_for_process): Rename to ...
12747 (linux_wait_for_lwp): ... this. Adjust.
12748 (linux_wait_for_event): Adjust.
12749 (send_sigstop): Adjust.
12750 (wait_for_sigstop): Adjust.
12751 (stop_all_processes): Rename to ...
12752 (stop_all_lwps): ... this.
12753 (linux_resume_one_process): Rename to ...
12754 (linux_resume_one_lwp): ... this. Adjust.
12755 (linux_set_resume_request, linux_continue_one_thread)
12756 (linux_queue_one_thread, resume_status_pending_p)
12757 (usr_store_inferior_registers, regsets_store_inferior_registers)
12758 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12759 Adjust.
12760 * linux-low.h (get_process): Rename to ...
12761 (get_lwp): ... this. Adjust.
12762 (get_thread_process): Rename to ...
12763 (get_thread_lwp): ... this. Adjust.
12764 (get_process_thread): Rename to ...
12765 (get_lwp_thread): ... this. Adjust.
12766 (struct process_info): Rename to ...
12767 (struct lwp_info): ... this.
12768 (all_processes): Rename to ...
12769 (all_lwps): ... this.
12770 * proc-service.c (ps_lgetregs): Adjust.
12771 * thread-db.c (thread_db_create_event, find_one_thread)
12772 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12773
0b16c5cf
PA
127742009-03-14 Pedro Alves <pedro@codesourcery.com>
12775
12776 * server.c (handle_query): Handle "qAttached".
12777
32de4b9d
NS
127782009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12779
12780 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12781 GPLv3, update license URL.
12782
2aecd87f
DE
127832009-03-01 Doug Evans <dje@google.com>
12784
93efd302 12785 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12786 (server_h): Add gdb_signals.h.
12787 (signals.o): Update.
12788 * server.h (target_signal_from_host,target_signal_to_host_p)
12789 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12790
86b1f9c5
PM
127912009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12792
12793 * remote-utils.c (getpkt): Also generate remote-debug
12794 information if noack_mode is set.
12795
4aa995e1
PA
127962009-02-06 Pedro Alves <pedro@codesourcery.com>
12797
12798 * server.c (handle_query): Report qXfer:siginfo:read and
12799 qXfer:siginfo:write as supported and handle them.
12800 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12801 * linux-low.c (linux_xfer_siginfo): New.
12802 (linux_target_ops): Set it.
12803
62709adf
PA
128042009-01-26 Pedro Alves <pedro@codesourcery.com>
12805
12806 * server.c (gdbserver_usage): Mention --remote-debug.
12807 (main): Accept '--remote-debug' switch.
12808
aef93bd7
DE
128092009-01-18 Doug Evans <dje@google.com>
12810
12811 * regcache.c (new_register_cache): No need to check result of xcalloc.
12812 * server.c (handle_search_memory): Back out calls to xmalloc,
12813 result is checked and error is returned to user upon failure.
12814 (handle_query): Ditto. Add more checks for result of malloc.
12815 (handle_v_cont): Check result of malloc, report error back to
12816 user upon failure.
12817 (handle_v_run): Ditto. Call freeargv.
12818 * server.h (freeargv): Declare.
12819 * utils.c (freeargv): New fn.
12820
54363045
DE
128212009-01-15 Doug Evans <dje@google.com>
12822
f626972c
DE
12823 * gdbreplay.c (perror_with_name): Make arg const char *.
12824 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12825 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12826 * utils.c (perror_with_name): Make arg const char *.
54363045 12827
18aae699
PA
128282009-01-14 Pedro Alves <pedro@codesourcery.com>
12829
12830 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12831 when handling a EXIT_PROCESS_DEBUG_EVENT.
12832
ff703abe
JB
128332009-01-06 Joel Brobecker <brobecker@adacore.com>
12834
12835 * gdbreplay.c (gdbreplay_version): Update copyright year.
12836 * server.c (gdbserver_version): Likewise.
12837
f21cc1a2 128382009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12839
12840 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12841 (handle_extended_wait): Improve comment.
0e21c1ec 12842
bca929d3
DE
128432008-12-13 Doug Evans <dje@google.com>
12844
12845 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12846 * server.h (ATTR_MALLOC): New macro.
12847 (xmalloc,xcalloc,xstrdup): Declare.
12848 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12849 * inferiors.c: Ditto.
12850 * linux-low.c: Ditto.
12851 * mem-break.c: Ditto.
12852 * regcache.c: Ditto.
12853 * remote-utils.c: Ditto.
12854 * server.c: Ditto.
12855 * target.c: Ditto.
12856 * win32-low.c: Ditto.
12857
97438e3f
DE
128582008-12-12 Doug Evans <dje@google.com>
12859
896c7fbb
DE
12860 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12861 in debugging printf.
12862
97438e3f
DE
12863 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12864
e3b886f8
DE
128652008-12-09 Doug Evans <dje@google.com>
12866
12867 * linux-low.h (struct process_info): Delete member tid, unused.
12868 * thread-db.c (find_one_thread): Update.
12869 (maybe_attach_thread): Update.
12870
07e059b5
VP
128712008-12-02 Pedro Alves <pedro@codesourcery.com>
12872
889bf7c5
PA
12873 * target.h (struct target_ops): Add qxfer_osdata member.
12874 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12875 and dirent.h.
12876 (linux_qxfer_osdata): New functions.
12877 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12878 callback.
12879 * server.c (handle_query): Handle "qXfer:osdata:read:".
12880 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12881 (buffer_xml_printf): New functions.
12882 * server.h (struct buffer): New.
12883 (buffer_grow_str, buffer_grow_str0): New macros.
12884 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12885 (buffer_xml_printf): Declare.
07e059b5 12886
4cab47ab
DE
128872008-11-24 Doug Evans <dje@google.com>
12888
12889 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12890
f142445f
DJ
128912008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12892
12893 * server.c (handle_v_run): Always use the supplied argument list.
12894
d0107bb6 128952008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12896
d0107bb6
BW
12897 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12898 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12899
2c4ad781
TJB
129002008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12901
12902 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12903 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12904 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12905 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12906 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12907 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12908 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12909 XML target descriptions.
12910 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12911 when inferior is running on an ISA 2.05 or later processor. Add
12912 special case to return offset for full 64-bit slot of FPSCR when
12913 in 32-bits.
12914
dfb64f85
DJ
129152008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12916
12917 * Makefile.in (SFILES, clean): Added sparc64 files.
12918 (reg-sparc64.o, reg-sparc64.c): New.
12919 * configure.srv (sparc*-*-linux*): New configuration.
12920 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12921 syscall arguments for SPARC.
12922 (regsets_store_inferior_registers): Likewise.
12923 * linux-sparc-low.c: New file.
12924
66b6e1dd
DE
129252008-10-21 Doug Evans <dje@google.com>
12926
12927 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12928 (READLINE_DIR,READLINE_DEP): Delete.
12929 (INTERNAL_CFLAGS): Update.
12930 (LINTFLAGS): Update.
12931
9b710a42
PA
129322008-10-10 Pedro Alves <pedro@codesourcery.com>
12933
12934 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12935 whole argv from the last run, not just argv[0].
12936
5822d809
PA
129372008-09-08 Pedro Alves <pedro@codesourcery.com>
12938
12939 * regcache.c (new_register_cache): Return NULL if the register
12940 cache size isn't known yet.
12941 (free_register_cache): Avoid dereferencing a NULL regcache.
12942
74aac56f
DJ
129432008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12944
12945 * configure.srv: Merge MIPS and MIPS64.
12946
400b20f5
MR
129472008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12948
12949 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12950
677c5bb1
LM
129512008-08-18 Luis Machado <luisgpm@br.ibm.com>
12952
12953 * Makefile.in: Add required vsx dependencies.
12954
12955 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12956 Declare init_registers_powerpc_vsx32l.
12957 Declare init_registers_powerpc_vsx64l.
12958 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12959 (ppc_arch_setup): Check for VSX in hwcap.
12960 (ppc_fill_vsxregset): New function.
12961 (ppc_store_vsxregset): New function.
12962 Add new VSX entry in regset_info target_regsets.
12963
12964 * configure.srv: Add new VSX dependencies.
12965
a6f3e723
SL
129662008-08-12 Pedro Alves <pedro@codesourcery.com>
12967
12968 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12969 (remote_open): Set or clear transport_is_reliable.
12970 (putpkt_binary): Don't expect acks in noack mode.
12971 (getpkt): Don't send ack/nac in noack mode.
12972 * server.c (handle_general_set): Handle QStartNoAckMode.
12973 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12974 qSupported.
12975 (main): Reset noack_mode on every connection.
12976 * server.h (noack_mode): Declare.
12977
a417dc56
RW
129782008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12979
12980 * Makefile.in (GDBREPLAY_OBS): New variable.
12981 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12982
3221518c
UW
129832008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12984 Daniel Jacobowitz <dan@codesourcery.com>
12985
12986 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12987 (usr_store_inferior_registers): Likewise.
12988 (regsets_store_inferior_registers): Likewise.
12989
ec56be1b
PA
129902008-07-31 Rolf Jansen <rj@surtec.com>
12991 Pedro Alves <pedro@codesourcery.com>
12992
12993 * configure.ac: Check for memmem declaration.
12994 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12995 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12996 (disable_packet_qfThreadInfo): Unconditionally compile.
12997 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12998 * configure, config.in: Regenerate.
12999
2fe5e3ff
DE
130002008-07-28 Doug Kwan <dougkwan@google.com>
13001
13002 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13003 (linux_write_memory): Remove declaration of errno.
13004
836acd6d
UW
130052008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13006
13007 * linux-low.c (handle_extended_wait): Do not use "status"
13008 variable uninitialized.
13009
aeba519e
PA
130102008-07-07 Pedro Alves <pedro@codesourcery.com>
13011
13012 * server.c (handle_v_attach): Inhibit reporting dll changes.
13013
db42f210
PA
130142008-06-27 Pedro Alves <pedro@codesourcery.com>
13015
13016 * remote-utils.c (prepare_resume_reply): If requested, don't
13017 output "thread:TID" in the T stop reply.
13018
13019 * server.c (disable_packet_vCont, disable_packet_Tthread)
13020 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13021 (handle_query): If requested, disable support for qC, qfThreadInfo
13022 and qsThreadInfo.
13023 (handle_v_requests): If requested, disable support for vCont.
13024 (gdbserver_show_disableable): New.
13025 (main): Handle --disable-packet and --disable-packet=LIST.
13026
13027 * server.h (disable_packet_vCont, disable_packet_Tthread)
13028 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13029
8e4c5421
CD
130302008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13031
13032 * server.c (gdbserver_usage): Mention --version.
13033
6e23a804
DJ
130342008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13035
13036 * Makefile.in (gdbreplay.o): New rule.
13037
90aa6a40
JM
130382008-06-06 Joseph Myers <joseph@codesourcery.com>
13039
13040 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13041 message, not gdbserver.
13042
c16158bc 130432008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13044 Nathan Sidwell <nathan@codesourcery.com>
13045 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13046
13047 * acinclude.m4: Include ../../config/acx.m4.
13048 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13049 * configure, config.in: Regenerate.
13050 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13051 * server.c (gdbserver_version): Print PKGVERSION.
13052 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13053 (main): Adjust gdbserver_usage calls.
13054 * gdbreplay.c (version, host_name): Add declarations.
13055 (gdbreplay_version, gdbreplay_usage): New.
13056 (main): Accept --version and --help options.
13057
aeb75bf5
DJ
130582008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13059
13060 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13061 (arm_breakpoint_at): Handle Thumb.
13062 (the_low_target): Add comment.
13063
76b233dd
UW
130642008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13065
13066 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13067
08388c79
DE
130682008-05-09 Doug Evans <dje@google.com>
13069
a3c83fae
DE
13070 * server.h (decode_search_memory_packet): Declare.
13071 * remote-utils.c (decode_search_memory_packet): New fn.
13072 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13073 (handle_search_memory): New fn.
13074 (handle_query): Process qSearch:memory packets.
13075
bb9c3d36
UW
130762008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13077
13078 * regcache.c (registers_length): Remove.
13079 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13080 full register packet.
13081 * regcache.h (registers_length): Remove prototype.
13082 * server.h (PBUFSIZ): Define to 16384.
13083
7284e1be
UW
130842008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13085
13086 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13087 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13088 powerpc-64l.o, and powerpc-altivec64l.o.
13089 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13090 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13091 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13092 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13093 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13094 to srv_xmlfiles.
13095
13096 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13097 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13098 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13099 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13100 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13101 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13102 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13103 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13104 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13105 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13106 (clean): Update.
13107
13108 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13109 (init_registers_powerpc_32l): ... this new prototype.
13110 (init_registers_powerpc_32): Remove, replace by ...
13111 (init_registers_powerpc_altivec32l): ... this new prototype.
13112 (init_registers_powerpc_e500): Remove, replace by ...
13113 (init_registers_powerpc_e500l): ... this new prototype.
13114 (init_registers_ppc64): Remove, replace by ...
13115 (init_registers_powerpc_64l): ... this new prototype.
13116 (init_registers_powerpc_64): Remove, replace by ...
13117 (init_registers_powerpc_altivec64l): ... this new prototype.
13118 (ppc_num_regs): Set to 73.
13119 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13120 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13121 (ppc_cannot_store_register): Handle orig_r3 and trap.
13122 (ppc_arch_setup): Update init_registers_... calls.
13123 (ppc_fill_gregset): Handle orig_r3 and trap.
13124
13125 * inferiors.c (clear_inferiors): Reset current_inferior.
13126
fdc59709
PB
131272008-04-23 Paolo Bonzini <bonzini@gnu.org>
13128
889bf7c5
PA
13129 * acinclude.m4: Add override.m4.
13130 * configure: Regenerate.
fdc59709 13131
c9b2f845
UW
131322008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13133
13134 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13135 initial call to init_register_ppc64.
13136
550512b8
UW
131372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13138
43aaf8b6
PA
13139 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13140 single powerpc*-*-linux* case.
550512b8
UW
13141 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13142
b6430ec3
UW
131432008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13144
13145 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13146 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13147 from reg_xmlfiles.
13148 * linux-ppc-low.c: Include <elf.h>.
13149 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13150 (ppc_hwcap): New global variable.
13151 (ppc_regmap): Remove __SPE__ #ifdef sections.
13152 (ppc_regmap_e500): New global variable.
13153 (ppc_cannot_store_register): Update __SPE__ special case.
13154 (ppc_get_hwcap): New function.
13155 (ppc_arch_setup): Use it to determine whether inferior supports
13156 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13157 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13158 Do not access registers if target does not support AltiVec.
13159 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13160 Do not access registers if target does not support SPE.
13161 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13162
52fa2412
UW
131632008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13164
13165 * linux-low.c (disabled_regsets, num_regsets): New.
13166 (use_regsets_p): Delete.
13167 (linux_wait_for_process): Clear disabled_regsets.
13168 (regsets_fetch_inferior_registers): Check and set it.
13169 (regsets_store_inferior_registers): Likewise.
13170 (linux_fetch_registers, linux_store_registers): Do not use
13171 use_regsets_p.
13172 (initialize_low): Allocate disabled_regsets.
13173
e28b3332
DJ
131742008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13175
13176 * Makefile.in (LIBOBJS): New.
13177 (OBS): Use LIBOBJS.
13178 (memmem.o): New rule.
13179 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13180 * configure: Regenerated.
13181
4536995d
UW
131822008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13183
13184 * server.c (handle_query): Never return "unsupported" for
13185 qXfer:features:read queries.
13186
221c031f
UW
131872008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13188
13189 * server.c (get_features_xml): Fix inverted condition.
13190 (handle_query): Always support qXfer:feature:read.
13191
ccd213ac
DJ
131922008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13193
13194 * server.c (wrapper_argv): New.
13195 (start_inferior): Handle wrapper_argv. If set, expect an extra
13196 trap.
13197 (gdbserver_usage): Document --wrapper.
13198 (main): Parse --wrapper.
13199
6fe305f7
UW
132002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13201
13202 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13203 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13204 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13205 (ppc_set_pc): Likewise.
13206 (ppc_arch_setup): New function.
13207 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13208 of collect_register.
889bf7c5 13209 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13210
5b0a002e
UW
132112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13212
13213 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13214 instead of linux-ppc64-low.o.
13215 * linux-ppc64-low.c: Remove file.
13216 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13217 (linux-ppc64-low.o): Remove rule.
13218
13219 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13220 (init_registers_powerpc_64): Likewise.
13221 (ppc_regmap): Conditionally define depending on __powerpc64__.
13222 (ppc_cannot_store_register): Do not special-case "fpscr" when
13223 compiled on __powerpc64__.
13224 (ppc_collect_ptrace_register): New function.
13225 (ppc_supply_ptrace_register): New function.
13226 (ppc_breakpoint): Change type to "unsigned int".
13227 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13228 (the_low_target): Conditionally provide initializers for the
889bf7c5 13229 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13230 collect_ptrace_register and supply_ptrace_register members.
13231
9b4b61c8
UW
132322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13233
13234 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13235 * server.c (gdbserver_xmltarget): Define.
13236 (get_features_xml): Use it to replace "target.xml" and arch_string.
13237
13238 * configure.srv: Remove srv_xmltarget. Add XML files that were
13239 mentioned there to srv_xmlfiles instead. Remove conditional tests
13240 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13241 srv_xmlfiles and srv_regobj to include all possible choices.
13242 * configure.ac (srv_xmltarget): Remove.
13243 (srv_xmlfiles): Do not add "target.xml".
13244 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13245 checks for supplementary target information.
13246 * configure: Regenerate.
13247 * Makefile.in (XML_TARGET): Remove.
13248 (target.xml): Remove rule.
13249 (clean): Do not clean up target.xml.
13250 (.PRECIOUS): Do not mention target.xml.
13251
13252 * target.h (struct target_ops): Remove arch_string member.
13253 * linux-low.c (linux_arch_string): Remove.
13254 (linux_target_ops): Remove arch_string initializer.
13255 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13256 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13257 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13258 * spu-low.c (spu_arch_string): Remove.
13259 (spu_target_ops): Remove arch_string initializer.
13260 * win32-low.c (win32_arch_string): Remove.
13261 (win32_target_ops): Remove arch_string initializer.
13262 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13263 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13264 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13265
ee1a7ae4
UW
132662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13267
13268 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13269 by collect_ptrace_register and supply_ptrace_register hooks.
13270 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13271 instead of checking for the_low_target.left_pad_xfer.
13272 (usr_store_inferior_registers): Use collect_ptrace_register callback
13273 instead of checking for the_low_target.left_pad_xfer.
13274
13275 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13276 (s390_supply_ptrace_register): Likewise.
13277 (s390_fill_gregset): Call s390_collect_ptrace_register.
13278 (the_low_target): Update.
13279
13280 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13281 (ppc_supply_ptrace_register): Likewise.
13282 (the_low_target): Update.
13283
13284 * linux-i386-low.c (the_low_target): Update.
13285 * linux-x86-64-low.c (the_low_target): Update.
13286
d61ddec4
UW
132872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13288
13289 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13290 reg-s390.o and reg-s390x.o.
13291
13292 * linux-low.c (new_inferior): New global variable.
13293 (linux_create_inferior, linux_attach): Set it.
13294 (linux_wait_for_process): Call the_low_target.arch_setup after the
13295 target has stopped for the first time.
13296 (initialize_low): Do not call the_low_target.arch_setup.
13297
13298 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13299 (s390_set_pc): Likewise.
13300 (s390_arch_setup): New function.
13301 (the_low_target): Use s390_arch_setup as arch_setup routine.
13302
13303 * regcache.c (realloc_register_cache): New function.
13304 (set_register_cache): Call it for each existing regcache.
13305
d05b4ac3
UW
133062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13307
13308 * server.h (init_registers): Remove prototype.
13309
13310 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13311 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13312 instead of init_registers ().
13313 * linux-arm-low.c (init_registers_arm): Add prototype.
13314 (init_registers_arm_with_iwmmxt): Likewise.
13315 (the_low_target): Add initializer for arch_setup field.
13316 * linux-cris-low.c (init_registers_cris): Add prototype.
13317 (the_low_target): Add initializer for arch_setup field.
13318 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13319 (the_low_target): Add initializer for arch_setup field.
13320 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13321 (the_low_target): Add initializer for arch_setup field.
13322 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13323 (the_low_target): Add initializer for arch_setup field.
13324 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13325 (the_low_target): Add initializer for arch_setup field.
13326 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13327 (the_low_target): Add initializer for arch_setup field.
13328 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13329 (init_registers_mips64_linux): Likewise.
13330 (the_low_target): Add initializer for arch_setup field.
13331 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13332 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13333 (the_low_target): Add initializer for arch_setup field.
13334 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13335 (init_registers_powerpc_64): Likewise.
13336 (the_low_target): Add initializer for arch_setup field.
13337 * linux-s390-low.c (init_registers_s390): Add prototype.
13338 (init_registers_s390x): Likewise.
13339 (the_low_target): Add initializer for arch_setup field.
13340 * linux-sh-low.c (init_registers_sh): Add prototype.
13341 (the_low_target): Add initializer for arch_setup field.
13342 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13343 (the_low_target): Add initializer for arch_setup field.
13344 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13345 (the_low_target): Add initializer for arch_setup field.
13346
13347 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13348 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13349 instead of init_registers ().
13350 * win32-arm-low.c (init_registers_arm): Add prototype.
13351 (the_low_target): Add initializer for arch_setup field.
13352 * win32-i386-low.c (init_registers_i386): Add prototype.
13353 (the_low_target): Add initializer for arch_setup field.
13354
13355 * spu-low.c (init_registers_spu): Add prototype.
13356 (initialize_low): Call initialie_registers_spu () instead of
13357 initialize_registers ().
13358
fd96d250
PA
133592008-02-19 Pedro Alves <pedro@codesourcery.com>
13360
13361 * server.c (handle_v_requests): When handling the vRun and vAttach
13362 packets, if already debugging a process, don't kill it. Return an
13363 error instead.
13364
d41b6bb4
DJ
133652008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13366
13367 * server.c (handle_query): Correct length check.
13368
5ac588cf
PA
133692008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13370
13371 * win32-low.c (do_initial_child_stuff): Add process handle
13372 parameter. Set current_process_handle and current_process_id from the
13373 parameters. Clear globals.
13374 (win32_create_inferior): Don't set current_process_handle and
13375 current_process_id here. Instead pass them on the call to
13376 do_initial_child_stuff.
13377 (win32_attach): Likewise.
13378 (win32_clear_inferiors): New.
13379 (win32_kill): Don't close the current process handle or the
13380 current thread handle here. Instead call win32_clear_inferiors.
13381 (win32_detach): Don't open a new handle to the process. Call
13382 win32_clear_inferiors.
13383 (win32_join): Don't rely on current_process_handle; open a new
13384 handle using the process id.
13385 (win32_wait): Call win32_clear_inferiors when the inferior process
13386 has exited.
13387
ecd7ecbc
DJ
133882008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13389
13390 * server.c (monitor_show_help): Add "exit".
13391
1525d545
MG
133922008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13393
ecd7ecbc 13394 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13395 (clean): Add reg-xtensa.c.
13396 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13397 * configure.srv (xtensa*-*-linux*) New target.
13398 * linux-xtensa-low.c: New.
13399 * xtensa-xtregs.c: New.
1525d545 13400
59a016f0
PA
134012008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13402
13403 * hostio.c: Don't include errno.h.
13404 (errno_to_fileio_errno): Move to hostio-errno.
13405 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13406 error number outputting to the target->hostio_last_error callback.
13407 (hostio_packet_error): Use FILEIO_EINVAL directly.
13408 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13409 calls to hostio_error.
13410 * hostio-errno.c: New.
13411 * server.h (hostio_last_error_from_errno): Declare.
13412 * target.h (target_ops): Add hostio_last_error member.
13413 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13414 as hostio_last_error handler.
889bf7c5 13415 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13416 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13417 (wince_hostio_last_error): New functions.
13418 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13419 as hostio_last_error handler.
13420 (win32_target_ops) [!_WIN32_WCE]: Register
13421 hostio_last_error_from_errno as hostio_last_error handler.
13422 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13423 (hostio-errno.o): New rule.
13424 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13425 * configure.srv (srv_hostio_err_objs): New variable. Default to
13426 hostio-errno.o.
13427 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13428 * configure: Regenerate.
13429
2d717e4f
DJ
134302008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13433 (linux_kill, linux_detach): Clean up the process list.
13434 * remote-utils.c (remote_open): Improve port number parsing.
13435 (putpkt_binary, input_interrupt): Only send interrupts if the target
13436 is running.
13437 * server.c (extended_protocol): Make static.
13438 (attached): Define earlier.
13439 (exit_requested, response_needed, program_argv): New variables.
13440 (target_running): New.
13441 (start_inferior): Clear attached here.
13442 (attach_inferior): Set attached here.
13443 (require_running): Define.
13444 (handle_query): Use require_running and target_running. Implement
13445 "monitor exit".
13446 (handle_v_attach, handle_v_run): New.
13447 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13448 (gdbserver_usage): Update.
13449 (main): Redo argument parsing. Handle --debug and --multi. Handle
13450 --attach along with other options or after the port. Save
13451 program_argv. Support no initial program. Resynchronize
13452 communication with GDB after an error. Handle "monitor exit".
13453 Use require_running and target_running. Always allow the extended
13454 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13455 restart in extended mode.
13456 * README: Refer to the GDB manual. Update --attach usage.
13457
7407e2de
AS
134582007-12-20 Andreas Schwab <schwab@suse.de>
13459
13460 * linux-low.c (STACK_SIZE): Define.
13461 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13462 (linux_test_for_tracefork): Likewise.
13463
b65d95c5
DJ
134642007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13465
13466 * linux-low.c (linux_wait_for_event): Update messages. Do not
13467 reinsert auto-delete breakpoints.
13468 * mem-break.c (struct breakpoint): Change return type of handler to
13469 int.
13470 (set_breakpoint_at): Update handler type.
13471 (reinsert_breakpoint_handler): Return 1 instead of calling
13472 delete_breakpoint.
13473 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13474 setting a new one.
13475 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13476 * mem-break.h (set_breakpoint_at): Update handler type.
13477 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13478 * win32-low.c (auto_delete_breakpoint): New.
13479 (get_child_debug_event): Use it.
13480
4e799345
DJ
134812007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13482
13483 * configure.ac: Check for pread and pwrite.
13484 * hostio.c (handle_pread): Fall back to lseek and read.
13485 (handle_pwrite): Fall back to lseek and write.
13486 * config.in, configure: Regenerated.
13487
27524b67
DJ
134882007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13489
13490 * server.c (myresume): Add own_buf argument.
13491 (main): Update calls.
13492
a20d5e98
DJ
134932007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13494
13495 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13496 * remote-utils.c (remote_open): Do not call disable_async_io.
13497 (block_async_io): Delete.
13498 (unblock_async_io): Make static.
13499 (initialize_async_io): New.
13500 * server.c (handle_v_cont): Handle async I/O here.
13501 (myresume): Likewise. Move other common resume tasks here...
13502 (main): ... from here. Call initialize_async_io. Disable async
13503 I/O before the main loop.
13504 * server.h (initialize_async_io): Declare.
13505 (block_async_io, unblock_async_io): Delete prototypes.
13506 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13507
b79d787e
DJ
135082007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13509
13510 * remote-utils.c (readchar): Allow binary data in received messages.
13511
d97903b2
PA
135122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13513
13514 * win32-low.c (attaching): New global.
13515 (win32_create_inferior): Clear the `attaching' global.
13516 (win32_attach): Set the `attaching' global.
13517 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13518 attaching. Only set a breakpoint at the entry point if not
13519 attaching.
13520
311de423
PA
135212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13522
13523 * server.c (main): Don't report dll events on the initial
13524 connection on attaches.
13525
6c2d16d2
PA
135262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13527
13528 * server.c (main): Relax numerical bases supported for the pid of
13529 the --attach command line argument.
13530
5ca906e6
PA
135312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13532
13533 * win32-low.c (win32_attach): Call OpenProcess before
13534 DebugActiveProcess, not after. Add last error output to error
13535 call.
13536
9c6c8194
PA
135372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13538
13539 * win32-low.c (win32_get_thread_context)
13540 (win32_set_thread_context): New functions.
13541 (thread_rec): Use win32_get_thread_context.
13542 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13543 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13544 field.
13545
4d5d1aaa
PA
135462007-12-03 Leo Zayas
13547 Pedro Alves <pedro_alves@portugalmail.pt>
13548
13549 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13550 global variables.
13551 (child_add_thread): Minor cleanup.
13552 (child_continue): Resume artificially suspended threads before
13553 calling ContinueDebugEvent.
13554 (suspend_one_thread): New.
13555 (fake_breakpoint_event): New.
13556 (get_child_debug_event): Change return type to int. Check here if
13557 gdb sent an interrupt request. If a soft interrupt was requested,
13558 fake a breakpoint event. Return 0 if there is no event to handle,
13559 and 1 otherwise.
13560 (win32_wait): Don't check here if gdb sent an interrupt request.
13561 Ensure there is a valid event to handle.
13562 (win32_request_interrupt): Add soft interruption method as last
13563 resort.
13564
c436e841
PA
135652007-12-03 Leo Zayas
13566 Pedro Alves <pedro_alves@portugalmail.pt>
13567
13568 * win32-low.h (win32_thread_info): Add descriptions to the
13569 structure members. Replace `suspend_count' counter by a
13570 `suspended' flag.
13571 * win32-low.c (thread_rec): Update condition of when to get the
13572 context from the inferior. Rely on ContextFlags being set if it
13573 has already been retrieved. Only suspend the inferior thread if
13574 we haven't already. Warn if that fails.
13575 (continue_one_thread): s/suspend_count/suspended/. Only call
13576 ResumeThread once. Warn if that fails.
13577
e7b5fa67
PA
135782007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13579
13580 * win32-low.c (win32_wait): Don't read from the inferior when it
13581 has already exited.
13582
a385171d
PA
135832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13584
13585 * Makefile.in (win32_low_h): New variable.
13586 (win32-low.o): Add dependency on $(win32_low_h).
13587 (win32-arm-low.o, win32-i386-low.o): New rules.
13588
f80c84b3
DJ
135892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * hostio.c: Correct copyright year.
13592
a6b151f1
DJ
135932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * Makefile.in (OBS): Add hostio.o.
13596 (hostio.o): New rule.
13597 * server.h (handle_vFile): Declare.
13598 * hostio.c: New file.
13599 * server.c (handle_v_requests): Take packet_len and new_packet_len
13600 for binary packets. Call handle_vFile.
13601 (main): Update call to handle_v_requests.
13602
f9387fc3
DJ
136032007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13604
13605 * linux-low.c: Include <sched.h>.
13606
51c2684e
DJ
136072007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13608
13609 * linux-low.c (linux_tracefork_grandchild): New.
13610 (linux_tracefork_child): Use clone.
13611 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13612
75f83163
JB
136132007-10-31 Joel Brobecker <brobecker@adacore.com>
13614
13615 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13616
da5898ce
DJ
136172007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13620
24a09b5f
DJ
136212007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13622
13623 * inferiors.c (change_inferior_id): Delete.
13624 (add_pid_to_list, pull_pid_from_list): New.
13625 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13626 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13627 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13628 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13629 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13630 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13631 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13632 (using_threads): Always set to 1.
13633 (handle_extended_wait): New.
13634 (add_process): Do not set TID.
13635 (linux_create_inferior): Set must_set_ptrace_flags.
13636 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13637 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13638 (linux_thread_alive): Rename TID argument to LWPID.
13639 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13640 (linux_wait_for_event): Do not use TID or check using_threads. Update
13641 call to dead_thread_notify. Call handle_extended_wait.
13642 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13643 (send_sigstop): Delete sigstop_sent.
13644 (wait_for_sigstop): Avoid TID.
13645 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13646 (linux_test_for_tracefork): New.
13647 (linux_lookup_signals): Use thread_db_active and
13648 linux_supports_tracefork_flag.
13649 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13650 * linux-low.h (get_process_thread): Avoid TID.
13651 (struct process_ifo): Move thread_known and tid to the end. Remove
13652 sigstop_sent.
13653 (linux_attach_lwp, thread_db_init): Update prototypes.
13654 * server.h (change_inferior_id): Delete prototype.
13655 (add_pid_to_list, pull_pid_from_list): New prototypes.
13656 * thread-db.c (thread_db_use_events): New.
13657 (find_first_thread): Rename to...
13658 (find_one_thread): ...this. Update callers and messages. Do not
13659 call fatal. Check thread_db_use_events. Do not call
13660 change_inferior_id or new_thread_notify.
13661 (maybe_attach_thread): Update. Do not call new_thread_notify.
13662 (thread_db_init): Set thread_db_use_events. Check use_events.
13663 * utils.c (fatal, warning): Correct message prefix.
13664
30ed0a8f
DJ
136652007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13666
13667 * Makefile.in (clean): Remove new files.
13668 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13669 (powerpc-64.o, powerpc-64.c): New rules.
13670 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13671 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13672 with SPE.
13673 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13674 SPE targets.
13675 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13676 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13677 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13678 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13679 (target_regsets): Add AltiVec and SPE register sets.
13680 * configure.ac: Check for AltiVec and SPE.
13681 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13682 (ppc_fill_vrregset, ppc_store_vrregset): New.
13683 (target_regsets): Add AltiVec register set.
13684 * configure: Regenerated.
13685
fd462a61
DJ
136862007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13687
13688 * linux-low.c (O_LARGEFILE): Define.
13689 (linux_read_memory): Use /proc/PID/mem.
13690 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13691 * configure, config.in: Regenerated.
13692
69f223ed
DJ
136932007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13694
13695 * linux-low.c (linux_wait_for_event): Do not pass signals while
13696 single-stepping.
13697
aec18585
PA
136982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13699
13700 * win32-low.c (create_process): New.
13701 (win32_create_inferior): Use create_process instead of
13702 CreateProcess. If create_process failed retry appending an ".exe"
13703 suffix. Store the GetLastError result immediatelly after
13704 create_process calls and use it on the call to error.
13705
34d86ddd
PA
137062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13707
13708 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13709
5a0e3bd0
JB
137102007-08-23 Joel Brobecker <brobecker@adacore.com>
13711
13712 * configure.ac: Switch license to GPLv3.
13713
f88c79e6
MS
137142007-08-01 Michael Snyder <msnyder@access-company.com>
13715
13716 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13717
6b3d9b83
PA
137182007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13719
13720 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13721 typedef.
13722 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13723 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13724 CloseToolhelp32Snapshot.
13725 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13726 CloseToolhelp32Snapshot.
13727
c588c53c
MS
137282007-07-27 Michael Snyder <michael.snyder@access-company.com>
13729
13730 * server.c (main): Check for inferior exit before main loop.
13731
aa0403d9
PA
137322007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13733
13734 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13735 instead of on tmp_desc.
13736
255e7678
DJ
137372007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13738 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13741 (add_thread): Minor cleanups.
13742 (clear_inferiors): Move lower in the file. Clear the DLL
13743 list.
13744 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13745 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13746 (xml_escape_text): New.
13747 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13748 for qSupported.
13749 (handle_v_cont): Report errors.
13750 (gdbserver_version): Update.
13751 (main): Correct size of own_buf. Do not report initial DLL events.
13752 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13753 (unloaded_dll, xml_escape_text): New.
13754 * win32-low.c (enum target_waitkind): Update comments.
13755 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13756 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13757 (win32_EnumProcessModules, win32_GetModuleInformation)
13758 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13759 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13760 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13761 (win32_Module32First, win32_Module32Next, load_toolhelp)
13762 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13763 (get_child_debug_event): Handle DLL events.
13764 (win32_wait): Likewise.
13765
0d37add9
DJ
137662007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13767
13768 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13769 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13770
45e2715e
PA
137712007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13772
13773 * win32-low.c (handle_output_debug_string): Ignore event if not
13774 waiting.
13775
c5674cf1
PA
137762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13777
13778 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13779
2bbe3cc1
DJ
137802007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13781
13782 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13783
ae13219e
DJ
137842007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13785
13786 * inferiors.c (change_inferior_id): Add comment.
13787 * linux-low.c (check_removed_breakpoint): Add an early
13788 prototype. Improve debug output.
13789 (linux_attach): Doc update.
13790 (linux_detach_one_process, linux_detach): Clean up before releasing
13791 each process.
13792 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13793 * linux-low.h (struct process_info): Doc improvement.
13794 * mem-break.c (delete_all_breakpoints): New.
13795 * mem-break.h (delete_all_breakpoints): New prototype.
13796 * thread-db.c (find_first_thread): New.
13797 (thread_db_create_event): Call it instead of
13798 thread_db_find_new_threads. Clean up unused variables.
13799 (maybe_attach_thread): Remove first thread handling.
13800 (thread_db_find_new_threads): Use find_first_thread.
13801 (thread_db_get_tls_address): Likewise.
13802
4105de34
DJ
138032007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * thread-db.c (thread_db_find_new_threads): Add prototype.
13806 (thread_db_create_event): Check for the main thread before adding
13807 a new thread.
13808 (maybe_attach_thread): Only enable event reporting if TID == 0.
13809 (thread_db_get_tls_address): Check for new threads.
13810
2b876972
DJ
138112007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13812
13813 * linux-low.c (linux_create_inferior): Try execv before execvp.
13814 * spu-low.c (spu_create_inferior): Likewise.
13815
7a245884
DJ
138162007-06-13 Mike Frysinger <vapier@gentoo.org>
13817
13818 * linux-low.c (linux_create_inferior): Change execv to execvp.
13819 * spu-low.c (spu_create_inferior): Likewies.
13820
117ce543
DJ
138212007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13822
13823 * Makefile.in (clean): Clean new files instead of deleted ones.
13824 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13825 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13826 rules.
13827 * configure.srv: Specify XML files and new regformats for MIPS and
13828 MIPS64 GNU/Linux.
13829 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13830 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13831 an entry for the restart register.
13832 (mips_cannot_fetch_register, mips_cannot_store_register)
13833 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13834 register names to match the XML descriptions.
13835 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13836 restart register instead of $0.
13837
0e7f50da
UW
138382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13839 Markus Deuling <deuling@de.ibm.com>
13840
13841 * remote-utils.c (decode_xfer_write): New function.
13842 * server.h (decode_xfer_write): Add prototype.
13843 * server.c (handle_query): Add PACKET_LEN argument. Support
13844 qXfer:spu:read and qXfer:spu:write packets.
13845 (main): Pass packet_len to handle_query.
13846 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13847 * target.h (target_ops): Add qxfer_spu.
13848
374c1d38
UW
138492007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13850
13851 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13852 accessing non-seekable spufs files.
13853
bb63802a
UW
138542007-05-16 Markus Deuling <deuling@de.ibm.com>
13855
889bf7c5 13856 * server.c (handle_query): Add reply for qC packet.
bb63802a 13857
7390519e
PA
138582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13859 Leo Zayas <lerele@champenstudios@com>
13860
13861 * server.h (check_remote_input_interrupt_request): New function.
13862 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13863 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13864 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13865 (check_remote_input_interrupt_request): New function.
13866 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13867 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13868 winapi_GenerateConsoleCtrlEvent): New typedefs.
13869 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13870 to 250 ms.
13871 (win32_wait): Check for remote interrupt request
13872 with check_remote_input_interrupt_request.
13873 (win32_request_interrupt): New function.
13874 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13875
34b34921
PA
138762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13877
13878 * win32-low.c (debug_registers_changed,
13879 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13880 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13881 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13882 (thread_rec): Get context using the low target.
13883 (child_add_thread): Call thread_added on the low target,
13884 which does the same thing.
13885 (regptr): Delete.
13886 (do_initial_child_stuff): Remove debug registers references.
13887 Set context using the low target. Resume threads after
13888 setting the contexts.
13889 (child_continue): Remove dead variable. Remove debug
13890 registers references.
13891 (child_fetch_inferior_registers): Go through the low target.
13892 (do_child_store_inferior_registers): Remove.
13893 (child_store_inferior_registers): Go through the low target.
13894 (win32_resume): Remove debug registers references.
13895 Set context using the low target.
13896 (handle_exception): Change return type to void. Don't record
13897 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13898 first chance exception.
889bf7c5 13899 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13900 goto loop. Always return after waiting for debug event.
13901 (win32_wait): Convert to switch statement. Handle spurious
13902 events.
13903
13904 * win32-i386-low.c (debug_registers_changed,
13905 debug_registers_used): New.
13906 (initial_stuff): Rename to ...
13907 (i386_initial_stuff): ... this. Clear debug registers
13908 state variables.
13909 (store_debug_registers): Delete.
13910 (i386_get_thread_context): New.
13911 (load_debug_registers): Delete.
13912 (i386_set_thread_context): New.
13913 (i386_thread_added): New.
13914 (single_step): Rename to ...
13915 (i386_single_step): ... this.
13916 (do_fetch_inferior_registers): Rename to ...
13917 (i386_fetch_inferior_register): ... this.
13918 (i386_store_inferior_register): New.
13919 (the_low_target): Adapt to new interface.
13920
13921 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13922 (arm_get_thread_context): New.
13923 (arm_set_thread_context): New.
13924 (regptr): New.
13925 (do_fetch_inferior_registers): Rename to ...
13926 (arm_fetch_inferior_register): ... this.
13927 (arm_store_inferior_register): New.
13928 (arm_wince_breakpoint): Reimplement as unsigned long.
13929 (arm_wince_breakpoint_len): Define.
13930 (the_low_target): Adapt to new interface.
13931
13932 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13933 load_debug_registers. Add get_thread_context, set_thread_context,
13934 thread_added and store_inferior_register. Rename
13935 fetch_inferior_registers to fetch_inferior_register.
13936 (regptr): Remove declaration.
13937
dd6953e1
PA
139382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13939
13940 * linux-low.c (linux_detach): Change return type to int. Return 0.
13941 * spu-low.c (spu_detach): Likewise.
13942
444d6139
PA
139432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13944
13945 * target.h (target_ops): Change return type of detach to int.
13946 Add join.
13947 (join_inferior): New.
13948 * server.c (main): Don't skip detach support on mingw32.
13949 If the inferior doesn't support detaching return error.
13950 Call join_inferior instead of using waitpid.
13951 * linux-low.c (linux_join): New.
13952 (linux_target_op): Add linux_join.
13953 * spu-low.c (spu_join): New.
13954 (spu_target_ops): Add spu_join.
13955 * win32-low.c (win32_detach): Adapt to new interface.
13956 Reopen current_process_handle before detaching. Issue a child
13957 resume before detaching.
13958 (win32_join): New.
13959 (win32_target_op): Add win32_join.
13960
1d5315fe
PA
139612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13962
13963 * win32-low.c (win32-attach): Fix return value.
13964 * target.h (target_ops): Describe ATTACH return values.
13965
bf914831
PA
139662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13967
13968 * win32-low.c (GETPROCADDRESS): Define.
13969 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13970 (winapi_DebugSetProcessKillOnExit): Likewise.
13971 (win32_create_inferior): Force usage of ansi CreateProcessA.
13972 (win32_attach): Use GETPROCADDRESS.
13973 (win32_detach): Likewise.
13974
f72f3e60
PA
139752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13976
13977 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13978
ed50f18f
PA
139792007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13980
13981 * win32-low.c: Commit leftover changes from 2007-03-29.
13982
0c2ead7e
DJ
139832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13984
13985 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13986 fields short instead of int. Add explicit padding.
13987 (i387_cache_to_fsave): Remove unnecessary casts.
13988 (i387_fsave_to_cache): Doc fix.
13989 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13990
73725ff3
DJ
139912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13992
13993 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13994 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13995
d99f33d8
PA
139962007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13997
13998 * configure.srv (arm*-*-mingw32ce*): Move near the other
13999 arm targets.
14000
68070c10
PA
140012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14002
2482afc6 14003 * configure.ac: Add errno checking.
68070c10
PA
14004 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14005 sys/file.h and malloc.h.
14006 (AC_CHECK_DECLS): Add perror.
14007 (srv_mingwce): Handle.
2482afc6 14008 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14009 win32-i386-low.o to srv_tgtobj.
14010 (i[34567]86-*-mingw*): Likewise.
14011 (arm*-*-mingw32ce*): Add case.
14012 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14013 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14014 [__MINGW32CE__] (strerror): New function.
14015 [__MINGW32CE__] (errno): Define to GetLastError.
14016 [__MINGW32CE__] (COUNTOF): New macro.
14017 (remote_open): Remove extra close call.
14018 * mem-break.c (delete_breakpoint_at): New function.
14019 * mem-break.h (delete_breakpoint_at): Declare.
14020 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14021 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14022 [USE_WIN32API] (read, write): Add char* casts.
14023 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14024 * server.h: Include wincecompat.h on Windows CE.
14025 [HAVE_ERRNO_H]: Check.
14026 (perror): Declare if not declared.
14027 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14028 (perror_with_name): Remove errno declaration.
14029 * wincecompat.h: New.
14030 * wincecompat.c: New.
14031 * win32-low.h: New.
14032 * win32-arm-low.c: New.
14033 * win32-i386-low.c: New.
14034 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14035 (OUTMSG2): Make it safe.
14036 (_T): New macro.
14037 (COUNTOF): New macro.
14038 (NUM_REGS): Get it from the low target.
14039 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14040 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14041 (thread_rec): Let low target handle debug registers.
14042 (child_add_thread): Likewise.
14043 (child_init_thread_list): Likewise.
14044 (continue_one_thread): Likewise.
14045 (regptr): New.
14046 (do_child_fetch_inferior_registers): Move to ...
14047 * win32-i386-low.c: ... here, and rename to ...
14048 (do_fetch_inferior_registers): ... this.
889bf7c5 14049 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14050 Go through the low target.
14051 (do_child_store_inferior_registers): Use regptr.
14052 (strwinerror): New function.
14053 (win32_create_inferior): Handle Windows CE.
14054 Use strwinerror instead of strerror on Windows error
14055 codes. Add program to the error output.
14056 Don't close the main thread handle on Windows CE.
14057 (win32_attach): Use coredll.dll on Windows CE.
14058 (win32_kill): Close current process and current
14059 thread handles.
14060 (win32_detach): Use coredll.dll on Windows CE.
14061 (win32_resume): Let low target handle debug registers, and
14062 step request.
14063 (handle_exception): Add/Remove initial breakpoint. Avoid
14064 non-existant WSTOPSIG on Windows CE.
14065 (win32_read_inferior_memory): Cast to remove warning.
14066 (win32_arch_string): Go through the low target.
14067 (initialize_low): Call set_breakpoint_data with the low
14068 target's breakpoint.
14069 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14070 FOP_REGNUM, mappings): Move to ...
14071 * win32-i386-low.c: ... here.
14072 * win32-low.c (win32_thread_info): Move to ...
14073 * win32-low.h: ... here.
14074 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14075 win32-arm-low.c and wincecompat.c.
14076 (all:): Add $EXEEXT.
14077 (install-only:): Likewise.
14078 (gdbserver:): Likewise.
14079 (gdbreplay:): Likewise.
14080 * config.in: Regenerate.
14081 * configure: Regenerate.
14082
41093d81
PA
140832007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14084
14085 * win32-low.c: Rename typedef thread_info to
14086 win32_thread_info throughout.
14087
544afa54
PA
140882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14089
14090 * win32-i386-low.c: Rename to ...
14091 * win32-low.c: ... this.
14092 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14093 * Makefile.in: Likewise.
14094
bce7165d
PA
140952007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14096
14097 * remote-utils.c (monitor_output): Constify msg parameter.
14098 * server.h (monitor_output): Likewise.
14099 * win32-i386-low.c (handle_output_debug_string): New.
14100 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14101 handle_output_debug_string.
14102 (get_child_debug_event): Likewise.
14103
506c7aa0
DJ
141042007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14105
14106 * server.c (main): Correct strtoul check.
14107
42c81e2a
DJ
141082007-03-27 Jon Ringle <jon@ringle.org>
14109
14110 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14111
9453113a
DJ
141122007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14113
14114 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14115
64a69107
DJ
141162007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14117
14118 * terminal.h: Check HAVE_SGTTY_H.
14119
141202007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14121
14122 * remote-utils.c (remote_open): Print out the assigned port number.
14123
c74d0ad8
DJ
141242007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14125
14126 * remote-utils.c (monitor_output): New function.
14127 * server.c (debug_threads): Define here.
14128 (monitor_show_help): New function.
14129 (handle_query): Handle qRcmd.
14130 (main): Do not handle 'd' packet.
14131 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14132 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14133 of debug_threads.
14134
de7c3b4a
PA
141352007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14136
14137 * Makefile.in (EXEEXT): New.
14138 (clean): Use $(EXEEXT).
14139
ef57601b
PA
141402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14141
14142 * target.h (target_ops): Rename send_signal to request_interrupt,
14143 and remove enum target_signal parameter.
14144 * linux-low.c (linux_request_interrupt): Rename from
14145 linux_send_signal, and always send SIGINT.
14146 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14147 and always send SIGINT.
14148 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14149 of send_signal.
14150 (input_interrupt): Likewise.
14151
820f2bda
PA
141522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14153
14154 * server.c (get_features_xml): Check if target implemented
14155 arch_string.
14156 * win32-i386-low.c (win32_arch_string): New.
14157 (win32_target_ops): Add win32_arch_string as arch_string member.
14158
ab39bf24
UW
141592007-02-22 Markus Deuling <deuling@de.ibm.com>
14160
14161 * spu-low.c (spu_arch_string): New.
14162 (spu_target_ops): Add spu_arch_string.
14163
61ff6e04
DJ
141642007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14165
14166 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14167 * configure.ac: Do not check for terminal.h.
14168 * configure, config.in: Regenerated.
14169
fb1e4ffc
DJ
141702007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14171
14172 * Makefile.in (OBS): Add $(XML_BUILTIN).
14173 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14174 (clean): Update.
14175 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14176 (arm-with-iwmmxt.c): New.
14177 * config.in, configure: Regenerate.
14178 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14179 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14180 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14181 (arm*-*-linux*): Add iWMMXt and regset support.
14182 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14183 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14184 (arm_store_wmmxregset, target_regsets): New.
14185 * server.c (get_features_xml): Take annex argument. Check builtin
14186 XML documents.
14187 (handle_query): Handle multiple annexes.
14188
0f48aa01
DJ
141892007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14190
14191 * remote-utils.c [USE_WIN32API] (read, write): Define.
14192 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14193 write.
14194
23181151
DJ
141952007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14196
14197 * linux-i386-low.c (the_low_target): Set arch_string.
14198 * linux-x86-64-low.c (the_low_target): Likewise.
14199 * linux-low.c (linux_arch_string): New.
14200 (linux_target_ops): Add it.
14201 * linux-low.h (struct linux_target_ops): Add arch_string.
14202 * server.c (write_qxfer_response): Use const void * for DATA.
14203 (get_features_xml): New.
14204 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14205 * target.h (struct target_ops): Add arch_string method.
14206
9d606399
DJ
142072007-01-03 Denis Pilat <denis.pilat@st.com>
14208 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * linux-low.c (linux_kill): Handle being called with no threads.
14211 * win32-i386-low.c (win32_kill): Likewise.
14212 (get_child_debug_event): Clear current_process_handle.
14213
142142006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14215 Daniel Jacobowitz <dan@codesourcery.com>
14216
14217 * remote-utils.c (remote_open): Check the type of specified
14218 serial port devices before opening them.
14219 * server.c (main): Kill the inferior if an error occurs during
14220 the first remote_open.
14221
a5e13d24
DJ
142222006-12-05 Markus Deuling <deuling@de.ibm.com>
14223
14224 * README: Update supported targets.
14225
186947f7
DJ
142262006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * Makefile.in (clean): Remove reg-mips64.c.
14229 (reg-mips64.c, reg-mips64.o): New rules.
14230 * configure.srv: Handle mips64. Include regset support for mips.
14231 * linux-mips-low.c (union mips_register): New.
14232 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14233 (mips_breakpoint, mips_breakpoint_at): Use int.
14234 (mips_collect_register, mips_supply_register)
14235 (mips_collect_register_32bit, mips_supply_register_32bit)
14236 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14237 (mips_store_fpregset, target_regsets): New.
14238 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14239
a13e2c95
UW
142402006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14241
14242 * configure.srv: Add target "spu*-*-*".
14243 * Makefile.in (clean): Remove reg-spu.c.
14244 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14245 * spu-low.c: New file.
14246
cb7283db
DJ
142472006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14248
14249 * configure.ac: Correct td_thr_tls_get_addr test.
14250 * configure: Regenerated.
14251
89be2091
DJ
142522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * linux-low.c (linux_wait_for_event): Reformat. Use the
14255 pass_signals array.
14256 * remote-utils.c (decode_address_to_semicolon): New.
14257 * server.c (pass_signals, handle_general_set): New.
14258 (handle_query): Mention QPassSignals for qSupported.
14259 (main): Call handle_general_set.
14260 * server.h (pass_signals, decode_address_to_semicolon): New.
14261
000ef4f0
DJ
142622006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14263
14264 * server.c (handle_query): Correct error handling for read_auxv.
14265
b7149293
UW
142662005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14267
14268 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14269 and srv_linux_thread_db to yes.
14270 * linux-s390-low.c (s390_fill_gregset): New function.
14271 (target_regsets): Define data structure.
14272
dae5f5cf
DJ
142732006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14274
14275 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14276 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14277 * config.in, configure: Regenerated.
14278 * inferiors.c (gdb_id_to_thread): New function.
14279 (gdb_id_to_thread_id): Use it.
14280 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14281 * linux-low.h (struct process_info): Add th member.
14282 (thread_db_get_tls_address): New prototype.
14283 * remote-utils.c (decode_address): Make non-static.
14284 * server.c (handle_query): Handle qGetTLSAddr.
14285 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14286 * target.h (struct target_ops): Add get_tls_address.
14287 * thread-db.c (maybe_attach_thread): Save the thread handle.
14288 (thread_db_get_tls_address): New.
14289
32ca6d61
DJ
142902006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14291
14292 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14293 (linux_resume_one_process): Take a siginfo_t *. Update all
14294 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14295 (struct pending_signals): Add a siginfo_t.
14296 (linux_wait_for_process): Always set last_status.
14297 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14298 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14299 * linux-low.h (struct process_info): Add last_status.
14300
5ffff7c1
DJ
143012006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14302
14303 * remote-utils.c (try_rle): New function.
14304 (putpkt_binary): Use it.
14305
8695c747
DJ
143062006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14309 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14310 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14311 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14312 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14313 point registers.
14314
290fadea
RS
143152006-08-08 Richard Sandiford <richard@codesourcery.com>
14316
14317 * server.c (terminal_fd): New variable.
14318 (old_foreground_pgrp): Likewise.
14319 (restore_old_foreground_pgrp): New function.
14320 (start_inferior): Record the terminal file descriptor in terminal_fd
14321 and its original foreground group in old_foreground_pgrp. Register
14322 restore_old_foreground_pgrp with atexit().
14323
9f2e1e63
DJ
143242006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14325
14326 * server.c (handle_query): Correct qPart to qXfer.
14327
b80864fb
DJ
143282006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14329
14330 * configure.ac: Check for more headers which are missing on
14331 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14332 * configure.srv: Add Cygwin and mingw32.
14333 * remote-utils.c: Don't include headers unconditionally which
14334 are missing on mingw32. Include <winsock.h> for mingw32.
14335 (remote_open): Adjust for mingw32 support. Flush
14336 standard error after writing to it.
14337 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14338 (unblock_async_io, enable_async_io, disable_async_io)
14339 (readchar, getpkt): Update for Winsock support.
14340 (prepare_resume_reply): Expect a protocol signal number.
14341 * server.c: Disable <sys/wait.h> on mingw32.
14342 (start_inferior): Adjust for mingw32 support. Flush
14343 standard error after writing to it.
14344 (attach_inferior): Likewise. Use protocol signal
14345 numbers.
14346 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14347 and names.
14348 * win32-i386-low.c: New file.
14349 * Makefile.in (XM_CLIBS): Set.
14350 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14351 (win32-i386-low.o): New dependency rule.
14352 * linux-low.c (linux_wait): Use target signal numbers.
14353 * target.h (struct target_ops): Doc fix.
14354 * server.h (target_signal_to_name): New prototype.
14355 * gdbreplay.c: Don't include headers unconditionally which
14356 are missing on mingw32. Include <winsock.h> for mingw32.
14357 (remote_close, remote_open): Adjust for Winsock support.
14358 * configure, config.in: Regenerated.
14359
0876f84a
DJ
143602006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14361
14362 * server.c (decode_xfer_read, write_qxfer_response): New.
14363 (handle_query): Take a packet length argument. Handle
14364 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14365 the qSupported response.
14366 (main): Update call to handle_query.
14367
01f9e8fa
DJ
143682006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14369
14370 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14371 (putpkt_binary): Renamed from putpkt and adjusted for binary
14372 data.
14373 (putpkt): New wrapper for putpkt_binary.
14374 (readchar): Don't mask off the high bit.
14375 (decode_X_packet): New function.
14376 * server.c (main): Call putpkt_binary if a handler sets the packet
14377 length. Save the length of the incoming packet. Handle 'X'.
14378 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14379
be2a5f71
DJ
143802006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * server.c (handle_query): Handle qSupported.
14383
ea025f5f
DJ
143842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * remote-utils.c (all_symbols_looked_up): New variable.
14387 (look_up_one_symbol): Check it.
14388 * server.h (look_up_one_symbol): New declaration.
14389 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14390
9308fc88
DJ
143912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14392
14393 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14394 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14395 (PTRACE_GET_THREAD_AREA): Define.
14396 (ps_get_thread_area): New function.
14397
52fb6437
NS
143982006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14399
14400 * configure.srv (m68k*-*-uclinux*): New target.
14401 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14402 (linux_resume_one_process): Remove extraneous cast.
14403 (linux_read_offsets): New.
14404 (linux_target_op): Add linux_read_offsets on mmuless systems.
14405 * server.c (handle_query): Add qOffsets logic.
14406 * target.h (struct target_ops): Add read_offsets.
14407
21b0f40c
DJ
144082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14411 (PTRACE_GET_THREAD_AREA): Define.
14412 (ps_get_thread_area): New function.
14413 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14414 (linux-x86-64-low.o): Update.
14415
0050a760
DJ
144162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14417
14418 * configure.ac: Remove checks for prfpregset_t.
14419 * gdb_proc_service.h: New file.
14420 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14421 new "gdb_proc_service.h".
14422 * proc-service.c: Likewise.
14423 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14424 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14425 * Makefile.in (gdb_proc_service_h): Updated.
14426 * configure, config.in: Regenerated.
14427
b92a518e
DJ
144282006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14429
14430 * remote-utils.c (prepare_resume_reply): Move declaration
14431 of gdb_id_from_wait to the top of the block.
14432
545587ee
DJ
144332006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14434
14435 * linux-low.c (regsets_store_inferior_registers): Read the regset
14436 from the target before filling it.
14437
9db87ebd
DJ
144382006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14439
14440 * server.c (attach_inferior): Return SIGTRAP for a successful
14441 attach.
14442
dd24457d
DJ
144432006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * Makefile.in (OBS): Add version.o.
14446 (STAGESTUFF): Delete.
14447 (version.o): Add dependencies.
14448 (version.c): Replace rule.
14449 (clean): Remove version.c.
14450 * server.c (gdbserver_version): New.
14451 (gdbserver_usage): Use printf.
14452 (main): Handle --version and --help.
14453 * server.h (version, host_name): Add declarations.
14454
6f0f660e
EZ
144552005-12-23 Eli Zaretskii <eliz@gnu.org>
14456
889bf7c5
PA
14457 * linux-arm-low.c:
14458 * linux-arm-low.c:
14459 * inferiors.c:
14460 * i387-fp.h:
14461 * i387-fp.c:
14462 * gdbreplay.c:
14463 * regcache.c:
14464 * proc-service.c:
14465 * mem-break.h:
14466 * mem-break.c:
14467 * linux-x86-64-low.c:
14468 * linux-sh-low.c:
14469 * linux-s390-low.c:
14470 * linux-ppc64-low.c:
14471 * linux-ppc-low.c:
14472 * linux-mips-low.c:
14473 * linux-m68k-low.c:
14474 * linux-m32r-low.c:
14475 * linux-low.h:
14476 * linux-low.c:
14477 * linux-ia64-low.c:
14478 * linux-i386-low.c:
14479 * linux-crisv32-low.c:
14480 * thread-db.c:
14481 * terminal.h:
14482 * target.h:
14483 * target.c:
14484 * server.h:
14485 * server.c:
14486 * remote-utils.c:
14487 * regcache.h:
14488 * utils.c:
14489 * Makefile.in:
14490 * configure.ac:
6f0f660e
EZ
14491 * gdbserver.1: Add (C) after Copyright. Update the FSF
14492 address.
14493
9d1fb177
DJ
144942005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14495
14496 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14497 (arm_breakpoint_at): Recognize both breakpoints.
14498 (the_low_target): Use the correct breakpoint instruction.
14499
011a70c2
DJ
145002005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14501
14502 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14503 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14504 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14505 (the_low_target): Update.
14506
7fb85e41
AS
145072005-10-25 Andreas Schwab <schwab@suse.de>
14508
14509 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14510
14511 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14512 (ia64_num_regs): Reduce to 462.
14513
3db0444b
DJ
145142005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * acinclude.m4: Correct quoting.
14517 * aclocal.m4: Regenerated.
14518
14519 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14520 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14521 (thread_db_init): Call thread_db_err_str.
14522 * configure.ac: Check for TD_VERSION.
14523 * config.in, configure: Regenerated.
14524
bee0189a
DJ
145252005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14526
14527 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14528
e9d25b98
DJ
145292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14530
14531 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14532 is not available. Define HAVE_PTRACE_GETREGS if it is.
14533 * config.in, configure: Regenerated.
14534 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14535 * linux-i386-low.c, linux-m68k-low.c: Update to use
14536 HAVE_PTRACE_GETREGS.
14537 * linux-low.c (regsets_fetch_inferior_registers)
14538 (regsets_store_inferior_registers): Only return 0 if we processed
14539 GENERAL_REGS.
14540 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14541 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14542
a06660f7
DJ
145432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14544
14545 * inferiors.c (struct thread_info): Add gdb_id.
14546 (add_thread): Add gdb_id argument.
14547 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14548 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14549 calls to add_thread.
14550 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14551 * server.c (handle_query): Use thread_to_gdb_id.
14552 (handle_v_cont, main): Use gdb_id_to_thread_id.
14553 * server.h (add_thread): Update prototype.
14554 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14555 prototypes.
14556
5a1f5858
DJ
145572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14558
14559 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14560 left-padded registers.
14561 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14562 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14563
e122f1f5
SE
145642005-07-01 Steve Ellcey <sje@cup.hp.com>
14565
14566 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14567 * configure: Regenerate.
14568 * config.in: Regenerate.
14569 * server.h (NEED_DECLARATION_STRERROR):
14570 Replace with !HAVE_DECL_STRERROR.
14571
d592fa2f
DJ
145722005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14573
14574 * linux-low.c (linux_wait, linux_send_signal): Don't test
14575 an unsigned long variable for > 0 if it could be MAX_ULONG.
14576 * server.c (myresume): Likewise.
14577 * target.c (set_desired_inferior): Likewise.
14578
ccbd4912
MK
145792005-06-13 Mark Kettenis <kettenis@gnu.org>
14580
14581 * configure.ac: Simplify and improve check for socklen_t.
14582 * configure, config.in: Regenerate.
14583
f450004a
DJ
145842005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14585
14586 * acconfig.h: Remove.
14587 * configure.ac: Add a test for socklen_t. Use three-argument
14588 AC_DEFINE throughout.
14589 * config.in: Regenerated using autoheader 2.59.
14590 * configure: Regenerated.
14591
14592 * gdbreplay.c (socklen_t): Provide a default.
14593 (remote_open): Use socklen_t.
14594 * remote-utils.c (socklen_t): Provide a default.
14595 (remote_open): Use socklen_t.
14596 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14597 unsigned char.
14598
14599 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14600 char for buffers.
14601 * linux-low.c (linux_read_memory, linux_write_memory)
14602 (linux_read_auxv): Likewise.
14603 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14604 (check_mem_write): Likewise.
14605 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14606 Likewise.
14607 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14608 (registers_from_string, register_data): Likewise.
14609 * server.c (handle_query, main): Likewise.
14610 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14611 (decode_M_packet): Likewise.
14612 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14613 * target.h (struct target_ops): Update read_memory, write_memory,
14614 and read_auxv.
14615 (read_inferior_memory, write_inferior_memory): Update.
14616 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14617 to unsigned char *.
14618 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14619 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14620 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14621 linux-s390-low.c, linux-sh-low.c: Update for changes in
14622 read_inferior_memory and the_low_target->breakpoint.
14623
eee84df1
DJ
146242005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14627 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14628 * configure.srv: Add powerpc64-*-linux*.
14629 * linux-ppc64-low.c: New file.
14630
45b134e5
OF
146312005-05-23 Orjan Friberg <orjanf@axis.com>
14632
14633 * linux-cris-low.c: New file with support for CRIS.
14634 * linux-crisv32-low.c: Ditto for CRISv32.
14635 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14636 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14637 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14638 reg-crisv32.o, and reg-crisv32.c to make rules.
14639 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14640 recognized targets.
14641
48d93c75
UW
146422005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14643
14644 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14645 of sizeof (PTRACE_XFER_TYPE).
14646 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14647
e013ee27
OF
146482005-05-12 Orjan Friberg <orjanf@axis.com>
14649
889bf7c5 14650 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14651 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14652 pointers for hardware watchpoint support.
14653 * linux-low.h (struct linux_target_ops): Ditto.
14654 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14655 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14656 to linux_target_ops.
14657 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14658 reply packet.
14659 * server.c (main): Recognize 'Z' and 'z' packets.
14660
b0ded00b
UW
146612005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14662
14663 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14664 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14665 (the_low_target): Add new members.
14666
8643e2ad
DJ
146672005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * proc-service.c (ps_lgetregs): Search all_processes instead of
14670 all_threads.
14671
fc620387
DJ
146722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * server.c (start_inferior): Change return type to int.
14675 (attach_inferior): Change sigptr to int *.
14676 (handle_v_cont, handle_v_requests): Change signal to int *.
14677 (main): Change signal to int.
14678
146792005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14680
14681 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14682 * configure.srv: Add m32r*-*-linux*.
14683 * linux-m32r-low.c: New file.
14684
e0e76420
DJ
146852005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14686
14687 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14688
a1928bad
DJ
146892005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14690
14691 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14692 Take unsigned long arguments for PIDs.
14693 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14694 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14695 (wait_for_sigstop, linux_resume_one_process)
14696 (regsets_fetch_inferior_registers, linux_send_signal)
14697 (linux_read_auxv): Likewise. Update the types of variables holding
14698 PIDs. Update format string specifiers.
14699 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14700 * remote-utils.c (prepare_resume_reply): Likewise.
14701 * server.c (cont_thread, general_thread, step_thread)
14702 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14703 unsigned long.
14704 (handle_query): Update format specifiers.
14705 (handle_v_cont, main): Use strtoul for thread IDs.
14706 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14707 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14708 (general_thread, step_thread, thread_from_wait)
14709 (old_thread_from_wait): Update.
14710 * target.h (struct thread_resume): Use unsigned long for THREAD.
14711 (struct target_ops): Use unsigned long for arguments to attach and
14712 thread_alive.
14713
dcdb98d2
DJ
147142005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14715
14716 * acinclude.m4: Include bfd/bfd.m4 directly.
14717 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14718 <agriffis@toolchain.org>.
14719 * aclocal.m4, configure: Regenerated.
14720
bec39cab
AC
147212005-01-07 Andrew Cagney <cagney@gnu.org>
14722
14723 * configure.ac: Rename configure.in, require autoconf 2.59.
14724 * configure: Re-generate.
14725
434c4c77
DJ
147262004-12-08 Daniel Jacobowitz <dan@debian.org>
14727
14728 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14729 LIBS when finished.
14730 * aclocal.m4: Regenerated.
14731 * configure: Regenerated.
14732
db1d3e1b
AS
147332004-11-21 Andreas Schwab <schwab@suse.de>
14734
14735 * linux-m68k-low.c (m68k_num_gregs): Define.
14736 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14737 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14738 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14739 (m68k_breakpoint_at): New. Add to the_low_target.
14740
14741 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14742 srv_linux_thread_db to yes.
14743
43360365
JB
147442004-10-20 Joel Brobecker <brobecker@gnat.com>
14745
14746 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14747 (ARCH_SET_FS): Likewise.
14748 (ARCH_GET_FS): Likewise.
14749 (ARCH_GET_GS): Likewise.
14750
fd500816
DJ
147512004-10-16 Daniel Jacobowitz <dan@debian.org>
14752
14753 * linux-i386-low.c (ps_get_thread_area): New.
14754 * linux-x86-64-low.c (ps_get_thread_area): New.
14755 * linux-low.c: Include <sys/syscall.h>.
14756 (linux_kill_one_process): Don't kill the first thread here.
14757 (linux_kill): Kill the first thread here.
14758 (kill_lwp): New function.
14759 (send_sigstop, linux_send_signal): Use it.
14760 * proc-service.c: Clean up #ifdefs.
14761 (fpregset_info): Delete.
14762 (ps_lgetregs): Update and enable implementation.
14763 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14764 implementations.
14765 * remote-utils.c (struct sym_cache, symbol_cache): New.
14766 (input_interrupt): Print a clearer message.
14767 (async_io_enabled): New variable.
14768 (enable_async_io, disable_async_io): Use it. Update comments.
14769 (look_up_one_symbol): Use the symbol cache.
14770 * thread-db.c (thread_db_look_up_symbols): New function.
14771 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14772
f6de3c42
DJ
147732004-10-16 Daniel Jacobowitz <dan@debian.org>
14774
14775 * configure.in: Test for -rdynamic.
14776 * configure: Regenerated.
14777 * Makefile (INTERNAL_LDFLAGS): New.
14778 (gdbserver, gdbreplay): Use it.
14779
2c0fc042
AC
147802004-09-02 Andrew Cagney <cagney@gnu.org>
14781
14782 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14783
075b3282
DJ
147842004-03-23 Daniel Jacobowitz <drow@mvista.com>
14785
14786 * linux-low.c (linux_wait): Clear all_processes list also.
14787
fa6a77dc
DJ
147882004-03-12 Daniel Jacobowitz <drow@mvista.com>
14789
14790 * linux-low.c: Include <errno.h>. Remove extern declaration of
14791 errno.
14792
6d782a97
DJ
147932004-03-12 Daniel Jacobowitz <drow@mvista.com>
14794
14795 * gdbreplay.c, server.h, utils.c: Update copyright years.
14796
3a7fb99b
DJ
147972004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14798
14799 * server.c (main): Print child status or termination signal from
14800 variable 'signal', not 'sig'.
14801
c3e735a6
DJ
148022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14803
14804 * linux-low.c (linux_read_memory): Change return type to
14805 int. Check for and return error from ptrace().
14806 * target.c (read_inferior_memory): Change return type to int. Pass
14807 back return status from the_target->read_memory().
14808 * target.h (struct target_ops): Adapt *read_memory() prototype.
14809 Update comment.
14810 (read_inferior_memory): Adapt prototype.
14811 * server.c (main): Return an error packet if
14812 read_inferior_memory() returns an error.
14813
a59d1c82
DJ
148142004-03-04 Daniel Jacobowitz <drow@mvista.com>
14815
14816 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14817 Unify with other clean targets.
14818
dc3f8883
DJ
148192004-02-29 Daniel Jacobowitz <drow@mvista.com>
14820
14821 * server.c (handle_v_cont): Call set_desired_inferior.
14822
89a208da
DJ
148232004-02-29 Daniel Jacobowitz <drow@mvista.com>
14824
14825 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14826
62ea82f5
DJ
148272004-02-29 Daniel Jacobowitz <drow@mvista.com>
14828
14829 * linux-low.c (linux_wait): Unblock async I/O.
14830 (linux_resume): Block and enable async I/O.
14831 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14832 * server.h (block_async_io, unblock_async_io): Add prototypes.
14833
6910d122
DJ
148342004-02-29 Daniel Jacobowitz <drow@mvista.com>
14835
14836 * remote-utils.c (remote_open): Print a status notice after
14837 opening a TCP port.
14838 * server.c (attach_inferior): Print a status notice after
14839 attaching.
14840
148412004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14842
14843 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14844
c89dc5d4
DJ
148452004-02-26 Daniel Jacobowitz <drow@mvista.com>
14846
14847 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14848 error packet.
14849 * server.c, target.h: Update copyright years.
14850
4b8dad4a
RM
148512004-02-25 Roland McGrath <roland@redhat.com>
14852
14853 * target.h (struct target_ops): New member `read_auxv'.
14854 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14855 * linux-low.c (linux_read_auxv): New function.
14856 (linux_target_ops): Initialize `read_auxv' member to that.
14857
d7446758
JB
148582004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14859
14860 Committed by Jim Blandy <jimb@redhat.com>.
14861
14862 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14863 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14864 instead of GPR_SIZE to distiguish s390 and s390x targets.
14865
5544ad89
DJ
148662004-01-31 Daniel Jacobowitz <drow@mvista.com>
14867
14868 * linux-low.c: Update copyright year.
14869 (check_removed_breakpoint): Clear pending_is_breakpoint.
14870 (linux_set_resume_request, linux_queue_one_thread)
14871 (resume_status_pending_p): New functions.
14872 (linux_continue_one_thread): Use process->resume.
14873 (linux_resume): Only resume threads if there are no pending events.
14874 * linux-low.h (struct process_info): Add resume request
14875 pointer.
14876
2a68b70e
DJ
148772004-01-30 Daniel Jacobowitz <drow@mvista.com>
14878
14879 * regcache.c (new_register_cache): Clear the allocated register
14880 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14881
64386c31
DJ
148822003-10-13 Daniel Jacobowitz <drow@mvista.com>
14883
14884 * linux-low.c (linux_resume): Take a struct thread_resume *
14885 argument.
14886 (linux_wait): Update call.
14887 (resume_ptr): New static variable.
14888 (linux_continue_one_thread): Renamed from
14889 linux_continue_one_process. Use resume_ptr.
14890 (linux_resume): Use linux_continue_one_thread.
14891 * server.c (handle_v_cont, handle_v_requests): New functions.
14892 (myresume): New function.
14893 (main): Handle 'v' case.
14894 * target.h (struct thread_resume): New type.
14895 (struct target_ops): Change argument of "resume" to struct
14896 thread_resume *.
14897 (myresume): Delete macro.
14898
c938e9b0
L
148992003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14900
14901 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14902 (uninstall): Support DESTDIR.
14903
7f313d07
BC
14904Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14905
14906 * configure.srv: Add xscale*linux copy of arm*linux entry.
14907
3b2fc2ea
DJ
149082003-07-24 Daniel Jacobowitz <drow@mvista.com>
14909
14910 * linux-arm-low.c (arm_reinsert_addr): New function.
14911 (the_low_target): Add arm_reinsert_addr.
14912
1c0a559e
MK
149132003-07-08 Mark Kettenis <kettenis@gnu.org>
14914
14915 * mem-break.c: Remove whitespace at end of file.
14916
43d5792c
DJ
149172003-06-28 Daniel Jacobowitz <drow@mvista.com>
14918
14919 * configure.in: Check whether we need to prototype strerror.
14920 * server.h: Optionally prototype strerror.
14921 * gdbreplay.c (perror_with_name): Use strerror.
14922 * linux-low.c (linux_attach_lwp): Use strerror.
14923 * utils.c (perror_with_name): Use strerror.
14924 * config.in, configure: Regenerated.
14925
c8a86edf
DJ
149262003-06-28 Daniel Jacobowitz <drow@mvista.com>
14927
14928 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14929 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14930
73d37363
DJ
149312003-06-20 Daniel Jacobowitz <drow@mvista.com>
14932
14933 * Makefile.in (SFILES): Update.
14934 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14935 low-sun3.c: Remove files.
14936
6ad8ae5c
DJ
149372003-06-17 Daniel Jacobowitz <drow@mvista.com>
14938
14939 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14940 (linux_detach_one_process, linux_detach): New functions.
14941 (linux_target_ops): Add linux_detach.
14942 * server.c (main): Handle 'D' packet.
14943 * target.h (struct target_ops): Add "detach" member.
14944 (detach_inferior): Define.
14945
1581182a
MK
149462003-06-13 Mark Kettenis <kettenis@gnu.org>
14947
14948 From Kelley Cook <kelleycook@wideopenwest.com>:
14949 * configure.srv: Accept i[34567]86 variants.
14950
e5379b03
DJ
149512003-06-05 Daniel Jacobowitz <drow@mvista.com>
14952
14953 * linux-low.c (linux_wait_for_event): Correct comment typos.
14954 (linux_resume_one_process): Call check_removed_breakpoint.
14955 (linux_send_signal): New function.
14956 (linux_target_ops): Add linux_send_signal.
14957 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14958 of kill.
14959 * target.h (struct target_ops): Add send_signal.
14960
2ff29de4
JB
149612003-05-29 Jim Blandy <jimb@redhat.com>
14962
14963 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14964 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14965 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14966 away part of the register's value.
14967
254787d4
DJ
149682003-03-26 Daniel Jacobowitz <drow@mvista.com>
14969
14970 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14971 (linux_wait_for_event, linux_init_signals): Likewise.
14972
94e10508
DJ
149732003-03-17 Daniel Jacobowitz <drow@mvista.com>
14974
14975 * configure.in: Check for stdlib.h.
14976 * configure: Regenerated.
14977 * config.in: Regenerated.
14978
4c0711e0
DJ
149792003-01-04 Andreas Schwab <schwab@suse.de>
14980
14981 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14982
ef66e766
AC
149832003-01-02 Andrew Cagney <ac131313@redhat.com>
14984
14985 * Makefile.in: Remove obsolete code.
14986
a1358604
DJ
149872002-11-20 Daniel Jacobowitz <drow@mvista.com>
14988
14989 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14990 defined(PT_FPR0_HI).
14991
23ce3b1c
DJ
149922002-11-17 Stuart Hughes <seh@zee2.com>
14993
14994 * linux-arm-low.c (arm_num_regs): Increase.
14995 (arm_regmap): Include status register.
14996
149972002-11-17 Daniel Jacobowitz <drow@mvista.com>
14998
14999 * linux-low.c (register_addr): Remove incorrect -1 check.
15000
a9fa9f7d
DJ
150012002-08-29 Daniel Jacobowitz <drow@mvista.com>
15002
15003 * linux-low.c (linux_create_inferior): Call setpgid. Return
15004 the new PID.
15005 (unstopped_p, linux_signal_pid): Remove.
15006 (linux_target_ops): Remove linux_signal_pid.
15007 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15008 global instead of target method.
15009 * target.h (struct target_ops): Remove signal_pid. Update comment
15010 for create_inferior.
15011 * server.c (signal_pid): New variable.
15012 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15013 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15014 (attach_inferior): Set signal_pid.
15015
17574093
DJ
150162002-08-23 Daniel Jacobowitz <drow@mvista.com>
15017
15018 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15019
150202002-08-20 Jim Blandy <jimb@redhat.com>
15021
15022 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15023 default for this.
15024
150252002-08-01 Andrew Cagney <cagney@redhat.com>
15026
15027 * Makefile.in: Make chill references obsolete.
15028
150292002-07-24 Kevin Buettner <kevinb@redhat.com>
15030
15031 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15032 * configure: Regenerate.
15033 * config.in: Regenerate.
15034
150352002-07-09 David O'Brien <obrien@FreeBSD.org>
15036
15037 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15038 (perror_with_name, remote_close, remote_open, expect, play): Static.
15039
150402002-07-04 Michal Ludvig <mludvig@suse.cz>
15041
4b8dad4a 15042 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15043 byte offsets instead of an array of indexes.
15044 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15045
150462002-06-13 Daniel Jacobowitz <drow@mvista.com>
15047
15048 * regcache.c: Add comment.
15049
150502002-06-11 Daniel Jacobowitz <drow@mvista.com>
15051
15052 * thread-db.c: New file.
15053 * proc-service.c: New file.
15054 * acinclude.m4: New file.
15055 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15056 proc-service.o, and thread-db.o.
15057 (linux-low.o): Add USE_THREAD_DB.
15058 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15059 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15060 * aclocal.m4: Regenerated.
15061 * config.in: Regenerated.
15062 * configure: Regenerated.
15063 * configure.in: Check for proc_service.h, sys/procfs.h,
15064 thread_db.h, and linux/elf.h headrs.
15065 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15066 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15067 Check for -lthread_db and thread support.
15068 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15069 PowerPC, and SuperH.
15070 * i387-fp.c: Constify arguments.
15071 * i387-fp.h: Likewise.
15072 * inferiors.c: (struct thread_info): Renamed from
15073 `struct inferior_info'. Remove PID member. Use generic inferior
15074 list header. All uses updated.
15075 (inferiors, signal_pid): Removed.
15076 (all_threads): New variable.
15077 (get_thread): Define.
15078 (add_inferior_to_list): New function.
15079 (for_each_inferior): New function.
15080 (change_inferior_id): New function.
15081 (add_inferior): Removed.
15082 (remove_inferior): New function.
15083 (add_thread): New function.
15084 (free_one_thread): New function.
15085 (remove_thread): New function.
15086 (clear_inferiors): Use for_each_inferior and free_one_thread.
15087 (find_inferior): New function.
15088 (find_inferior_id): New function.
15089 (inferior_target_data): Update argument type.
15090 (set_inferior_target_data): Likewise.
15091 (inferior_regcache_data): Likewise.
15092 (set_inferior_regcache_data): Likewise.
15093 * linux-low.c (linux_bp_reinsert): Remove.
15094 (all_processes, stopping_threads, using_thrads)
15095 (struct pending_signals, debug_threads, pid_of): New.
15096 (inferior_pid): Replace with macro.
15097 (struct inferior_linux_data): Remove.
15098 (get_stop_pc, add_process): New functions.
15099 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15100 Use add_process and add_thread.
15101 (linux_attach_lwp): New function, based on old linux_attach. Use
15102 add_process and add_thread. Set stop_expected for new threads.
15103 (linux_attach): New function.
15104 (linux_kill_one_process): New function.
15105 (linux_kill): Kill all LWPs.
15106 (linux_thread_alive): Use find_inferior_id.
15107 (check_removed_breakpoints, status_pending_p): New functions.
15108 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15109 Update. Use WNOHANG. Wait for cloned processes also. Update process
15110 struct for the found process.
15111 (linux_wait_for_event): New function.
15112 (linux_wait): Use it. Support LWPs.
15113 (send_sigstop, wait_for_sigstop, stop_all_processes)
15114 (linux_resume_one_process, linux_continue_one_process): New functions.
15115 (linux_resume): Support LWPs.
15116 (REGISTER_RAW_SIZE): Remove.
15117 (fetch_register): Use register_size instead. Call supply_register.
15118 (usr_store_inferior_registers): Likewise. Call collect_register.
15119 Fix recursive case.
15120 (regsets_fetch_inferior_registers): Improve error message.
15121 (regsets_store_inferior_registers): Add debugging.
15122 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15123 (unstopped_p, linux_signal_pid): New functions.
15124 (linux_target_ops): Add linux_signal_pid.
15125 (linux_init_signals): New function.
15126 (initialize_low): Call it. Initialize using_threads.
15127 * regcache.c (inferior_regcache_data): Add valid
15128 flag.
15129 (get_regcache): Fetch registers lazily. Add fetch argument
15130 and update all callers.
15131 (regcache_invalidate_one, regcache_invalidate): New
15132 functions.
15133 (new_register_cache): Renamed from create_register_cache.
15134 Return the new regcache.
15135 (free_register_cache): Change argument to a void *.
15136 (registers_to_string, registers_from_string): Call get_regcache
15137 with fetch flag set.
15138 (register_data): Make static. Pass fetch flag to get_regcache.
15139 (supply_register): Call get_regcache with fetch flag clear.
15140 (collect_register): Call get_regcache with fetch flag set.
15141 (collect_register_as_string): New function.
15142 * regcache.h: Update.
15143 * remote-utils.c (putpkt): Flush after debug output and use
15144 stderr.
15145 Handle input interrupts while waiting for an ACK.
15146 (input_interrupt): Use signal_pid method.
15147 (getpkt): Flush after debug output and use stderr.
15148 (outreg): Use collect_register_as_string.
15149 (new_thread_notify, dead_thread_notify): New functions.
15150 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15151 and general_thread.
15152 (look_up_one_symbol): Flush after debug output.
15153 * server.c (step_thread, server_waiting): New variables.
15154 (start_inferior): Don't use signal_pid. Update call to mywait.
15155 (attach_inferior): Update call to mywait.
15156 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15157 (main): Don't fetch/store registers explicitly. Use
15158 set_desired_inferior. Support proposed ``Hs'' packet. Update
15159 calls to mywait.
15160 * server.h: Update.
15161 (struct inferior_list, struct_inferior_list_entry): New.
15162 * target.c (set_desired_inferior): New.
15163 (write_inferior_memory): Constify.
15164 (mywait): New function.
15165 * target.h: Update.
15166 (struct target_ops): New signal_pid method.
15167 (mywait): Removed macro, added prototype.
15168
15169 * linux-low.h (regset_func): Removed.
15170 (regset_fill_func, regset_store_func): New.
15171 (enum regset_type): New.
15172 (struct regset_info): Add type field. Use new operation types.
15173 (struct linux_target_ops): stop_pc renamed to get_pc.
15174 Add decr_pc_after_break and breakpoint_at.
15175 (get_process, get_thread_proess, get_process_thread)
15176 (strut process_info, all_processes, linux_attach_lwp)
15177 (thread_db_init): New.
15178
15179 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15180 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15181 (the_low_target): Add new members.
15182 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15183 (i386_store_fpxregset): Constify.
15184 (target_regsets): Add new kind identifier.
15185 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15186 (i386_set_pc): Add debugging.
15187 (i386_breakpoint_at): New function.
15188 (the_low_target): Add new members.
15189 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15190 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15191 (mips_breakpoint_at): New.
15192 (the_low_target): Add new members.
15193 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15194 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15195 (the_low_target): Add new members.
15196 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15197 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15198 (the_low_target): Add new members.
15199 * linux-x86-64-low.c (target_regsets): Add new kind
15200 identifier.
15201
152022002-05-15 Daniel Jacobowitz <drow@mvista.com>
15203
15204 From Martin Pool <mbp@samba.org>:
15205 * server.c (gdbserver_usage): New function.
15206 (main): Call it.
15207
152082002-05-14 Daniel Jacobowitz <drow@mvista.com>
15209
15210 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15211 stop_at -> stop_pc.
15212
152132002-05-04 Andrew Cagney <ac131313@redhat.com>
15214
15215 * Makefile.in: Remove obsolete code.
15216
152172002-04-24 Michal Ludvig <mludvig@suse.cz>
15218
15219 * linux-low.c (regsets_fetch_inferior_registers),
15220 (regsets_store_inferior_registers): Removed cast to int from
15221 ptrace() calls.
15222 * regcache.h: Added declaration of struct inferior_info.
15223
152242002-04-20 Daniel Jacobowitz <drow@mvista.com>
15225
15226 * inferiors.c (struct inferior_info): Add regcache_data.
15227 (add_inferior): Call create_register_cache.
15228 (clear_inferiors): Call free_register_cache.
15229 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15230 * regcache.c (struct inferior_regcache_data): New.
15231 (registers): Remove.
15232 (get_regcache): New function.
15233 (create_register_cache, free_register_cache): New functions.
15234 (set_register_cache): Don't initialize the register cache here.
15235 (registers_to_string, registers_from_string, register_data): Call
15236 get_regcache.
15237 * regcache.h: Add prototypes.
15238 * server.h: Likewise.
15239
152402002-04-20 Daniel Jacobowitz <drow@mvista.com>
15241
15242 * mem-break.c: New file.
15243 * mem-break.h: New file.
15244 * Makefile.in: Add mem-break.o rule; update server.h
15245 dependencies.
15246 * inferiors.c (struct inferior_info): Add target_data
15247 member.
15248 (clear_inferiors): Free target_data member if set.
15249 (inferior_target_data, set_inferior_target_data): New functions.
15250 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15251 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15252 * linux-low.c (linux_bp_reinsert): New variable.
15253 (struct inferior_linux_data): New.
15254 (linux_create_inferior): Use set_inferior_target_data.
15255 (linux_attach): Likewise. Call add_inferior.
15256 (linux_wait_for_one_inferior): New function.
15257 (linux_wait): Call it.
15258 (linux_write_memory): Add const.
15259 (initialize_low): Call set_breakpoint_data.
15260 * linux-low.h (struct linux_target_ops): Add breakpoint
15261 handling members.
15262 * server.c (attach_inferior): Remove extra add_inferior
15263 call.
15264 * server.h: Include mem-break.h. Update inferior.c
15265 prototypes.
15266 * target.c (read_inferior_memory)
15267 (write_inferior_memory): New functions.
15268 * target.h (read_inferior_memory)
15269 (write_inferior_memory): Change macros to prototypes.
15270 (struct target_ops): Update comments. Add const to write_memory
15271 definition.
15272
152732002-04-11 Daniel Jacobowitz <drow@mvista.com>
15274
15275 * linux-low.c (usr_store_inferior_registers): Support
15276 registers which are allowed to fail to store.
15277 * linux-low.h (linux_target_ops): Likewise.
15278 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15279 (ppc_cannot_store_register): FPSCR may not be storable.
15280
152812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * server.h: Include <string.h> if HAVE_STRING_H.
15284 * ChangeLog: Correct paths in last ChangeLog entry.
15285
152862002-04-09 Daniel Jacobowitz <drow@mvista.com>
15287
15288 * linux-low.h: Remove obsolete prototypes.
15289 (struct linux_target_ops): New.
15290 (extern the_low_target): New.
15291 * linux-low.c (num_regs, regmap): Remove declarations.
15292 (register_addr): Use the_low_target explicitly.
15293 (fetch_register): Likewise.
15294 (usr_fetch_inferior_registers): Likewise.
15295 (usr_store_inferior_registers): Likewise.
15296 * linux-arm-low.c (num_regs): Remove.
15297 (arm_num_regs): Define.
15298 (arm_regmap): Renamed from regmap, made static.
15299 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15300 made static.
15301 (arm_cannot_store_register): Renamed from cannot_store_register,
15302 made static.
15303 (the_low_target): New.
15304 * linux-i386-low.c (num_regs): Remove.
15305 (i386_num_regs): Define.
15306 (i386_regmap): Renamed from regmap, made static.
15307 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15308 made static.
15309 (i386_cannot_store_register): Renamed from cannot_store_register,
15310 made static.
15311 (the_low_target): New.
15312 * linux-ia64-low.c (num_regs): Remove.
15313 (ia64_num_regs): Define.
15314 (ia64_regmap): Renamed from regmap, made static.
15315 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15316 made static.
15317 (ia64_cannot_store_register): Renamed from cannot_store_register,
15318 made static.
15319 (the_low_target): New.
15320 * linux-m68k-low.c (num_regs): Remove.
15321 (m68k_num_regs): Define.
15322 (m68k_regmap): Renamed from regmap, made static.
15323 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15324 made static.
15325 (m68k_cannot_store_register): Renamed from cannot_store_register,
15326 made static.
15327 (the_low_target): New.
15328 * linux-mips-low.c (num_regs): Remove.
15329 (mips_num_regs): Define.
15330 (mips_regmap): Renamed from regmap, made static.
15331 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15332 made static.
15333 (mips_cannot_store_register): Renamed from cannot_store_register,
15334 made static.
15335 (the_low_target): New.
15336 * linux-ppc-low.c (num_regs): Remove.
15337 (ppc_num_regs): Define.
15338 (ppc_regmap): Renamed from regmap, made static.
15339 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15340 made static.
15341 (ppc_cannot_store_register): Renamed from cannot_store_register,
15342 made static.
15343 (the_low_target): New.
15344 * linux-s390-low.c (num_regs): Remove.
15345 (s390_num_regs): Define.
15346 (s390_regmap): Renamed from regmap, made static.
15347 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15348 made static.
15349 (s390_cannot_store_register): Renamed from cannot_store_register,
15350 made static.
15351 (the_low_target): New.
15352 * linux-sh-low.c (num_regs): Remove.
15353 (sh_num_regs): Define.
15354 (sh_regmap): Renamed from regmap, made static.
15355 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15356 made static.
15357 (sh_cannot_store_register): Renamed from cannot_store_register,
15358 made static.
15359 (the_low_target): New.
15360 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15361 (the_low_target): New.
15362
153632002-04-09 Daniel Jacobowitz <drow@mvista.com>
15364
15365 * Makefile.in: Add stamp-h target.
15366 * configure.in: Create stamp-h.
15367 * configure: Regenerated.
15368
153692002-04-09 Daniel Jacobowitz <drow@mvista.com>
15370
15371 * inferiors.c: New file.
15372 * target.c: New file.
15373 * target.h: New file.
15374 * Makefile.in: Add target.o and inferiors.o. Update
15375 dependencies.
15376 * linux-low.c (inferior_pid): New static variable,
15377 moved from server.c.
15378 (linux_create_inferior): Renamed from create_inferior.
15379 Call add_inferior. Return 0 on success instead of a PID.
15380 (linux_attach): Renamed from myattach.
15381 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15382 (linux_thread_alive): Renamed from mythread_alive.
15383 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15384 child dies.
15385 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15386 (regsets_store_inferior_registers): Correct error message.
15387 Add missing ``return 0''.
15388 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15389 (linux_store_registers): Renamed from store_inferior_registers.
15390 (linux_read_memory): Renamed from read_inferior_memory.
15391 (linux_write_memory): Renamed from write_inferior_memory.
15392 (linux_target_ops): New structure.
15393 (initialize_low): Call set_target_ops ().
15394 * remote-utils.c (unhexify): New function.
15395 (hexify): New function.
15396 (input_interrupt): Send signals to ``signal_pid''.
15397 * server.c (inferior_pid): Remove.
15398 (start_inferior): Update create_inferior call.
15399 (attach_inferior): Call add_inferior.
15400 (handle_query): New function.
15401 (main): Call handle_query for `q' packets.
15402 * server.h: Include "target.h". Remove obsolete prototypes.
15403 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15404
154052002-04-09 Daniel Jacobowitz <drow@mvista.com>
15406
15407 * Makefile.in: Add WARN_CFLAGS. Update configury
15408 dependencies.
15409 * configure.in: Check for <string.h>
15410 * configure: Regenerate.
15411 * config.in: Regenerate.
15412 * gdbreplay.c: Include needed system headers.
15413 (remote_open): Remove strchr prototype.
15414 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15415 * regcache.c (supply_register): Change buf argument to const void *.
15416 (supply_register_by_name): Likewise.
15417 (collect_register): Change buf argument to void *.
15418 (collect_register_by_name): Likewise.
15419 * regcache.h: Add missing prototypes.
15420 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15421 * server.c (handle_query): New function.
15422 (attached): New static variable, moved out of main.
15423 (main): Quiet longjmp clobber warnings.
15424 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15425 * utils.c (error): Remove NORETURN.
15426 (fatal): Likewise.