]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Documentation for Inferior.thread_from_thread_handle
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f557a88a
PA
12017-09-21 Pedro Alves <palves@redhat.com>
2
3 * server.c (gdb_read_memory, handle_status, process_serial_event)
4 (handle_serial_event, handle_target_event): Adjust to
5 set_desired_thread prototype change.
6 * target.c (set_desired_thread): Remove 'use_general' parameter
7 and adjust.
8 * target.h (set_desired_thread): Remove 'use_general' parameter.
9
223ffa71
TT
102017-09-20 Tom Tromey <tom@tromey.com>
11
12 * target.c (target_terminal::terminal_state): Define.
13 (target_terminal::init): Rename from target_terminal_init.
14 (target_terminal::inferior): Rename from
15 target_terminal_inferior.
16 (target_terminal::ours): Rename from target_terminal_ours.
17 (target_terminal::ours_for_output, target_terminal::info): New.
18
04fd3ba9
SM
192017-09-16 Simon Marchi <simon.marchi@ericsson.com>
20
21 * server.c (accumulate_file_name_length): Remove.
22 (emit_dll_description): Adjust to std::string change.
23 (handle_qxfer_libraries): Use std::string to hold document.
24
5e187554
SM
252017-09-16 Simon Marchi <simon.marchi@ericsson.com>
26
27 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
28 return type of xml_escape_text.
29 * server.c (emit_dll_description): Likewise.
30
1526853e
SM
312017-09-16 Simon Marchi <simon.marchi@ericsson.com>
32
33 * server.c (captured_main): Accept argument for --selftest.
34 Update run_tests call.
35 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
36 when registering selftests.
37
c4dfafab
SDJ
382017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
39
40 * regcache.c (get_thread_regcache): Update code to use "std::vector"
41 instead of "VEC" for "target_desc.reg_defs".
42 (regcache_cpy): Likewise.
43 (registers_to_string): Likewise.
44 (registers_from_string): Likewise.
45 (find_regno): Likewise.
46 (supply_regblock): Likewise.
47 (regcache_raw_read_unsigned): Likewise.
48 * tdesc.c (init_target_desc): Likewise.
49 (tdesc_create_reg): Likewise.
50 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
51 (struct target_desc) <reg_defs>: Convert to "std::vector".
52 (target_desc): Do not initialize "reg_defs".
53 (~target_desc): Update code to use "std::vector" instead of "VEC"
54 for "target_desc.reg_defs".
55 (operator==): Likewise.
56
124aceb4
SM
572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
58
59 * inferiors.h (thread_to_gdb_id): Remove.
60 * inferiors.c (thread_to_gdb_id): Remove.
61 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
62 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
63 lynx_store_registers, lynx_read_memory, lynx_write_memory):
64 Likewise.
65 * nto-low.c (nto_fetch_registers, nto_store_registers,
66 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
67
96cde54f
SM
682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
69
70 * inferiors.h (gdb_id_to_thread_id): Remove.
71 * inferiors.c (gdb_id_to_thread_id): Remove.
72 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
73 removal. Move pid declaration closer to where it's used.
74
e8ca139e
SM
752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
76
77 * server.c (handle_detach): New function.
78 (process_serial_event): Move code out, call handle_detach.
79
f8a4e119
SM
802017-09-15 Simon Marchi <simon.marchi@ericsson.com>
81
82 * server.c (require_running): Rename to ...
83 (require_running_or_return): ... this ...
84 (require_running_or_break): ... and this.
85 (handle_query, process_serial_event): Adjust.
86
0eb0a407
SM
872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
88
89 * linux-low.c (linux_set_resume_request): Remove unused
90 variables.
91
785922a5
SM
922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
93
94 * server.c (first_thread_of): Remove.
95 (process_serial_event): Replace usage of first_thread_of with
96 find_any_thread_of_pid.
97 * tracepoint.c (same_process_p): Remove.
98 (gdb_agent_about_to_close): Replace usage of same_process_p with
99 find_any_thread_of_pid.
100 * linux-x86-low.c (same_process_callback): Remove.
101 (x86_arch_setup_process_callback): Replace usage of
102 same_process_callback with find_any_thread_of_pid.
103 * thread-db.c (any_thread_of): Remove.
104 (switch_to_process): Replace usage of any_thread_of with
105 find_any_thread_of_pid.
106 * inferiors.c (thread_pid_matches_callback): Remove.
107 (find_thread_process): Adjust to use find_any_thread_of_pid.
108
a059f00c
SDJ
1092017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
110
111 * regcache.c (get_thread_regcache): Guard calls to "memset"
112 with "!VEC_empty".
113
cc397f3a
SDJ
1142017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
115
116 * linux-low.c (handle_extended_wait): Use
117 "allocate_target_description" instead of "XNEW".
118 * linux-x86-low.c (initialize_low_arch): Likewise.
119
22916b07
YQ
1202017-09-05 Yao Qi <yao.qi@linaro.org>
121
122 * configure.srv (srv_i386_regobj): Remove.
123 (srv_amd64_regobj): Remove.
124 (srv_regobj): Set it to "" for x86 non-linux targets.
125 * linux-x86-tdesc.c (i386_linux_read_description):
126 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
127 (init_registers_i386): Remove the declaration.
128 (tdesc_i386): Remove the declaration.
129 (lynx_i386_arch_setup): Call i386_create_target_description.
130 * nto-x86-low.c: Likewise.
131 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
132 [!__x86_64__]: include arch/i386.h.
133 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
134
38602d55
YQ
1352017-09-05 Yao Qi <yao.qi@linaro.org>
136
137 * configure.srv (srv_amd64_linux_xmlfiles): Remove
138 i386/amd64-XXX-linux from it.
139
44b886ff
YQ
1402017-09-05 Yao Qi <yao.qi@linaro.org>
141
142 * configure.srv: Empty srv_amd64_linux_regobj if $development is
143 false.
144 (ipa_amd64_linux_regobj): Remove.
145 (ipa_x32_linux_regobj): Remove.
146
b4570e4b
YQ
1472017-09-05 Yao Qi <yao.qi@linaro.org>
148
149 * Makefile.in (arch-amd64.o): New rule.
150 * configure.srv: Append arch-amd64.o.
151 * linux-amd64-ipa.c: Include common/x86-xstate.h.
152 (get_ipa_tdesc): Call amd64_linux_read_description.
153 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
154 and init_registers_amd64_XXX.
155 * linux-x86-low.c (x86_linux_read_description): Call
156 amd64_linux_read_description.
157 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
158 (initialize_low_arch): Don't call init_registers_x32_XXX and
159 init_registers_amd64_XXX.
160 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
161 and tdesc_amd64_XXX.
162 [__x86_64__] (amd64_tdesc_test): New function.
163 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
164 and init_registers_amd64_XXX.
165 * linux-x86-tdesc.c: Include arch/amd64.h.
166 (xcr0_to_tdesc_idx): New function.
167 (i386_linux_read_description): New function.
168 (amd64_get_ipa_tdesc_idx): New function.
169 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
170 (amd64_get_ipa_tdesc): Declare.
171
d1f28ea2
YQ
1722017-09-05 Yao Qi <yao.qi@linaro.org>
173
174 * configure.srv (srv_i386_linux_xmlfiles): Remove
175 i386/i386-XXX-linux.xml from it.
176
25a93583
YQ
1772017-09-05 Yao Qi <yao.qi@linaro.org>
178
179 * configure.srv: Set srv_i386_linux_regobj empty if $development
180 is false.
181 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
182 initialize_low_tdesc.
183 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
184 with #if initialize_low_tdesc.
185 * linux-x86-tdesc-selftest.c: New file.
186 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
187
5f035c07
YQ
1882017-09-05 Yao Qi <yao.qi@linaro.org>
189
190 * Makefile.in (arch-i386.o): New rule.
191 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
192 (x86_64-*-linux*): Likewise.
193 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
194 include arch/i386.h.
195 (i386_linux_read_description): Remove code and call
196 i386_create_target_description.
197 * tdesc.c (allocate_target_description): New function.
198 * tdesc.h (set_tdesc_architecture): Remove declaration.
199 (set_tdesc_osabi): Likewise.
200
0abe8a89
YQ
2012017-09-05 Yao Qi <yao.qi@linaro.org>
202
203 * linux-x86-tdesc.c: Don't include <inttypes.h>.
204 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
205 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
206 .xmltarget.
207 * server.c (get_features_xml): Call tdesc_get_features_xml.
208 * tdesc.c (set_tdesc_architecture): New function.
209 (set_tdesc_osabi): New function.
210 (tdesc_get_features_xml): New function.
211 (tdesc_create_feature): Add an argument.
212 * tdesc.h (struct target_desc) <features>: New field.
213 <arch, osabi>: New field.
214 (~target_desc): xfree features, arch, and osabi.
215 (target_desc::oerator==): Don't compare .xmltarget.
216 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
217 (set_tdesc_osabi): Likewise.
218 (tdesc_get_features_xml): Likewise.
219
0a188386
YQ
2202017-09-05 Yao Qi <yao.qi@linaro.org>
221
222 * linux-x86-tdesc.c: Include selftest.h.
223 (i386_tdesc_test): New function.
224 (initialize_low_tdesc): Call selftests::register_test.
225 * tdesc.h: Include regdef.h.
226 (target_desc): Override operator == and !=.
227
f49ff000
YQ
2282017-09-05 Yao Qi <yao.qi@linaro.org>
229
230 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
231 (ipa_obj): Likewise.
232 * linux-i386-ipa.c: Include common/x86-xstate.h
233 (get_ipa_tdesc): Call i386_linux_read_description.
234 (initialize_low_tracepoint): Don't call init_registers_XXX
235 functions, call initialize_low_tdesc instead.
236 * linux-x86-low.c (x86_linux_read_description): Call
237 i386_linux_read_description.
238 (initialize_low_arch): Don't call init_registers_i386_XXX
239 functions, call initialize_low_tdesc.
240 * linux-x86-tdesc.c: New file.
241 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
242 (i386_get_ipa_tdesc_idx): Declare.
243 (i386_get_ipa_tdesc): Declare.
244 (initialize_low_tdesc): Declare.
245
2b68ef2f
YQ
2462017-09-05 Yao Qi <yao.qi@linaro.org>
247
248 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
249 instead of 0.
250
f7000548
YQ
2512017-09-05 Yao Qi <yao.qi@linaro.org>
252
253 * Makefile.in (IPA_OBJS): Add vec-ipa.o
254 * regcache.c (get_thread_regcache): Use VEC_length.
255 (init_register_cache): Likewise.
256 (regcache_cpy): Likewise.
257 (registers_to_string): Iterate reg_defs via VEC_iterate.
258 (find_regno): Likewise.
259 (find_register_by_number): Use VEC_index.
260 (register_size): Call find_register_by_number.
261 (register_data): Call find_register_by_number.
262 (supply_regblock): Use VEC_length.
263 (regcache_raw_read_unsigned): Likewise.
264 * tdesc.c (init_target_desc): Iterate reg_defs via
265 VEC_iterate.
266 (default_description): Update initializer.
267 (copy_target_description): Don't update field num_registers.
268 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
269 <num_registers>: Remove.
270
50a421ac
SM
2712017-09-04 Simon Marchi <simon.marchi@ericsson.com>
272
273 * Makefile.in (.SECONDARY): Define target.
274
23fdd69e
SM
2752017-09-03 Simon Marchi <simon.marchi@ericsson.com>
276
277 * linux-low.c (linux_wait_1): Adjust.
278 * server.c (queue_stop_reply_callback): Adjust.
279
0a2dde4a
SDJ
2802017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
281
282 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
283 QEnvironmentUnset and QEnvironmentReset packets.
284 (handle_query): Inform remote that QEnvironmentHexEncoded,
285 QEnvironmentUnset and QEnvironmentReset are supported.
286
6afd337d
SM
2872017-08-25 Simon Marchi <simon.marchi@ericsson.com>
288
289 * inferiors.h (inferior_target_data): Rename to ...
290 (thread_target_data): ... this.
291 (inferior_regcache_data): Rename to ...
292 (thread_regcache_data): ... this.
293 (set_inferior_regcache_data): Rename to ...
294 (set_thread_regcache_data): ... this.
295 * inferiors.c (inferior_target_data): Rename to ...
296 (thread_target_data): ... this.
297 (inferior_regcache_data): Rename to ...
298 (thread_regcache_data): ... this.
299 (set_inferior_regcache_data): Rename to ...
300 (set_thread_regcache_data): ... this.
301 (free_one_thread): Update.
302 * linux-low.h (get_thread_lwp): Update.
303 * regcache.c (get_thread_regcache): Update.
304 (regcache_invalidate_thread): Update.
305 (free_register_cache_thread): Update.
306 * win32-i386-low.c (update_debug_registers_callback): Update.
307 (win32_get_current_dr): Update.
308 * win32-low.c (thread_rec): Update.
309 (delete_thread_info): Update.
310 (continue_one_thread): Update.
311 (suspend_one_thread): Update.
312
a160cc46
SM
3132017-08-24 Simon Marchi <simon.marchi@ericsson.com>
314
315 * inferiors.c (set_inferior_target_data): Remove.
316 * inferiors.h (set_inferior_target_data): Remove.
317
6d580b63
YQ
3182017-08-18 Yao Qi <yao.qi@linaro.org>
319
320 * Makefile.in (OBS): Add selftest.o.
321 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
322 * configure, config.in: Re-generated.
323 * server.c: Include common/sefltest.h.
324 (captured_main): Handle option --selftest.
325
f5a29eb0
YQ
3262017-08-09 Yao Qi <yao.qi@linaro.org>
327
328 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
329 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
330 i386-avx-mpx.o and i386-mmx.o.
331 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
332 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
333 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
334 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
335 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
336 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
337 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
338 i386/amd64-avx-mpx.xml.
339
57757c2f
YQ
3402017-08-09 Yao Qi <yao.qi@linaro.org>
341
342 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
343 and x32-avx-avx512.o.
344 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
345 i386/x32-avx-avx512.xml.
346
229d26fc
SM
3472017-07-26 Simon Marchi <simon.marchi@ericsson.com>
348
349 * tracepoint.h (enum class fast_tpoint_collect_result): New
350 enumeration.
351 (fast_tracepoint_collecting): Change return type to
352 fast_tpoint_collect_result.
353 * tracepoint.c (fast_tracepoint_collecting): Likewise.
354 * linux-low.h: Include tracepoint.h.
355 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
356 fast_tpoint_collect_result.
357 * linux-low.c (handle_tracepoints): Adjust.
358 (linux_fast_tracepoint_collecting): Change return type to
359 fast_tpoint_collect_result.
360 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
361 linux_wait_1, stuck_in_jump_pad_callback,
362 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
363 proceed_one_lwp): Adjust to type change.
364
2e1e43e1
YQ
3652017-07-10 Yao Qi <yao.qi@linaro.org>
366
367 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
368
adc764e7
YQ
3692017-06-29 Yao Qi <yao.qi@linaro.org>
370
371 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
372 Remove.
373 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
374
a206891a
SM
3752017-06-20 Simon Marchi <simon.marchi@ericsson.com>
376
377 * Makefile.in (IPA_OBJS): Sort and format one item per line.
378
9a6c7d9c
SDJ
3792017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
380
381 * linux-low.c (linux_create_inferior): Adjust code to access the
382 environment information via 'gdb_environ' class.
383 * lynx-low.c (lynx_create_inferior): Likewise.
384 * server.c (our_environ): Make it an instance of 'gdb_environ'.
385 (get_environ): Return a pointer to 'our_environ'.
386 (captured_main): Initialize 'our_environ'.
387 * server.h (get_environ): Adjust prototype.
388 * spu-low.c (spu_create_inferior): Adjust code to access the
389 environment information via 'gdb_environ' class.
390
ae3e2ccf
SM
3912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
392
393 * linux-low.c (linux_read_memory, linux_write_memory): Remove
394 usage of "register" keyword.
395
3e019bdc
SM
3962017-06-17 Simon Marchi <simon.marchi@ericsson.com>
397
398 * configure: Re-generate.
399
8465943a
SM
4002017-06-17 Simon Marchi <simon.marchi@ericsson.com>
401
402 * configure: Re-generate.
403
cf0dd6f0
SM
4042017-06-17 Simon Marchi <simon.marchi@ericsson.com>
405
406 * Makefile.in (COMPILE.pre): Add "-x c++".
407
9845682b
SDJ
4082017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
409
410 * fork-child.c: Conditionally include <signal.h>.
411
aefd8b33
SDJ
4122017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
413
414 * server.c (handle_general_set): Handle new packet
415 "QStartupWithShell".
416 (handle_query): Add "QStartupWithShell" to the list of supported
417 packets.
418 (gdbserver_usage): Add help text explaining the
419 new "--startup-with-shell" and "--no-startup-with-shell" CLI
420 options.
421 (captured_main): Recognize and act upon the presence of the new
422 CLI options.
423
2090129c
SDJ
4242017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
425 Pedro Alves <palves@redhat.com>
426
427 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
428 * configure: Regenerate.
429 * configure.srv (srv_linux_obj): Add "fork-child.o" and
430 "fork-inferior.o".
431 (i[34567]86-*-lynxos*): Likewise.
432 (spu*-*-*): Likewise.
433 * fork-child.c: New file.
434 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
435 and "environ.h".
436 (linux_ptrace_fun): New function.
437 (linux_create_inferior): Adjust function prototype to reflect
438 change on "target.h". Adjust function code to use
439 "fork_inferior".
440 (linux_request_interrupt): Delete "signal_pid".
441 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
442 (lynx_ptrace_fun): New function.
443 (lynx_create_inferior): Adjust function prototype to reflect
444 change on "target.h". Adjust function code to use
445 "fork_inferior".
446 * nto-low.c (nto_create_inferior): Adjust function prototype and
447 code to reflect change on "target.h". Update comments.
448 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
449 "common-terminal.h" and "environ.h".
450 (terminal_fd): Moved to fork-child.c.
451 (old_foreground_pgrp): Likewise.
452 (restore_old_foreground_pgrp): Likewise.
453 (last_status): Make it global.
454 (last_ptid): Likewise.
455 (our_environ): New variable.
456 (startup_with_shell): Likewise.
457 (program_name): Likewise.
458 (program_argv): Rename to...
459 (program_args): ...this.
460 (wrapper_argv): New variable.
461 (start_inferior): Delete function.
462 (get_exec_wrapper): New function.
463 (get_exec_file): Likewise.
464 (get_environ): Likewise.
465 (prefork_hook): Likewise.
466 (post_fork_inferior): Likewise.
467 (postfork_hook): Likewise.
468 (postfork_child_hook): Likewise.
469 (handle_v_run): Update code to deal with arguments coming from the
470 remote host. Update calls from "start_inferior" to
471 "create_inferior".
472 (captured_main): Likewise. Initialize environment variable. Call
473 "have_job_control".
474 * server.h (post_fork_inferior): New prototype.
475 (get_environ): Likewise.
476 (last_status): Declare.
477 (last_ptid): Likewise.
478 (signal_pid): Likewise.
479 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
480 (spu_ptrace_fun): New function.
481 (spu_create_inferior): Adjust function prototype to reflect change
482 on "target.h". Adjust function code to use "fork_inferior".
483 * target.c (target_terminal_init): New function.
484 (target_terminal_inferior): Likewise.
485 (target_terminal_ours): Likewise.
486 * target.h: Include <vector>.
487 (struct target_ops) <create_inferior>: Update prototype.
488 (create_inferior): Update macro.
489 * utils.c (gdb_flush_out_err): New function.
490 * win32-low.c (win32_create_inferior): Adjust function prototype
491 and code to reflect change on "target.h".
492
043a4934
SDJ
4932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
494
495 * inferiors.c (switch_to_thread): New function.
496
15652511
SDJ
4972017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
498
499 * Makefile.in (SFILE): Add "common/job-control.c".
500 (OBS): Add "job-control.o".
501
21ea5acd
SDJ
5022017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
503
504 * Makefile: Remove "@host_makefile_frag@".
505
e13cb306
PA
5062017-05-05 Pedro Alves <palves@redhat.com>
507
508 * configure: Regenerate.
509
c94fee56
SDJ
5102017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
511
512 * configure: Regenerate.
513
a0ff9e1a
SM
5142017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
515
516 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
517 software_single_step change of return type to
518 std::vector<CORE_ADDR>.
519 * linux-low.c (install_software_single_step_breakpoints):
520 Likewise.
521 * linux-low.h (install_software_single_step_breakpoints):
522 Likewise.
523
be628ab8
SDJ
5242017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
525
526 * remote-utils.c: Include "gdb_termios.h" instead of
527 "terminal.h".
528 * terminal.h: Delete file.
529
7c5ded6a
SDJ
5302017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
531
532 * server.c: Include <vector>.
533 <program_argv, wrapper_argv>: Convert to std::vector.
534 (start_inferior): Rewrite function to use C++.
535 (handle_v_run): Likewise. Update code that calculates the argv
536 based on the vRun packet; use C++.
537 (captured_main): Likewise.
538
436252de
SM
5392017-04-06 Simon Marchi <simon.marchi@ericsson.com>
540
541 * server.c (handle_v_cont): Initialize thread_resume::thread
542 with null_ptid.
543
9bf2a700
PA
5442017-04-05 Pedro Alves <palves@redhat.com>
545
546 * configure: Regenerate.
547
a121b7c1
PA
5482017-04-05 Pedro Alves <palves@redhat.com>
549
550 * gdbreplay.c (sync_error): Constify.
551 * linux-x86-low.c (push_opcode): Constify.
552
21c8a587
PA
5532017-04-05 Pedro Alves <palves@redhat.com>
554
555 * win32-low.c (get_child_debug_event)
556 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
557 Report TARGET_WAITKIND_SPURIOUS instead.
558
fb32b4f7
PA
5592017-04-05 Pedro Alves <palves@redhat.com>
560
561 * remote-utils.c (remote_prepare, remote_open): Constify.
562 * remote-utils.h (remote_prepare, remote_open): Constify.
563 * server.c (captured_main): Constify 'port' handling.
564
65dd1e59
SM
5652017-04-04 Simon Marchi <simon.marchi@ericsson.com>
566
567 * Makefile.in (clean): Clear .deps.
568
8fa5b777
SM
5692017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
570
571 * .gitignore: Remove generated files, replace with wildcard.
572 * (clean): Replace removal of generated files with wildcard.
573 (version.c): Replace with...
574 (version-generated.c): ...this.
575 (xml-builtin.c): Replace with...
576 (xml-builtin-generated.c): ...this.
577 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
578 (%.c: *regformats*): Replace with...
579 (%-generated.c: *regformats*): ...this.
580
a12e714b
MF
5812017-03-27 Max Filippov <jcmvbkbc@gmail.com>
582
583 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
584 (xtensa_fill_gregset): Call collect_register_by_name for
585 threadptr register.
586 (xtensa_store_gregset): Call supply_register_by_name for
587 threadptr register.
588
1a09b50a
MF
5892017-03-27 Max Filippov <jcmvbkbc@gmail.com>
590
591 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
592 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
593 (xtensa_store_gregset): Call supply_register for all registers in
594 a0_regnum..a0_regnum + C0_NREGS range.
595
1a01e7c6
SM
5962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
597
598 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
599 (ax-ipa.o: ax.c): Remove.
600 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
601 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
602 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
603 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
604 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
605
36bc18a8
SM
6062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
609 (print-utils-ipa.o: ../common/print-utils.c): Remove.
610 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
611 (errors-ipa.o: ../common/errors.c): Remove.
612 (format-ipa.o: ../common/format.c): Remove.
613 (common-utils-ipa.o: ../common/common-utils.c): Remove.
614
a8ebe3d5
SM
6152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
616
617 * Makefile.in (%-ipa.o: %.c): New rule.
618 (tracepoint-ipa.o: tracepoint.c): Remove.
619 (utils-ipa.o: utils.c): Remove.
620 (remote-utils-ipa.o: remote-utils.c): Remove.
621 (regcache-ipa.o: regcache.c): Remove.
622 (i386-linux-ipa.o: i386-linux.c): Remove.
623 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
624 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
625 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
626 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
627 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
628 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
629 (amd64-linux-ipa.o: amd64-linux.c): Remove.
630 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
631 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
632 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
633 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
634 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
635 (aarch64-ipa.o: aarch64.c): Remove.
636 (s390-linux32-ipa.o: s390-linux32.c): Remove.
637 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
638 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
639 (s390-linux64-ipa.o: s390-linux64.c): Remove.
640 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
641 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
642 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
643 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
644 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
645 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
646 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
647 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
648 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
649 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
650 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
651 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
652 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
653 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
654 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
655 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
656 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
657 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
658 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
659 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
660 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
661 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
662 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
663 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
664 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
665 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
666 (tdesc-ipa.o: tdesc.c): Remove.
667 (x32-linux-ipa.o: x32-linux.c): Remove.
668 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
669 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
670
50cfacb7
SM
6712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
672
673 * Makefile.in (%.o: ../arch/%.c): New rule.
674 (arm.o: ../arch/arm.c): Remove.
675 (arm-linux.o: ../arch/arm-linux.c): Remove.
676 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
677 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
678
c5a22423
SM
6792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * Makefile.in (%.o: ../nat/%.c): New rule.
682 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
683 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
684 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
685 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
686 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
687 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
688 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
689 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
690 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
691 (linux-personality.o: ../nat/linux-personality.c): Remove.
692 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
693 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
694 (x86-linux.o: ../nat/x86-linux.c): Remove.
695 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
696 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
697
6bda016b
SM
6982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
699
700 * Makefile.in (%.o: ../common/%.c): New rule.
701 (signals.o: ../common/signals.c): Remove.
702 (print-utils.o: ../common/print-utils.c): Remove.
703 (rsp-low.o: ../common/rsp-low.c): Remove.
704 (common-utils.o: ../common/common-utils.c): Remove.
705 (posix-strerror.o: ../common/posix-strerror.c): Remove.
706 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
707 (vec.o: ../common/vec.c): Remove.
708 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
709 (xml-utils.o: ../common/xml-utils.c): Remove.
710 (ptid.o: ../common/ptid.c): Remove.
711 (buffer.o: ../common/buffer.c): Remove.
712 (format.o: ../common/format.c): Remove.
713 (filestuff.o: ../common/filestuff.c): Remove.
714 (agent.o: ../common/agent.c): Remove.
715 (errors.o: ../common/errors.c): Remove.
716 (environ.o: ../common/environ.c): Remove.
717 (common-debug.o: ../common/common-debug.c): Remove.
718 (cleanups.o: ../common/cleanups.c): Remove.
719 (common-exceptions.o: ../common/common-exceptions.c): Remove.
720 (fileio.o: ../common/fileio.c): Remove.
721 (common-regcache.o: ../common/common-regcache.c): Remove.
722 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
723 (new-op.o: ../common/new-op.c): Remove.
724 (btrace-common.o: ../common/btrace-common.c): Remove.
725
21122961
SM
7262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
727
728 * Makefile.in (%.o: ../target/%.c): New rule.
729 (waitstatus.o: ../target/waitstatus.c): Remove.
730
c362e621
SM
7312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
732
733 * Makefile.in
734 (%.c: ../regformats/%.dat,
735 (%.c: ../regformats/arm/%.dat,
736 (%.c: ../regformats/i386/%.dat,
737 (%.c: ../regformats/rs6000/%.dat): New rules.
738 (aarch64.c): Remove.
739 (reg-arm.c): Remove.
740 (arm-with-iwmmxt.c): Remove.
741 (arm-with-vfpv2.c): Remove.
742 (arm-with-vfpv3.c): Remove.
743 (arm-with-neon.c): Remove.
744 (reg-bfin.c): Remove.
745 (reg-cris.c): Remove.
746 (reg-crisv32.c): Remove.
747 (i386.c): Remove.
748 (i386-linux.c): Remove.
749 (i386-avx.c): Remove.
750 (i386-avx-linux.c): Remove.
751 (i386-avx-avx512.c): Remove.
752 (i386-avx-avx512-linux.c): Remove.
753 (i386-mpx.c): Remove.
754 (i386-mpx-linux.c): Remove.
755 (i386-avx-mpx-avx512-pku.c): Remove.
756 (i386-avx-mpx-avx512-pku-linux.c): Remove.
757 (i386-avx-mpx.c): Remove.
758 (i386-avx-mpx-linux.c): Remove.
759 (i386-mmx.c): Remove.
760 (i386-mmx-linux.c): Remove.
761 (reg-ia64.c): Remove.
762 (reg-m32r.c): Remove.
763 (reg-m68k.c): Remove.
764 (reg-cf.c): Remove.
765 (mips-linux.c): Remove.
766 (mips-dsp-linux.c): Remove.
767 (mips64-linux.c): Remove.
768 (mips64-dsp-linux.c): Remove.
769 (nios2-linux.c): Remove.
770 (powerpc-32.c): Remove.
771 (powerpc-32l.c): Remove.
772 (powerpc-altivec32l.c): Remove.
773 (powerpc-cell32l.c): Remove.
774 (powerpc-vsx32l.c): Remove.
775 (powerpc-isa205-32l.c): Remove.
776 (powerpc-isa205-altivec32l.c): Remove.
777 (powerpc-isa205-vsx32l.c): Remove.
778 (powerpc-e500l.c): Remove.
779 (powerpc-64l.c): Remove.
780 (powerpc-altivec64l.c): Remove.
781 (powerpc-cell64l.c): Remove.
782 (powerpc-vsx64l.c): Remove.
783 (powerpc-isa205-64l.c): Remove.
784 (powerpc-isa205-altivec64l.c): Remove.
785 (powerpc-isa205-vsx64l.c): Remove.
786 (s390-linux32.c): Remove.
787 (s390-linux32v1.c): Remove.
788 (s390-linux32v2.c): Remove.
789 (s390-linux64.c): Remove.
790 (s390-linux64v1.c): Remove.
791 (s390-linux64v2.c): Remove.
792 (s390-te-linux64.c): Remove.
793 (s390-vx-linux64.c): Remove.
794 (s390-tevx-linux64.c): Remove.
795 (s390x-linux64.c): Remove.
796 (s390x-linux64v1.c): Remove.
797 (s390x-linux64v2.c): Remove.
798 (s390x-te-linux64.c): Remove.
799 (s390x-vx-linux64.c): Remove.
800 (s390x-tevx-linux64.c): Remove.
801 (tic6x-c64xp-linux.c): Remove.
802 (tic6x-c64x-linux.c): Remove.
803 (tic6x-c62x-linux.c): Remove.
804 (reg-sh.c): Remove.
805 (reg-sparc64.c): Remove.
806 (reg-spu.c): Remove.
807 (amd64.c): Remove.
808 (amd64-linux.c): Remove.
809 (amd64-avx.c): Remove.
810 (amd64-avx-linux.c): Remove.
811 (amd64-avx-avx512.c): Remove.
812 (amd64-avx-avx512-linux.c): Remove.
813 (amd64-mpx.c): Remove.
814 (amd64-mpx-linux.c): Remove.
815 (amd64-avx-mpx-avx512-pku.c): Remove.
816 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
817 (amd64-avx-mpx.c): Remove.
818 (amd64-avx-mpx-linux.c): Remove.
819 (x32.c): Remove.
820 (x32-linux.c): Remove.
821 (x32-avx.c): Remove.
822 (x32-avx-linux.c): Remove.
823 (x32-avx-avx512.c): Remove.
824 (x32-avx-avx512-linux.c): Remove.
825 (reg-xtensa.c): Remove.
826 (reg-tilegx.c): Remove.
827 (reg-tilegx32.c): Remove.
828
1672e0d9
SDJ
8292017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
830
831 * Makefile.in (SFILES): Add "common/environ.c".
832 (OBJS): Add "common/environ.h".
833
239b6d10
WT
8342017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
835
836 * configure.ac: Check if the fs_base and gs_base members of
837 `struct user_regs_struct' exist.
838 * config.in: Regenerated.
839 * configure: Likewise.
840
694b382c
AT
8412017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
842
843 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
844 target_read_memory.
845 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
846 (get_next_pcs_syscall_next_pc): Likewise.
847
7dc53023
LM
8482016-12-23 Luis Machado <lgustavo@codesourcery.com>
849
850 * win32-i386-low.c: Fix incorrect reference to a couple source files.
851 * nto-x86-low.c: Likewise.
852
ad02e4fe
SM
8532016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
854
855 * Makefile.in: Include disable-implicit-rules.mk.
856
dcb07cfa
PA
8572016-11-23 Pedro Alves <palves@redhat.com>
858
859 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
860 (debug_vprintf): Use std::chrono::steady_clock instead of
861 gettimeofday. Use '.' instead of ':'.
862 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
863 (get_timestamp): Use std::chrono::steady_clock instead of
864 gettimeofday.
865
8629c02c
SM
8662016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
867
868 * Makefile.in: Fix whitespace formatting.
869
b593ecca
SM
8702016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
871
872 * Makefile.in (SFILES, OBS): Flatten list and order
873 alphabetically.
874
9986ba08
PA
8752016-11-23 Pedro Alves <palves@redhat.com>
876
877 * event-loop.c (handle_file_event): Use warning.
878 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
879 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
880 Use warning.
881
4eefa7bc
PA
8822016-11-23 Pedro Alves <palves@redhat.com>
883
884 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
885 output.
886 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
887 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
888 debug_printf and debug_flush for debug output.
889 * server.c (handle_general_set): Likewise.
890 * thread-db.c (try_thread_db_load): Use debug_printf for debug
891 output.
892
5443506e
SM
8932016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
894
895 * Makefile.in (.c.o): Replace rule with ...
896 (%.o: %.c): ... this one.
897
3b165252
SM
8982016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
899
900 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
901 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
902 make.
903 * configure.ac: Remove checks for the make program.
904 * configure: Re-generate.
905
0bcda685
PA
9062016-10-28 Pedro Alves <palves@redhat.com>
907
908 * Makefile.in (CXX_DIALECT): Get from configure.
909 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
910 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
911 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
912 * config.in: Regenerate.
913 * configure: Regenerate.
914
c3805894
YQ
9152016-10-27 Yao Qi <yao.qi@linaro.org>
916
917 * linux-low.c (linux_supports_range_stepping): Return true if
918 can_software_single_step return true.
919
89342618
YQ
9202016-10-27 Yao Qi <yao.qi@linaro.org>
921
922 * inferiors.c (find_inferior_in_random): New function.
923 * inferiors.h (find_inferior_in_random): Declare.
924 * linux-low.c (linux_wait_for_event_filtered): Call
925 find_inferior_in_random instead of find_inferior.
926
e3652c84
YQ
9272016-10-27 Yao Qi <yao.qi@linaro.org>
928
929 * linux-low.c (linux_wait_1): If single-step breakpoints are
930 inserted, remove them.
931
5a04c4cf
PA
9322016-10-26 Pedro Alves <palves@redhat.com>
933
934 * linux-low.c (handle_extended_wait): Link parent/child fork
935 threads.
936 (linux_wait_1): Unlink them.
937 (linux_set_resume_request): Ignore resume requests for
938 already-resumed and unhandled fork child threads.
939 * linux-low.h (struct lwp_info) <fork_relative>: New field.
940 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
941 New functions.
942 (handle_v_requests) <vCont>: Don't call require_running.
943 * server.h (in_queued_stop_replies): New declaration.
944
cb93dc7f
YQ
9452016-10-24 Yao Qi <yao.qi@linaro.org>
946
947 PR server/20733
948 * linux-aarch64-low.c (append_insns): Cast the return value to
949 'uint32_t *'.
950
a1078bea
YQ
9512016-10-10 Yao Qi <yao.qi@linaro.org>
952
953 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
954
1fb77080
SDJ
9552016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
956
957 * target.c (target_supports_multi_process): New function, moved
958 from...
959 * target.h (target_supports_multi_process): ... here. Remove
960 macro.
961
39b5a3b9
TT
9622016-10-05 Tom Tromey <tom@tromey.com>
963
964 PR remote/20655:
965 * tracepoint.c (handle_tracepoint_bkpts): Check
966 ipa_error_tracepoint, not ipa_stopping_tracepoint.
967
c1d0b70a
YQ
9682016-10-05 Yao Qi <yao.qi@linaro.org>
969
970 * configure.srv: Update the path of arm-*.xml files.
971
0a69eedb
YQ
9722016-10-05 Terry Guo <terry.guo@arm.com>
973 Yao Qi <yao.qi@linaro.org>
974
975 * Makefile.in: Adjust the path of rules.
976 * configure.srv: Update the path of xml files.
977 * regformats/arm-with-iwmmxt.dat: Regenerated.
978 * regformats/arm-with-neon.dat: Likewise.
979 * regformats/arm-with-vfpv2.dat: Likewise.
980 * regformats/arm-with-vfpv3.dat Likewise.
981
17e16485
YQ
9822016-09-30 Yao Qi <yao.qi@linaro.org>
983
984 PR gdbserver/20627
985 * target.c (target_stop_and_wait): Don't call
986 target_continue_no_signal, use resume_stop instead.
987
edeeb602
YQ
9882016-09-26 Yao Qi <yao.qi@linaro.org>
989
990 * linux-low.c (linux_wait_1): Call debug_exit.
991
503b1c39
PA
9922016-09-23 Pedro Alves <palves@redhat.com>
993
994 * Makefile.in (SFILES): Add common/new-op.c.
995 (OBS): Add common/new-op.o.
996 (new-op.o): New rule.
997
74172ecf
SM
9982016-09-21 Simon Marchi <simon.marchi@ericsson.com>
999
1000 * .gitinore: Ignore more files.
1001
fc6cda2e
YQ
10022016-09-21 Yao Qi <yao.qi@linaro.org>
1003
1004 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1005 23.
1006
bc1e6c81
SDJ
10072016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1008
1009 * server.c (start_inferior): Call target_mourn_inferior instead of
1010 mourn_inferior; pass ptid_t argument to it.
1011 (resume): Likewise.
1012 (handle_target_event): Likewise.
1013 * target.c (target_mourn_inferior): New function.
1014 * target.h (mourn_inferior): Delete macro.
1015
0e00e962
AA
10162016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1017
1018 * linux-low.c (lwp_is_stepping): New function.
1019
1d8cb77d
CL
10202016-09-06 Carl Love <cel@us.ibm.com>
1021
1022 * server.c (start_inferior): Fixed comment, requested comment change
1023 didn't get updated correctly. Removed reference to ptrace () call as
1024 it is only true on Linux systems.
1025
7313bced
CL
10262016-09-06 Carl Love <cel@us.ibm.com>
1027
1028 * server.c (start_inferior): Do not call
1029 function target_post_create_inferior () if the
1030 inferior process has already exited.
1031
cf6de44d
PA
10322016-09-05 Pedro Alves <palves@redhat.com>
1033
1034 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1035 (COMPILE.pre, CC_LD): Use CXX directly.
1036 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1037 * acinclude.m4: Don't include build-with-cxx.m4.
1038 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1039 * configure: Regenerate.
1040
c1da6748
AT
10412016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1042
1043 PR gdb/19495
1044 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1045 call writing data to own_buf.
1046
f2b9e3df
SDJ
10472016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1048
1049 * target.c (mywait): Call target_wait instead of
1050 the_target->wait.
1051 (target_wait): New function.
1052
049a8570
SDJ
10532016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1054
1055 * server.c (start_inferior): New variable 'ptid'. Replace calls
1056 to the_target->resume by target_continue{,_no_signal}, depending
1057 on the case.
1058 * target.c (target_stop_and_wait): Call target_continue_no_signal
1059 instead of the_target->resume.
1060 (target_continue): New function.
1061
3aa5cfa0
AT
10622016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1063
1064 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1065
754653a7
AZ
10662016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1067
1068 PR server/20491
1069 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1070 ps_prochandle.
1071 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1072 * linux-arm-low.c (ps_get_thread_area): Likewise.
1073 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1074 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1075 * linux-mips-low.c (ps_get_thread_area): Likewise.
1076 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1077 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1078 * linux-x86-low.c (ps_get_thread_area): Likewise.
1079 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1080
ed036b40
PA
10812016-08-19 Pedro Alves <palves@redhat.com>
1082
1083 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1084
c8ef42ee
PA
10852016-08-19 Pedro Alves <palves@redhat.com>
1086
1087 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1088 comment. Use memcpy instead of casting through unsigned long.
1089
9c235a72
PA
10902016-08-19 Pedro Alves <palves@redhat.com>
1091
1092 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1093 allocating around 0x80000000.
1094
201506da
PA
10952016-08-19 Pedro Alves <palves@redhat.com>
1096
1097 PR gdb/20415
1098 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1099 (x32-avx512-linux-ipa.o): New rules.
1100 * configure.ac (x86_64-*-linux*): New x32 check.
1101 * configure.srv (ipa_x32_linux_regobj): New.
1102 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1103 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1104 descriptions.
1105 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1106 descriptions.
1107 * configure: Regenerate.
1108
f348d89a
PA
11092016-08-09 Pedro Alves <palves@redhat.com>
1110
1111 PR gdb/18653
1112 * Makefile.in (OBS): Add signals-state-save-restore.o.
1113 (signals-state-save-restore.o): New rule.
1114 * config.in: Regenerate.
1115 * configure: Regenerate.
1116 * linux-low.c: Include "signals-state-save-restore.h".
1117 (linux_create_inferior): Call
1118 restore_original_signals_state.
1119 * server.c: Include "dispositions-save-restore.h".
1120 (captured_main): Call save_original_signals_state.
1121
1baf5149
PA
11222016-08-05 Pedro Alves <palves@redhat.com>
1123
1124 * configure: Regenerate.
1125
fcd4a73d
YQ
11262016-08-04 Yao Qi <yao.qi@linaro.org>
1127
1128 * linux-low.c (regsets_fetch_inferior_registers): Check
1129 errno is ESRCH or not.
1130
979659d0
YQ
11312016-08-02 Yao Qi <yao.qi@linaro.org>
1132
1133 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1134 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1135 (thread_db_load_search): Update.
1136 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1137 td_ta_set_event and td_ta_event_getmsg.
1138
6598661d
PA
11392016-07-26 Pedro Alves <palves@redhat.com>
1140
1141 PR server/20414
1142 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1143 of unsigned long for 64-bit registers and use uint32_t instead of
1144 unsigned int for 32-bit registers.
1145
9cf12d57
PA
11462016-07-26 Pedro Alves <palves@redhat.com>
1147
1148 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1149 to 'ptrace'.
1150
305450ed
TT
11512016-07-21 Tom Tromey <tom@tromey.com>
1152
1153 * configure: Rebuild.
1154
2583da7c
YQ
11552016-07-21 Yao Qi <yao.qi@linaro.org>
1156
1157 * mem-break.c (find_gdb_breakpoint): Cast bp to
1158 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1159
21536b36
YQ
11602016-07-21 Yao Qi <yao.qi@linaro.org>
1161
1162 * server.c (handle_v_requests): Support s and S actions
1163 if target_supports_software_single_step return true.
1164
8901d193
YQ
11652016-07-21 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1168 is resume_step, call maybe_hw_step.
1169 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1170 and unstop them.
1171 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1172 breakpoints or not.
1173 (proceed_one_lwp): If resume request is resume_step, install
1174 reinsert breakpoints and call maybe_hw_step.
1175
0e9a339e
YQ
11762016-07-21 Yao Qi <yao.qi@linaro.org>
1177
1178 * linux-low.c (proceed_one_lwp): Declare.
1179 (linux_resume_one_thread): Remove local variable 'step'.
1180 Lift code enqueue signal. Call proceed_one_lwp instead of
1181 linux_resume_one_lwp.
1182
4281b351
YQ
11832016-07-21 Yao Qi <yao.qi@linaro.org>
1184
1185 * linux-low.c (linux_resume_one_thread): Call
1186 enqueue_pending_signal.
1187
984a2c04
YQ
11882016-07-21 Yao Qi <yao.qi@linaro.org>
1189
1190 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1191 * inferiors.c (do_restore_current_thread_cleanup): New function.
1192 (make_cleanup_restore_current_thread): Likewise.
1193 * linux-low.c (install_software_single_step_breakpoints): Call
1194 make_cleanup_restore_current_thread. Switch current_thread to
1195 thread.
1196
bec903c9
YQ
11972016-07-21 Yao Qi <yao.qi@linaro.org>
1198
1199 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1200 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1201 (clone_one_breakpoint): Likewise.
1202 (delete_reinsert_breakpoints): Change parameter to thread.
1203 Callers updated.
1204 (has_reinsert_breakpoints): Likewise.
1205 (uninsert_reinsert_breakpoints): Likewise.
1206 (reinsert_reinsert_breakpoints): Likewise.
1207 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1208 (delete_reinsert_breakpoints): Likewise.
1209 (reinsert_reinsert_breakpoints): Likewise.
1210 (uninsert_reinsert_breakpoints): Likewise.
1211 (has_reinsert_breakpoints): Likewise.
1212
63c40ec7
YQ
12132016-07-21 Yao Qi <yao.qi@linaro.org>
1214
1215 * inferiors.c (get_thread_process): Make parameter const.
1216 * inferiors.h (get_thread_process): Update declaration.
1217 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1218 Add new parameters child_thread and parent_thread. Callers
1219 updated.
1220 * mem-break.h (clone_all_breakpoints): Update declaration.
1221
9aa76cd0
YQ
12222016-07-21 Yao Qi <yao.qi@linaro.org>
1223
1224 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1225 <command_list, handler>: Remove.
1226 (struct gdb_breakpoint): New.
1227 (struct other_breakpoint): New.
1228 (struct reinsert_breakpoint): New.
1229 (is_gdb_breakpoint): New function.
1230 (any_persistent_commands): Update command_list if
1231 is_gdb_breakpoint returns true.
1232 (set_breakpoint): Create breakpoints according to their types.
1233 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1234 (set_gdb_breakpoint_1): Likewise.
1235 (set_gdb_breakpoint): Likewise.
1236 (clear_breakpoint_conditions): Change parameter type to
1237 'struct gdb_breakpoint *'.
1238 (clear_breakpoint_commands): Likewise.
1239 (clear_breakpoint_conditions_and_commands): Likewise.
1240 (add_condition_to_breakpoint): Likewise.
1241 (add_breakpoint_condition): Likewise.
1242 (add_commands_to_breakpoint): Likewise.
1243 (check_breakpoints): Check other_breakpoint.
1244 (clone_one_breakpoint): Clone breakpopint according to its type.
1245 * mem-break.h (struct gdb_breakpoint): Declare.
1246 (set_gdb_breakpoint): Update declaration.
1247 (clear_breakpoint_conditions_and_commands): Likewise.
1248 (add_breakpoint_condition): Likewise.
1249 (add_breakpoint_commands): Likewise.
1250 * server.c (process_point_options): Change parameter type to
1251 'struct gdb_breakpoint *'.
1252
811f8301
YQ
12532016-07-21 Yao Qi <yao.qi@linaro.org>
1254
1255 * mem-break.c (set_breakpoint_at): Rename it to ...
1256 (set_breakpoint_type_at): ... it.
1257 (set_breakpoint_at): Call set_breakpoint_type_at.
1258 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1259 * mem-break.h (set_breakpoint_at): Update comments.
1260
b1c51e36
CLT
12612016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1262
1263 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1264 to buf parameter.
1265 (nios2_store_gregset): Likewise.
1266
ced2dffb
PA
12672016-07-01 Pedro Alves <palves@redhat.com>
1268 Antoine Tremblay <antoine.tremblay@ericsson.com>
1269
1270 * linux-low.c: Change interface to take the target lwp_info
1271 pointer directly and return void. Handle detaching from a zombie
1272 thread.
1273 (linux_detach_lwp_callback): New function.
1274 (linux_detach): Detach from the leader thread after detaching from
1275 the clone threads.
1276
2ac09a5b
YQ
12772016-06-28 Yao Qi <yao.qi@linaro.org>
1278
1279 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1280 for variable new_offset.
1281 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1282 (aarch64_ftrace_insn_reloc_cb): Likewise.
1283 (aarch64_ftrace_insn_reloc_tb): Likewise.
1284 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1285 PRIx64 instead of PRIx32.
1286
79e7fd4f
YQ
12872016-06-28 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1290 (the_low_target): Install arm_get_syscall_trapinfo.
1291
061fc021
YQ
12922016-06-28 Yao Qi <yao.qi@linaro.org>
1293
1294 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1295 function.
1296 (the_low_target): Install aarch64_get_syscall_trapinfo.
1297
4cc32bec
YQ
12982016-06-28 Yao Qi <yao.qi@linaro.org>
1299
1300 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1301 Callers updated.
1302 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1303 Remove parameter sysno.
1304 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1305 sysret.
1306
782c1122
AA
13072016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1308
1309 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1310 (s390_emit_ne_goto): Likewise.
1311 (s390_emit_lt_goto): Likewise.
1312 (s390_emit_le_goto): Likewise.
1313 (s390_emit_gt_goto): Likewise.
1314 (s390_emit_ge_goto): Likewise.
1315 (s390x_emit_eq_goto): Likewise.
1316 (s390x_emit_ne_goto): Likewise.
1317 (s390x_emit_lt_goto): Likewise.
1318 (s390x_emit_le_goto): Likewise.
1319 (s390x_emit_gt_goto): Likewise.
1320 (s390x_emit_ge_goto): Likewise.
1321 (s390_emit_ops_impl): Mark variable static.
1322 (s390x_emit_ops): Likewise.
1323
2e7b624b
YQ
13242016-06-17 Yao Qi <yao.qi@linaro.org>
1325
1326 * linux-low.c (handle_extended_wait): Call
1327 uninsert_reinsert_breakpoints for the parent process. Remove
1328 reinsert breakpoints from the child process. Reinsert them to
1329 the parent process when vfork is done.
1330 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1331 (reinsert_reinsert_breakpoints): New function.
1332 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1333 (reinsert_reinsert_breakpoints): Declare.
1334
8a81c5d7
YQ
13352016-06-17 Yao Qi <yao.qi@linaro.org>
1336
1337 * linux-low.c (handle_extended_wait): If the parent is doing
1338 step-over, remove the reinsert breakpoints from the forked child.
1339
f50bf8e5
YQ
13402016-06-17 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-low.c (unsuspend_all_lwps): Declare.
1343 (linux_low_filter_event): If thread exited, call finish_step_over.
1344 If step-over is finished, unsuspend other threads.
1345
8376a3cb
YQ
13462016-06-17 Yao Qi <yao.qi@linaro.org>
1347
1348 * linux-low.c (linux_resume_one_lwp_throw): Assert
1349 has_reinsert_breakpoints returns false.
1350 * mem-break.c (delete_disabled_breakpoints): Assert
1351 bp type isn't reinsert_breakpoint.
1352
f79b145d
YQ
13532016-06-17 Yao Qi <yao.qi@linaro.org>
1354
1355 * linux-low.c (maybe_hw_step): New function.
1356 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1357 (finish_step_over): Switch current_thread to lwp temporarily,
1358 and assert has_reinsert_breakpoints returns true.
1359 (proceed_one_lwp): Call maybe_hw_step.
1360 * mem-break.c (has_reinsert_breakpoints): New function.
1361 * mem-break.h (has_reinsert_breakpoints): Declare.
1362
0ae534d2
JT
13632016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1364
1365 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1366
fcdad592
YQ
13672016-05-17 Yao Qi <yao.qi@linaro.org>
1368
1369 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1370 instead of find_inferior.
1371
9e784964
YQ
13722016-05-05 Yao Qi <yao.qi@linaro.org>
1373
1374 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1375 Initialize res to zero.
1376
cf2ebb6e
YQ
13772016-05-05 Yao Qi <yao.qi@linaro.org>
1378
1379 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1380 to uint32_t.
1381
c1aebf87
UW
13822016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1383
1384 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1385 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1386 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1387
35fd2deb 13882016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1389 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1390
1391 * tracepoint.c (write_inferior_int8): New function.
1392 (cmd_qtenable_disable): Write enable flag using
1393 write_inferior_int8.
1394
484b3c32
YQ
13952016-04-25 Yao Qi <yao.qi@linaro.org>
1396
1397 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1398 (need_step_over_p): Return zero if the LWP has pending signals
1399 can be delivered on software single step target.
1400
85ba7d86
YQ
14012016-04-25 Yao Qi <yao.qi@linaro.org>
1402
1403 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1404 return instead of error.
1405
3539aa13
YQ
14062016-04-22 Yao Qi <yao.qi@linaro.org>
1407
1408 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1409 to 23.
1410
5b061e98
YQ
14112016-04-22 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1414 signal when stepping over breakpoint with software single
1415 step.
1416
3451269c
PA
14172016-04-21 Pedro Alves <palves@redhat.com>
1418
1419 * linux-s390-low.c (s390_collect_ptrace_register)
1420 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1421 add casts.
1422 (s390_check_regset): Use void * instead of gdb_byte *.
1423
a2358508
PA
14242016-04-20 Pedro Alves <palves@redhat.com>
1425
1426 * configure: Renegerate.
1427
6885166d
YQ
14282016-04-20 Yao Qi <yao.qi@linaro.org>
1429
1430 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1431 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1432 number 16.
1433 (arm_store_gregset): Likewise.
1434
2b863f51
WT
14352016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1436
1437 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1438 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1439 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1440 (amd64-avx-mpx-linux.c): New rules.
1441 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1442 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1443 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1444 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1445 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1446 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1447 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1448 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1449 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1450 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1451 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1452 * linux-x86-low.c (x86_linux_read_description): Add case for
1453 X86_XSTATE_AVX_MPX_MASK.
1454 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1455 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1456 init_registers_i386_avx_mpx_linux.
1457 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1458 (initialize_low_tracepoint): Call
1459 init_registers_i386_avx_mpx_linux.
1460 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1461 (initialize_low_tracepoint): Call
1462 init_registers_amd64_avx_mpx_linux.
1463 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1464 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1465 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1466 declarations.
1467
9b30624b
PA
14682016-04-18 Pedro Alves <palves@redhat.com>
1469
1470 * configure: Regenerate.
1471
45e3745e
AT
14722016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1473
1474 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1475 (aarch64_emit_sub): Likewise.
1476
2afc13ff
PA
14772016-04-12 Pedro Alves <palves@redhat.com>
1478
1479 * utils.c (prepare_to_throw_exception): Delete.
1480
6e774b13
SM
14812016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1484
4dca19f8
MK
14852016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1486
1487 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1488
d0a9981f
MK
14892016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1490
1491 * linux-aarch64-ipa.c: Add <elf.h> include.
1492 * linux-ppc-ipa.c: Add <elf.h> include.
1493 * linux-s390-ipa.c: Add <elf.h> include.
1494
252db07e
MK
14952016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1496
1497 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1498 (get_raw_reg_ptr): Likewise.
1499 (get_trace_state_variable_value_ptr): Likewise.
1500 (set_trace_state_variable_value_ptr): Likewise.
1501 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1502 char *.
1503
14e2b6d9
MK
15042016-03-31 Wei-cheng Wang <cole945@gmail.com>
1505 Marcin Kościelnicki <koriakin@0x04.net>
1506
1507 PR/17221
1508 * linux-ppc-low.c (emit_insns): New function.
1509 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1510 (ppc_emit_prologue): New function.
1511 (ppc_emit_epilogue): New function.
1512 (ppc_emit_add): New function.
1513 (ppc_emit_sub): New function.
1514 (ppc_emit_mul): New function.
1515 (ppc_emit_lsh): New function.
1516 (ppc_emit_rsh_signed): New function.
1517 (ppc_emit_rsh_unsigned): New function.
1518 (ppc_emit_ext): New function.
1519 (ppc_emit_zero_ext): New function.
1520 (ppc_emit_log_not): New function.
1521 (ppc_emit_bit_and): New function.
1522 (ppc_emit_bit_or): New function.
1523 (ppc_emit_bit_xor): New function.
1524 (ppc_emit_bit_not): New function.
1525 (ppc_emit_equal): New function.
1526 (ppc_emit_less_signed): New function.
1527 (ppc_emit_less_unsigned): New function.
1528 (ppc_emit_ref): New function.
1529 (ppc_emit_const): New function.
1530 (ppc_emit_reg): New function.
1531 (ppc_emit_pop): New function.
1532 (ppc_emit_stack_flush): New function.
1533 (ppc_emit_swap): New function.
1534 (ppc_emit_stack_adjust): New function.
1535 (ppc_emit_call): New function.
1536 (ppc_emit_int_call_1): New function.
1537 (ppc_emit_void_call_2): New function.
1538 (ppc_emit_if_goto): New function.
1539 (ppc_emit_goto): New function.
1540 (ppc_emit_eq_goto): New function.
1541 (ppc_emit_ne_goto): New function.
1542 (ppc_emit_lt_goto): New function.
1543 (ppc_emit_le_goto): New function.
1544 (ppc_emit_gt_goto): New function.
1545 (ppc_emit_ge_goto): New function.
1546 (ppc_write_goto_address): New function.
1547 (ppc_emit_ops_impl): New static variable.
1548 (ppc64v1_emit_prologue): New function.
1549 (ppc64v2_emit_prologue): New function.
1550 (ppc64_emit_epilogue): New function.
1551 (ppc64_emit_add): New function.
1552 (ppc64_emit_sub): New function.
1553 (ppc64_emit_mul): New function.
1554 (ppc64_emit_lsh): New function.
1555 (ppc64_emit_rsh_signed): New function.
1556 (ppc64_emit_rsh_unsigned): New function.
1557 (ppc64_emit_ext): New function.
1558 (ppc64_emit_zero_ext): New function.
1559 (ppc64_emit_log_not): New function.
1560 (ppc64_emit_bit_and): New function.
1561 (ppc64_emit_bit_or): New function.
1562 (ppc64_emit_bit_xor): New function.
1563 (ppc64_emit_bit_not): New function.
1564 (ppc64_emit_equal): New function.
1565 (ppc64_emit_less_signed): New function.
1566 (ppc64_emit_less_unsigned): New function.
1567 (ppc64_emit_ref): New function.
1568 (ppc64_emit_const): New function.
1569 (ppc64v1_emit_reg): New function.
1570 (ppc64v2_emit_reg): New function.
1571 (ppc64_emit_pop): New function.
1572 (ppc64_emit_stack_flush): New function.
1573 (ppc64_emit_swap): New function.
1574 (ppc64v1_emit_call): New function.
1575 (ppc64v2_emit_call): New function.
1576 (ppc64v1_emit_int_call_1): New function.
1577 (ppc64v2_emit_int_call_1): New function.
1578 (ppc64v1_emit_void_call_2): New function.
1579 (ppc64v2_emit_void_call_2): New function.
1580 (ppc64_emit_if_goto): New function.
1581 (ppc64_emit_eq_goto): New function.
1582 (ppc64_emit_ne_goto): New function.
1583 (ppc64_emit_lt_goto): New function.
1584 (ppc64_emit_le_goto): New function.
1585 (ppc64_emit_gt_goto): New function.
1586 (ppc64_emit_ge_goto): New function.
1587 (ppc64v1_emit_ops_impl): New static variable.
1588 (ppc64v2_emit_ops_impl): New static variable.
1589 (ppc_emit_ops): New function.
1590 (linux_low_target): Wire in ppc_emit_ops.
1591
a2174ba4
MK
15922016-03-31 Wei-cheng Wang <cole945@gmail.com>
1593 Marcin Kościelnicki <koriakin@0x04.net>
1594
1595 PR/17221
1596 * Makefile.in: Add powerpc-*-ipa.o
1597 * configure.srv: Add ipa_obj for powerpc*-linux.
1598 * linux-ppc-ipa.c: New file.
1599 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1600 includes.
1601 (PPC_FIELD): New macro.
1602 (PPC_SEXT): New macro.
1603 (PPC_OP6): New macro.
1604 (PPC_BO): New macro.
1605 (PPC_LI): New macro.
1606 (PPC_BD): New macro.
1607 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1608 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1609 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1610 (ppc_get_thread_area): New function.
1611 (is_elfv2_inferior): New function.
1612 (gen_ds_form): New function.
1613 (GEN_STD): New macro.
1614 (GEN_STDU): New macro.
1615 (GEN_LD): New macro.
1616 (GEN_LDU): New macro.
1617 (gen_d_form): New function.
1618 (GEN_ADDI): New macro.
1619 (GEN_ADDIS): New macro.
1620 (GEN_LI): New macro.
1621 (GEN_LIS): New macro.
1622 (GEN_ORI): New macro.
1623 (GEN_ORIS): New macro.
1624 (GEN_LWZ): New macro.
1625 (GEN_STW): New macro.
1626 (GEN_STWU): New macro.
1627 (gen_xfx_form): New function.
1628 (GEN_MFSPR): New macro.
1629 (GEN_MTSPR): New macro.
1630 (GEN_MFCR): New macro.
1631 (GEN_MTCR): New macro.
1632 (GEN_SYNC): New macro.
1633 (GEN_LWSYNC): New macro.
1634 (gen_x_form): New function.
1635 (GEN_OR): New macro.
1636 (GEN_MR): New macro.
1637 (GEN_LWARX): New macro.
1638 (GEN_STWCX): New macro.
1639 (GEN_CMPW): New macro.
1640 (gen_md_form): New function.
1641 (GEN_RLDICL): New macro.
1642 (GEN_RLDICR): New macro.
1643 (gen_i_form): New function.
1644 (GEN_B): New macro.
1645 (GEN_BL): New macro.
1646 (gen_b_form): New function.
1647 (GEN_BNE): New macro.
1648 (GEN_LOAD): New macro.
1649 (GEN_STORE): New macro.
1650 (gen_limm): New function.
1651 (gen_atomic_xchg): New function.
1652 (gen_call): New function.
1653 (ppc_relocate_instruction): New function.
1654 (ppc_install_fast_tracepoint_jump_pad): New function.
1655 (ppc_get_min_fast_tracepoint_insn_len): New function.
1656 (ppc_get_ipa_tdesc_idx): New function.
1657 (the_low_target): Wire in the new functions.
1658 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1659 tdescs.
1660 * linux-ppc-tdesc.h: New file.
1661
a13c4696
MK
16622016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1663
1664 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1665 (alloc_jump_pad_buffer): New function.
1666 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1667 (alloc_jump_pad_buffer): New function.
1668 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1669 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1670 (alloc_jump_pad_buffer): New function.
1671 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1672 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1673 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1674 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1675
1cda1512
MK
16762016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1677
1678 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1679 * linux-amd64-ipa.c: Likewise.
1680 * linux-i386-ipa.c: Likewise.
1681 * linux-s390-ipa.c: Likewise.
1682 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1683 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1684 set_trace_state_variable_value_ptr.
1685 (struct ipa_sym_addresses): Likewise.
1686 (symbol_list): Likewise.
1687 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1688 accessing gdb_collect directly.
1689 (gdb_collect_ptr_type): New typedef.
1690 (get_raw_reg_ptr_type): New typedef.
1691 (get_trace_state_variable_value_ptr_type): New typedef.
1692 (set_trace_state_variable_value_ptr_type): New typedef.
1693 (gdb_collect_ptr): New global.
1694 (get_raw_reg_ptr): New global.
1695 (get_trace_state_variable_value_ptr): New global.
1696 (set_trace_state_variable_value_ptr): New global.
1697 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1698 accessing get_raw_reg directly.
1699 (get_get_tsv_func_addr): Likewise for
1700 get_trace_state_variable_value_ptr.
1701 (get_set_tsv_func_addr): Likewise for
1702 set_trace_state_variable_value_ptr.
1703 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1704
72fb5488
SM
17052016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1706
1707 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1708
28170b88
MK
17092016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1710
1711 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1712 packets.
1713 (relocate_instruction): Remove own_buf.
1714 * server.c (own_buf): Make global.
1715 (handle_v_requests): Make global.
1716 * server.h (own_buf): New declaration.
1717 (handle_v_requests): New prototype.
1718
f39e8743
MK
17192016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1720
1721 PR 18377
1722 * linux-s390-low.c (add_insns): New function.
1723 (s390_emit_prologue): New function.
1724 (s390_emit_epilogue): New function.
1725 (s390_emit_add): New function.
1726 (s390_emit_sub): New function.
1727 (s390_emit_mul): New function.
1728 (s390_emit_lsh): New function.
1729 (s390_emit_rsh_signed): New function.
1730 (s390_emit_rsh_unsigned): New function.
1731 (s390_emit_ext): New function.
1732 (s390_emit_log_not): New function.
1733 (s390_emit_bit_and): New function.
1734 (s390_emit_bit_or): New function.
1735 (s390_emit_bit_xor): New function.
1736 (s390_emit_bit_not): New function.
1737 (s390_emit_equal): New function.
1738 (s390_emit_less_signed): New function.
1739 (s390_emit_less_unsigned): New function.
1740 (s390_emit_ref): New function.
1741 (s390_emit_if_goto): New function.
1742 (s390_emit_goto): New function.
1743 (s390_write_goto_address): New function.
1744 (s390_emit_litpool): New function.
1745 (s390_emit_const): New function.
1746 (s390_emit_call): New function.
1747 (s390_emit_reg): New function.
1748 (s390_emit_pop): New function.
1749 (s390_emit_stack_flush): New function.
1750 (s390_emit_zero_ext): New function.
1751 (s390_emit_swap): New function.
1752 (s390_emit_stack_adjust): New function.
1753 (s390_emit_set_r2): New function.
1754 (s390_emit_int_call_1): New function.
1755 (s390_emit_void_call_2): New function.
1756 (s390_emit_eq_goto): New function.
1757 (s390_emit_ne_goto): New function.
1758 (s390_emit_lt_goto): New function.
1759 (s390_emit_le_goto): New function.
1760 (s390_emit_gt_goto): New function.
1761 (s390_emit_ge_goto): New function.
1762 (s390x_emit_prologue): New function.
1763 (s390x_emit_epilogue): New function.
1764 (s390x_emit_add): New function.
1765 (s390x_emit_sub): New function.
1766 (s390x_emit_mul): New function.
1767 (s390x_emit_lsh): New function.
1768 (s390x_emit_rsh_signed): New function.
1769 (s390x_emit_rsh_unsigned): New function.
1770 (s390x_emit_ext): New function.
1771 (s390x_emit_log_not): New function.
1772 (s390x_emit_bit_and): New function.
1773 (s390x_emit_bit_or): New function.
1774 (s390x_emit_bit_xor): New function.
1775 (s390x_emit_bit_not): New function.
1776 (s390x_emit_equal): New function.
1777 (s390x_emit_less_signed): New function.
1778 (s390x_emit_less_unsigned): New function.
1779 (s390x_emit_ref): New function.
1780 (s390x_emit_if_goto): New function.
1781 (s390x_emit_const): New function.
1782 (s390x_emit_call): New function.
1783 (s390x_emit_reg): New function.
1784 (s390x_emit_pop): New function.
1785 (s390x_emit_stack_flush): New function.
1786 (s390x_emit_zero_ext): New function.
1787 (s390x_emit_swap): New function.
1788 (s390x_emit_stack_adjust): New function.
1789 (s390x_emit_int_call_1): New function.
1790 (s390x_emit_void_call_2): New function.
1791 (s390x_emit_eq_goto): New function.
1792 (s390x_emit_ne_goto): New function.
1793 (s390x_emit_lt_goto): New function.
1794 (s390x_emit_le_goto): New function.
1795 (s390x_emit_gt_goto): New function.
1796 (s390x_emit_ge_goto): New function.
1797 (s390_emit_ops): New function.
1798 (struct linux_target_ops): Fill in emit_ops hook.
1799
abd9baf9
MK
18002016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1801
1802 PR 18377
1803 * Makefile.in: Add s390 IPA files.
1804 * configure.srv: Build IPA for s390.
1805 * linux-s390-ipa.c: New file.
1806 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1807 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1808 (tdesc_s390_linux32): Likewise.
1809 (init_registers_s390_linux32v1): Likewise.
1810 (tdesc_s390_linux32v1): Likewise.
1811 (init_registers_s390_linux32v2): Likewise.
1812 (tdesc_s390_linux32v2): Likewise.
1813 (init_registers_s390_linux64): Likewise.
1814 (tdesc_s390_linux64): Likewise.
1815 (init_registers_s390_linux64v1): Likewise.
1816 (tdesc_s390_linux64v1): Likewise.
1817 (init_registers_s390_linux64v2): Likewise.
1818 (tdesc_s390_linux64v2): Likewise.
1819 (init_registers_s390_te_linux64): Likewise.
1820 (tdesc_s390_te_linux64): Likewise.
1821 (init_registers_s390_vx_linux64): Likewise.
1822 (tdesc_s390_vx_linux64): Likewise.
1823 (init_registers_s390_tevx_linux64): Likewise.
1824 (tdesc_s390_tevx_linux64): Likewise.
1825 (init_registers_s390x_linux64): Likewise.
1826 (tdesc_s390x_linux64): Likewise.
1827 (init_registers_s390x_linux64v1): Likewise.
1828 (tdesc_s390x_linux64v1): Likewise.
1829 (init_registers_s390x_linux64v2): Likewise.
1830 (tdesc_s390x_linux64v2): Likewise.
1831 (init_registers_s390x_te_linux64): Likewise.
1832 (tdesc_s390x_te_linux64): Likewise.
1833 (init_registers_s390x_vx_linux64): Likewise.
1834 (tdesc_s390x_vx_linux64): Likewise.
1835 (init_registers_s390x_tevx_linux64): Likewise.
1836 (tdesc_s390x_tevx_linux64): Likewise.
1837 (have_hwcap_s390_vx): New static variable.
1838 (s390_arch_setup): Fill have_hwcap_s390_vx.
1839 (s390_get_thread_area): New function.
1840 (s390_ft_entry_gpr_esa): New const.
1841 (s390_ft_entry_gpr_zarch): New const.
1842 (s390_ft_entry_misc): New const.
1843 (s390_ft_entry_fr): New const.
1844 (s390_ft_entry_vr): New const.
1845 (s390_ft_main_31): New const.
1846 (s390_ft_main_64): New const.
1847 (s390_ft_exit_fr): New const.
1848 (s390_ft_exit_vr): New const.
1849 (s390_ft_exit_misc): New const.
1850 (s390_ft_exit_gpr_esa): New const.
1851 (s390_ft_exit_gpr_zarch): New const.
1852 (append_insns): New function.
1853 (s390_relocate_instruction): New function.
1854 (s390_install_fast_tracepoint_jump_pad): New function.
1855 (s390_get_min_fast_tracepoint_insn_len): New function.
1856 (s390_get_ipa_tdesc_idx): New function.
1857 (struct linux_target_ops): Wire in the above functions.
1858 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1859 * linux-s390-tdesc.h: New file.
1860
a4105d04
MK
18612016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1862
1863 * linux-s390-low.c (s390_supports_tracepoints): New function.
1864 (struct linux_target_ops): Fill supports_tracepoints hook.
1865
35ac8b3e
YQ
18662016-03-18 Yao Qi <yao.qi@linaro.org>
1867
1868 * linux-low.c (lwp_signal_can_be_delivered): New function.
1869 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1870
94610ec4
YQ
18712016-03-18 Yao Qi <yao.qi@linaro.org>
1872
1873 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1874 0 if signal is enqueued. Remove 'signal' from one debugging
1875 message. Move one debugging message to some lines below.
1876 Remove code setting 'signal' to 0.
1877
80aea927
YQ
18782016-03-18 Yao Qi <yao.qi@linaro.org>
1879
1880 * linux-low.c (linux_low_filter_event): Remove redundant
1881 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1882
b04fd3be
MK
18832016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1884
1885 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1886 (struct linux_target_ops): Wire in the above.
1887
c40c8d4b
YQ
18882016-03-03 Yao Qi <yao.qi@linaro.org>
1889
1890 * linux-low.c: Update comments to start_step_over.
1891
0f8288ae
YQ
18922016-03-03 Yao Qi <yao.qi@linaro.org>
1893
1894 PR server/19736
1895 * linux-low.c (handle_extended_wait): Set child suspended
1896 if event_lwp->bp_reinsert isn't zero.
1897
fdbd04a8
YQ
18982016-03-02 Yao Qi <yao.qi@linaro.org>
1899
1900 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1901 enqueue_pending_signal.
1902
6896a8fa
MK
19032016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1904
1905 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1906 is actually loaded.
1907
ab503087
MK
19082016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1909
1910 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1911 (s390_regmap_3264) [!__s390x__]: New global.
1912 (s390_collect_ptrace_register): Skip map entries containing -1.
1913 (s390_supply_ptrace_register): Ditto.
1914 (s390_fill_gprs_high): New function.
1915 (s390_store_gprs_high): New function.
1916 (s390_regsets): Add NT_S390_HIGH_GPRS.
1917 (s390_get_hwcap): Enable on 31-bit.
1918 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1919 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1920 Detect NT_S390_HIGH_GPRS.
1921 (s390_usrregs_info_3264): Enable on 31-bit.
1922 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1923 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1924
ae91f625
MK
19252016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1926
1927 PR gdb/13808
1928 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1929 * configure.srv: Ditto.
1930 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1931 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1932 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1933 (init_registers_amd64_linux): Remove prototype.
1934 (tdesc_amd64_linux): Remove declaration.
1935 (get_ipa_tdesc): New function.
1936 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1937 initialize remaining tdescs.
1938 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1939 (init_registers_i386_linux): Remove prototype.
1940 (tdesc_i386_linux): Remove declaration.
1941 (get_ipa_tdesc): New function.
1942 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1943 initialize remaining tdescs.
1944 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1945 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1946 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1947 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1948 (x86_get_ipa_tdesc_idx): New function.
1949 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1950 * linux-x86-tdesc.h: New file.
1951 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1952 (target_get_ipa_tdesc_idx): New macro.
1953 * tracepoint.c (ipa_tdesc_idx): New macro.
1954 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1955 (symbol_list): Add ipa_tdesc_idx.
1956 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1957 (ipa_tdesc): Remove.
1958 (ipa_tdesc_idx): New variable.
1959 (get_context_regcache): Use get_ipa_tdesc.
1960 (gdb_collect): Ditto.
1961 (gdb_probe): Ditto.
1962 * tracepoint.h (get_ipa_tdesc): New prototype.
1963 (ipa_tdesc): Remove.
1964
e7ad2f14
PA
19652016-02-24 Pedro Alves <palves@redhat.com>
1966
1967 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1968 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1969 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1970 Factor out common code between the USE_SIGTRAP_SIGINFO and
1971 !USE_SIGTRAP_SIGINFO blocks.
1972 (linux_low_filter_event): Call save_stop_reason instead of
1973 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1974 Update comments.
1975 (linux_wait_1): Update comments.
1976
657f9cde
WW
19772016-02-24 Wei-cheng Wang <cole945@gmail.com>
1978
1979 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1980 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1981 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1982 ppc_insert_point, ppc_remove_point.
1983
b00b61e1
MK
19842016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1985
1986 * linux-s390-low.c (s390_supports_z_point_type): New function.
1987 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1988
553cb527
YQ
19892016-02-16 Yao Qi <yao.qi@linaro.org>
1990
1991 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1992 PC. Get pc from regcache_read_pc.
1993
a5652c21
YQ
19942016-02-12 Yao Qi <yao.qi@linaro.org>
1995
1996 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1997 or linux_get_pc_32bit.
1998 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1999
ed443b61
YQ
20002016-02-12 Yao Qi <yao.qi@linaro.org>
2001
2002 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2003 arm_linux_get_next_pcs_fixup.
2004
020ecd38
MK
20052016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2006
2007 * tracepoint.c (x_tracepoint_action_download): Change
2008 write_inferior_data_ptr to write_inferior_data_pointer.
2009 (cmd_qtstart): Likewise.
2010 (write_inferior_data_ptr): Remove.
2011 (download_agent_expr): Change write_inferior_data_ptr to
2012 write_inferior_data_pointer.
2013 (download_tracepoint_1): Likewise.
2014 (download_tracepoint): Likewise.
2015 (download_trace_state_variables): Likewise.
2016
7cae9051
WW
20172016-02-11 Wei-cheng Wang <cole945@gmail.com>
2018 Marcin Kościelnicki <koriakin@0x04.net>
2019
2020 * tracepoint.c (struct tracepoint_action_ops): Remove.
2021 (struct tracepoint_action): Remove ops.
2022 (m_tracepoint_action_download, r_tracepoint_action_download)
2023 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2024 size and offset accordingly.
2025 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2026 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2027 (tracepoint_action_send, tracepoint_action_download): New functions.
2028 Helpers for trace action handlers.
2029 (add_tracepoint_action): Remove setup actions ops.
2030 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2031
9f6a71b4
YQ
20322016-02-10 Yao Qi <yao.qi@linaro.org>
2033
2034 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2035
1e94266c
SM
20362016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2039 to AC_OUTPUT.
2040 * configure: Regenerate.
2041
8adce034
SM
20422016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2043
2044 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2045 void * to gdb_byte *.
2046 * linux-low.c (siginfo_fixup): Likewise.
2047 (linux_xfer_siginfo): Likewise.
2048 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2049 Likewise.
2050 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2051
93813b37
WT
20522016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2053
2054 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2055 to srv_tgtobj.
2056 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2057 to srv_tgtobj.
2058 * linux-x86-low.c [__x86_64__]: Include
2059 "nat/amd64-linux-siginfo.h".
2060 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2061 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2062 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2063 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2064 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2065 (cpt_si_fd, si_timerid, si_overrun): Move from
2066 nat/amd64-linux-siginfo.c.
2067 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2068
8424cc97
SM
20692016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2070
2071 * server.c (skip_to_semicolon): Remove.
2072 (process_point_options): Use strchrnul instead of
2073 skip_to_semicolon.
2074
4d18591b
YQ
20752016-01-26 Yao Qi <yao.qi@linaro.org>
2076
2077 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2078 * linux-low.c (install_software_single_step_breakpoints): Don't
2079 call regcache_read_pc.
2080 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2081 argument pc.
2082
d8020970
YQ
20832016-01-26 Yao Qi <yao.qi@linaro.org>
2084
2085 * linux-low.c (install_software_single_step_breakpoints): Call
2086 regcache_read_pc instead of get_pc.
2087
8b207339
YQ
20882016-01-26 Yao Qi <yao.qi@linaro.org>
2089
2090 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2091 (unblock_async_io): Rename to ...
2092 (block_unblock_async_io): ... it. New function.
2093 (enable_async_io): Don't install SIGIO handler. Unblock it
2094 instead.
2095 (disable_async_io): Don't ignore SIGIO. Block it instead.
2096 (initialize_async_io): Install SIGIO handler. Don't call
2097 unblock_async_io.
2098
18879fef
YQ
20992016-01-26 Yao Qi <yao.qi@linaro.org>
2100
2101 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2102 first character is '\003', call *the_target->request_interrupt.
2103
a0f8e08a
YQ
21042016-01-25 Yao Qi <yao.qi@linaro.org>
2105
2106 * remote-utils.c (new_thread_notify): Remove.
2107 (dead_thread_notify): Likewise.
2108 * remote-utils.h (new_thread_notify): Remove declaration.
2109 (dead_thread_notify): Likewise.
2110
cc5fd9ab
MK
21112016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2112
2113 * gdb.trace/pending.exp: Fix expected message on continue.
2114
99e8eb11
MK
21152016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2116
2117 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2118 it works properly on big-endian machines where sizeof (CORE_ADDR)
2119 != sizeof (void *).
2120
a994041d
PA
21212016-01-21 Pedro Alves <palves@redhat.com>
2122
2123 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2124 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2125 * configure: Regenerate.
2126
f7a6a40d
YQ
21272016-01-21 Yao Qi <yao.qi@linaro.org>
2128
2129 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2130 is_thumb and set it according to CPSR saved on the stack.
2131 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2132 arm_sigreturn_next_pc.
2133
6f69e520
YQ
21342016-01-18 Yao Qi <yao.qi@linaro.org>
2135
2136 * linux-low.c (linux_set_pc_64bit): New function.
2137 (linux_get_pc_64bit): New function.
2138 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2139 Declare.
2140 * linux-sparc-low.c (debug_threads): Remove declaration.
2141 (sparc_get_pc): Remove.
2142 (the_low_target): Use linux_get_pc_64bit instead of
2143 sparc_get_pc.
2144 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2145 (the_low_target): Use linux_get_pc_64bit and
2146 linux_set_pc_64bit.
2147
276d4552
YQ
21482016-01-18 Yao Qi <yao.qi@linaro.org>
2149
2150 * linux-arm-low.c (debug_threads): Remove declaration.
2151 (arm_get_pc, arm_set_pc): Remove.
2152 (the_low_target): Use linux_get_pc_32bit and
2153 linux_set_pc_32bit.
2154 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2155 (the_low_target): Use linux_get_pc_32bit and
2156 linux_set_pc_32bit.
2157 * linux-cris-low.c (debug_threads): Remove declaration.
2158 (cris_get_pc, cris_set_pc,): Remove.
2159 (the_low_target): Use linux_get_pc_32bit and
2160 linux_set_pc_32bit.
2161 * linux-crisv32-low.c (debug_threads): Remove declaration.
2162 (cris_get_pc, cris_set_pc): Remove.
2163 (the_low_target): Use linux_get_pc_32bit and
2164 linux_set_pc_32bit.
2165 * linux-low.c: Include inttypes.h.
2166 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2167 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2168 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2169 (the_low_target): Use linux_get_pc_32bit and
2170 linux_set_pc_32bit.
2171 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2172 (the_low_target): Use linux_get_pc_32bit and
2173 linux_set_pc_32bit.
2174 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2175 (the_low_target): Use linux_get_pc_32bit and
2176 linux_set_pc_32bit.
2177 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2178 (the_low_target): Use linux_get_pc_32bit and
2179 linux_set_pc_32bit.
2180 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2181 (the_low_target): Use linux_get_pc_32bit and
2182 linux_set_pc_32bit.
2183
eb0edac8
GB
21842016-01-18 Gary Benson <gbenson@redhat.com>
2185
2186 * configure.ac (AC_FUNC_FORK): New check.
2187 * config.in: Regenerate.
2188 * configure: Likewise.
2189
1b451dda
YQ
21902016-01-14 Yao Qi <yao.qi@linaro.org>
2191
2192 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2193 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2194 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2195 arm_get_next_pcs_ctor.
2196
82075af2
JS
21972016-01-12 Josh Stone <jistone@redhat.com>
2198 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2199
2200 * inferiors.h: Include "gdb_vecs.h".
2201 (struct process_info): Add syscalls_to_catch.
2202 * inferiors.c (remove_process): Free syscalls_to_catch.
2203 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2204 syscall_return stops.
2205 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2206 * server.c (handle_general_set): Handle QCatchSyscalls.
2207 (handle_query): Report support for QCatchSyscalls.
2208 * target.h (struct target_ops): Add supports_catch_syscall.
2209 (target_supports_catch_syscall): New macro.
2210 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2211 (struct lwp_info): Add syscall_state.
2212 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2213 Maintain syscall_state and syscalls_to_catch across exec.
2214 (get_syscall_trapinfo): New function, proxy to the_low_target.
2215 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2216 (linux_low_filter_event): Toggle syscall_state entry/return for
2217 syscall traps, and set it ignored for all others.
2218 (gdb_catching_syscalls_p): New function.
2219 (gdb_catch_this_syscall_p): New function.
2220 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2221 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2222 (linux_supports_catch_syscall): New function.
2223 (linux_target_ops): Install it.
2224 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2225 (the_low_target): Install it.
2226
8f13a3ce
MF
22272016-01-12 Mike Frysinger <vapier@gentoo.org>
2228
2229 * acinclude.m4: Include new ../warning.m4 file.
2230 * configure: Regenerated.
2231 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2232
5b3da067
MF
22332016-01-12 Mike Frysinger <vapier@gentoo.org>
2234
2235 * ax.c (is_goto_target): Mark static.
2236 * linux-low.c (register_addr): Likewise.
2237 (linux_fetch_registers, linux_store_registers): Likewise.
2238 * mem-break.c (any_persistent_commands): Fix old prototype.
2239 (add_commands_to_breakpoint): Mark static.
2240 * regcache.c (find_register_by_name): Delete unused func.
2241 * remote-utils.c (hex_or_minus_one): Mark static.
2242 * server.c (monitor_show_help): Mark static.
2243 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2244 handle_v_requests): Likewise.
2245
bc504a31
PA
22462016-01-12 Pedro Alves <palves@redhat.com>
2247
2248 Remove use of the registered trademark symbol throughout.
2249
5a0dd67a
YQ
22502016-01-08 Yao Qi <yao.qi@linaro.org>
2251
2252 * remote-utils.c (getpkt): If c is '\003', call target hook
2253 request_interrupt.
2254
b2ca446f
YQ
22552016-01-06 Yao Qi <yao.qi@linaro.org>
2256
2257 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2258 linux-aarch32-low.c.
2259 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2260 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2261 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2262 (thumb2_breakpoint): Declare.
2263 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2264 linux-aarch32-low.h.
2265 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2266 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2267 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2268
edd88788
JB
22692016-01-01 Joel Brobecker <brobecker@adacore.com>
2270
2271 * gdbreplay.c (gdbreplay_version): Change copyright year in
2272 version message.
2273 * server.c (gdbserver_version): Likewise.
2274
65da7f14
PP
22752015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2276
2277 * server.c (crc32_table): Delete.
2278 (crc32): Use libiberty's xcrc32 function.
2279
4abd5ed2
JB
22802015-12-22 Joel Brobecker <brobecker@adacore.com>
2281
2282 * lynx-low.c (lynx_delete_thread_callback): New function.
2283 (lynx_mourn): Properly delete our process and all of its
2284 threads. Remove call to clear_inferiors.
2285
0e50fe5c
JB
22862015-12-22 Joel Brobecker <brobecker@adacore.com>
2287
2288 * target.c (thread_search_callback): Add check that
2289 the thread_stopped target callback is not NULL before
2290 calling it.
2291
35adc03f
YQ
22922015-12-21 Yao Qi <yao.qi@linaro.org>
2293
2294 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2295 arm breakpoint.
2296
bd2b2909
AT
22972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2298
2299 * server.c (handle_query): Call target_supports_software_single_step.
2300
7fe5e27e
AT
23012015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2302
2303 * linux-low.c (single_step): New function.
2304 (linux_resume_one_lwp_throw): Call single_step.
2305 (start_step_over): Likewise.
2306
d9311bfa
AT
23072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2308
2309 * Makefile.in (SFILES): Append arch/arm-linux.c,
2310 arch/arm-get-next-pcs.c.
2311 (arm-linux.o): New rule.
2312 (arm-get-next-pcs.o): New rule.
2313 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2314 arm-linux.o.
2315 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2316 to linux-aarch32-low.c.
2317 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2318 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2319 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2320 (thumb2_breakpoint_len): Likewise.
2321 (arm_is_thumb_mode): Make non-static.
2322 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2323 from linux-aarch32-low.c.
2324 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2325 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2326 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2327 (thumb2_breakpoint_len): Likewise.
2328 (arm_is_thumb_mode): New declaration.
2329 * linux-arm-low.c: Include arch/arm-linux.h
2330 aarch/arm-get-next-pcs.h, sys/syscall.h.
2331 (get_next_pcs_ops): New struct.
2332 (get_next_pcs_addr_bits_remove): New function.
2333 (get_next_pcs_is_thumb): New function.
2334 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2335 (arm_sigreturn_next_pc): Likewise.
2336 (get_next_pcs_syscall_next_pc): Likewise.
2337 (arm_gdbserver_get_next_pcs): Likewise.
2338 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2339 Initialize.
2340 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2341 * server.h: Include gdb_vecs.h.
2342
68ce2059
AT
23432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2344
2345 * Makefile.in (SFILES): Append common/common-regcache.c.
2346 (OBS): Append common-regcache.o.
2347 (common-regcache.o): New rule.
2348 * regcache.c (init_register_cache): Initialize cache to
2349 REG_UNAVAILABLE.
2350 (regcache_raw_read_unsigned): New function.
2351 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2352 register_status enum.
2353
fa5308bd
AT
23542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2355
2356 * linux-aarch64-low.c (the_low_targets): Rename
2357 breakpoint_reinsert_addr to get_next_pcs.
2358 * linux-arm-low.c (the_low_targets): Likewise.
2359 * linux-bfin-low.c (the_low_targets): Likewise.
2360 * linux-cris-low.c (the_low_targets): Likewise.
2361 * linux-crisv32-low.c (the_low_targets): Likewise.
2362 * linux-low.c (can_software_single_step): Likewise.
2363 (install_software_single_step_breakpoints): New function.
2364 (start_step_over): Use install_software_single_step_breakpoints.
2365 * linux-low.h: New CORE_ADDR vector.
2366 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2367 get_next_pcs.
2368 * linux-mips-low.c (the_low_targets): Likewise.
2369 * linux-nios2-low.c (the_low_targets): Likewise.
2370 * linux-sparc-low.c (the_low_targets): Likewise.
2371
4a6ed09b
PA
23722015-12-17 Pedro Alves <palves@redhat.com>
2373
2374 * linux-low.c (linux_kill_one_lwp): Remove references to
2375 LinuxThreads.
2376 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2377 to 'kill'.
2378 (linux_init_signals): Delete.
2379 (initialize_low): Adjust.
2380 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2381
7544db95
PA
23822015-12-16 Pedro Alves <palves@redhat.com>
2383
2384 * configure.ac (compiler warning flags): When testing a
2385 -Wno-foo option, check whether -Wfoo works instead.
2386 * configure: Regenerate.
2387
8020350c
DB
23882015-12-11 Don Breazeal <donb@codesourcery.com>
2389
2390 * server.c (process_serial_event): Don't exit from gdbserver
2391 in remote mode if there are still active inferiors.
2392
db91f502
YQ
23932015-12-11 Yao Qi <yao.qi@linaro.org>
2394
2395 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2396 arm_breakpoint_at if the process is 32-bit.
2397
b37a6290
YQ
23982015-12-11 Yao Qi <yao.qi@linaro.org>
2399
2400 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2401 arm breakpoint.
2402
17b1509a
YQ
24032015-12-07 Yao Qi <yao.qi@linaro.org>
2404
2405 * configure.srv: Append arm.o to srv_tgtobj for
2406 aarch64*-*-linux* target.
2407 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2408 from linux-arm-low.c.
2409 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2410 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2411 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2412 (thumb2_breakpoint_len): Likewise.
2413 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2414 (arm_breakpoint_kinds): Likewise.
2415 (arm_breakpoint_kind_from_pc): Likewise.
2416 (arm_sw_breakpoint_from_kind): Likewise.
2417 (arm_breakpoint_kind_from_current_state): Likewise.
2418 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2419 (arm_sw_breakpoint_from_kind): Declare.
2420 (arm_breakpoint_kind_from_current_state): Declare.
2421 (arm_breakpoint_at): Declare.
2422 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2423 arm_sw_breakpoint_from_kind if process is 32-bit.
2424 (aarch64_breakpoint_kind_from_pc): New function.
2425 (aarch64_breakpoint_kind_from_current_state): New function.
2426 (the_low_target): Initialize fields breakpoint_kind_from_pc
2427 and breakpoint_kind_from_current_state.
2428 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2429 linux-aarch32-low.c.
2430 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2431 (arm_breakpoint, arm_breakpoint_len): Likewise.
2432 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2433 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2434 (arm_is_thumb_mode): Likewise.
2435 (arm_breakpoint_at): Likewise.
2436 (arm_breakpoint_kind_from_pc): Likewise.
2437 (arm_sw_breakpoint_from_kind): Likewise.
2438 (arm_breakpoint_kind_from_current_state): Likewise.
2439
2440 Revert:
2441 2015-08-04 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2444 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2445 * server.c (extended_protocol): Remove "static".
2446 * server.h (extended_protocol): Declare it.
2447
ece66d65
JS
24482015-12-04 Josh Stone <jistone@redhat.com>
2449
2450 * target.h (struct target_ops) <arch_setup>: Rename to ...
2451 (struct target_ops) <post_create_inferior>: ... this.
2452 (target_arch_setup): Rename to ...
2453 (target_post_create_inferior): ... this, calling post_create_inferior.
2454 * server.c (start_inferior): Update target_arch_setup calls to
2455 target_post_create_inferior.
2456 * linux-low.c (linux_low_ptrace_options): Forward declare.
2457 (linux_arch_setup): Update its comment for general use.
2458 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2459 (struct linux_target_ops): Use linux_post_create_inferior.
2460 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2461 to post_create_inferior.
2462 * nto-low.c (struct nto_target_ops): Likewise.
2463 * spu-low.c (struct spu_target_ops): Likewise.
2464 * win32-low.c (struct win32_target_ops): Likewise.
2465
e58c48b4
AT
24662015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2467
2468 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2469
fbec8956
AT
24702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2471
2472 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2473 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2474 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2475 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2476 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2477 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2478 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2479 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2480 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2481 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2482 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2483 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2484
9b4c5f87
AT
24852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2486
2487 * linux-low.c (linux_look_up_symbols): Don't call
2488 linux_supports_traceclone.
2489 * linux-low.h (thread_db_init): Remove use_events argument.
2490 * thread-db.c (thread_db_use_event): Remove global variable.
2491 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2492 (struct thread_db) <td_create_bp>: Remove field.
2493 (thread_db_create_event): Remove function.
2494 (thread_db_enable_reporting): Likewise.
2495 (find_one_thread): Don't check for thread_db_use_events.
2496 (attach_thread): Likewise.
2497 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2498 (try_thread_db_load_1): Don't check for thread_db_use_events.
2499 (thread_db_init): Remove use_events argument and thread events
2500 handling.
2501 (remove_thread_event_breakpoints): Remove function.
2502 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2503
7d00775e
AT
25042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2505
2506 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2507 New function.
2508 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2509 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2510 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2511 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2512 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2513 Initialize.
2514 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2515 New function.
2516 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2517 * linux-low.c (can_hardware_single_step): Use
2518 supports_hardware_single_step.
2519 (can_software_single_step): New function.
2520 (start_step_over): Call can_software_single_step.
2521 (linux_supports_hardware_single_step): New function.
2522 (struct target_ops) <supports_software_single_step>: Initialize.
2523 * linux-low.h (struct linux_target_ops)
2524 <supports_hardware_single_step>: Initialize.
2525 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2526 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2527 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2528 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2529 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2530 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2531 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2532 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2533 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2534 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2535 Initialize.
2536 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2537 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2538 Initialize.
2539 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2540 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2541 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2542 New function.
2543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2544 * target.h (struct target_ops): <supports_software_single_step>:
2545 New field.
2546 (target_supports_software_single_step): New macro.
2547
2d97cd35
AT
25482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2549
2550 * linux-low.c (linux_wait_1): Fix pc advance condition.
2551 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2552 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2553
769ef81f
AT
25542015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2555
2556 * linux-arm-low.c (arm_is_thumb_mode): New function.
2557 (arm_breakpoint_at): Use arm_is_thumb_mode.
2558 (arm_breakpoint_kind_from_current_state): New function.
2559 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2560 Initialize.
2561 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2562 (linux_breakpoint_kind_from_current_state): New function.
2563 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2564 * linux-low.h (struct linux_target_ops)
2565 <breakpoint_kind_from_current_state>: New field.
2566 * target.h (struct target_ops): Likewise.
2567 (target_breakpoint_kind_from_current_state): New macro.
2568
1bebeeca
PA
25692015-11-30 Pedro Alves <palves@redhat.com>
2570
2571 * linux-low.c (linux_resume): Wake up the event loop before
2572 returning.
2573
a67a9fae
PA
25742015-11-30 Pedro Alves <palves@redhat.com>
2575
2576 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2577 check.
2578 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2579 to -1.
2580 * target.c (struct thread_search): New structure.
2581 (thread_search_callback): New function.
2582 (prev_general_thread): New global.
2583 (prepare_to_access_memory, done_accessing_memory): New functions.
2584 * target.h (prepare_to_access_memory, done_accessing_memory):
2585 Replace macros with function declarations.
2586
f2faf941
PA
25872015-11-30 Pedro Alves <palves@redhat.com>
2588
2589 PR 14618
2590 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2591 report TARGET_WAITKIND_NO_RESUMED.
2592 * remote-utils.c (prepare_resume_reply): Handle
2593 TARGET_WAITKIND_NO_RESUMED.
2594 * server.c (report_no_resumed): New global.
2595 (handle_query) <qSupported>: Handle "no-resumed+". Report
2596 "no-resumed+" support.
2597 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2598 return error if the client doesn't support no-resumed events.
2599 (push_stop_notification): New function.
2600 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2601 events if the client supports them.
2602
a681f9c9
PA
26032015-11-30 Pedro Alves <palves@redhat.com>
2604
2605 * linux-low.c (thread_still_has_status_pending_p): Don't check
2606 vCont;t here.
2607 (lwp_resumed): New function.
2608 (status_pending_p_callback): Return early if the LWP is not
2609 supposed to be resumed.
2610
65706a29
PA
26112015-11-30 Pedro Alves <palves@redhat.com>
2612
2613 * linux-low.c (handle_extended_wait): Assert that the LWP's
2614 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2615 thread create events, leave the new child's status pending.
2616 (linux_low_filter_event): If GDB wants to hear about thread exit
2617 events, leave the LWP marked dead and don't delete it.
2618 (linux_wait_for_event_filtered): Don't check for thread exit.
2619 (filter_exit_event): New function.
2620 (linux_wait_1): Use it, when returning an exit event.
2621 (linux_resume_one_lwp_throw): Assert that the LWP's
2622 waitstatus is TARGET_WAITKIND_IGNORE.
2623 * remote-utils.c (prepare_resume_reply): Handle
2624 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2625 * server.c (report_thread_events): New global.
2626 (handle_general_set): Handle QThreadEvents.
2627 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2628 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2629 TARGET_WAITKIND_THREAD_EXITED.
2630 * server.h (report_thread_events): Declare.
2631
56cf4bed
PA
26322015-11-30 Pedro Alves <palves@redhat.com>
2633
2634 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2635 the thread's last_resume_kind was resume_stop.
2636
500c1d85
PA
26372015-11-30 Pedro Alves <palves@redhat.com>
2638
2639 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2640 before returning.
2641
de979965
PA
26422015-11-30 Pedro Alves <palves@redhat.com>
2643
2644 * server.c (handle_v_requests): Handle vCtrlC.
2645
34c65914
PA
26462015-11-30 Pedro Alves <palves@redhat.com>
2647
2648 * gdbthread.h (find_any_thread_of_pid): Declare.
2649 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2650 functions.
2651 * server.c (handle_query): If current_thread is NULL, look for
2652 another thread of the selected process.
2653
79efa585 26542015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2655 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2656
2657 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2658 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2659 name in reply.
2660 * target.h (struct target_ops) <thread_name>: New field.
2661 (target_thread_name): New macro.
2662
80d82c19
JB
26632015-11-23 Joel Brobecker <brobecker@adacore.com>
2664
2665 * regcache.h (regcache_invalidate_pid): Add declaration.
2666 * regcache.c (regcache_invalidate_pid): New function, extracted
2667 from regcache_invalidate.
2668 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2669 Add trivial documentation comment.
2670 * lynx-low.c: Use regcache_invalidate_pid instead of
2671 regcache_invalidate.
2672
64da5dd5
JB
26732015-11-23 Joel Brobecker <brobecker@adacore.com>
2674
2675 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2676 and Elf64_auxv_t if the target is Android.
2677
37ce4055
DE
26782015-11-22 Doug Evans <xdje42@gmail.com>
2679
2680 * target.h: #include <sys/types.h>.
2681
06e03fff
PA
26822015-11-19 Pedro Alves <palves@redhat.com>
2683
2684 * linux-low.c (linux_process_qsupported): Change prototype.
2685 Adjust.
2686 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2687 Change prototype.
2688 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2689 and adjust to loop over all features.
2690 * server.c (handle_query) <qSupported>: Adjust to call
2691 target_process_qsupported once, passing it a vector of unprocessed
2692 features.
2693 * target.h (struct target_ops) <process_qsupported>: Change
2694 prototype.
2695 (target_process_qsupported): Adjust.
2696
9a084706
PA
26972015-11-19 Pedro Alves <palves@redhat.com>
2698
2699 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2700 mode.
2701 * configure: Regenerate.
2702
dad44a1f
PA
27032015-11-19 Pedro Alves <palves@redhat.com>
2704
2705 * configure: Regenerate.
2706
231c0592
YQ
27072015-11-19 Yao Qi <yao.qi@linaro.org>
2708
2709 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2710 type to uint32_t.
2711
6c1c9a8b
YQ
27122015-11-19 Yao Qi <yao.qi@linaro.org>
2713
2714 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2715 (struct aarch64_operand): Move enum out.
2716
9caa3311
YQ
27172015-11-19 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2720 struct user_fpsimd_state *.
2721 (aarch64_store_fpregset): Likewise.
2722
6a69a054
YQ
27232015-11-19 Yao Qi <yao.qi@linaro.org>
2724
2725 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2726 struct user_pt_regs *.
2727 (aarch64_store_gregset): Likewise.
2728
1798301e
PA
27292015-11-18 Pedro Alves <palves@redhat.com>
2730
2731 * Makefile.in (all_object_files): Add $IPA_OBJS.
2732
ce7715e2
PA
27332015-11-17 Pedro Alves <palves@redhat.com>
2734
2735 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2736 GDB_SIGNAL_0 and gdb_signal_to_string.
2737
c0879059
PA
27382015-11-17 Pedro Alves <palves@redhat.com>
2739
2740 * win32-low.c (handle_output_debug_string): Remove parameter.
2741 (win32_kill): Remove our_status local and adjust call to
2742 handle_output_debug_string.
2743 (get_child_debug_event): Adjust call to
2744 handle_output_debug_string.
2745
1996e237
SM
27462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2747
2748 * linux-mips-low.c (mips_fill_gregset): Add cast.
2749 (mips_store_gregset): Likewise.
2750 (mips_fill_fpregset): Likewise.
2751 (mips_store_fpregset): Likewise.
2752
cbec665b
SM
27532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2754
2755 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2756 priv.
2757
eb3e3c67
SM
27582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2759
2760 * linux-mips-low.c (mips_linux_new_thread): Change type of
2761 watch_type to enum target_hw_bp_type.
2762
171de4b8
SM
27632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2764
2765 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2766 Change return type to arm_hwbp_type.
2767
04248ead
SM
27682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2769
2770 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2771 (arm_store_gregset): Likewise.
2772 * linux-arm-low.c (arm_get_hwcap): Likewise.
2773 (arm_read_description): Likewise.
2774
04b3479c
SM
27752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2776
2777 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2778
2bc84e8a
SM
27792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2780
2781 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2782 (ppc_fill_vsxregset): Likewise.
2783 (ppc_store_vsxregset): Likewise.
2784 (ppc_fill_vrregset): Likewise.
2785 (ppc_store_vrregset): Likewise.
2786 (ppc_fill_evrregset): Likewise.
2787 (ppc_store_evrregset): Likewise.
2788
e6c5bb05
SM
27892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2790
2791 * linux-ppc-low.c (ppc_usrregs_info): Remove
2792 forward-declaration.
2793 (ppc_arch_setup): Move lower in file.
2794
7ea45d72
SM
27952015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2798 (ps_pdwrite): Likewise.
2799
69291610
HW
28002015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2801
2802 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2803 to after assert checks.
2804
b42945fd
SM
28052015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2806
2807 * proc-service.c (ps_pdread): Add/adjust casts.
2808 (ps_pdwrite): Add/adjust casts.
2809
d6f85c84
SM
28102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2811
2812 * server.c (handle_search_memory_1): Cast return value of
2813 memmem.
2814
f98cd059
SM
28152015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2816
2817 * server.c (write_qxfer_response): Change type of data to
2818 gdb_byte *.
2819
d2412fa5
PA
28202015-10-29 Pedro Alves <palves@redhat.com>
2821
2822 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2823
c17414a2
PA
28242015-10-29 Pedro Alves <palves@redhat.com>
2825
2826 * tracepoint.c (clear_installed_tracepoints): Add casts.
2827
e053fbc4
PA
28282015-10-29 Pedro Alves <palves@redhat.com>
2829
2830 * server.c (handle_v_cont, process_serial_event): Add enum
2831 gdb_signal casts to signal parsing code.
2832
add67df8
PA
28332015-10-29 Pedro Alves <palves@redhat.com>
2834
2835 * linux-low.h (NULL_REGSET): Define.
2836 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2837 * linux-arm-low.c (arm_regsets): Likewise.
2838 * linux-crisv32-low.c (cris_regsets): Likewise.
2839 * linux-m68k-low.c (m68k_regsets): Likewise.
2840 * linux-mips-low.c (mips_regsets): Likewise.
2841 * linux-nios2-low.c (nios2_regsets): Likewise.
2842 * linux-ppc-low.c (ppc_regsets): Likewise.
2843 * linux-s390-low.c (s390_regsets): Likewise.
2844 * linux-sh-low.c (sh_regsets): Likewise.
2845 * linux-sparc-low.c (sparc_regsets): Likewise.
2846 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2847 * linux-tile-low.c (tile_regsets): Likewise.
2848 * linux-x86-low.c (x86_regsets): Likewise.
2849 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2850
50bc912a
PA
28512015-10-29 Pedro Alves <palves@redhat.com>
2852
2853 * linux-low.h (NULL_REGSET): Define.
2854 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2855 * linux-arm-low.c (arm_regsets): Likewise.
2856 * linux-crisv32-low.c (cris_regsets): Likewise.
2857 * linux-m68k-low.c (m68k_regsets): Likewise.
2858 * linux-mips-low.c (mips_regsets): Likewise.
2859 * linux-nios2-low.c (nios2_regsets): Likewise.
2860 * linux-ppc-low.c (ppc_regsets): Likewise.
2861 * linux-s390-low.c (s390_regsets): Likewise.
2862 * linux-sh-low.c (sh_regsets): Likewise.
2863 * linux-sparc-low.c (sparc_regsets): Likewise.
2864 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2865 * linux-tile-low.c (tile_regsets): Likewise.
2866 * linux-x86-low.c (x86_regsets): Likewise.
2867 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2868
682b2546
DE
28692015-10-26 Doug Evans <dje@google.com>
2870
2871 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2872
963843d4
DE
28732015-10-26 Doug Evans <dje@google.com>
2874
2875 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2876
d41401ac
DE
28772015-10-26 Doug Evans <dje@google.com>
2878
2879 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2880 for debug_printf.
2881 (attach_thread, find_new_threads_callback): Ditto.
2882
3db28855
AT
28832015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2884
2885 * mem-break.h (set_breakpoint_data): Remove.
2886
fb78e89c
AT
28872015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2888
2889 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2890 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2891 (initialize_low): Remove set_breakpoint_data call.
2892 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2893 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2894 (initialize_low): Remove set_breakpoint_data call.
2895 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2896 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2897 (initialize_low): Remove set_breakpoint_data call.
2898
2e6ee069
AT
28992015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2900
2901 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2902 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2903 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2904 * target.h (target_breakpoint_kind_from_pc): New macro.
2905
1652a986
AT
29062015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2907
2908 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2909 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2910 the default breakpoint kind.
2911
abeead09
AT
29122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2913
2914 * linux-arm-low.c (arm_supports_z_point_type): Add software
2915 breakpoint support.
2916
b0b4b501
AT
29172015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2918
2919 * linux-arm-low.c: Refactor breakpoint definitions.
2920 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2921 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2922
8689682c
AT
29232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2924
2925 * Makefile.in: Add arm.c/o.
2926 * configure.srv: Likewise.
2927 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2928 (arm_breakpoint_kind_from_pc): New function.
2929 (arm_sw_breakpoint_from_kind): Return proper kind.
2930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2931
27165294
AT
29322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2933
2934 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2935 removal.
2936 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2937 (struct raw_breakpoint) <size>: Remove.
2938 (struct raw_breakpoint) <kind>: Add.
2939 (bp_size): New function.
2940 (bp_opcode): Likewise.
2941 (find_raw_breakpoint_at): Adjust for kind.
2942 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2943 (remove_memory_breakpoint): Adjust for kind call bp_size.
2944 (set_raw_breakpoint_at): Adjust for kind.
2945 (set_breakpoint): Likewise.
2946 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2947 (delete_raw_breakpoint): Adjust for kind.
2948 (delete_breakpoint): Likewise.
2949 (find_gdb_breakpoint): Likewise.
2950 (set_gdb_breakpoint_1): Likewise.
2951 (set_gdb_breakpoint): Likewise.
2952 (delete_gdb_breakpoint_1): Likewise.
2953 (delete_gdb_breakpoint): Likewise.
2954 (uninsert_raw_breakpoint): Likewise.
2955 (reinsert_raw_breakpoint): Likewise.
2956 (set_breakpoint_data): Remove.
2957 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2958 (check_mem_read): Adjust for kind call bp_size.
2959 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2960 (clone_one_breakpoint): Adjust for kind.
2961 * mem-break.h (set_gdb_breakpoint): Likewise.
2962 (delete_gdb_breakpoint): Likewise.
2963 * server.c (process_serial_event): Likewise.
2964
dd373349
AT
29652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2966
2967 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2973 (arm_sw_breakpoint_from_kind): New function.
2974 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2975 (struct linux_target_ops) <breakpoint>: Remove.
2976 (struct linux_target_ops) <breakpoint_len>: Remove.
2977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2979 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2980 (struct linux_target_ops) <breakpoint>: Remove.
2981 (struct linux_target_ops) <breakpoint_len>: Remove.
2982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2984 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2985 (struct linux_target_ops) <breakpoint>: Remove.
2986 (struct linux_target_ops) <breakpoint_len>: Remove.
2987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2989 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2990 and sw_breakpoint_from_kind to increment the pc.
2991 (linux_breakpoint_kind_from_pc): New function.
2992 (linux_sw_breakpoint_from_kind): New function.
2993 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2994 (initialize_low): Call breakpoint_kind_from_pc and
2995 sw_breakpoint_from_kind to replace breakpoint_data/len.
2996 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2997 New field.
2998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2999 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3000 (struct linux_target_ops) <breakpoint>: Remove.
3001 (struct linux_target_ops) <breakpoint_len>: Remove.
3002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3004 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3005 (struct linux_target_ops) <breakpoint>: Remove.
3006 (struct linux_target_ops) <breakpoint_len>: Remove.
3007 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3008 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3009 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3010 (struct linux_target_ops) <breakpoint>: Remove.
3011 (struct linux_target_ops) <breakpoint_len>: Remove.
3012 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3013 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3014 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3015 (struct linux_target_ops) <breakpoint>: Remove.
3016 (struct linux_target_ops) <breakpoint_len>: Remove.
3017 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3019 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3020 (struct linux_target_ops) <breakpoint>: Remove.
3021 (struct linux_target_ops) <breakpoint_len>: Remove.
3022 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3023 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3024 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3025 (struct linux_target_ops) <breakpoint>: Remove.
3026 (struct linux_target_ops) <breakpoint_len>: Remove.
3027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3029 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3030 (struct linux_target_ops) <breakpoint>: Remove.
3031 (struct linux_target_ops) <breakpoint_len>: Remove.
3032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3034 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3035 (struct linux_target_ops) <breakpoint>: Remove.
3036 (struct linux_target_ops) <breakpoint_len>: Remove.
3037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3039 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3040 (struct linux_target_ops) <breakpoint>: Remove.
3041 (struct linux_target_ops) <breakpoint_len>: Remove.
3042 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3044 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3045 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3046 (struct linux_target_ops) <breakpoint>: Remove.
3047 (struct linux_target_ops) <breakpoint_len>: Remove.
3048 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3049 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3050 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3051 (struct linux_target_ops) <breakpoint>: Remove.
3052 (struct linux_target_ops) <breakpoint_len>: Remove.
3053 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3054 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3055
4cd98a19
AT
30562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3057
3058 * linux-cris-low.c (cris_get_pc): Remove void arg.
3059
774ee6d2
AR
30602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3061
3062 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3063 variable name.
3064
833dcd29
AR
30652015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3066
3067 * inferiors.c (thread_pid_matches_callback): New function.
3068 (find_thread_process): New function.
3069 (remove_thread): Reset current_thread.
3070 (remove_process): Assert threads have been removed first.
3071
8d689ee5
YQ
30722015-10-15 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3075 if it is 3.
3076 (aarch64_remove_point): Likewise.
3077 * regcache.c (regcache_register_size): New function.
3078
1c2e1515
YQ
30792015-10-12 Yao Qi <yao.qi@linaro.org>
3080
3081 * linux-aarch64-low.c: Update all callers as emit_load_store
3082 is renamed to aarch64_emit_load_store.
3083
e1c587c3
YQ
30842015-10-12 Yao Qi <yao.qi@linaro.org>
3085
3086 * linux-aarch64-low.c: Update all callers of function renaming
3087 from emit_insn to aarch64_emit_insn.
3088
b6542f81
YQ
30892015-10-12 Yao Qi <yao.qi@linaro.org>
3090
3091 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3092 arch/aarch64-insn.h.
3093 (struct aarch64_memory_operand): Likewise.
3094 (ENCODE): Likewise.
3095 (emit_insn): Move to arch/aarch64-insn.c.
3096 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3097 (emit_load_store): Move to arch/aarch64-insn.c.
3098 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3099 (can_encode_int32): Remove.
3100
246994ce
YQ
31012015-10-12 Yao Qi <yao.qi@linaro.org>
3102
3103 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3104 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3105 (aarch64_relocate_instruction): Likewise.
3106 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3107 (struct aarch64_insn_visitor): Likewise.
3108
0badd99f
YQ
31092015-10-12 Yao Qi <yao.qi@linaro.org>
3110
3111 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3112 (struct aarch64_insn_visitor): New.
3113 (struct aarch64_insn_relocation_data): New.
3114 (aarch64_ftrace_insn_reloc_b): New function.
3115 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3116 (aarch64_ftrace_insn_reloc_cb): Likewise.
3117 (aarch64_ftrace_insn_reloc_tb): Likewise.
3118 (aarch64_ftrace_insn_reloc_adr): Likewise.
3119 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3120 (aarch64_ftrace_insn_reloc_others): Likewise.
3121 (visitor): New.
3122 (aarch64_relocate_instruction): Use visitor.
3123
dfaffe9d
YQ
31242015-10-12 Yao Qi <yao.qi@linaro.org>
3125
3126 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3127 int. Add argument buf.
3128 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3129 aarch64_relocate_instruction.
3130
70b439f0
YQ
31312015-10-12 Yao Qi <yao.qi@linaro.org>
3132
3133 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3134 argument insn. Remove local variable insn. Don't call
3135 target_read_uint32.
3136 (aarch64_install_fast_tracepoint_jump_pad): Call
3137 target_read_uint32.
3138
7781c06f
YQ
31392015-09-30 Yao Qi <yao.qi@linaro.org>
3140
3141 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3142 (emit_load_store_pair): Likewise.
3143
9a3c8263
SM
31442015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3145
3146 * dll.c (match_dll): Add cast(s).
3147 (unloaded_dll): Likewise.
3148 * linux-low.c (second_thread_of_pid_p): Likewise.
3149 (delete_lwp_callback): Likewise.
3150 (count_events_callback): Likewise.
3151 (select_event_lwp_callback): Likewise.
3152 (linux_set_resume_request): Likewise.
3153 * server.c (accumulate_file_name_length): Likewise.
3154 (emit_dll_description): Likewise.
3155 (handle_qxfer_threads_worker): Likewise.
3156 (visit_actioned_threads): Likewise.
3157 * thread-db.c (any_thread_of): Likewise.
3158 * tracepoint.c (same_process_p): Likewise.
3159 (match_blocktype): Likewise.
3160 (build_traceframe_info_xml): Likewise.
3161
224c3ddb
SM
31622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3163
3164 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3165 assignment.
3166 (gdb_unparse_agent_expr): Likewise.
3167 * hostio.c (require_data): Likewise.
3168 (handle_pread): Likewise.
3169 * linux-low.c (disable_regset): Likewise.
3170 (fetch_register): Likewise.
3171 (store_register): Likewise.
3172 (get_dynamic): Likewise.
3173 (linux_qxfer_libraries_svr4): Likewise.
3174 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3175 (set_fast_tracepoint_jump): Likewise.
3176 (uninsert_fast_tracepoint_jumps_at): Likewise.
3177 (reinsert_fast_tracepoint_jumps_at): Likewise.
3178 (validate_inserted_breakpoint): Likewise.
3179 (clone_agent_expr): Likewise.
3180 * regcache.c (init_register_cache): Likewise.
3181 * remote-utils.c (putpkt_binary_1): Likewise.
3182 (decode_M_packet): Likewise.
3183 (decode_X_packet): Likewise.
3184 (look_up_one_symbol): Likewise.
3185 (relocate_instruction): Likewise.
3186 (monitor_output): Likewise.
3187 * server.c (handle_search_memory): Likewise.
3188 (handle_qxfer_exec_file): Likewise.
3189 (handle_qxfer_libraries): Likewise.
3190 (handle_qxfer): Likewise.
3191 (handle_query): Likewise.
3192 (handle_v_cont): Likewise.
3193 (handle_v_run): Likewise.
3194 (captured_main): Likewise.
3195 * target.c (write_inferior_memory): Likewise.
3196 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3197 * tracepoint.c (init_trace_buffer): Likewise.
3198 (add_tracepoint_action): Likewise.
3199 (add_traceframe): Likewise.
3200 (add_traceframe_block): Likewise.
3201 (cmd_qtdpsrc): Likewise.
3202 (cmd_qtdv): Likewise.
3203 (cmd_qtstatus): Likewise.
3204 (response_source): Likewise.
3205 (response_tsv): Likewise.
3206 (cmd_qtnotes): Likewise.
3207 (gdb_collect): Likewise.
3208 (initialize_tracepoint): Likewise.
3209
afbe19f8
PL
32102015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3211
3212 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3213 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3214 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3215 <NOP>: New.
3216 (enum aarch64_condition_codes): New enum.
3217 (w0): New static global.
3218 (fp): Likewise.
3219 (lr): Likewise.
3220 (struct aarch64_memory_operand) <type>: New
3221 MEMORY_OPERAND_POSTINDEX type.
3222 (postindex_memory_operand): New helper function.
3223 (emit_ret): New function.
3224 (emit_load_store_pair): New function, factored out of emit_stp
3225 with support for MEMORY_OPERAND_POSTINDEX.
3226 (emit_stp): Rewrite using emit_load_store_pair.
3227 (emit_ldp): New function.
3228 (emit_load_store): Likewise.
3229 (emit_ldr): Mention post-index instruction in comment.
3230 (emit_ldrh): New function.
3231 (emit_ldrb): New function.
3232 (emit_ldrsw): Mention post-index instruction in comment.
3233 (emit_str): Likewise.
3234 (emit_subs): New function.
3235 (emit_cmp): Likewise.
3236 (emit_and): Likewise.
3237 (emit_orr): Likewise.
3238 (emit_orn): Likewise.
3239 (emit_eor): Likewise.
3240 (emit_mvn): Likewise.
3241 (emit_lslv): Likewise.
3242 (emit_lsrv): Likewise.
3243 (emit_asrv): Likewise.
3244 (emit_mul): Likewise.
3245 (emit_sbfm): Likewise.
3246 (emit_sbfx): Likewise.
3247 (emit_ubfm): Likewise.
3248 (emit_ubfx): Likewise.
3249 (emit_csinc): Likewise.
3250 (emit_cset): Likewise.
3251 (emit_nop): Likewise.
3252 (emit_ops_insns): New helper function.
3253 (emit_pop): Likewise.
3254 (emit_push): Likewise.
3255 (aarch64_emit_prologue): New function.
3256 (aarch64_emit_epilogue): Likewise.
3257 (aarch64_emit_add): Likewise.
3258 (aarch64_emit_sub): Likewise.
3259 (aarch64_emit_mul): Likewise.
3260 (aarch64_emit_lsh): Likewise.
3261 (aarch64_emit_rsh_signed): Likewise.
3262 (aarch64_emit_rsh_unsigned): Likewise.
3263 (aarch64_emit_ext): Likewise.
3264 (aarch64_emit_log_not): Likewise.
3265 (aarch64_emit_bit_and): Likewise.
3266 (aarch64_emit_bit_or): Likewise.
3267 (aarch64_emit_bit_xor): Likewise.
3268 (aarch64_emit_bit_not): Likewise.
3269 (aarch64_emit_equal): Likewise.
3270 (aarch64_emit_less_signed): Likewise.
3271 (aarch64_emit_less_unsigned): Likewise.
3272 (aarch64_emit_ref): Likewise.
3273 (aarch64_emit_if_goto): Likewise.
3274 (aarch64_emit_goto): Likewise.
3275 (aarch64_write_goto_address): Likewise.
3276 (aarch64_emit_const): Likewise.
3277 (aarch64_emit_call): Likewise.
3278 (aarch64_emit_reg): Likewise.
3279 (aarch64_emit_pop): Likewise.
3280 (aarch64_emit_stack_flush): Likewise.
3281 (aarch64_emit_zero_ext): Likewise.
3282 (aarch64_emit_swap): Likewise.
3283 (aarch64_emit_stack_adjust): Likewise.
3284 (aarch64_emit_int_call_1): Likewise.
3285 (aarch64_emit_void_call_2): Likewise.
3286 (aarch64_emit_eq_goto): Likewise.
3287 (aarch64_emit_ne_goto): Likewise.
3288 (aarch64_emit_lt_goto): Likewise.
3289 (aarch64_emit_le_goto): Likewise.
3290 (aarch64_emit_gt_goto): Likewise.
3291 (aarch64_emit_ge_got): Likewise.
3292 (aarch64_emit_ops_impl): New static global variable.
3293 (aarch64_emit_ops): New target function, return
3294 &aarch64_emit_ops_impl.
3295 (struct linux_target_ops): Install it.
3296
bb903df0
PL
32972015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3298
3299 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3300 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3301 aarch64-ipa.o.
3302 * linux-aarch64-ipa.c: New file.
3303 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3304 and endian.h.
3305 (aarch64_get_thread_area): New target method.
3306 (extract_signed_bitfield): New helper function.
3307 (aarch64_decode_ldr_literal): New function.
3308 (enum aarch64_opcodes): New enum.
3309 (struct aarch64_register): New struct.
3310 (struct aarch64_operand): New struct.
3311 (x0): New static global.
3312 (x1): Likewise.
3313 (x2): Likewise.
3314 (x3): Likewise.
3315 (x4): Likewise.
3316 (w2): Likewise.
3317 (ip0): Likewise.
3318 (sp): Likewise.
3319 (xzr): Likewise.
3320 (aarch64_register): New helper function.
3321 (register_operand): Likewise.
3322 (immediate_operand): Likewise.
3323 (struct aarch64_memory_operand): New struct.
3324 (offset_memory_operand): New helper function.
3325 (preindex_memory_operand): Likewise.
3326 (enum aarch64_system_control_registers): New enum.
3327 (ENCODE): New macro.
3328 (emit_insn): New helper function.
3329 (emit_b): New function.
3330 (emit_bcond): Likewise.
3331 (emit_cb): Likewise.
3332 (emit_tb): Likewise.
3333 (emit_blr): Likewise.
3334 (emit_stp): Likewise.
3335 (emit_ldp_q_offset): Likewise.
3336 (emit_stp_q_offset): Likewise.
3337 (emit_load_store): Likewise.
3338 (emit_ldr): Likewise.
3339 (emit_ldrsw): Likewise.
3340 (emit_str): Likewise.
3341 (emit_ldaxr): Likewise.
3342 (emit_stxr): Likewise.
3343 (emit_stlr): Likewise.
3344 (emit_data_processing_reg): Likewise.
3345 (emit_data_processing): Likewise.
3346 (emit_add): Likewise.
3347 (emit_sub): Likewise.
3348 (emit_mov): Likewise.
3349 (emit_movk): Likewise.
3350 (emit_mov_addr): Likewise.
3351 (emit_mrs): Likewise.
3352 (emit_msr): Likewise.
3353 (emit_sevl): Likewise.
3354 (emit_wfe): Likewise.
3355 (append_insns): Likewise.
3356 (can_encode_int32_in): New helper function.
3357 (aarch64_relocate_instruction): New function.
3358 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3359 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3360 (struct linux_target_ops): Install aarch64_get_thread_area,
3361 aarch64_install_fast_tracepoint_jump_pad and
3362 aarch64_get_min_fast_tracepoint_insn_len.
3363
787749ea
PL
33642015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3365
3366 * Makefile.in (aarch64-insn.o): New rule.
3367 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3368
9812b2e6
YQ
33692015-09-21 Yao Qi <yao.qi@linaro.org>
3370
3371 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3372
18fe412b
YQ
33732015-09-21 Yao Qi <yao.qi@linaro.org>
3374
3375 * tracepoint.c (max_jump_pad_size): Remove.
3376
a0cc84cd
YQ
33772015-09-18 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-aarch64-low.c: Don't include sys/uio.h.
3380 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3381
d78908cf
WW
33822015-09-16 Wei-cheng Wang <cole945@gmail.com>
3383
3384 * tracepoint.c (eval_result_type): Change prototype.
3385 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3386
d57e0d50
PA
33872015-09-15 Pedro Alves <palves@redhat.com>
3388
3389 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3390 Check whether to report exec events instead of checking whether
3391 multiprocess is enabled.
3392
5a676acc
PA
33932015-09-15 Pedro Alves <palves@redhat.com>
3394
3395 PR remote/18965
3396 * remote-utils.c (prepare_resume_reply): Merge
3397 TARGET_WAITKIND_VFORK_DONE switch case with the
3398 TARGET_WAITKIND_FORKED case.
3399
7c5d0fad
YQ
34002015-09-15 Yao Qi <yao.qi@linaro.org>
3401
3402 * server.c (handle_query): Check string comparison using
3403 "else if" instead of "if".
3404
750ce8d1
YQ
34052015-09-15 Yao Qi <yao.qi@linaro.org>
3406
3407 * server.c (vCont_supported): New global variable.
3408 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3409 matches. Append ";vContSupported+" to own_buf.
3410 (handle_v_requests): Append ";s;S" to own_buf if target supports
3411 hardware single step or vCont_supported is false.
3412 (capture_main): Set vCont_supported to zero.
3413
70b90b91
YQ
34142015-09-15 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3417 it to ...
3418 (linux_supports_hardware_single_step): ... New function.
3419 (linux_target_ops): Update.
3420 * lynx-low.c (lynx_target_ops): Set field
3421 supports_hardware_single_step to target_can_do_hardware_single_step.
3422 * nto-low.c (nto_target_ops): Likewise.
3423 * spu-low.c (spu_target_ops): Likewise.
3424 * win32-low.c (win32_target_ops): Likewise.
3425 * target.c (target_can_do_hardware_single_step): New function.
3426 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3427 Remove. <supports_hardware_single_step>: New field.
3428 (target_supports_conditional_breakpoints): Remove.
3429 (target_supports_hardware_single_step): New macro.
3430 (target_can_do_hardware_single_step): Declare.
3431 * server.c (handle_query): Use target_supports_hardware_single_step
3432 instead of target_supports_conditional_breakpoints.
3433
ade90bde
YQ
34342015-09-15 Yao Qi <yao.qi@linaro.org>
3435
3436 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3437 function.
3438 (struct linux_target_ops the_low_target): Install
3439 aarch64_linux_siginfo_fixup.
3440
94585166
DB
34412015-09-11 Don Breazeal <donb@codesourcery.com>
3442 Luis Machado <lgustavo@codesourcery.com>
3443
3444 * linux-low.c (linux_mourn): Static declaration.
3445 (linux_arch_setup): Move in front of
3446 handle_extended_wait.
3447 (linux_arch_setup_thread): New function.
3448 (handle_extended_wait): Handle exec events. Call
3449 linux_arch_setup_thread. Make event_lwp argument a
3450 pointer-to-a-pointer.
3451 (check_zombie_leaders): Do not check stopped threads.
3452 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3453 (linux_low_filter_event): Add lwp and thread for exec'ing
3454 non-leader thread if leader thread has been deleted.
3455 Refactor code into linux_arch_setup_thread and call it.
3456 Pass child lwp pointer by reference to handle_extended_wait.
3457 (linux_wait_for_event_filtered): Update comment.
3458 (linux_wait_1): Prevent clobbering exec event status.
3459 (linux_supports_exec_events): New function.
3460 (linux_target_ops) <supports_exec_events>: Initialize new member.
3461 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3462 new member.
3463 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3464 * server.c (report_exec_events): New global variable.
3465 (handle_query): Handle qSupported query for exec-events feature.
3466 (captured_main): Initialize report_exec_events.
3467 * server.h (report_exec_events): Declare new global variable.
3468 * target.h (struct target_ops) <supports_exec_events>: New
3469 member.
3470 (target_supports_exec_events): New macro.
3471 * win32-low.c (win32_target_ops) <supports_exec_events>:
3472 Initialize new member.
3473
0568462b
MM
34742015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3475
3476 * linux-low.c (linux_low_enable_btrace): Remove.
3477 (linux_target_ops): Replace linux_low_enable_btrace with
3478 linux_enable_btrace.
3479
39edd165
YQ
34802015-09-03 Yao Qi <yao.qi@linaro.org>
3481
3482 * linux-aarch64-low.c (aarch64_insert_point): Call
3483 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3484 returns true.
3485
1db33b5a
UW
34862015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3487
3488 * linux-low.c (check_stopped_by_breakpoint): Use
3489 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3490
ab290430
PA
34912015-08-27 Pedro Alves <palves@redhat.com>
3492
3493 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3494
8d749320
SM
34952015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3496
6711b7f8
SM
3497 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3498 the XNEW-family equivalent.
8d749320
SM
3499 (compile_bytecodes): Likewise.
3500 * dll.c (loaded_dll): Likewise.
3501 * event-loop.c (append_callback_event): Likewise.
3502 (create_file_handler): Likewise.
3503 (create_file_event): Likewise.
3504 * hostio.c (handle_open): Likewise.
3505 * inferiors.c (add_thread): Likewise.
3506 (add_process): Likewise.
3507 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3508 * linux-arm-low.c (arm_new_process): Likewise.
3509 (arm_new_thread): Likewise.
3510 * linux-low.c (add_to_pid_list): Likewise.
3511 (linux_add_process): Likewise.
3512 (handle_extended_wait): Likewise.
3513 (add_lwp): Likewise.
3514 (enqueue_one_deferred_signal): Likewise.
3515 (enqueue_pending_signal): Likewise.
3516 (linux_resume_one_lwp_throw): Likewise.
3517 (linux_resume_one_thread): Likewise.
3518 (linux_read_memory): Likewise.
3519 (linux_write_memory): Likewise.
3520 * linux-mips-low.c (mips_linux_new_process): Likewise.
3521 (mips_linux_new_thread): Likewise.
3522 (mips_add_watchpoint): Likewise.
3523 * linux-x86-low.c (initialize_low_arch): Likewise.
3524 * lynx-low.c (lynx_add_process): Likewise.
3525 * mem-break.c (set_raw_breakpoint_at): Likewise.
3526 (set_breakpoint): Likewise.
3527 (add_condition_to_breakpoint): Likewise.
3528 (add_commands_to_breakpoint): Likewise.
3529 (clone_agent_expr): Likewise.
3530 (clone_one_breakpoint): Likewise.
3531 * regcache.c (new_register_cache): Likewise.
3532 * remote-utils.c (look_up_one_symbol): Likewise.
3533 * server.c (queue_stop_reply): Likewise.
3534 (start_inferior): Likewise.
3535 (queue_stop_reply_callback): Likewise.
3536 (handle_target_event): Likewise.
3537 * spu-low.c (fetch_ppc_memory): Likewise.
3538 (store_ppc_memory): Likewise.
3539 * target.c (set_target_ops): Likewise.
3540 * thread-db.c (thread_db_load_search): Likewise.
3541 (try_thread_db_load_1): Likewise.
3542 * tracepoint.c (add_tracepoint): Likewise.
3543 (add_tracepoint_action): Likewise.
3544 (create_trace_state_variable): Likewise.
3545 (cmd_qtdpsrc): Likewise.
3546 (cmd_qtro): Likewise.
3547 (add_while_stepping_state): Likewise.
3548 * win32-low.c (child_add_thread): Likewise.
3549 (get_image_name): Likewise.
3550
ed8b7b42
YQ
35512015-08-25 Yao Qi <yao.qi@linaro.org>
3552
3553 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3554
db3cb7cb
YQ
35552015-08-25 Yao Qi <yao.qi@linaro.org>
3556
3557 * Makefile.in (aarch64-linux.o): New rule.
3558 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3559 srv_tgtobj.
3560 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3561 (aarch64_init_debug_reg_state): Make it extern.
3562 (aarch64_linux_prepare_to_resume): Remove.
3563
f6011a1c
YQ
35642015-08-25 Yao Qi <yao.qi@linaro.org>
3565
3566 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3567 lwp_arch_private_info and ptid_of_lwp.
3568
88e2cf7e
YQ
35692015-08-25 Yao Qi <yao.qi@linaro.org>
3570
3571 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3572 Find proc_info by find_process_pid. All callers updated.
3573
5e35436e
YQ
35742015-08-25 Yao Qi <yao.qi@linaro.org>
3575
3576 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3577 Remove.
3578 (debug_reg_change_callback): Remove.
3579 (aarch64_notify_debug_reg_change): Remove.
3580
4a8a7965
YQ
35812015-08-25 Yao Qi <yao.qi@linaro.org>
3582
3583 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3584 Call current_lwp_ptid.
3585
32a271ee
YQ
35862015-08-25 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-aarch64-low.c (debug_reg_change_callback): Use
3589 debug_printf.
3590
0d51c8d7
YQ
35912015-08-25 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3594
31a43dd5
YQ
35952015-08-25 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3598
8ee52567
YQ
35992015-08-25 Yao Qi <yao.qi@linaro.org>
3600
3601 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3602 the code.
3603
ff3f0f45
YQ
36042015-08-25 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3607 Remove.
3608 (debug_reg_change_callback): Remove argument entry and add argument
3609 lwp. Remove local variable thread. Don't print thread id in the
3610 debugging output. Don't check whether pid of thread equals to pid.
3611 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3612 iterate_over_lwps instead find_inferior.
3613
3d40fbb5
PA
36142015-08-24 Pedro Alves <palves@redhat.com>
3615
3616 * inferiors.c (get_first_process): New function.
3617 * inferiors.h (get_first_process): New declaration.
3618 * remote-utils.c (read_ptid): Default to the first process in the
3619 list, instead of to the current thread's process.
3620
438e1e42
PA
36212015-08-24 Pedro Alves <palves@redhat.com>
3622
3623 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3624 * event-loop.c: Likewise.
3625 * remote-utils.c: Likewise.
3626 * tracepoint.c: Likewise.
3627
a8c6d4fc
PA
36282015-08-24 Pedro Alves <palves@redhat.com>
3629
3630 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3631 ptid_get_lwp.
3632
99b0bb12
PA
36332015-08-21 Pedro Alves <palves@redhat.com>
3634
3635 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3636 instead of literal 1.
3637
f8904751
PA
36382015-08-21 Pedro Alves <palves@redhat.com>
3639
3640 * tdesc.c (default_description): Explicitly zero-initialize.
3641
465a859e
PA
36422015-08-21 Pedro Alves <palves@redhat.com>
3643
3644 PR gdb/18749
3645 * inferiors.c (remove_thread): Discard any pending stop reply for
3646 this thread.
3647 * server.c (remove_all_on_match_pid): Rename to ...
3648 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3649 instead of a pid.
3650 (discard_queued_stop_replies): Change parameter to a ptid. Now
3651 extern.
3652 (handle_v_kill, kill_inferior_callback, captured_main)
3653 (process_serial_event): Adjust.
3654 * server.h (discard_queued_stop_replies): Declare.
3655
f0db101d
PA
36562015-08-21 Pedro Alves <palves@redhat.com>
3657
3658 * linux-low.c (wait_for_sigstop): Always switch to no thread
3659 selected if the previously current thread dies.
3660 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3661 process instead of the current thread's.
3662 * remote-utils.c (input_interrupt): Don't check if there's no
3663 current thread.
3664 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3665 current thread to the general thread fails, error out.
3666 (handle_qxfer_auxv, handle_qxfer_libraries)
3667 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3668 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3669 (handle_query): Check if there's a thread selected instead of
3670 checking whether there's any thread in the thread list.
3671 (handle_qxfer_threads, handle_qxfer_btrace)
3672 (handle_qxfer_btrace_conf): Don't error out early if there's no
3673 thread in the thread list.
3674 (handle_v_cont, myresume): Don't set the current thread to the
3675 continue thread.
3676 (process_serial_event) <Hg handling>: Also set thread_id if the
3677 previous general thread is still alive.
3678 (process_serial_event) <g/G handling>: If setting the current
3679 thread to the general thread fails, error out.
3680 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3681 thread's lwp instead of the current thread's.
3682 * target.c (set_desired_thread): If the desired thread was not
3683 found, leave the current thread pointing to NULL. Return an int
3684 (boolean) indicating success.
3685 * target.h (set_desired_thread): Change return type to int.
3686
40045d91
MF
36872015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3688
3689 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3690 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3691 #includes.
3692 (ps_get_thread_area): New function.
3693
45face3b
GB
36942015-08-19 Gary Benson <gbenson@redhat.com>
3695
3696 * hostio.c (handle_pread): Do not attempt to read more data
3697 than hostio_reply_with_data can fit in a packet.
3698
16d5f642
JB
36992015-08-18 Joel Brobecker <brobecker@adacore.com>
3700
3701 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3702
a738da3a
MF
37032015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3704
3705 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3706
33ebda9d
PA
37072015-08-06 Pedro Alves <palves@redhat.com>
3708
3709 * tracepoint.c (expr_eval_result): Now an int.
3710
a44892be
PA
37112015-08-06 Pedro Alves <palves@redhat.com>
3712
3713 * gdbthread.h (struct regcache): Forward declare.
3714 (struct thread_info) <regcache_data>: Now a struct regcache
3715 pointer.
3716 * inferiors.c (inferior_regcache_data)
3717 (set_inferior_regcache_data): Now work with struct regcache
3718 pointers.
3719 * inferiors.h (struct regcache): Forward declare.
3720 (inferior_regcache_data, set_inferior_regcache_data): Now work
3721 with struct regcache pointers.
3722 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3723 (free_register_cache_thread): Remove struct regcache pointer
3724 casts.
3725
608a1e46
PA
37262015-08-06 Pedro Alves <palves@redhat.com>
3727
3728 * server.c (captured_main): On error, print the exception message
3729 to stderr, and if run_once is set, throw a quit.
3730
f0ce0d3a
PA
37312015-08-06 Pedro Alves <palves@redhat.com>
3732
3733 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3734 the current thread.
3735
bf47e248
PA
37362015-08-06 Pedro Alves <palves@redhat.com>
3737
3738 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3739 reading beyond the passed in buffer length.
3740
b6b9ffcc
PL
37412015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3742
3743 * tracepoint.c (symbol_list) <required>: Remove.
3744
863d01bd
PA
37452015-08-06 Pedro Alves <palves@redhat.com>
3746
3747 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3748 count if stopping and suspending threads.
3749 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3750 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3751 (linux_detach): Complete an ongoing step-over.
3752 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3753 throughout.
3754 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3755 (linux_wait_1): If passing a signal to the inferior after
3756 finishing a step-over, unsuspend and re-resume all lwps. If we
3757 see a single-step event but the thread should be continuing, don't
3758 pass the trap to gdb.
3759 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3760 internal_error instead of gdb_assert.
3761 (enqueue_pending_signal): New function.
3762 (check_ptrace_stopped_lwp_gone): Add debug output.
3763 (start_step_over): Use internal_error instead of gdb_assert.
3764 (complete_ongoing_step_over): New function.
3765 (linux_resume_one_thread): Don't resume a suspended thread.
3766 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3767 it stepping.
3768
00db26fa
PA
37692015-08-06 Pedro Alves <palves@redhat.com>
3770
3771 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3772 (linux_thread_alive): Use lwp_is_marked_dead.
3773 (extended_event_reported): Delete.
3774 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3775 instead of extended_event_reported.
3776 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3777 as well.
3778 (lwp_is_marked_dead): New function.
3779 (lwp_running): Use lwp_is_marked_dead.
3780 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3781 comment.
3782
ad071a30
PA
37832015-08-06 Pedro Alves <palves@redhat.com>
3784
3785 * linux-low.c (linux_wait_1): Move fork event output out of the
3786 !report_to_gdb check. Pass event_child->waitstatus to
3787 target_waitstatus_to_string instead of ourstatus.
3788
524b57e6
YQ
37892015-08-04 Yao Qi <yao.qi@linaro.org>
3790
3791 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3792 if current_thread is 32 bit.
3793
6085d6f6
YQ
37942015-08-04 Yao Qi <yao.qi@linaro.org>
3795
3796 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3797 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3798 * server.c (extended_protocol): Remove "static".
3799 * server.h (extended_protocol): Declare it.
3800
8a7e4587
YQ
38012015-08-04 Yao Qi <yao.qi@linaro.org>
3802
3803 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3804 both aarch64 and aarch32.
3805 (aarch64_set_pc): Likewise.
3806
3b53ae99
YQ
38072015-08-04 Yao Qi <yao.qi@linaro.org>
3808
3809 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3810 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3811 arm-with-neon.xml to srv_xmlfiles.
3812 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3813 (is_64bit_tdesc): New function.
3814 (aarch64_linux_read_description): New function.
3815 (aarch64_arch_setup): Call aarch64_linux_read_description.
3816 (regs_info): Rename to regs_info_aarch64.
3817 (aarch64_regs_info): Return right regs_info.
3818 (initialize_low_arch): Call initialize_low_arch_aarch32.
3819
bd9e6534
YQ
38202015-08-04 Yao Qi <yao.qi@linaro.org>
3821
3822 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3823 * linux-aarch32-low.c: New file.
3824 * linux-aarch32-low.h: New file.
3825 * linux-arm-low.c (arm_fill_gregset): Move it to
3826 linux-aarch32-low.c.
3827 (arm_store_gregset): Likewise.
3828 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3829 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3830 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3831 (regs_info): Rename to regs_info_arm.
3832 (arm_regs_info): Return regs_info_aarch32 if
3833 have_ptrace_getregset is 1 and target description is
3834 arm_with_neon or arm_with_vfpv3.
3835 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3836 Call initialize_low_arch_aarch32 instead.
3837
ded48a5e
YQ
38382015-08-04 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3841 * linux-low.c: ... here.
3842 * linux-low.h (have_ptrace_getregset): Declare it.
3843
96e9210f
PA
38442015-08-04 Pedro Alves <palves@redhat.com>
3845
3846 * thread-db.c (struct thread_db): Use new typedefs.
3847 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3848 CHK calls.
3849 (disable_thread_event_reporting): Cast result of dlsym to
3850 destination function pointer type.
3851 (thread_db_mourn): Use td_ta_delete_ftype.
3852
af60a1ef
SL
38532015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3854
3855 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3856 arch variant.
3857 (CDX_BREAKPOINT): Define for R2.
3858 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3859 (the_low_target): Add comments.
3860
e8b41681
YQ
38612015-07-30 Yao Qi <yao.qi@linaro.org>
3862
3863 * linux-arm-low.c (arm_hwcap): Remove it.
3864 (arm_read_description): New local variable arm_hwcap. Don't
3865 set arm_hwcap to zero.
3866
89abb039
YQ
38672015-07-30 Yao Qi <yao.qi@linaro.org>
3868
3869 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3870 Use regcache->tdesc instead.
3871 (arm_store_wmmxregset): Likewise.
3872 (arm_fill_vfpregset): Likewise.
3873 (arm_store_vfpregset): Likewise.
3874
deca266c
YQ
38752015-07-30 Yao Qi <yao.qi@linaro.org>
3876
3877 * linux-arm-low.c: Include arch/arm.h.
3878 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3879 (arm_store_gregset): Likewise.
3880
aa58a496
SM
38812015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3882
3883 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3884 ptrace's 4th parameter.
3885
50904b25
YQ
38862015-07-27 Yao Qi <yao.qi@linaro.org>
3887
3888 * configure.srv (case aarch64*-*-linux*): Don't set
3889 srv_linux_usrregs.
3890
5826e159
PA
38912015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3892
3893 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3894 sys/ptrace.h.
3895 * linux-arm-low.c: Likewise.
3896 * linux-cris-low.c: Likewise.
3897 * linux-crisv32-low.c: Likewise.
3898 * linux-low.c: Likewise.
3899 * linux-m68k-low.c: Likewise.
3900 * linux-mips-low.c: Likewise.
3901 * linux-nios2-low.c: Likewise.
3902 * linux-s390-low.c: Likewise.
3903 * linux-sparc-low.c: Likewise.
3904 * linux-tic6x-low.c: Likewise.
3905 * linux-tile-low.c: Likewise.
3906 * linux-x86-low.c: Likewise.
3907
54019719
PA
39082015-07-24 Pedro Alves <palves@redhat.com>
3909
3910 * config.in: Regenerate.
3911 * configure: Regenerate.
3912
eb7aa561
PA
39132015-07-24 Pedro Alves <palves@redhat.com>
3914
3915 * acinclude.m4: Include ../ptrace.m4.
3916 * configure.ac: Call GDB_AC_PTRACE.
3917 * config.in, configure: Regenerate.
3918
55d7b841
YQ
39192015-07-24 Yao Qi <yao.qi@linaro.org>
3920
3921 * linux-low.c (linux_create_inferior): Remove setting to
3922 proc->priv->new_inferior.
3923 (linux_attach): Likewise.
3924 (linux_low_filter_event): Likewise.
3925 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3926
c06cbd92
YQ
39272015-07-24 Yao Qi <yao.qi@linaro.org>
3928
3929 * linux-low.c (linux_arch_setup): New function.
3930 (linux_low_filter_event): If proc->tdesc is NULL and
3931 proc->attached is true, call the_low_target.arch_setup.
3932 Otherwise, keep status pending, and return.
3933 (linux_resume_one_lwp_throw): Don't call get_pc if
3934 thread->while_stepping isn't NULL. Don't call
3935 get_thread_regcache if proc->tdesc is NULL.
3936 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3937 (linux_target_ops): Install arch_setup.
3938 * server.c (start_inferior): Call the_target->arch_setup.
3939 * target.h (struct target_ops) <arch_setup>: New field.
3940 (target_arch_setup): New marco.
3941 * lynx-low.c (lynx_target_ops): Update.
3942 * nto-low.c (nto_target_ops): Update.
3943 * spu-low.c (spu_target_ops): Update.
3944 * win32-low.c (win32_target_ops): Update.
3945
5ae3ebba
YQ
39462015-07-24 Yao Qi <yao.qi@linaro.org>
3947
3948 * linux-low.c (linux_add_process): Don't set
3949 proc->priv->new_inferior.
3950 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3951 (linux_attach): Likewise.
3952
eb97750b
YQ
39532015-07-24 Yao Qi <yao.qi@linaro.org>
3954
3955 * server.c (start_inferior): Code refactor.
3956
51aee833
YQ
39572015-07-24 Yao Qi <yao.qi@linaro.org>
3958
3959 * server.c (process_serial_event): Set general_thread.
3960
af1b22f3
YQ
39612015-07-21 Yao Qi <yao.qi@linaro.org>
3962
3963 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3964 aarch64_linux_get_debug_reg_capacity.
3965
554717a3
YQ
39662015-07-17 Yao Qi <yao.qi@linaro.org>
3967
3968 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3969 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3970 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3971 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3972 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3973 (AARCH64_HWP_ALIGNMENT): Likewise.
3974 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3975 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3976 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3977 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3978 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3979 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3980 (struct aarch64_debug_reg_state): Likewise.
3981 (struct arch_lwp_info): Likewise.
3982 (aarch64_align_watchpoint): Likewise.
3983 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3984 (aarch64_watchpoint_length): Likewise.
3985 (aarch64_point_encode_ctrl_reg): Likewise
3986 (aarch64_point_is_aligned): Likewise.
3987 (aarch64_align_watchpoint): Likewise.
3988 (aarch64_linux_set_debug_regs):
3989 (aarch64_dr_state_insert_one_point): Likewise.
3990 (aarch64_dr_state_remove_one_point): Likewise.
3991 (aarch64_handle_breakpoint): Likewise.
3992 (aarch64_handle_aligned_watchpoint): Likewise.
3993 (aarch64_handle_unaligned_watchpoint): Likewise.
3994 (aarch64_handle_watchpoint): Likewise.
3995
c67ca4de
YQ
39962015-07-17 Yao Qi <yao.qi@linaro.org>
3997
3998 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3999 and don't aarch64_get_debug_reg_state. All callers update.
4000 (aarch64_handle_aligned_watchpoint): Likewise.
4001 (aarch64_handle_unaligned_watchpoint): Likewise.
4002 (aarch64_handle_watchpoint): Likewise.
4003 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4004 (aarch64_remove_point): Likewise.
4005
25abf979
YQ
40062015-07-17 Yao Qi <yao.qi@linaro.org>
4007
4008 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4009 debug_printf.
4010 (aarch64_handle_unaligned_watchpoint): Likewise.
4011
db1ff28b
JK
40122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4013
4014 Revert the previous 3 commits:
4015 Move gdb_regex* to common/
4016 Move linux_find_memory_regions_full & co.
4017 gdbserver build-id attribute generator
4018
700ca40f
JK
40192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4020 Jan Kratochvil <jan.kratochvil@redhat.com>
4021
4022 gdbserver build-id attribute generator.
4023 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4024 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4025 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4026 (find_phdr): New.
4027 (get_dynamic): Use find_pdhr to traverse program headers.
4028 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4029 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4030 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4031 (get_hex_build_id): New.
4032 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4033 to reply XML document.
4034
9904185c
JK
40352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4036 Jan Kratochvil <jan.kratochvil@redhat.com>
4037
4038 * target.c: Include target/target-utils.h and fcntl.h.
4039 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4040 (target_fileio_read_stralloc): New functions.
4041
6e5b4429
JK
40422015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4043
4044 * Makefile.in (OBS): Add gdb_regex.o.
4045 (gdb_regex.o): New.
4046 * config.in: Rebuilt.
4047 * configure: Rebuilt.
4048
ddc98fbf
JK
40492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4050 Jan Kratochvil <jan.kratochvil@redhat.com>
4051
4052 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4053 * Makefile.in (OBS): Add target-utils.o.
4054 (linux-maps.o, target-utils.o): New.
4055 * configure.srv (srv_linux_obj): Add linux-maps.o.
4056
e57bb7a0
PL
40572015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4058
4059 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4060 function, return 1.
4061 (the_low_target): Install it.
4062
586b02a9
PA
40632015-07-14 Pedro Alves <palves@redhat.com>
4064
4065 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4066 Instead, ignore ECHILD, and throw an error for other errnos.
4067
58c1b36c
PA
40682015-07-10 Pedro Alves <palves@redhat.com>
4069
4070 * event-loop.c (struct callback_event) <data>: Change type to
4071 gdb_client_data instance instead of gdb_client_data pointer.
4072 (append_callback_event): Adjust.
4073
421530db
PL
40742015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4075
4076 * linux-aarch64-low.c: Add comments for each linux_target_ops
4077 method. Remove comments already covered in target_ops and
4078 linux_target_ops definitions.
4079 (the_low_target): Add comments for each unimplemented method.
4080
c2d65f38
YQ
40812015-07-09 Yao Qi <yao.qi@linaro.org>
4082
4083 * linux-aarch64-low.c (aarch64_regmap): Remove.
4084 (aarch64_usrregs_info): Remove.
4085 (regs_info): Set field usrregs to NULL.
4086
b20a6524
MM
40872015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4088
4089 * linux-low.c: Include "rsp-low.h"
4090 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4091 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4092 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4093 (handle_btrace_enable_pt): New.
4094 (handle_btrace_general_set): Support "pt".
4095 (handle_btrace_conf_general_set): Support "pt:size".
4096
96c97461
PL
40972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4098
4099 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4100 Z_PACKET_SW_BP.
4101
37d66942
PL
41022015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4103
4104 * linux-aarch64-low.c: Remove comment about endianness.
4105 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4106 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4107 memcmp.
4108
dc06243f
GB
41092015-06-24 Gary Benson <gbenson@redhat.com>
4110
4111 * linux-i386-ipa.c (stdint.h): Do not include.
4112 * lynx-i386-low.c (stdint.h): Likewise.
4113 * lynx-ppc-low.c (stdint.h): Likewise.
4114 * mem-break.c (stdint.h): Likewise.
4115 * thread-db.c (stdint.h): Likewise.
4116 * tracepoint.c (stdint.h): Likewise.
4117 * win32-low.c (stdint.h): Likewise.
4118
124e13d9
SM
41192015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4120
4121 * server.c (write_qxfer_response): Update call to
4122 remote_escape_output.
4123
909c2cda
JK
41242015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4125 Jan Kratochvil <jan.kratochvil@redhat.com>
4126
4127 Merge multiple hex conversions.
4128 * gdbreplay.c (tohex): Rename to 'fromhex'.
4129 (logchar): Use fromhex.
4130
24c05f46
JK
41312015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4132
4133 * server.c (handle_qxfer_libraries): Set `version' attribute for
4134 <library-list>.
4135
14d2069a
GB
41362015-06-10 Gary Benson <gbenson@redhat.com>
4137
4138 * target.h (struct target_ops) <multifs_open>: New field.
4139 <multifs_unlink>: Likewise.
4140 <multifs_readlink>: Likewise.
4141 * linux-low.c (nat/linux-namespaces.h): New include.
4142 (linux_target_ops): Initialize the_target->multifs_open,
4143 the_target->multifs_unlink and the_target->multifs_readlink.
4144 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4145 * hostio.c (hostio_fs_pid): New static variable.
4146 (hostio_handle_new_gdb_connection): New function.
4147 (handle_setfs): Likewise.
4148 (handle_open): Use the_target->multifs_open as appropriate.
4149 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4150 (handle_readlink): Use the_target->multifs_readlink as
4151 appropriate.
4152 (handle_vFile): Handle vFile:setfs packets.
4153 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4154 after target_handle_new_gdb_connection.
4155
4b8b5e72
GB
41562015-06-10 Gary Benson <gbenson@redhat.com>
4157
4158 * configure.ac (AC_CHECK_FUNCS): Add setns.
4159 * config.in: Regenerate.
4160 * configure: Likewise.
4161 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4162 (linux-namespaces.o): New rule.
4163 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4164
3ac2e371
GB
41652015-06-09 Gary Benson <gbenson@redhat.com>
4166
4167 * hostio.c (handle_open): Process mode argument with
4168 fileio_to_host_mode.
4169
ca9b78ce
YQ
41702015-06-01 Yao Qi <yao.qi@linaro.org>
4171
4172 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4173 * linux-x86-low.c: Likewise.
4174
bfacd19d
DB
41752015-05-28 Don Breazeal <donb@codesourcery.com>
4176
4177 * linux-low.c (handle_extended_wait): Initialize
4178 thread_info.last_resume_kind for new fork children.
4179
452003ef
PA
41802015-05-15 Pedro Alves <palves@redhat.com>
4181
4182 * target.h (target_handle_new_gdb_connection): Rewrite using if
4183 wrapped in do/while.
4184
1041a03c
JB
41852015-05-14 Joel Brobecker <brobecker@adacore.com>
4186
4187 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4188 * configure, config.in: Regenerate.
4189 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4190 Declare typedef.
4191
c269dbdb
DB
41922015-05-12 Don Breazeal <donb@codesourcery.com>
4193
4194 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4195 PTRACE_EVENT_VFORK_DONE.
4196 (linux_low_ptrace_options, extended_event_reported): Add vfork
4197 events.
4198 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4199 and "vforkdone" for RSP 'T' Stop Reply Packet.
4200 * server.h (report_vfork_events): Declare
4201 global variable.
4202
3a8a0396
DB
42032015-05-12 Don Breazeal <donb@codesourcery.com>
4204
4205 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4206 (the_low_target) <new_fork>: Initialize new member.
4207 * linux-arm-low.c (arm_new_fork): New function.
4208 (the_low_target) <new_fork>: Initialize new member.
4209 * linux-low.c (handle_extended_wait): Call new target function
4210 new_fork.
4211 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4212 * linux-mips-low.c (mips_add_watchpoint): New function
4213 extracted from mips_insert_point.
4214 (the_low_target) <new_fork>: Initialize new member.
4215 (mips_linux_new_fork): New function.
4216 (mips_insert_point): Call mips_add_watchpoint.
4217 * linux-x86-low.c (x86_linux_new_fork): New function.
4218 (the_low_target) <new_fork>: Initialize new member.
4219
de0d863e
DB
42202015-05-12 Don Breazeal <donb@codesourcery.com>
4221
4222 * linux-low.c (handle_extended_wait): Implement return value,
4223 rename argument 'event_child' to 'event_lwp', handle
4224 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4225 (linux_low_ptrace_options): New function.
4226 (linux_low_filter_event): Call linux_low_ptrace_options,
4227 use different argument fo linux_enable_event_reporting,
4228 use return value from handle_extended_wait.
4229 (extended_event_reported): New function.
4230 (linux_wait_1): Call extended_event_reported and set
4231 status to report fork events.
4232 (linux_write_memory): Add pid to debug message.
4233 (reset_lwp_ptrace_options_callback): New function.
4234 (linux_handle_new_gdb_connection): New function.
4235 (linux_target_ops): Initialize new structure member.
4236 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4237 * lynx-low.c: Initialize new structure member.
4238 * remote-utils.c (prepare_resume_reply): Implement stop reason
4239 "fork" for "T" stop message.
4240 * server.c (handle_query): Call handle_new_gdb_connection.
4241 * server.h (report_fork_events): Declare global flag.
4242 * target.h (struct target_ops) <handle_new_gdb_connection>:
4243 New member.
4244 (target_handle_new_gdb_connection): New macro.
4245 * win32-low.c: Initialize new structure member.
4246
ddcbc397
DB
42472015-05-12 Don Breazeal <donb@codesourcery.com>
4248
4249 * mem-break.c (APPEND_TO_LIST): Define macro.
4250 (clone_agent_expr): New function.
4251 (clone_one_breakpoint): New function.
4252 (clone_all_breakpoints): New function.
4253 * mem-break.h: Declare new functions.
4254
89245bc0
DB
42552015-05-12 Don Breazeal <donb@codesourcery.com>
4256
4257 * linux-low.c (linux_supports_fork_events): New function.
4258 (linux_supports_vfork_events): New function.
4259 (linux_target_ops): Initialize new structure members.
4260 (initialize_low): Call linux_check_ptrace_features.
4261 * lynx-low.c (lynx_target_ops): Initialize new structure
4262 members.
4263 * server.c (report_fork_events, report_vfork_events):
4264 New global flags.
4265 (handle_query): Add new features to qSupported packet and
4266 response.
4267 (captured_main): Initialize new global variables.
4268 * target.h (struct target_ops) <supports_fork_events>:
4269 New member.
4270 <supports_vfork_events>: New member.
4271 (target_supports_fork_events): New macro.
4272 (target_supports_vfork_events): New macro.
4273 * win32-low.c (win32_target_ops): Initialize new structure
4274 members.
4275
835205d0
GB
42762015-05-12 Gary Benson <gbenson@redhat.com>
4277
4278 * server.c (handle_qxfer_exec_file): Use current process
4279 if annex is empty.
4280
21e94bd9
SL
42812015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4282
4283 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4284 Remove HAVE_PTRACE_GETREGS conditionals.
4285 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4286 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4287
45614f15
YQ
42882015-05-08 Yao Qi <yao.qi@linaro.org>
4289
4290 * linux-low.c (linux_supports_conditional_breakpoints): New
4291 function.
4292 (linux_target_ops): Install new target method.
4293 * lynx-low.c (lynx_target_ops): Install NULL hook for
4294 supports_conditional_breakpoints.
4295 * nto-low.c (nto_target_ops): Likewise.
4296 * spu-low.c (spu_target_ops): Likewise.
4297 * win32-low.c (win32_target_ops): Likewise.
4298 * server.c (handle_query): Check
4299 target_supports_conditional_breakpoints.
4300 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4301 New field.
4302 (target_supports_conditional_breakpoints): New macro.
4303
80ad801e
PA
43042015-05-06 Pedro Alves <palves@redhat.com>
4305
4306 PR server/18081
4307 * server.c (start_inferior): If the process exits, mourn it.
4308
819843c7
GB
43092015-04-21 Gary Benson <gbenson@redhat.com>
4310
4311 * hostio.c (fileio_open_flags_to_host): Factored out to
4312 fileio_to_host_openflags in common/fileio.c. Single use
4313 updated.
4314
a2d5a9d7
MF
43152015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4316
4317 * linux-xtensa-low.c (xtensa_fill_gregset)
4318 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4319 XCHAL_HAVE_LOOP.
4320
deb44829
MF
43212015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4322
4323 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4324 (regs_info): Replace usrregs pointer with NULL.
4325
e57f1de3
GB
43262015-04-17 Gary Benson <gbenson@redhat.com>
4327
4328 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4329 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4330 * server.c (handle_qxfer_exec_file): New function.
4331 (qxfer_packets): Add exec-file entry.
4332 (handle_query): Report qXfer:exec-file:read as supported packet.
4333
62828379
RN
43342015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4335
4336 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4337
b88bb450
GB
43382015-04-09 Gary Benson <gbenson@redhat.com>
4339
4340 * hostio-errno.c (errno_to_fileio_error): Remove function.
4341 Update caller to use remote_fileio_to_fio_error.
4342
c8f4bfdd
YQ
43432015-04-09 Yao Qi <yao.qi@linaro.org>
4344
4345 * linux-low.c (linux_insert_point): Call
4346 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4347 (linux_remove_point): Call remove_memory_breakpoint if type is
4348 raw_bkpt_type_sw.
4349 * linux-x86-low.c (x86_insert_point): Don't call
4350 insert_memory_breakpoint.
4351 (x86_remove_point): Don't call remove_memory_breakpoint.
4352
41f98f02
PA
43532015-04-01 Pedro Alves <palves@redhat.com>
4354 Cleber Rosa <crosa@redhat.com>
4355
4356 * server.c (gdbserver_usage): Reorganize and extend the usage
4357 message.
4358
2bf6fb9d
PA
43592015-03-24 Pedro Alves <palves@redhat.com>
4360
4361 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4362 output. Also dump TRAP_TRACE.
4363 (linux_low_filter_event): In debug output, distinguish a
4364 resume_stop SIGSTOP from a delayed SIGSTOP.
4365
369f6daa
GB
43662015-03-24 Gary Benson <gbenson@redhat.com>
4367
4368 * linux-x86-low.c (x86_linux_new_thread): Moved to
4369 nat/x86-linux.c.
4370 (x86_linux_prepare_to_resume): Likewise.
4371
8e5d4070
GB
43722015-03-24 Gary Benson <gbenson@redhat.com>
4373
4374 * Makefile.in (x86-linux-dregs.o): New rule.
4375 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4376 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4377 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4378 (x86_linux_dr_get): Likewise.
4379 (x86_linux_dr_set): Likewise.
4380 (update_debug_registers_callback): Likewise.
4381 (x86_linux_dr_set_addr): Likewise.
4382 (x86_linux_dr_get_addr): Likewise.
4383 (x86_linux_dr_set_control): Likewise.
4384 (x86_linux_dr_get_control): Likewise.
4385 (x86_linux_dr_get_status): Likewise.
4386 (x86_linux_update_debug_registers): Likewise.
4387
2b95d440
GB
43882015-03-24 Gary Benson <gbenson@redhat.com>
4389
4390 * linux-x86-low.c (x86_linux_update_debug_registers):
4391 New function, factored out from...
4392 (x86_linux_prepare_to_resume): ...this.
4393
14b0bc68
GB
43942015-03-24 Gary Benson <gbenson@redhat.com>
4395
4396 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4397 (x86_linux_dr_set): Likewise.
4398 (update_debug_registers_callback): Likewise.
4399 (x86_linux_dr_set_addr): Likewise.
4400 (x86_linux_dr_get_addr): Likewise.
4401 (x86_linux_dr_set_control): Likewise.
4402 (x86_linux_dr_get_control): Likewise.
4403 (x86_linux_dr_get_status): Likewise.
4404 (x86_linux_prepare_to_resume): Likewise.
4405
5dfe6ca8
GB
44062015-03-24 Gary Benson <gbenson@redhat.com>
4407
4408 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4409 Use perror_with_name. Pass string through gettext.
4410 (x86_linux_dr_set): Likewise.
4411
d33472ad
GB
44122015-03-24 Gary Benson <gbenson@redhat.com>
4413
4414 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4415 (x86_linux_dr_set_addr): ...this.
4416 (x86_dr_low_get_addr): Rename to...
4417 (x86_linux_dr_get_addr): ...this.
4418 (x86_dr_low_set_control): Rename to...
4419 (x86_linux_dr_set_control): ...this.
4420 (x86_dr_low_get_control): Rename to...
4421 (x86_linux_dr_get_control): ...this.
4422 (x86_dr_low_get_status): Rename to...
4423 (x86_linux_dr_get_status): ...this.
4424 (x86_dr_low): Update with new function names.
4425
4b134ca1
GB
44262015-03-24 Gary Benson <gbenson@redhat.com>
4427
4428 * Makefile.in (x86-linux.o): New rule.
4429 * configure.srv: Add x86-linux.o to relevant targets.
4430 * linux-low.c (lwp_set_arch_private_info): New function.
4431 (lwp_arch_private_info): Likewise.
4432 * linux-x86-low.c: Include nat/x86-linux.h.
4433 (arch_lwp_info): Removed structure.
4434 (update_debug_registers_callback):
4435 Use lwp_set_debug_registers_changed.
4436 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4437 and lwp_set_debug_registers_changed.
4438 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4439
34c703da
GB
44402015-03-24 Gary Benson <gbenson@redhat.com>
4441
4442 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4443 * linux-arm-low.c (arm_new_thread): Likewise.
4444 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4445 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4446 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4447 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4448
cff068da
GB
44492015-03-24 Gary Benson <gbenson@redhat.com>
4450
4451 * linux-low.c (ptid_of_lwp): New function.
4452 (lwp_is_stopped): Likewise.
4453 (lwp_stop_reason): Likewise.
4454 * linux-x86-low.c (update_debug_registers_callback):
4455 Use lwp_is_stopped.
4456 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4457 lwp_stop_reason.
4458
b2f7c7e8
GB
44592015-03-24 Gary Benson <gbenson@redhat.com>
4460
4461 * linux-low.h (linux_stop_lwp): Remove declaration.
4462
6d4ee8c6
GB
44632015-03-24 Gary Benson <gbenson@redhat.com>
4464
4465 * linux-low.h: Include nat/linux-nat.h.
4466 * linux-low.c (iterate_over_lwps_args): New structure.
4467 (iterate_over_lwps_filter): New function.
4468 (iterate_over_lwps): Likewise.
4469 * linux-x86-low.c (update_debug_registers_callback):
4470 Update signature to what iterate_over_lwps expects.
4471 Remove PID check that iterate_over_lwps now performs.
4472 (x86_dr_low_set_addr): Use iterate_over_lwps.
4473 (x86_dr_low_set_control): Likewise.
4474
70a0bb6b
GB
44752015-03-24 Gary Benson <gbenson@redhat.com>
4476
4477 * linux-x86-low.c (x86_debug_reg_state): New function.
4478 (x86_linux_prepare_to_resume): Use the above.
4479
7b669087
GB
44802015-03-24 Gary Benson <gbenson@redhat.com>
4481
4482 * linux-low.c (current_lwp_ptid): New function.
4483 * linux-x86-low.c: Include nat/linux-nat.h.
4484 (x86_dr_low_get_addr): Use current_lwp_ptid.
4485 (x86_dr_low_get_control): Likewise.
4486 (x86_dr_low_get_status): Likewise.
4487
eef49a3d
PA
44882015-03-20 Pedro Alves <palves@redhat.com>
4489
4490 * tracepoint.c (cmd_qtstatus): Make "str" const.
4491
b2333d22
PA
44922015-03-20 Pedro Alves <palves@redhat.com>
4493
4494 * server.c (handle_general_set): Make "req_str" const.
4495
23f238d3
PA
44962015-03-19 Pedro Alves <palves@redhat.com>
4497
4498 * linux-low.c (linux_resume_one_lwp): Rename to ...
4499 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4500 instead call perror_with_name.
4501 (check_ptrace_stopped_lwp_gone): New function.
4502 (linux_resume_one_lwp): Reimplement as wrapper around
4503 linux_resume_one_lwp_throw that swallows errors if the LWP is
4504 gone.
4505
91baf43f
PA
45062015-03-19 Pedro Alves <palves@redhat.com>
4507
4508 * linux-low.c (count_events_callback, select_event_lwp_callback):
4509 No longer check whether the thread has resume_stop as last resume
4510 kind.
4511
8bf3b159
PA
45122015-03-19 Pedro Alves <palves@redhat.com>
4513
4514 * linux-low.c (count_events_callback, select_event_lwp_callback):
4515 Use the lwp's status_pending_p field, not the thread's.
4516
b90fc188
PA
45172015-03-19 Pedro Alves <palves@redhat.com>
4518
4519 * linux-low.c (select_event_lwp_callback): Update comments to
4520 no longer mention SIGTRAP.
4521
464b0089
GB
45222015-03-18 Gary Benson <gbenson@redhat.com>
4523
4524 * server.c (handle_query): Do not report vFile:fstat as supported.
4525
aa9e327f
GB
45262015-03-11 Gary Benson <gbenson@redhat.com>
4527
4528 * hostio.c (sys/types.h): New include.
4529 (sys/stat.h): Likewise.
4530 (common-remote-fileio.h): Likewise.
4531 (handle_fstat): New function.
4532 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4533
791c0056
GB
45342015-03-11 Gary Benson <gbenson@redhat.com>
4535
4536 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4537 struct stat.st_blocks and struct stat.st_blksize.
4538 * configure: Regenerate.
4539 * config.in: Likewise.
4540 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4541 (OBS): Add common-remote-fileio.o.
4542 (common-remote-fileio.o): New rule.
4543
9a9df970
PA
45442015-03-09 Pedro Alves <palves@redhat.com>
4545
4546 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4547 'struct sockaddr' pointer in 'accept' call.
4548
9eb1356e
PA
45492015-03-09 Pedro Alves <palves@redhat.com>
4550
4551 Revert:
4552 2015-03-07 Pedro Alves <palves@redhat.com>
4553 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4554 or <winsock2.h> here. Instead include "gdb_socket.h".
4555 (remote_open): Use union gdb_sockaddr_u.
4556 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4557 or <winsock2.h> here. Instead include "gdb_socket.h".
4558 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4559 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4560 or <sys/un.h>.
4561 (init_named_socket, gdb_agent_helper_thread): Use union
4562 gdb_sockaddr_u.
4563
aac331e4
PA
45642015-03-07 Pedro Alves <palves@redhat.com>
4565
4566 * configure.ac (build_warnings): Move
4567 -Wdeclaration-after-statement to the C-specific set.
4568 * configure: Regenerate.
4569
366c75fc
PA
45702015-03-07 Pedro Alves <palves@redhat.com>
4571
4572 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4573 or <winsock2.h> here. Instead include "gdb_socket.h".
4574 (remote_open): Use union gdb_sockaddr_u.
4575 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4576 or <winsock2.h> here. Instead include "gdb_socket.h".
4577 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4578 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4579 or <sys/un.h>.
4580 (init_named_socket, gdb_agent_helper_thread): Use union
4581 gdb_sockaddr_u.
4582
492d29ea
PA
45832015-03-07 Pedro Alves <palves@redhat.com>
4584
4585 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4586 instead.
4587
60a191ed
YQ
45882015-03-06 Yao Qi <yao.qi@linaro.org>
4589
4590 * linux-aarch64-low.c (aarch64_insert_point): Use
4591 show_debug_regs as a boolean.
4592 (aarch64_remove_point): Likewise.
4593
f5771b1d
PA
45942015-03-05 Pedro Alves <palves@redhat.com>
4595
4596 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4597 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4598 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4599 * nto-low.c (nto_target_ops): Likewise.
4600 * spu-low.c (spu_target_ops): Likewise.
4601 * win32-low.c (win32_target_ops): Likewise.
4602
3e572f71
PA
46032015-03-04 Pedro Alves <palves@redhat.com>
4604
72f4393d 4605 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4606 Decide whether a breakpoint triggered based on the SIGTRAP's
4607 siginfo.si_code.
72f4393d
L
4608 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4609 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4610 (linux_low_filter_event): Check for breakpoints before checking
4611 watchpoints.
4612 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4613 siginfo.si_code.
72f4393d
L
4614 (linux_stopped_by_sw_breakpoint)
4615 (linux_supports_stopped_by_sw_breakpoint)
4616 (linux_stopped_by_hw_breakpoint)
4617 (linux_supports_stopped_by_hw_breakpoint): New functions.
4618 (linux_target_ops): Install new target methods.
3e572f71 4619
1ec68e26
PA
46202015-03-04 Pedro Alves <palves@redhat.com>
4621
4622 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4623 * server.c (swbreak_feature, hwbreak_feature): New globals.
4624 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4625 (captured_main): Clear swbreak_feature and hwbreak_feature.
4626 * server.h (swbreak_feature, hwbreak_feature): Declare.
4627 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4628 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4629 supports_stopped_by_hw_breakpoint>: New fields.
4630 (target_supports_stopped_by_sw_breakpoint)
4631 (target_stopped_by_sw_breakpoint)
4632 (target_supports_stopped_by_hw_breakpoint)
4633 (target_stopped_by_hw_breakpoint): Declare.
4634
15c66dd6
PA
46352015-03-04 Pedro Alves <palves@redhat.com>
4636
4637 enum lwp_stop_reason -> enum target_stop_reason
4638 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4639 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4640 (linux_wait_1, stuck_in_jump_pad_callback)
4641 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4642 (linux_stopped_by_watchpoint):
4643 * linux-low.h (enum lwp_stop_reason): Delete.
4644 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4645 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4646
98fc70d6
YQ
46472015-03-04 Yao Qi <yao.qi@linaro.org>
4648
4649 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4650
dd2ac174
GB
46512015-03-03 Gary Benson <gbenson@redhat.com>
4652
4653 * hostio.c (handle_vFile): Fix prefix lengths.
4654
d68e53f4
MM
46552015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4656
4657 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4658 ptr_bits.
4659
bf2d68ab
AA
46602015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4661
4662 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4663 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4664 (clean): Add "rm -f" for above C files.
4665 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4666 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4667 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4668 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4669 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4670 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4671 (init_registers_s390x_vx_linux64)
4672 (init_registers_s390x_tevx_linux64)
4673 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4674 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4675 declarations.
4676 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4677 (s390_store_vxrs_high): New functions.
4678 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4679 NT_S390_VXRS_HIGH.
4680 (s390_arch_setup): Add logic for selecting one of the new target
4681 descriptions. Activate the new vector regsets if applicable.
4682 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4683 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4684 and init_registers_s390x_tevx_linux64.
4685
c966a859
PA
46862015-03-01 Pedro Alves <palves@redhat.com>
4687
4688 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4689 parameter.
4690
4180215b
PA
46912015-02-27 Pedro Alves <palves@redhat.com>
4692
4693 * linux-x86-low.c (u_debugreg_offset): New function.
4694 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4695
749bab01
PA
46962015-02-27 Pedro Alves <palves@redhat.com>
4697
4698 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4699 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4700 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4701 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4702 (ps_lsetfpregs, ps_getpid)
4703 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4704 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4705 (ps_lsetxregs, ps_plog): Declare.
4706
3c14e5a3
PA
47072015-02-27 Pedro Alves <palves@redhat.com>
4708
4709 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4710 IP_AGENT_EXPORT_FUNC.
4711 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4712 IP_AGENT_EXPORT_FUNC.
4713 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4714 (IP_AGENT_EXPORT): Delete.
4715 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4716 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4717 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4718 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4719 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4720 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4721 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4722 (traceframe_read_count, traceframe_write_count)
4723 (traceframes_created, trace_state_variables, get_raw_reg)
4724 (get_trace_state_variable_value, set_trace_state_variable_value)
4725 (ust_loaded, helper_thread_id, cmd_buf): Use
4726 IPA_SYM_EXPORTED_NAME.
4727 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4728 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4729 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4730 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4731 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4732 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4733 EXTERN_C_PUSH/EXTERN_C_POP.
4734 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4735 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4736 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4737 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4738 (traceframe_write_count, traceframe_read_count)
4739 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4740 (about_to_request_buffer_space, get_trace_state_variable_value)
4741 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4742 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4743 EXTERN_C_PUSH/EXTERN_C_POP.
4744 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4745 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4746 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4747 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4748 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4749 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4750 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4751 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4752 Define.
4753 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4754 (IP_AGENT_EXPORT_VAR_DECL): Define.
4755 (tracing): Declare.
4756 (gdb_agent_get_raw_reg): Declare.
4757
fe978cb0
PA
47582015-02-27 Tom Tromey <tromey@redhat.com>
4759 Pedro Alves <palves@redhat.com>
4760
4761 Rename symbols whose names are reserved C++ keywords throughout.
4762
3bc3d82a
PA
47632015-02-27 Pedro Alves <palves@redhat.com>
4764
4765 * Makefile.in (COMPILER): New, get it from autoconf.
4766 (CXX): Get from autoconf instead.
4767 (COMPILE.pre): Use COMPILER.
4768 (CC-LD): Rename to ...
4769 (CC_LD): ... this. Use COMPILER.
4770 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4771 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4772 * acinclude.m4: Include build-with-cxx.m4.
4773 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4774 Disable -Werror by default if building in C++ mode.
4775 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4776 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4777 the C++ compiler. Save/restore CXXFLAGS too.
4778 * configure: Regenerate.
4779
07697489
PA
47802015-02-27 Pedro Alves <palves@redhat.com>
4781
4782 * acinclude.m4: Include libiberty.m4.
4783 * configure.ac: Call libiberty_INIT.
4784 * config.in, configure: Regenerate.
4785
9beb7c4e
PA
47862015-02-26 Pedro Alves <palves@redhat.com>
4787
4788 * linux-low.c (linux_wait_1): When incrementing the PC past a
4789 program breakpoint always use the_low_target.breakpoint_len as
4790 increment, rather than the maximum between that and
4791 the_low_target.decr_pc_after_break.
4792
8090aef2
PA
47932015-02-23 Pedro Alves <palves@redhat.com>
4794
4795 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4796 thread was doing a step-over; always adjust the PC if
4797 we stepped over a permanent breakpoint.
4798 (linux_wait_1): If we stepped over breakpoint that was on top of a
4799 permanent breakpoint, manually advance the PC past it.
4800
bc9540e8
PA
48012015-02-23 Pedro Alves <palves@redhat.com>
4802
4803 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4804 modes.
4805 (x86_fill_gregset, x86_store_gregset): Use it when handling
4806 $orig_eax.
4807
2db9a427
PA
48082015-02-20 Pedro Alves <palves@redhat.com>
4809
4810 * thread-db.c: Include "nat/linux-procfs.h".
4811 (thread_db_init): Skip listing new threads if the kernel supports
4812 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4813
afa8d396
PA
48142015-02-20 Pedro Alves <palves@redhat.com>
4815
4816 * linux-low.c (status_pending_p_callback): Use ptid_match.
4817
c9587f88
AT
48182015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4819
4820 PR breakpoints/16812
4821 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4822 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4823 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4824
b05ec7a5
AT
48252015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4826
4827 PR breakpoints/15956
4828 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4829
d33501a5
MM
48302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4831
4832 * linux-low.c (linux_low_btrace_conf): Print size.
4833 * server.c (handle_btrace_conf_general_set): New.
4834 (hanle_general_set): Call handle_btrace_conf_general_set.
4835 (handle_query): Report Qbtrace-conf:bts:size as supported.
4836
f4abbc16
MM
48372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4838
4839 * linux-low.c (linux_low_enable_btrace): Update parameters.
4840 (linux_low_btrace_conf): New.
4841 (linux_target_ops)<to_btrace_conf>: Initialize.
4842 * server.c (current_btrace_conf): New.
4843 (handle_btrace_enable): Rename to ...
4844 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4845 to target_enable_btrace. Update comment. Update users.
4846 (handle_qxfer_btrace_conf): New.
4847 (qxfer_packets): Add btrace-conf entry.
4848 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4849 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4850 (target_ops)<read_btrace_conf>: New.
4851 (target_enable_btrace): Update parameters.
4852 (target_read_btrace_conf): New.
4853
043c3577
MM
48542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4855
4856 * server.c (handle_btrace_general_set): Remove call to
4857 target_supports_btrace.
4858 (supported_btrace_packets): New.
4859 (handle_query): Call supported_btrace_packets.
4860 * target.h: include btrace-common.h.
4861 (btrace_target_info): Removed.
4862 (supports_btrace, target_supports_btrace): Update parameters.
4863
734b0e4b
MM
48642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4865
4866 * Makefile.in (SFILES): Add common/btrace-common.c.
4867 (OBS): Add common/btrace-common.o.
4868 (btrace-common.o): Add build rules.
4869 * linux-low: Include btrace-common.h.
4870 (linux_low_read_btrace): Use struct btrace_data. Call
4871 btrace_data_init and btrace_data_fini.
4872
d6c146e9
PA
48732015-02-06 Pedro Alves <palves@redhat.com>
4874
4875 * thread-db.c (find_new_threads_callback): Add debug output.
4876
20ba1ce6
PA
48772015-02-04 Pedro Alves <palves@redhat.com>
4878
4879 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4880 (resume_stopped_resumed_lwps): New function.
4881 (linux_wait_for_event_filtered): Use it.
4882
8cc73a39
SDJ
48832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4884
4885 * Makefile.in (SFILES): Add linux-personality.c.
4886 (linux-personality.o): New rule.
4887 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4888 list of objects to be built.
4889 * linux-low.c: Include nat/linux-personality.h.
4890 (linux_create_inferior): Remove code to disable address space
4891 randomization (moved to ../nat/linux-personality.c). Create
4892 cleanup to disable address space randomization.
4893
fb23d554
SDJ
48942015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4895
4896 * Makefile.in (posix-strerror.o): New rule.
4897 (mingw-strerror.o): Likewise.
4898 * configure: Regenerated.
4899 * configure.ac: Source file ../common/common.host. Initialize new
4900 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4901
cdf43629
YQ
49022015-01-14 Yao Qi <yao@codesourcery.com>
4903
4904 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4905 (ppc-linux.o): New rule.
4906 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4907 * configure.ac: AC_CHECK_FUNCS(getauxval).
4908 * config.in: Re-generated.
4909 * configure: Re-generated.
4910 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4911 ppc64_64bit_inferior_p
4912
514c5338
YQ
49132015-01-14 Yao Qi <yao@codesourcery.com>
4914
4915 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4916 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4917 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4918 (PT_ORIG_R3, PT_TRAP): Likewise.
4919 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4920 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4921 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4922
3368c1e5
JB
49232015-01-10 Joel Brobecker <brobecker@adacore.com>
4924
4925 * i387-fp.c (i387_cache_to_xsave): In look over
4926 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4927 zmmh_low_space field by use of zmmh_high_space.
4928
582511be
PA
49292015-01-09 Pedro Alves <palves@redhat.com>
4930
4931 * linux-low.c (step_over_bkpt): Move higher up in the file.
4932 (handle_extended_wait): Don't store the stop_pc here.
4933 (get_stop_pc): Adjust comments and rename to ...
4934 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4935 stopped for a software breakpoint or hardware breakpoint.
4936 (thread_still_has_status_pending_p): New function.
4937 (status_pending_p_callback): Use
4938 thread_still_has_status_pending_p. If the event is no longer
4939 interesting, resume the LWP.
4940 (handle_tracepoints): Add assert.
4941 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4942 (wstatus_maybe_breakpoint): New function.
4943 (cancel_breakpoint): Delete function.
4944 (check_stopped_by_watchpoint): New function, factored out from
4945 linux_low_filter_event.
4946 (lp_status_maybe_breakpoint): Delete function.
4947 (linux_low_filter_event): Remove filter_ptid argument.
4948 Leave thread group exits pending here. Store the LWP's stop PC.
4949 Always leave events pending.
4950 (linux_wait_for_event_filtered): Pull all events out of the
4951 kernel, and leave them all pending.
4952 (count_events_callback, select_event_lwp_callback): Consider all
4953 events.
4954 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4955 (select_event_lwp): Only give preference to the stepping LWP in
4956 all-stop mode. Adjust comments.
4957 (ignore_event): New function.
4958 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4959 references to cancel_breakpoints. Adjust to renames. Also give
4960 equal priority to all LWPs that have had events in non-stop mode.
4961 If reporting a software breakpoint event, unadjust the LWP's PC.
4962 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4963 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4964 Adjust.
4965 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4966 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4967 (linux_stopped_by_watchpoint): Adjust.
4968 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4969 * linux-low.h (enum lwp_stop_reason): New.
4970 (struct lwp_info) <stop_pc>: Adjust comment.
4971 <stopped_by_watchpoint>: Delete field.
4972 <stop_reason>: New field.
4973 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4974 * mem-break.c (software_breakpoint_inserted_here)
4975 (hardware_breakpoint_inserted_here): New function.
4976 * mem-break.h (software_breakpoint_inserted_here)
4977 (hardware_breakpoint_inserted_here): Declare.
4978 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4979 (cancel_breakpoints): Delete.
4980 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4981 (upload_fast_traceframes): Remove references to
4982 cancel_breakpoints.
4983
a33e3959
PA
49842015-01-09 Pedro Alves <palves@redhat.com>
4985
4986 * thread-db.c (find_new_threads_callback): Ignore thread if the
4987 kernel thread ID is -1.
4988
8784d563
PA
49892015-01-09 Pedro Alves <palves@redhat.com>
4990
4991 * linux-low.c (linux_attach_fail_reason_string): Move to
4992 nat/linux-ptrace.c, and rename.
4993 (linux_attach_lwp): Update comment.
4994 (attach_proc_task_lwp_callback): New function.
4995 (linux_attach): Adjust to rename and use
4996 linux_proc_attach_tgid_threads.
4997 (linux_attach_fail_reason_string): Delete declaration.
4998
76f2b779
JB
49992015-01-01 Joel Brobecker <brobecker@adacore.com>
5000
5001 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5002 * server.c (gdbserver_version): Likewise.
5003
fafcc06a
SDJ
50042014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5005
5006 * remote-utils.c: Include ctype.h.
5007 (input_interrupt): Explicitly handle the case when the char
5008 received is the NUL byte. Improve the printing of non-ASCII
5009 characters.
5010
beed38b8
JB
50112014-12-16 Joel Brobecker <brobecker@adacore.com>
5012
5013 * linux-low.c (linux_low_filter_event): Update call to
5014 linux_enable_event_reporting following the addition of
5015 a new parameter to that function.
5016
bf330350
CU
50172014-12-16 Catalin Udma <catalin.udma@freescale.com>
5018
5019 PR server/17457
5020 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5021 (AARCH64_FPCR_REGNO): Likewise.
5022 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5023 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5024 (aarch64_store_fpregset): Likewise.
5025
5227d625
JB
50262014-12-15 Joel Brobecker <brobecker@adacore.com>
5027
5028 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5029 Remove FIXME comment about assumption about N.
5030
f93b65a0
JB
50312014-12-13 Joel Brobecker <brobecker@adacore.com>
5032
5033 * configure.ac: If large-file support is disabled in GDBserver,
5034 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5035 * configure: Regenerate.
5036
e5a9158d
AA
50372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5038
5039 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5040 warning upon ENODATA from ptrace.
5041 * linux-s390-low.c (s390_store_tdb): New.
5042 (s390_regsets): Add regset for NT_S390_TDB.
5043
feea5f36
AA
50442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5045
5046 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5047 without a fill_function.
5048 * linux-s390-low.c (s390_fill_last_break): Remove.
5049 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5050 (s390_arch_setup): Use regset's size instead of fill_function for
5051 loop end condition.
5052
098dbe61
AA
50532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5054
5055 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5056 the regset's store function when ptrace returned an error.
5057 * regcache.c (get_thread_regcache): Invalidate register cache
5058 before fetching inferior's registers.
5059
28eef672
AA
50602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5061
5062 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5063 while-loop as for-loop.
5064 (regsets_store_inferior_registers): Likewise.
5065
bdca27a2
YQ
50662014-11-28 Yao Qi <yao@codesourcery.com>
5067
5068 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5069 * config.in, configure: Re-generate.
5070 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5071 is defined.
5072
9c232dda
YQ
50732014-11-21 Yao Qi <yao@codesourcery.com>
5074
5075 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5076 (AC_CHECK_HEADERS): Remove malloc.h.
5077 * configure: Re-generated.
5078 * config.in: Re-generated.
5079 * server.h: Don't include alloca.h and malloc.h.
5080 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5081 Don't include malloc.h.
5082
43968415
JB
50832014-11-17 Joel Brobecker <brobecker@adacore.com>
5084
5085 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5086 corresponding ERRNO check in same block.
5087
40e91bc7
PA
50882014-11-12 Pedro Alves <palves@redhat.com>
5089
5090 * server.c (cont_thread): Update comment.
5091 (start_inferior, attach_inferior): No longer clear cont_thread.
5092 (handle_v_cont): No longer set cont_thread.
5093 (captured_main): Clear cont_thread each time a GDB connects.
5094
c2c118cf
PA
50952014-11-12 Pedro Alves <palves@redhat.com>
5096
5097 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5098 thread, and don't resume all threads if the Hc thread has exited.
5099
78708b7c
PA
51002014-11-12 Pedro Alves <palves@redhat.com>
5101
5102 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5103 the process group instead of to a specific LWP.
5104
a2abc7de
PA
51052014-10-15 Pedro Alves <palves@redhat.com>
5106
5107 PR server/17487
5108 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5109 parameter.
5110 (arm_set_thread_context): Delete.
5111 (the_low_target): Adjust.
5112 * win32-i386-low.c (debug_registers_changed)
5113 (debug_registers_used): Delete.
5114 (update_debug_registers_callback): New function.
5115 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5116 needing to update their debug registers.
5117 (win32_get_current_dr): New function.
5118 (x86_dr_low_get_addr, x86_dr_low_get_control)
5119 (x86_dr_low_get_status): Fetch the debug register from the thread
5120 record's context.
5121 (i386_initial_stuff): Adjust.
5122 (i386_get_thread_context): Remove current_event parameter. Don't
5123 clear debug_registers_changed nor copy DR values to
5124 debug_reg_state.
5125 (i386_set_thread_context): Delete.
5126 (i386_prepare_to_resume): New function.
5127 (i386_thread_added): Mark the thread as needing to update irs
5128 debug registers.
5129 (the_low_target): Remove i386_set_thread_context and install
5130 i386_prepare_to_resume.
5131 * win32-low.c (win32_get_thread_context): Adjust.
5132 (win32_set_thread_context): Use SetThreadContext
5133 directly.
5134 (win32_prepare_to_resume): New function.
5135 (win32_require_context): New function, factored out from ...
5136 (thread_rec): ... this.
5137 (continue_one_thread): Call win32_prepare_to_resume on each thread
5138 we're about to continue.
5139 (win32_resume): Call win32_prepare_to_resume on the event thread.
5140 * win32-low.h (struct win32_thread_info)
5141 <debug_registers_changed>: New field.
5142 (struct win32_target_ops): Change prototype of set_thread_context,
5143 delete set_thread_context and add prepare_to_resume.
5144 (win32_require_context): New declaration.
5145
a442d071
GB
51462014-10-08 Gary Benson <gbenson@redhat.com>
5147
5148 * server.h: Do not include common-exceptions.h.
5149
6f1947e8
GB
51502014-10-08 Gary Benson <gbenson@redhat.com>
5151
5152 * server.h: Do not include cleanups.h.
5153
63b434a4
JH
51542014-09-30 James Hogan <james.hogan@imgtec.com>
5155
5156 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5157 mips64-dsp-linux.c.
5158
c4d9ceb6
YQ
51592014-09-23 Yao Qi <yao@codesourcery.com>
5160
5161 * linux-low.c (lp_status_maybe_breakpoint): New function.
5162 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5163 (count_events_callback): Likewise.
5164 (select_event_lwp_callback): Likewise.
5165 (cancel_breakpoints_callback): Likewise.
5166
89a5711c
DB
51672014-09-19 Don Breazeal <donb@codesourcery.com>
5168
5169 * linux-low.c (handle_extended_wait): Call
5170 linux_ptrace_get_extended_event.
5171 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5172 linux_is_extended_waitstatus.
5173
bffc0964
JB
51742014-09-16 Joel Brobecker <brobecker@adacore.com>
5175
5176 * Makefile.in (CPPFLAGS): Define.
5177 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5178 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5179
0bfdf32f
GB
51802014-09-16 Gary Benson <gbenson@redhat.com>
5181
5182 * inferiors.h (current_inferior): Renamed as...
5183 (current_thread): New variable. All uses updated.
5184 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5185 (maybe_move_out_of_jump_pad): Likewise.
5186 (cancel_breakpoint): Likewise.
5187 (linux_low_filter_event): Likewise.
5188 (wait_for_sigstop): Likewise.
5189 (linux_resume_one_lwp): Likewise.
5190 (need_step_over_p): Likewise.
5191 (start_step_over): Likewise.
5192 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5193 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5194 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5195 and save_inferior as saved_thread.
5196 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5197 saved_thread.
5198 (regcache_invalidate_thread): Likewise.
5199 * remote-utils.c (prepare_resume_reply): Likewise.
5200 * thread-db.c (thread_db_get_tls_address): Likewise.
5201 (disable_thread_event_reporting): Likewise.
5202 (remove_thread_event_breakpoints): Likewise.
5203 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5204 as saved_thread.
5205 * target.h (set_desired_inferior): Renamed as...
5206 (set_desired_thread): New declaration. All uses updated.
5207 * server.c (myresume): Updated comment to reference thread instead
5208 of inferior.
5209 (handle_serial_event): Likewise.
5210 (handle_target_event): Likewise.
5211
361c8ade
GB
52122014-09-12 Tom Tromey <tromey@redhat.com>
5213 Gary Benson <gbenson@redhat.com>
5214
5215 * regcache.h: Include common-regcache.h.
5216 (regcache_read_pc): Don't declare.
5217 * regcache.c (get_thread_regcache_for_ptid): New function.
5218
bd9269f7
GB
52192014-09-11 Tom Tromey <tromey@redhat.com>
5220 Gary Benson <gbenson@redhat.com>
5221
5222 * symbol.c: New file.
5223 * Makefile.in (SFILES): Add symbol.c.
5224 (OBS): Add symbol.o.
5225
f8c1d06b
GB
52262014-09-11 Gary Benson <gbenson@redhat.com>
5227
5228 * target.c (target_stop_ptid, target_continue_ptid): New
5229 functions.
5230
721ec300
GB
52312014-09-11 Tom Tromey <tromey@redhat.com>
5232 Gary Benson <gbenson@redhat.com>
5233
5234 * target.h: Include target/target.h.
5235 * target.c (target_read_memory, target_read_uint32)
5236 (target_write_memory): New functions.
5237
c5e92cca
GB
52382014-09-11 Gary Benson <gbenson@redhat.com>
5239
5240 * server.h (debug_hw_points): Don't declare.
5241 * server.c (debug_hw_points): Don't define. Replace all uses
5242 with show_debug_regs.
5243 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5244 all uses with show_debug_regs.
5245
2e4bb98a
EBM
52462014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5247
5248 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5249 endianness into account.
5250 (ppc_supply_ptrace_register): Likewise.
5251
ac740bc7
JH
52522014-09-03 James Hogan <james.hogan@imgtec.com>
5253
5254 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5255 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5256
97ea6506
GB
52572014-09-03 Gary Benson <gbenson@redhat.com>
5258
5259 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5260 ALL_DEBUG_ADDRESS_REGISTERS.
5261
df7e5265
GB
52622014-09-02 Gary Benson <gbenson@redhat.com>
5263
5264 * i386-low.h: Renamed as...
5265 * x86-low.h: New file. All type, function and variable name
5266 prefixes changed from "i386_" to "x86_". All references updated.
5267 * i386-low.c: Renamed as...
5268 * x86-low.c: New file. All type, function and variable name
5269 prefixes changed from "i386_" to "x86_". All references updated.
5270
ed859da7
GB
52712014-09-02 Gary Benson <gbenson@redhat.com>
5272
5273 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5274 (x86_linux_new_thread): Likewise.
5275
860789c7
GB
52762014-08-29 Gary Benson <gbenson@redhat.com>
5277
5278 * server.h (setjmp.h): Do not include.
5279 (toplevel): Do not declare.
5280 (common-exceptions.h): Include.
5281 (cleanups.h): Likewise.
5282 * server.c (toplevel): Do not define.
5283 (exit_code): New static global.
5284 (detach_or_kill_for_exit_cleanup): New function.
5285 (main): New function. Original main renamed to...
5286 (captured_main): New function.
5287 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5288
ff55e1b5
GB
52892014-08-29 Gary Benson <gbenson@redhat.com>
5290
5291 * Makefile.in (SFILES): Add common/common-exceptions.c.
5292 (OBS): Add common-exceptions.o.
5293 (common-exceptions.o): New rule.
5294 * utils.c (prepare_to_throw_exception): New function.
5295
e9bcb658
GB
52962014-08-29 Gary Benson <gbenson@redhat.com>
5297
5298 * config.in: Regenerate.
5299 * configure: Likewise.
5300
e3180625
GB
53012014-08-29 Gary Benson <gbenson@redhat.com>
5302
5303 * Makefile.in (SFILES): Add common/cleanups.c.
5304 (OBS): cleanups.o.
5305 (cleanups.o): New rule.
5306
e3d6ba5d
GB
53072014-08-29 Gary Benson <gbenson@redhat.com>
5308
5309 * utils.c (internal_vwarning): New function.
5310
7096e886
GB
53112014-08-28 Gary Benson <gbenson@redhat.com>
5312
5313 * utils.h (fatal): Remove declaration.
5314 * utils.c (fatal): Remove function.
5315
14ce3192
GB
53162014-08-28 Gary Benson <gbenson@redhat.com>
5317
5318 * tracepoint.c (gdb_agent_init): Replace fatal with
5319 perror_with_name.
5320 (initialize_tracepoint): Likewise.
5321
50278d59
GB
53222014-08-28 Gary Benson <gbenson@redhat.com>
5323
5324 * remote-utils.c (remote_prepare): Replace fatal with error.
5325
aa96c426
GB
53262014-08-28 Gary Benson <gbenson@redhat.com>
5327
5328 * linux-low.c (linux_async): Replace fatal with warning.
5329 Tidy up and return.
5330 (linux_start_non_stop): Return -1 if linux_async failed.
5331
f7160e97
GB
53322014-08-28 Gary Benson <gbenson@redhat.com>
5333
5334 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5335 gdb_assert.
5336 (i386_dr_low_get_addr): Remove vague comment.
5337 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5338 gdb_assert.
5339
38e08fca
GB
53402014-08-28 Gary Benson <gbenson@redhat.com>
5341
5342 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5343 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5344 internal_error.
5345 (linux_resume_one_lwp): Likewise.
5346 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5347 gdb_assert.
5348 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5349 with internal_error.
5350 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5351 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5352 (find_register_by_name): Replace fatal with internal_error.
5353 (find_regno): Likewise.
5354 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5355 * thread-db.c (thread_db_create_event): Likewise.
5356 (thread_db_load_search): Likewise.
5357 (try_thread_db_load_1): Likewise.
5358 * tracepoint.c (get_jump_space_head): Replace fatal with
5359 internal_error.
5360 (claim_trampoline_space): Likewise.
5361 (have_fast_tracepoint_trampoline_buffer): Likewise.
5362 (cmd_qtstart): Likewise.
5363 (stop_tracing): Likewise.
5364 (fast_tracepoint_collecting): Likewise.
5365 (target_malloc): Likewise.
5366 (download_tracepoint): Likewise.
5367 (download_trace_state_variables): Replace check with gdb_assert.
5368 (upload_fast_traceframes): Replace fatal with internal_error.
5369
34abf635
GB
53702014-08-19 Tom Tromey <tromey@redhat.com>
5371 Gary Benson <gbenson@redhat.com>
5372
5373 * Makefile.in (SFILES): Add common/common-debug.c.
5374 (OBS): Add common-debug.o.
5375 (common-debug.o): New rule.
5376 * debug.h (debug_printf): Don't declare.
5377 * debug.c (debug_printf): Renamed and rewritten as...
5378 (debug_vprintf): New function.
5379
f6e94d78
GB
53802014-08-19 Gary Benson <gbenson@redhat.com>
5381
5382 * utils.h: Do not include print-utils.h.
5383
9239eeab
GB
53842014-08-19 Tom Tromey <tromey@redhat.com>
5385 Gary Benson <gbenson@redhat.com>
5386
5387 * server.h: Add static assertion.
5388 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5389
ef87c8bb
GB
53902014-08-19 Tom Tromey <tromey@redhat.com>
5391 Gary Benson <gbenson@redhat.com>
5392
5393 * Makefile.in (SFILES): Add common/errors.c.
5394 (OBS): Add errors.o.
5395 (IPA_OBS): Add errors-ipa.o.
5396 (errors.o): New rule.
5397 (errors-ipa.o): Likewise.
5398 * utils.h (perror_with_name, error, warning): Don't declare.
5399 * utils.c (warning): Renamed and rewritten as...
5400 (vwarning): New function.
5401 (error): Renamed and rewritten as...
5402 (verror): New function.
5403 (internal_error): Renamed and rewritten as...
5404 (internal_verror): New function.
5405
bb974a24
GB
54062014-08-07 Gary Benson <gbenson@redhat.com>
5407
5408 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5409 * configure: Regenerate.
5410 * config.in: Likewise.
5411 * server.h: Do not include errno.h.
5412 * event-loop.c: Likewise.
5413 * hostio-errno.c: Likewise.
5414 * linux-low.c: Likewise.
5415 * remote-utils.c: Likewise.
5416 * spu-low.c: Likewise.
5417 * utils.c: Likewise.
5418 * gdbreplay.c: Unconditionally include errno.h.
5419
6d3d12eb
GB
54202014-08-07 Gary Benson <gbenson@redhat.com>
5421
5422 * server.h: Do not include string.h.
5423 * event-loop.c: Likewise.
5424 * linux-low.c: Likewise.
5425 * regcache.c: Likewise.
5426 * remote-utils.c: Likewise.
5427 * spu-low.c: Likewise.
5428 * utils.c: Likewise.
5429
dccbb609
GB
54302014-08-07 Gary Benson <gbenson@redhat.com>
5431
5432 * server.h: Do not include gdb_assert.h.
5433
e76df0d0
GB
54342014-08-07 Gary Benson <gbenson@redhat.com>
5435
5436 * server.h: Do not include common-utils.h.
5437
4cb9c816
GB
54382014-08-07 Gary Benson <gbenson@redhat.com>
5439
5440 * server.h: Do not include ptid.h.
5441 * notif.h: Likewise.
5442
3995eeee
GB
54432014-08-07 Gary Benson <gbenson@redhat.com>
5444
5445 * server.h: Do not include gdb_locale.h.
5446
cb9f1a9b
GB
54472014-08-07 Gary Benson <gbenson@redhat.com>
5448
5449 * server.h: Do not include gdb/signals.h.
5450 * win32-low.c: Likewise.
5451
a5fceff8
GB
54522014-08-07 Gary Benson <gbenson@redhat.com>
5453
5454 * server.h: Do not include pathmax.h.
5455
b9391142
GB
54562014-08-07 Gary Benson <gbenson@redhat.com>
5457
5458 * server.h: Do not include libiberty.h.
5459 * linux-bfin-low.c: Likewise.
5460
0e443c87
GB
54612014-08-07 Gary Benson <gbenson@redhat.com>
5462
5463 * server.h: Do not include ansidecl.h.
5464
8ebb3f56
GB
54652014-08-07 Gary Benson <gbenson@redhat.com>
5466
5467 * linux-x86-low.c: Do not include stddef.h.
5468 * lynx-ppc-low.c: Likewise.
5469 * tracepoint.c: Likewise.
5470
8980bdf6
GB
54712014-08-07 Gary Benson <gbenson@redhat.com>
5472
5473 * server.h: Do not include stdarg.h.
5474 * nto-low.c: Likewise.
5475
d7096f71
GB
54762014-08-07 Gary Benson <gbenson@redhat.com>
5477
5478 * server.h: Do not include stdlib.h.
5479 * inferiors.c: Likewise.
5480 * linux-low.c: Likewise.
5481 * regcache.c: Likewise.
5482 * spu-low.c: Likewise.
5483 * tracepoint.c: Likewise.
5484 * utils.c: Likewise.
5485
d02f550d
GB
54862014-08-07 Gary Benson <gbenson@redhat.com>
5487
5488 * server.h: Do not include stdio.h.
5489 * linux-low.c: Likewise.
5490 * remote-utils.c: Likewise.
5491 * spu-low.c: Likewise.
5492 * utils.c: Likewise.
5493 * wincecompat.c: Likewise.
5494
87f6c4e3
GB
54952014-08-06 Gary Benson <gbenson@redhat.com>
5496
5497 * regcache.c (init_register_cache): Move conditionals inside if.
5498
7089dca4
GB
54992014-08-06 Gary Benson <gbenson@redhat.com>
5500
5501 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5502
462f517e
GB
55032014-07-31 Gary Benson <gbenson@redhat.com>
5504
5505 * ax.h: Do not include server.h.
5506 * gdbthread.h: Likewise.
5507 * lynx-low.h: Likewise.
5508 * notif.h: Likewise.
5509
976411d6
GB
55102014-07-30 Gary Benson <gbenson@redhat.com>
5511
5512 * server.h: Include common-defs.h.
5513 Do not include config.h or build-gnulib-gdbserver/config.h.
5514
d41f6d8e
GB
55152014-07-30 Gary Benson <gbenson@redhat.com>
5516
5517 * hostio-errno.c: Move server.h to top of includes list.
5518 * inferiors.c: Likewise.
5519 * linux-x86-low.c: Likewise.
5520 * notif.c: Include server.h.
5521
314c6a35
TT
55222014-07-24 Tom Tromey <tromey@redhat.com>
5523 Gary Benson <gbenson@redhat.com>
5524
5525 * server.h (CORE_ADDR): Now unsigned.
5526
69ff6be5
PA
55272014-07-16 Pedro Alves <palves@redhat.com>
5528
5529 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5530
ce9e3fe7
PA
55312014-07-15 Pedro Alves <palves@redhat.com>
5532
5533 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5534 copy.
5535
e76126e8
PA
55362014-07-11 Pedro Alves <palves@redhat.com>
5537
5538 * linux-low.c (kill_wait_lwp): New function, based on
5539 kill_one_lwp_callback, but use my_waitpid directly.
5540 (kill_one_lwp_callback, linux_kill): Use it.
5541
8e9db26e
PA
55422014-06-23 Pedro Alves <palves@redhat.com>
5543
5544 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5545 before setting DR0..DR3.
5546
698b3e08
GB
55472014-06-20 Gary Benson <gbenson@redhat.com>
5548
5549 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5550 * configure: Regenerated.
5551 * config.in: Likewise.
5552
125f8a3d
GB
55532014-06-20 Gary Benson <gbenson@redhat.com>
5554
5555 * Makefile.in (SFILES): Update locations for files moved
5556 from common to nat.
5557 (object file files): Reordered.
5558
42995dbd
GB
55592014-06-20 Gary Benson <gbenson@redhat.com>
5560
5561 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5562 (i386_dr_low_set_addr): Likewise.
5563 (i386_dr_low_get_addr): Likewise.
5564 (i386_dr_low_can_set_control): Likewise.
5565 (i386_dr_low_set_control): Likewise.
5566 (i386_dr_low_get_control): Likewise.
5567 (i386_dr_low_get_status): Likewise.
5568 (i386_get_debug_register_length): Likewise.
5569 * linux-x86-low.c (i386_dr_low_set_addr):
5570 Changed signature. Made static.
5571 (i386_dr_low_get_addr): Likewise.
5572 (i386_dr_low_set_control): Likewise.
5573 (i386_dr_low_get_control): Likewise.
5574 (i386_dr_low_get_status): Likewise.
5575 (i386_dr_low): New global variable.
5576 * win32-i386-low.c (i386_dr_low_set_addr):
5577 Changed signature. Made static.
5578 (i386_dr_low_get_addr): Likewise.
5579 (i386_dr_low_set_control): Likewise.
5580 (i386_dr_low_get_control): Likewise.
5581 (i386_dr_low_get_status): Likewise.
5582 (i386_dr_low): New global variable.
5583
e1d2394b
MS
55842014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5585
5586 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5587 * Makefile.in (AR, AR_FLAGS): Define.
5588 * configure: Regenerate.
5589
3a8ee006
GB
55902014-06-19 Gary Benson <gbenson@redhat.com>
5591
5592 * Makefile.in (i386-dregs.o): New rule.
5593 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5594 * i386-low.c (target.h): Remove include.
5595 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5596 (DR_CONTROL_SHIFT): Likewise.
5597 (DR_CONTROL_SIZE): Likewise.
5598 (DR_RW_EXECUTE): Likewise.
5599 (DR_RW_WRITE): Likewise.
5600 (DR_RW_READ): Likewise.
5601 (DR_RW_IORW): Likewise.
5602 (DR_LEN_1): Likewise.
5603 (DR_LEN_2): Likewise.
5604 (DR_LEN_4): Likewise.
5605 (DR_LEN_8): Likewise.
5606 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5607 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5608 (DR_ENABLE_SIZE): Likewise.
5609 (DR_LOCAL_SLOWDOWN): Likewise.
5610 (DR_GLOBAL_SLOWDOWN): Likewise.
5611 (DR_CONTROL_RESERVED): Likewise.
5612 (I386_DR_CONTROL_MASK): Likewise.
5613 (I386_DR_VACANT): Likewise.
5614 (I386_DR_LOCAL_ENABLE): Likewise.
5615 (I386_DR_GLOBAL_ENABLE): Likewise.
5616 (I386_DR_DISABLE): Likewise.
5617 (I386_DR_SET_RW_LEN): Likewise.
5618 (I386_DR_GET_RW_LEN): Likewise.
5619 (I386_DR_WATCH_HIT): Likewise.
5620 (i386_wp_op_t): Likewise.
5621 (i386_show_dr): Likewise.
5622 (i386_length_and_rw_bits): Likewise.
5623 (i386_insert_aligned_watchpoint): Likewise.
5624 (i386_remove_aligned_watchpoint): Likewise.
5625 (i386_handle_nonaligned_watchpoint): Likewise.
5626 i386_update_inferior_debug_regs(): Likewise.
5627 (i386_dr_insert_watchpoint): Likewise.
5628 (i386_dr_remove_watchpoint): Likewise.
5629 (i386_dr_region_ok_for_watchpoint): Likewise.
5630 (i386_dr_stopped_data_address): Likewise.
5631 (i386_dr_stopped_by_watchpoint): Likewise.
5632
8f26655c
GB
56332014-06-19 Gary Benson <gbenson@redhat.com>
5634
5635 * i386-low.c (i386_dr_show): Renamed to
5636 i386_show_dr and made static. All uses updated.
5637 (i386_dr_length_and_rw_bits): Renamed to
5638 i386_length_and_rw_bits and made static.
5639 All uses updated.
5640 (i386_dr_insert_aligned_watchpoint): Renamed to
5641 i386_insert_aligned_watchpoint and made static.
5642 All uses updated.
5643 (i386_dr_remove_aligned_watchpoint): Renamed to
5644 i386_remove_aligned_watchpoint and made static.
5645 All uses updated.
5646 (i386_dr_update_inferior_debug_regs): Renamed to
5647 i386_update_inferior_debug_regs and made static.
5648 All uses updated.
5649
b9228891
GB
56502014-06-18 Gary Benson <gbenson@redhat.com>
5651
5171def3
GB
5652 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5653 (i386_dr_low_can_set_control): Likewise.
5654 (i386_get_debug_register_length): Likewise.
5655 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5656 (i386_dr_low_can_set_control): Likewise.
5657 (i386_get_debug_register_length): Likewise.
5658
56592014-06-17 Gary Benson <gbenson@redhat.com>
5660
b9228891
GB
5661 * i386-low.h (i386-dregs.h): New include.
5662 (DR_FIRSTADDR): Now in i386-dregs.h.
5663 (DR_LASTADDR): Likewise.
5664 (DR_NADDR): Likewise.
5665 (DR_STATUS): Likewise.
5666 (DR_CONTROL): Likewise.
5667 (i386_debug_reg_state): Likewise.
5668 (i386_dr_insert_watchpoint): Likewise.
5669 (i386_dr_remove_watchpoint): Likewise.
5670 (i386_dr_region_ok_for_watchpoint): Likewise.
5671 (i386_dr_stopped_data_address): Likewise.
5672 (i386_dr_stopped_by_watchpoint): Likewise.
5673 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5674
4be83cc2
GB
56752014-06-18 Gary Benson <gbenson@redhat.com>
5676
5677 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5678 i386_dr_insert_watchpoint.
5679 (i386_low_remove_watchpoint): Renamed to
5680 i386_dr_remove_watchpoint.
5681 (i386_low_region_ok_for_watchpoint): Renamed to
5682 i386_dr_region_ok_for_watchpoint.
5683 (i386_low_stopped_data_address): Renamed to
5684 i386_dr_stopped_data_address.
5685 (i386_low_stopped_by_watchpoint): Renamed to
5686 i386_dr_stopped_by_watchpoint.
5687 * i386-low.c (i386_show_dr): Renamed to
5688 i386_dr_show and made nonstatic. All uses updated.
5689 (i386_length_and_rw_bits): Renamed to
5690 i386_dr_length_and_rw_bits and made nonstatic.
5691 All uses updated.
5692 (i386_insert_aligned_watchpoint): Renamed to
5693 i386_dr_insert_aligned_watchpoint and made nonstatic.
5694 All uses updated.
5695 (i386_remove_aligned_watchpoint): Renamed to
5696 i386_dr_remove_aligned_watchpoint and made nonstatic.
5697 All uses updated.
5698 (i386_update_inferior_debug_regs): Renamed to
5699 i386_dr_update_inferior_debug_regs and made nonstatic.
5700 All uses updated.
5701 (i386_low_insert_watchpoint): Renamed to
5702 i386_dr_insert_watchpoint. All uses updated.
5703 (i386_low_remove_watchpoint): Renamed to
5704 i386_dr_remove_watchpoint. All uses updated.
5705 (i386_low_region_ok_for_watchpoint): Renamed to
5706 i386_dr_region_ok_for_watchpoint. All uses updated.
5707 (i386_low_stopped_data_address): Renamed to
5708 i386_dr_stopped_data_address. All uses updated.
5709 (i386_low_stopped_by_watchpoint): Renamed to
5710 i386_dr_stopped_by_watchpoint. All uses updated.
5711
131aa0d4
GB
57122014-06-18 Gary Benson <gbenson@redhat.com>
5713
5714 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5715 (i386_dr_low_can_set_control): Likewise.
5716 (i386_insert_aligned_watchpoint): New check.
5717
d9305f7f
GB
57182014-06-18 Gary Benson <gbenson@redhat.com>
5719
5720 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5721 Renamed to state.
5722
e927c9fc
GB
57232014-06-18 Gary Benson <gbenson@redhat.com>
5724
5725 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5726 instead of fatal and error.
5727 (i386_handle_nonaligned_watchpoint): Likewise.
5728
1b6d4134
GB
57292014-06-18 Gary Benson <gbenson@redhat.com>
5730
5731 * i386-low.c (i386_get_debug_register_length): New macro.
5732 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5733 (i386_show_dr): Use debug_printf instead of fprintf. Use
5734 phex to format values.
5735
6e62758f
GB
57362014-06-18 Gary Benson <gbenson@redhat.com>
5737
5738 * i386-low.h: Comment changes.
5739 * i386-low.c: Likewise.
5740
fc6e2f03
GB
57412014-06-18 Gary Benson <gbenson@redhat.com>
5742
5743 * i386-low.c: Whitespace changes.
5744
f9d1eeed
TT
57452014-06-12 Tom Tromey <tromey@redhat.com>
5746
5747 * utils.c (freeargv): Remove.
5748
0b04e523
TT
57492014-06-12 Tom Tromey <tromey@redhat.com>
5750
5751 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5752 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5753 (parse_debug_format_options): Likewise.
5754 (gdbserver_usage): Likewise.
5755 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5756 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5757 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5758 against libiberty.
5759 ($(LIBGNU)): Depend on libiberty.
5760 (all-lib): Recurse into all subdirs.
5761 (install-only): Invoke "install" target in subdirs.
5762 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5763 targets.
5764 * configure: Rebuild.
5765 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5766 for vasprintf, vsnprintf, or gettimeofday.
5767 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5768 srv_tgtobj.
5769
270c9937
JB
57702014-06-05 Joel Brobecker <brobecker@adacore.com>
5771
5772 * development.sh: Delete.
5773 * Makefile.in (config.status): Adjust dependency on development.sh.
5774 * configure.ac: Adjust development.sh source call.
5775 * configure: Regenerate.
5776
0a261ed8
PA
57772014-06-02 Pedro Alves <palves@redhat.com>
5778
5779 * ax.c (gdb_free_agent_expr): New function.
5780 * ax.h (gdb_free_agent_expr): New declaration.
5781 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5782 list.
5783 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5784 static.
5785 (clear_breakpoint_conditions_and_commands): New function.
5786 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5787 (clear_breakpoint_conditions_and_commands): New declaration.
5788
e9dae05e
RR
57892014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5790
5791 * linux-aarch64-low.c (asm/ptrace.h): Include.
5792
5876f503
JK
57932014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5794
5795 Fix TLS access for -static -pthread.
5796 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5797 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5798 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5799
802e8e6d
PA
58002014-05-20 Pedro Alves <palves@redhat.com>
5801
5802 * linux-aarch64-low.c (aarch64_insert_point)
5803 (aarch64_remove_point): No longer check whether the type is
5804 supported here. Adjust to new interface.
5805 (the_low_target): Install aarch64_supports_z_point_type as
5806 supports_z_point_type method.
5807 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5808 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5809 instead of a Z packet char. Adjust.
5810 (arm_supports_z_point_type): New function.
5811 (arm_insert_point, arm_remove_point): Adjust to new interface.
5812 (the_low_target): Install arm_supports_z_point_type.
5813 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5814 (cris_insert_point, cris_remove_point): Adjust to new interface.
5815 Don't check whether the type is supported here.
5816 (the_low_target): Install cris_supports_z_point_type.
5817 * linux-low.c (linux_supports_z_point_type): New function.
5818 (linux_insert_point, linux_remove_point): Adjust to new interface.
5819 * linux-low.h (struct linux_target_ops) <insert_point,
5820 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5821 raw_breakpoint pointer parameter.
5822 <supports_z_point_type>: New method.
5823 * linux-mips-low.c (mips_supports_z_point_type): New function.
5824 (mips_insert_point, mips_remove_point): Adjust to new interface.
5825 Use mips_supports_z_point_type.
5826 (the_low_target): Install mips_supports_z_point_type.
5827 * linux-ppc-low.c (the_low_target): Install NULL as
5828 supports_z_point_type method.
5829 * linux-s390-low.c (the_low_target): Install NULL as
5830 supports_z_point_type method.
5831 * linux-sparc-low.c (the_low_target): Install NULL as
5832 supports_z_point_type method.
5833 * linux-x86-low.c (x86_supports_z_point_type): New function.
5834 (x86_insert_point): Adjust to new insert_point interface. Use
5835 insert_memory_breakpoint. Adjust to new
5836 i386_low_insert_watchpoint interface.
5837 (x86_remove_point): Adjust to remove_point interface. Use
5838 remove_memory_breakpoint. Adjust to new
5839 i386_low_remove_watchpoint interface.
5840 (the_low_target): Install x86_supports_z_point_type.
5841 * lynx-low.c (lynx_target_ops): Install NULL as
5842 supports_z_point_type callback.
5843 * nto-low.c (nto_supports_z_point_type): New.
5844 (nto_insert_point, nto_remove_point): Adjust to new interface.
5845 (nto_target_ops): Install nto_supports_z_point_type.
5846 * mem-break.c: Adjust intro comment.
5847 (struct raw_breakpoint) <raw_type, size>: New fields.
5848 <inserted>: Update comment.
5849 <shlib_disabled>: Delete field.
5850 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5851 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5852 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5853 (raw_bkpt_type_to_target_hw_bp_type): New function.
5854 (find_enabled_raw_code_breakpoint_at): New function.
5855 (find_raw_breakpoint_at): New type and size parameters. Use them.
5856 (insert_memory_breakpoint): New function, based off
5857 set_raw_breakpoint_at.
5858 (remove_memory_breakpoint): New function.
5859 (set_raw_breakpoint_at): Reimplement.
5860 (set_breakpoint): New, based on set_breakpoint_at.
5861 (set_breakpoint_at): Reimplement.
5862 (delete_raw_breakpoint): Go through the_target->remove_point
5863 instead of assuming memory breakpoints.
5864 (find_gdb_breakpoint_at): Delete.
5865 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5866 (find_gdb_breakpoint): New function.
5867 (set_gdb_breakpoint_at): Delete.
5868 (z_type_supported): New function.
5869 (set_gdb_breakpoint_1): New function, loosely based off
5870 set_gdb_breakpoint_at.
5871 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5872 (delete_gdb_breakpoint_at): Delete.
5873 (delete_gdb_breakpoint_1): New function, loosely based off
5874 delete_gdb_breakpoint_at.
5875 (delete_gdb_breakpoint): New function.
5876 (clear_gdb_breakpoint_conditions): Rename to ...
5877 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5878 breakpoint.
5879 (add_condition_to_breakpoint): Make static.
5880 (add_breakpoint_condition): Take a struct breakpoint pointer
5881 instead of an address. Adjust.
5882 (gdb_condition_true_at_breakpoint): Rename to ...
5883 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5884 z_type parameter.
5885 (gdb_condition_true_at_breakpoint): Reimplement.
5886 (add_breakpoint_commands): Take a struct breakpoint pointer
5887 instead of an address. Adjust.
5888 (gdb_no_commands_at_breakpoint): Rename to ...
5889 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5890 parameter. Return true if no breakpoint was found. Change debug
5891 output.
5892 (gdb_no_commands_at_breakpoint): Reimplement.
5893 (run_breakpoint_commands): Rename to ...
5894 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5895 and change return type to boolean.
5896 (run_breakpoint_commands): New function.
5897 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5898 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5899 breakpoint. Go through the_target->remove_point instead of
5900 assuming memory breakpoint.
5901 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5902 software and hardware breakpoints.
5903 (reinsert_raw_breakpoint): Go through the_target->insert_point
5904 instead of assuming memory breakpoint.
5905 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5906 software and hardware breakpoints.
5907 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5908 Check both software and hardware breakpoints.
5909 (validate_inserted_breakpoint): Assert the breakpoint is a
5910 software breakpoint. Set the inserted flag to -1 instead of
5911 setting shlib_disabled.
5912 (delete_disabled_breakpoints): Adjust.
5913 (validate_breakpoints): Only validate software breakpoints.
5914 Adjust to inserted flag change.
5915 (check_mem_read, check_mem_write): Skip breakpoint types other
5916 than software breakpoints. Adjust to inserted flag change.
5917 * mem-break.h (enum raw_bkpt_type): New enum.
5918 (raw_breakpoint, struct process_info): Forward declare.
5919 (Z_packet_to_target_hw_bp_type): Delete declaration.
5920 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5921 (set_gdb_breakpoint, delete_gdb_breakpoint)
5922 (clear_breakpoint_conditions): New declarations.
5923 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5924 (breakpoint_inserted_here): Update comment.
5925 (add_breakpoint_condition, add_breakpoint_commands): Replace
5926 address parameter with a breakpoint pointer parameter.
5927 (gdb_breakpoint_here): Update comment.
5928 (delete_gdb_breakpoint_at): Delete.
5929 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5930 * server.c (process_point_options): Take a struct breakpoint
5931 pointer instead of an address. Adjust.
5932 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5933 delete_gdb_breakpoint.
5934 * spu-low.c (spu_target_ops): Install NULL as
5935 supports_z_point_type method.
5936 * target.h: Include mem-break.h.
5937 (struct target_ops) <prepare_to_access_memory>: Update comment.
5938 <supports_z_point_type>: New field.
5939 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5940 instead of a char. Also take a raw breakpoint pointer.
5941 * win32-arm-low.c (the_low_target): Install NULL as
5942 supports_z_point_type.
5943 * win32-i386-low.c (i386_supports_z_point_type): New function.
5944 (i386_insert_point, i386_remove_point): Adjust to new interface.
5945 (the_low_target): Install i386_supports_z_point_type.
5946 * win32-low.c (win32_supports_z_point_type): New function.
5947 (win32_insert_point, win32_remove_point): Adjust to new interface.
5948 (win32_target_ops): Install win32_supports_z_point_type.
5949 * win32-low.h (struct win32_target_ops):
5950 <supports_z_point_type>: New method.
5951 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5952 instead of a char. Also take a raw breakpoint pointer.
5953
932539e3
PA
59542014-05-20 Pedro Alves <palves@redhat.com>
5955
5956 * mem-break.h: Include break-common.h.
5957 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5958 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5959 (Z_packet_to_target_hw_bp_type): New declaration.
5960 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5961 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5962 (Z_PACKET_ACCESS_WP): Delete macros.
5963 (Z_packet_to_hw_type): Delete function.
5964 * i386-low.h: Don't include break-common.h here.
5965 (Z_packet_to_hw_type): Delete declaration.
5966 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5967 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5968 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5969 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5970 * linux-aarch64-low.c: Don't include break-common.h here.
5971 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5972 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5973 (Z_packet_to_target_hw_bp_type): Delete function.
5974 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5975 function.
5976 (mips_insert_point, mips_remove_point): Use
5977 Z_packet_to_target_hw_bp_type.
5978
4ff0d3d8
PA
59792014-05-20 Pedro Alves <palves@redhat.com>
5980
5981 * linux-aarch64-low.c: Include break-common.h.
5982 (enum target_point_type): Delete.
5983 (Z_packet_to_point_type): Rename to ...
5984 (Z_packet_to_target_hw_bp_type): ... this, and return a
5985 target_hw_bp_type instead.
5986 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5987 instead of an enum target_point_type.
5988 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5989 breakpoint type.
5990 (aarch64_dr_state_insert_one_point)
5991 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5992 (aarch64_handle_aligned_watchpoint)
5993 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5994 Take an enum target_hw_bp_type instead of an enum
5995 target_point_type.
5996 (aarch64_supports_z_point_type): New function.
5997 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5998 use Z_packet_to_target_hw_bp_type.
5999
786dc519
JB
60002014-05-20 Joel Brobecker <brobecker@adacore.com>
6001
6002 * configure.ac: Only use -Werror by default when DEVELOPMENT
6003 is true.
6004 * configure: Regenerate.
6005
9e0aa64f
JK
60062014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6007
6008 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6009 * linux-x86-low.c (X86_64_USER_REGS): New.
6010 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6011
2b577b92
YQ
60122014-04-28 Yao Qi <yao@codesourcery.com>
6013
6014 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6015 name.
6016
94611da2
PA
60172014-04-25 Pedro Alves <palves@redhat.com>
6018
6019 PR server/16255
6020 * linux-low.c (linux_attach_fail_reason_string): New function.
6021 (linux_attach_lwp): Delete.
6022 (linux_attach_lwp_1): Rename to ...
6023 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6024 argument. Remove "initial" parameter. Return int instead of
6025 void. Don't error or warn here.
6026 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6027 failure to attach to the tgid. Call warning when failing to
6028 attach to an lwp.
6029 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6030 argument. Remove "initial" parameter. Return int instead of
6031 void. Don't error or warn here.
6032 (linux_attach_fail_reason_string): New declaration.
6033 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6034 interface change. Use linux_attach_fail_reason_string.
6035
01f9f808
MS
60362014-04-24 Michael Sturm <michael.sturm@mintel.com>
6037 Walfred Tedeschi <walfred.tedeschi@intel.com>
6038
6039 * Makefile.in: Added rules to handle new files
6040 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6041 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6042 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6043 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6044 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6045 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6046 x32-avx512-linux.o.
6047 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6048 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6049 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6050 i386/x32-avx512.xml.
6051 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6052 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6053 i386/x32-avx512-linux.xml.
6054 * i387-fp.c (num_avx512_k_registers): New constant for number
6055 of K registers.
6056 (num_avx512_zmmh_low_registers): New constant for number of
6057 lower ZMM registers (0-15).
6058 (num_avx512_zmmh_high_registers): New constant for number of
6059 higher ZMM registers (16-31).
6060 (num_avx512_ymmh_registers): New contant for number of higher
6061 YMM registers (ymm16-31 added by avx521 on x86_64).
6062 (num_avx512_xmm_registers): New constant for number of higher
6063 XMM registers (xmm16-31 added by AVX512 on x86_64).
6064 (struct i387_xsave): Add space for AVX512 registers.
6065 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6066 Add code to handle AVX512 registers.
6067 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6068 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6069 prototypei from generated file.
6070 (tdesc_amd64_avx512_linux): Likewise.
6071 (init_registers_x32_avx512_linux): Likewise.
6072 (tdesc_x32_avx512_linux): Likewise.
6073 (init_registers_i386_avx512_linux): Likewise.
6074 (tdesc_i386_avx512_linux): Likewise.
6075 (x86_64_regmap): Add AVX512 registers.
6076 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6077 mask.
6078 (initialize_low_arch): Add code to initialize AVX512 registers.
6079
51aa91f9
PA
60802014-04-23 Pedro Alves <palves@redhat.com>
6081
6082 * mem-break.c (find_gdb_breakpoint_at): Make static.
6083 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6084
a4165e94
PA
60852014-04-23 Pedro Alves <palves@redhat.com>
6086
6087 * i386-low.c: Don't include break-common.h here.
6088 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6089 prototype to take target_hw_bp_type as argument instead of a Z
6090 packet char.
6091 * i386-low.h: Include break-common.h here.
6092 (Z_packet_to_hw_type): Declare.
6093 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6094 prototypes.
6095 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6096 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6097 (x86_remove_point): Convert the packet number to a
6098 target_hw_bp_type before calling i386_low_remove_watchpoint.
6099 * win32-i386-low.c (i386_insert_point): Convert the packet number
6100 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6101 (i386_remove_point): Convert the packet number to a
6102 target_hw_bp_type before calling i386_low_remove_watchpoint.
6103
b8acf843
PA
61042014-04-23 Pedro Alves <palves@redhat.com>
6105
6106 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6107
d708bcd1
PA
61082014-04-10 Pedro Alves <palves@redhat.com>
6109
6110 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6111 Check if the condition or command is NULL before checking if the
6112 breakpoint is known. On success, return true.
6113 * mem-break.h (add_breakpoint_condition): Document return.
6114 (add_breakpoint_commands): Add describing comment.
6115 * server.c (skip_to_semicolon): New function.
6116 (process_point_options): Use it.
6117
2eec7d5b
PA
61182014-04-09 Pedro Alves <palves@redhat.com>
6119
6120 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6121 to lwpid_of.
6122
fa96cb38
PA
61232014-02-27 Pedro Alves <palves@redhat.com>
6124
6125 PR 12702
6126 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6127 macros.
6128 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6129 output.
6130 (last_thread_of_process_p): Take a PID argument instead of a
6131 thread pointer.
6132 (linux_wait_for_lwp): Delete.
6133 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6134 functions.
6135 (linux_low_filter_event): New function, party factored out from
6136 linux_wait_for_event.
6137 (linux_wait_for_event): Rename to ...
6138 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6139 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6140 sigsuspend. Check for zombie leaders.
6141 (linux_wait_for_event): Reimplement as wrapper around
6142 linux_wait_for_event_filtered.
6143 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6144 a normal or signal exit is seen, it's the whole process exiting.
6145 (wait_for_sigstop): No longer a for_each_inferior callback.
6146 Rewrite on top of linux_wait_for_event_filtered.
6147 (stop_all_lwps): Call wait_for_sigstop directly.
6148 * server.c (resume, handle_target_event): Handle
6149 TARGET_WAITKIND_NO_RESUMED.
6150
d763de10
JB
61512014-02-26 Joel Brobecker <brobecker@adacore.com>
6152
6153 * win32-low.c (psapi_get_dll_name,
6154 * win32_CreateToolhelp32Snapshot): Delete.
6155 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6156 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6157 Delete.
6158 (handle_load_dll): Add function description.
6159 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6160
850a0f76
JB
61612014-02-26 Joel Brobecker <brobecker@adacore.com>
6162
6163 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6164 Add comment.
6165 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6166 base address when calling win32_add_one_solib.
6167 (handle_load_dll): Delete local variable load_addr.
6168 Remove 0x1000 offset applied to DLL base address when calling
6169 win32_add_one_solib.
6170 (handle_unload_dll): Add comment.
6171
f25b3fc3
JB
61722014-02-26 Joel Brobecker <brobecker@adacore.com>
6173
6174 * win32-low.c (win32_add_all_dlls): Renames
6175 win32_ensure_ntdll_loaded. Rewrite function documentation.
6176 Adjust implementation to always load all DLLs.
6177 Add 0x1000 offset to DLL base address when calling
6178 win32_add_one_solib.
6179 (child_initialization_done): New static global.
6180 (do_initial_child_stuff): Set child_initialization_done to
6181 zero during child initialization, and 1 after. Replace call
6182 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6183 Add comment.
6184 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6185 (handle_unload_dll): Add function documentation.
6186 (get_child_debug_event): Ignore load and unload DLL events
6187 during child initialization.
6188
d86d4aaf
DE
61892014-02-20 Doug Evans <dje@google.com>
6190
3bc32da3 6191 Remove global all_lwps.
d86d4aaf
DE
6192 * inferiors.h (ptid_of): Move here from linux-low.h.
6193 (pid_of, lwpid_of): Ditto.
6194 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6195 parameter is a struct thread_info * now.
6196 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6197 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6198 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6199 directly.
6200 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6201 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6202 * linux-arm-low.c (update_registers_callback): Update, "entry"
6203 parameter is a struct thread_info * now.
6204 Fetch lwpid from current_inferior directly.
6205 (arm_insert_point): Pass &all_threads to find_inferior instead of
6206 &all_lwps.
6207 (arm_remove_point): Ditto.
6208 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6209 (arm_prepare_to_resume): Fetch pid from thread.
6210 (arm_read_description): Fetch lwpid from current_inferior directly.
6211 * linux-low.c (all_lwps): Delete.
6212 (delete_lwp): Delete call to remove_inferior.
6213 (handle_extended_wait): Fetch lwpid from thread.
6214 (add_lwp): Don't set lwp->entry.id. Remove call to
6215 add_inferior_to_list.
6216 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6217 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6218 (kill_one_lwp_callback): Ditto.
6219 (linux_kill): Don't dereference NULL pointer.
6220 Fetch ptid,lwpid from thread.
6221 (get_detach_signal): Fetch ptid from thread.
6222 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6223 Simplify call to regcache_invalidate_thread.
6224 (delete_lwp_callback): Update, "entry" parameter is a
6225 struct thread_info * now. Fetch pid from thread.
6226 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6227 (status_pending_p_callback): Update, "entry" parameter is a
6228 struct thread_info * now. Fetch ptid from thread.
6229 (find_lwp_pid): Update, "entry" parameter is a
6230 struct thread_info * now.
6231 (linux_wait_for_lwp): Fetch pid from thread.
6232 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6233 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6234 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6235 (dequeue_one_deferred_signal): Ditto.
6236 (cancel_breakpoint): Fetch ptid from current_inferior.
6237 (linux_wait_for_event): Pass &all_threads to find_inferior,
6238 not &all_lwps. Fetch ptid, lwpid from thread.
6239 (count_events_callback): Update, "entry" parameter is a
6240 struct thread_info * now.
6241 (select_singlestep_lwp_callback): Ditto.
6242 (select_event_lwp_callback): Ditto.
6243 (cancel_breakpoints_callback): Ditto.
6244 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6245 not &all_lwps.
6246 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6247 (unsuspend_one_lwp): Update, "entry" parameter is a
6248 struct thread_info * now.
6249 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6250 not &all_lwps.
6251 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6252 Fetch lwpid from thread, not lwp.
6253 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6254 Pass &all_threads to find_inferior, not &all_lwps.
6255 (send_sigstop): Fetch lwpid from thread, not lwp.
6256 (send_sigstop_callback): Update, "entry" parameter is a
6257 struct thread_info * now.
6258 (suspend_and_send_sigstop_callback): Ditto.
6259 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6260 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6261 struct thread_info * now.
6262 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6263 from thread, lwp.
6264 (lwp_running): Update, "entry" parameter is a
6265 struct thread_info * now.
6266 (stop_all_lwps): Fetch ptid from thread.
6267 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6268 (linux_resume_one_lwp): Fetch lwpid from thread.
6269 (linux_set_resume_request): Update, "entry" parameter is a
6270 struct thread_info * now. Fetch pid, lwpid from thread.
6271 (resume_status_pending_p): Update, "entry" parameter is a
6272 struct thread_info * now.
6273 (need_step_over_p): Ditto. Fetch lwpid from thread.
6274 (start_step_over): Fetch lwpid from thread.
6275 (linux_resume_one_thread): Update, "entry" parameter is a
6276 struct thread_info * now. Fetch lwpid from thread.
6277 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6278 (proceed_one_lwp): Update, "entry" parameter is a
6279 struct thread_info * now. Fetch lwpid from thread.
6280 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6281 struct thread_info * now.
6282 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6283 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6284 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6285 directly.
6286 (regsets_store_inferior_registers): Ditto.
6287 (fetch_register, store_register): Ditto.
6288 (linux_read_memory, linux_write_memory): Ditto.
6289 (linux_request_interrupt): Ditto.
6290 (linux_read_auxv): Ditto.
6291 (linux_xfer_siginfo): Ditto.
6292 (linux_qxfer_spu): Ditto.
6293 (linux_qxfer_libraries_svr4): Ditto.
6294 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6295 moved to inferiors.h.
6296 (get_lwp): Delete.
6297 (get_thread_lwp): Update.
6298 (struct lwp_info): Delete member "entry". Simplify comment for
6299 member "thread".
6300 (all_lwps): Delete.
6301 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6302 current_inferior directly.
6303 (update_watch_registers_callback): Update, "entry" parameter is a
6304 struct thread_info * now. Fetch pid from thread.
6305 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6306 (mips_insert_point): Fetch lwpid from current_inferior.
6307 Pass &all_threads to find_inferior, not &all_lwps.
6308 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6309 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6310 directly.
6311 (mips_stopped_data_address): Ditto.
6312 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6313 directly.
6314 * linux-tile-low.c (tile_arch_setup): Ditto.
6315 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6316 (update_debug_registers_callback): Update, "entry" parameter is a
6317 struct thread_info * now. Fetch pid from thread.
6318 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6319 Pass &all_threads to find_inferior, not &all_lwps.
6320 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6321 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6322 Pass &all_threads to find_inferior, not &all_lwps.
6323 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6324 (i386_dr_low_get_status): Ditto.
6325 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6326 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6327 (x86_linux_read_description): Ditto.
6328 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6329
3b8361aa
DE
63302014-02-20 Doug Evans <dje@google.com>
6331
6332 * inferiors.c (get_first_inferior): Fix buglet.
6333
f7667f0d
DE
63342014-02-19 Doug Evans <dje@google.com>
6335
6336 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6337 * inferiors.c (add_thread): Change result type to struct thread_info *.
6338 All callers updated.
6339 (add_lwp): Call add_thread here instead of in callers.
6340 All callers updated.
6341 * linux-low.h (get_lwp_thread): Rewrite.
6342 (struct lwp_info): New member "thread".
6343
b3312d80
DE
63442014-02-19 Doug Evans <dje@google.com>
6345
6346 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6347 All callers updated.
6348
ecc6f45c
DE
63492014-02-19 Doug Evans <dje@google.com>
6350
6351 * inferiors.c (add_thread): Fix whitespace.
6352
649ebbca
DE
63532014-02-19 Doug Evans <dje@google.com>
6354
6355 * dll.c (clear_dlls): Replace accessing list implemention details
6356 with API function.
6357 * gdbthread.h (get_first_thread): Declare.
6358 * inferiors.c (for_each_inferior_with_data): New function.
6359 (get_first_thread): New function.
6360 (find_thread_ptid): Simplify.
6361 (get_first_inferior): New function.
6362 (clear_list): Delete.
6363 (one_inferior_p): New function.
6364 (clear_inferior_list): New function.
6365 (clear_inferiors): Update.
6366 * inferiors.h (for_each_inferior_with_data): Declare.
6367 (clear_inferior_list): Declare.
6368 (one_inferior_p): Declare.
6369 (get_first_inferior): Declare.
6370 * linux-low.c (linux_wait_for_event): Replace accessing list
6371 implemention details with API function.
6372 * server.c (target_running): Ditto.
6373 (accumulate_file_name_length): New function.
6374 (emit_dll_description): New function.
6375 (handle_qxfer_libraries): Replace accessing list implemention
6376 details with API function.
6377 (handle_qxfer_threads_worker): New function.
6378 (handle_qxfer_threads_proper): Replace accessing list implemention
6379 details with API function.
6380 (handle_query): Ditto.
6381 (visit_actioned_threads_callback_ftype): New typedef.
6382 (visit_actioned_threads_data): New struct.
6383 (visit_actioned_threads): Rewrite to be find_inferior callback.
6384 (resume): Call find_inferior.
6385 (handle_status): Replace accessing list implemention
6386 details with API function.
6387 (process_serial_event): Replace accessing list implemention details
6388 with API function.
6389 * target.c (set_desired_inferior): Replace accessing list implemention
6390 details with API function.
6391 * tracepoint.c (same_process_p): New function.
6392 (gdb_agent_about_to_close): Replace accessing list implemention
6393 details with API function.
6394 * win32-low.c (child_delete_thread): Replace accessing list
6395 implemention details with API function.
6396 (match_dll_by_basename): New function.
6397 (dll_is_loaded_by_basename): New function.
6398 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6399 details call to dll_is_loaded_by_basename.
6400
80894984
DE
64012014-02-19 Doug Evans <dje@google.com>
6402
6403 * dll.h (struct dll_info): Add comment.
6404 * gdbthread.h (struct thread_info): Add comment.
6405 (current_ptid): Simplify.
6406 * inferiors.c (add_process): Update.
6407 (remove_process): Update.
6408 * inferiors.h (struct process_info): Rename member "head" to "entry".
6409 * linux-low.c (delete_lwp): Update.
6410 (add_lwp): Update.
6411 (last_thread_of_process_p): Update.
6412 (kill_one_lwp_callback, linux_kill): Update.
6413 (status_pending_p_callback): Update.
6414 (wait_for_sigstop): Update. Simplify read of ptid.
6415 (start_step_over): Update.
6416 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6417 (get_lwp_thread): Update.
6418 (struct lwp_info): Rename member "head" to "entry".
6419 * regcache.h (inferior_list_entry): Delete.
6420 * server.c (kill_inferior_callback): Update.
6421 (detach_or_kill_inferior_callback): Update.
6422 (print_started_pid): Update.
6423 (print_attached_pid): Update.
6424 (process_serial_event): Simplify read of ptid.
6425 * thread-db.c (thread_db_create_event): Update.
6426 (thread_db_get_tls_address): Update.
6427 * win32-low.c (current_inferior_ptid): Simplify.
6428
46917d26
TT
64292014-02-19 Tom Tromey <tromey@redhat.com>
6430
6431 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6432 argument.
6433 (target_supports_btrace): Update.
6434
0759a81e
YQ
64352014-02-14 Yao Qi <yao@codesourcery.com>
6436
6437 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6438 (rsp-low-ipa.o): New target.
6439
a7191e8b
TT
64402014-02-12 Tom Tromey <tromey@redhat.com>
6441
6442 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6443 convert_ascii_to_int.
6444 * regcache.c (registers_to_string): Likewise.
6445 * remote-utils.c (decode_M_packet): Likewise.
6446 * server.c (process_serial_event): Likewise.
6447
ff0e980e
TT
64482014-02-12 Tom Tromey <tromey@redhat.com>
6449
6450 * server.c (handle_query, handle_v_run): Use hex2bin, not
6451 unhexify.
6452 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6453
e9371aff
TT
64542014-02-12 Tom Tromey <tromey@redhat.com>
6455
6456 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6457 convert_int_to_ascii.
6458 * regcache.c (registers_to_string, collect_register_as_string):
6459 Likewise.
6460 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6461 Likewise.
6462 * server.c (process_serial_event): Likewise.
6463 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6464 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6465
971dc0b8
TT
64662014-02-12 Tom Tromey <tromey@redhat.com>
6467
6468 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6469 bin2hex, not hexify.
6470 * tracepoint.c (cmd_qtstatus): Likewise.
6471
0a822afb
TT
64722014-02-12 Tom Tromey <tromey@redhat.com>
6473
6474 * remote-utils.c (monitor_output): Pass explicit length to
6475 hexify.
6476
9c3d6531
TT
64772014-02-12 Tom Tromey <tromey@redhat.com>
6478
6479 * tracepoint.c: Include rsp-low.h.
6480 * server.c: Include rsp-low.h.
6481 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6482 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6483 declare.
6484 * remote-utils.c: Include rsp-low.h.
6485 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6486 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6487 (convert_int_to_ascii, convert_ascii_to_int): Move to
6488 common/rsp-low.c.
6489 * regcache.c: Include rsp-low.h.
6490 * ax.c: Include rsp-low.h.
6491 * Makefile.in (SFILES): Add common/rsp-low.c.
6492 (OBS): Add rsp-low.o.
6493 (rsp-low.o): New target.
6494
01fd3ea5
TT
64952014-02-12 Tom Tromey <tromey@redhat.com>
6496
6497 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6498 Include print-utils.h.
6499 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6500 (plongest, thirty_two, phex_nz): Remove.
6501 * Makefile.in (SFILES): Add common/print-utils.c.
6502 (OBS): Add print-utils.o.
6503 (print-utils-ipa.o): New target.
6504 (print-utils.o): New target.
6505 (IPA_OBJS): Add print-utils-ipa.o.
6506
e99dc820
TT
65072014-02-06 Tom Tromey <tromey@redhat.com>
6508
6509 * Makefile.in (SFILES): Fix indentation.
6510
ee1e2d4f
DE
65112014-02-05 Doug Evans <dje@google.com>
6512
6513 * linux-low.c (linux_wait_for_event): Improve comment.
6514 (linux_wait_1): Keep current_inferior in sync with event_child.
6515
f5a02773
DE
65162014-01-22 Doug Evans <dje@google.com>
6517
6518 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6519
87ce2a04
DE
65202014-01-22 Doug Evans <dje@google.com>
6521
6522 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6523 * configure: Regenerate.
6524 * config.in: Regenerate.
6525 * Makefile.in (SFILES): Add debug.c.
6526 (OBS): Add debug.o.
6527 * debug.c: New file.
6528 * debug.h: New file.
6529 * linux-aarch64-low.c (*): Update all debugging printfs to use
6530 debug_printf instead of fprintf.
6531 * linux-arm-low.c (*): Ditto.
6532 * linux-cris-low.c (*): Ditto.
6533 * linux-crisv32-low.c (*): Ditto.
6534 * linux-m32r-low.c (*): Ditto.
6535 * linux-sparc-low.c (*): Ditto.
6536 * linux-x86.c (*): Ditto.
6537 * linux-low.c (*): Ditto.
6538 (linux_wait_1): Add calls to debug_enter, debug_exit.
6539 (linux_wait): Remove redundant debugging printf.
6540 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6541 (linux_resume, unstop_all_lwps): Ditto.
6542 * mem-break.c (*): Update all debugging printfs to use
6543 debug_printf instead of fprintf.
6544 * remote-utils.c (*): Ditto.
6545 * thread-db.c (*): Ditto.
6546 * server.c #include <ctype.h>, "gdb_vecs.h".
6547 (debug_threads): Moved to debug.c.
6548 (*): Update all debugging printfs to use debug_printf instead of
6549 fprintf.
6550 (start_inferior): Replace call to fflush with call to debug_flush.
6551 (monitor_show_help): Mention set debug-format.
6552 (parse_debug_format_options): New function.
6553 (handle_monitor_command): Handle "monitor set debug-format".
6554 (gdbserver_usage): Mention --debug-format.
6555 (main): Parse --debug-format.
6556 * server.h (debug_threads): Declaration moved to debug.h.
6557 #include "debug.h".
6558 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6559 trace_debug_1 that uses debug_printf.
6560 (tracepoint_look_up_symbols): Update all debugging printfs to use
6561 debug_printf instead of fprintf.
6562
e671835b
BS
65632014-01-20 Baruch Siach <baruch@tkos.co.il>
6564
6565 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6566 sys/ptrace.h.
6567
b5737fa9
PA
65682014-01-17 Pedro Alves <palves@redhat.com>
6569
ea38d2a9 6570 PR build/16445
c7faa97a
PA
6571 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6572 defined after including gdb_proc_service.h.
b5737fa9 6573
40ed484e
DE
65742014-01-16 Doug Evans <dje@google.com>
6575
6576 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6577 (match_dll): Use it.
6578
969c39fb
MM
65792014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6580
6581 * target.h (target_ops) <read_btrace>: Change parameters and
6582 return type to allow error reporting.
6583 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6584 trace reading errors on.
6585 * linux-low.c (linux_low_read_btrace): Pass trace reading
6586 errors on.
6587 (linux_low_disable_btrace): New.
6588
ab7f45ba
DE
65892014-01-15 Doug Evans <dje@google.com>
6590
6591 * inferiors.c (thread_id_to_gdb_id): Delete.
6592 * inferiors.h (thread_id_to_gdb_id): Delete.
6593
66af0f44
EZ
65942014-01-13 Eli Zaretskii <eliz@gnu.org>
6595
6596 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6597 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6598 versions.
6599
9939e131
PA
66002014-01-08 Pedro Alves <palves@redhat.com>
6601
6602 * server.c (handle_status): Don't discard previous queued stop
6603 replies or thread's pending status here.
6604 (main) <disconnection>: Do it here instead.
6605
b7ea362b
PA
66062014-01-08 Pedro Alves <palves@redhat.com>
6607
6608 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6609 * server.c (visit_actioned_threads, handle_pending_status): New
6610 function.
6611 (handle_v_cont): Factor out parts to ...
6612 (resume): ... this new function. If in all-stop, and a thread
6613 being resumed has a pending status, report it without actually
6614 resuming.
6615 (myresume): Adjust to use the new 'resume' function.
6616 (clear_pending_status_callback, set_pending_status_callback)
6617 (find_status_pending_thread_callback): New functions.
6618 (handle_status): Handle the case of multiple threads having
6619 interesting statuses to report. Report threads' real last signal
6620 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6621 with an interesting thread to report the status for, instead of
6622 always reporting the status of the first thread.
6623
28498c42
JB
66242014-01-01 Joel Brobecker <brobecker@adacore.com>
6625
6626 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6627 * gdbreplay.c (gdbreplay_version): Likewise.
6628
f45c82da
YZ
66292013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6630
6631 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6632 iov.iov_len with the real length in use.
6633
379a5e2d
JB
66342013-12-13 Joel Brobecker <brobecker@adacore.com>
6635
6636 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6637 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6638 for all targets that use win32-low.c.
6639 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6640 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6641
4210d83e
PA
66422013-12-13 Pedro Alves <palves@redhat.com>
6643
6644 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6645 if equal to TARGET_WAITKIND_LOADED.
6646 * win32-low.c (cached_status): New static global.
6647 (win32_wait): Add declaration.
6648 (do_initial_child_stuff): Flush all initial pending debug events
6649 up to the initial breakpoint.
6650 (win32_wait): If CACHED_STATUS was set, return that instead
6651 of doing a real wait. Remove the code resuming the execution
6652 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6653 during the initial phase. Also remove the code changing
6654 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6655 TARGET_WAITKIND_STOPPED.
6656
e7f0d979
YQ
66572013-12-11 Yao Qi <yao@codesourcery.com>
6658
6659 * notif.c (handle_notif_ack): Return 0 if no notification
6660 matches.
6661
ebcf782c
DE
66622013-11-20 Doug Evans <dje@google.com>
6663
6664 * linux-low.c (linux_set_resume_request): Fix comment.
6665
20ad9378
DE
66662013-11-20 Doug Evans <dje@google.com>
6667
6668 * linux-low.c (resume_status_pending_p): Tweak comment.
6669
a196ebeb
WT
66702013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6671
6672 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6673 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6674 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6675 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6676 (srv_amd64_regobj): Add amd64-mpx.o.
6677 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6678 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6679 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6680 * i387-fp.c (num_pl_bnd_register) Added constant.
6681 (num_pl_bnd_cfg_registers) Added constant.
6682 (struct i387_xsave) Added reserved area and MPX fields.
6683 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6684 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6685 function.
6686 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6687 (init_registers_amd64_mpx_linux): Declare new function.
6688 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6689 (x86_64_regmap): Add MPX registers.
6690 (x86_linux_read_description): Add MPX case.
6691 (initialize_low_arch): Initialize MPX targets.
6692
0080a2f6
TT
66932013-11-18 Tom Tromey <tromey@redhat.com>
6694
6695 * configure: Rebuild.
6696 * configure.ac: Don't check for stdlib.h.
6697 * gdbreplay.c: Unconditionally include stdlib.h.
6698
2978b111
TT
66992013-11-18 Tom Tromey <tromey@redhat.com>
6700
6701 * config.in: Rebuild.
6702 * configure: Rebuild.
6703 * configure.ac: Don't use AC_HEADER_DIRENT.
6704
a3d08894
TT
67052013-11-18 Tom Tromey <tromey@redhat.com>
6706
6707 * server.h: Don't check HAVE_STRING_H.
6708 * gdbreplay.c: Don't check HAVE_STRING_H.
6709 * configure: Rebuild.
6710
0a5dd17d
TT
67112013-11-18 Tom Tromey <tromey@redhat.com>
6712
6713 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6714 LIBGNU.
6715
1bd2f0ba
TT
67162013-11-08 Tom Tromey <tromey@redhat.com>
6717
6718 * configure, config.in: Rebuild.
6719 * configure.ac: Remove unused configury.
6720
3266f10b
TT
67212013-11-08 Tom Tromey <tromey@redhat.com>
6722
6723 * acinclude.m4: Include common.m4, codeset.m4.
6724 * configure, config.in: Rebuild.
6725 * configure.ac: Use GDB_AC_COMMON.
6726
6682d959
AA
67272013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6728
6729 * linux-s390-low.c (HWCAP_S390_TE): New define.
6730 (s390_arch_setup): Consider the TE field in the HWCAP for
6731 determining 'have_regset_tdb'.
6732
fd0a4d76
SDJ
67332013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6734
6735 PR gdb/16014
6736 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6737 call to sizeof.
6738
1a3d890b
PA
67392013-10-02 Pedro Alves <palves@redhat.com>
6740
6741 * server.c (process_serial_event): Don't output "GDBserver
6742 exiting" if GDB is connected through stdio.
6743 * target.c (mywait): Likewise, be silent if GDB is connected
6744 through stdio.
6745
97ad4581
JB
67462013-10-01 Joel Brobecker <brobecker@adacore.com>
6747
6748 * lynx-low.c (lynx_add_threads_after_attach): New function.
6749 (lynx_attach): Remove call to add_thread. Add call to
6750 lynx_add_threads_after_attach instead.
6751
5b4e221c
MF
67522013-09-28 Mike Frysinger <vapier@gentoo.org>
6753
6754 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6755 * config.in, configure: Regenerated.
6756
ee47b2f8
YQ
67572013-09-18 Yao Qi <yao@codesourcery.com>
6758
6759 PR server/15959
6760 * server.c (start_inferior): Clear 'resume_info'.
6761
d6707650 67622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6763
d6707650
JW
6764 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6765 for each register.
6766
9243dd0e 67672013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6768
9243dd0e
JW
6769 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6770 linux-tile-low.o to srv_tgtobj.
6771
c623a6ef
WN
67722013-09-16 Will Newton <will.newton@linaro.org>
6773
6774 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6775 out regs.
6776
fb71d39e
PA
67772013-09-06 Pedro Alves <palves@redhat.com>
6778
6779 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6780 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6781 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6782 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6783 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6784 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6785
8e7e9910
PA
67862013-09-06 Pedro Alves <palves@redhat.com>
6787
6788 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6789 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6790
7c3a12ca
PA
67912013-09-06 Pedro Alves <palves@redhat.com>
6792
6793 * linux-amd64-ipa.c: Include tracepoint.h.
6794 * linux-i386-ipa.c: Include tracepoint.h.
6795
8eb3d7b6
RW
67962013-09-06 Ricard Wanderlof <ricardw@axis.com>
6797
6798 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6799 (ps_get_thread_area): New function.
6800
eddddb9d
RW
68012013-09-06 Ricard Wanderlof <ricardw@axis.com>
6802
6803 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6804 (initialize_low_arch): Call init_registers_crisv32 rather than
6805 init_register_crisv32.
6806
533b0600
PA
68072013-09-05 Pedro Alves <palves@redhat.com>
6808
6809 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6810 to ...
6811 * hostio.h: ... this new file.
6812 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6813 win32-low.c: Include hostio.h.
6814
0ce3d3b5
PA
68152013-09-05 Pedro Alves <palves@redhat.com>
6816
6817 * server.h (gdb_client_data, handler_func, callback_handler_func)
6818 (delete_file_handler, add_file_handler, append_callback_event)
6819 (delete_callback_event, start_event_loop, initialize_event_loop):
6820 Move to event-loop.h and include it.
6821 * event-loop.h: New file.
6822
799cdc37
PA
68232013-09-05 Pedro Alves <palves@redhat.com>
6824
6825 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6826 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6827 (loaded_dll, unloaded_dll): Move to ...
6828 * dll.h: ... this new file.
6829 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6830
6a6bbd9d
PA
68312013-09-05 Pedro Alves <palves@redhat.com>
6832
6833 * server.h (current_process, get_thread_process, all_processes)
6834 (add_inferior_to_list, for_each_inferior, current_inferior)
6835 (remove_inferior, add_process, remove_process, find_process_pid)
6836 (have_started_inferiors_p, have_attached_inferiors_p)
6837 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6838 (clear_inferiors, find_inferior, find_inferior_id)
6839 (inferior_target_data, set_inferior_target_data)
6840 (inferior_regcache_data, set_inferior_regcache_data): Move to
6841 inferiors.h, and include it.
6842 * inferiors.h: New file.
6843
f699aaba
PA
68442013-09-05 Pedro Alves <palves@redhat.com>
6845
6846 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6847 Move ...
72f4393d 6848 * ax.h: ... here.
f699aaba 6849
c144c7a0
PA
68502013-09-05 Pedro Alves <palves@redhat.com>
6851
6852 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6853 tracepoint.h.
6854 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6855 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6856 (handle_tracepoint_general_set, handle_tracepoint_query)
6857 (tracepoint_finished_step, tracepoint_was_hit)
6858 (release_while_stepping_state_list, current_traceframe)
6859 (in_readonly_region, traceframe_read_mem)
6860 (fetch_traceframe_registers, traceframe_read_sdata)
6861 (traceframe_read_info, struct fast_tpoint_collect_status)
6862 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6863 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6864 (supply_fast_tracepoint_registers)
6865 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6866 (ipa_tdesc, claim_trampoline_space)
6867 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6868 (agent_mem_read, agent_get_trace_state_variable_value)
6869 (agent_set_trace_state_variable_value, agent_tsv_read)
6870 (agent_mem_read_string, get_raw_reg_func_addr)
6871 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6872 * tracepoint.h: ... this new file.
6873
ff42e6ab
PA
68742013-09-05 Pedro Alves <palves@redhat.com>
6875
6876 * server.h (perror_with_name, error, fatal, warning, paddress)
6877 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6878 include it.
6879 * utils.h: New file.
6880
541af0f4
PA
68812013-09-05 Pedro Alves <palves@redhat.com>
6882
6883 * server.h (remote_debug, noack_mode, transport_is_reliable)
6884 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6885 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6886 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6887 (write_enn, initialize_async_io, enable_async_io)
6888 (disable_async_io, check_remote_input_interrupt_request)
6889 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6890 (dead_thread_notify, prepare_resume_reply)
6891 (decode_address_to_semicolon, decode_address, decode_m_packet)
6892 (decode_M_packet, decode_X_packet, decode_xfer_write)
6893 (decode_search_memory_packet, unhexify, hexify)
6894 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6895 (look_up_one_symbol, relocate_instruction)
6896 (monitor_output): Move to remote-utils.h, and include it.
6897 * remote-utils.h: New file.
6898
eebdf26b
PA
68992013-09-05 Pedro Alves <palves@redhat.com>
6900
6901 * server.h (_): Delete.
6902
3aafd2ff
PA
69032013-09-02 Pedro Alves <palves@redhat.com>
6904
6905 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6906 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6907 allocated.
6908 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6909
cee83bcb
PM
69102013-09-02 Pierre Muller <muller@sourceware.org>
6911
6912 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6913 or WriteProcessMemory complete successfully and handle
6914 ERROR_PARTIAL_COPY error.
6915
9a13b2fa
PA
69162013-09-02 Pedro Alves <palves@redhat.com>
6917
6918 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6919 error instead of EIO.
6920
602e3198
JK
69212013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6922
6923 PR server/15604
6924 * linux-low.c: Include filestuff.h.
6925 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6926 * lynx-low.c: Include filestuff.h.
6927 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6928 * server.c: Include filestuff.h.
6929 (main): Call notice_open_fds.
6930 * spu-low.c: Include filestuff.h.
6931 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6932
96d7229d
LM
69332013-08-22 Luis Machado <lgustavo@codesourcery.com>
6934
6935 * Makefile.in: Explain why ../target and ../nat are not
6936 listed as include file search paths.
6937 (linux-waitpid.o): New object file rule.
6938 * configure.srv (srv_native_linux_obj): New variable.
6939 Replace all occurrences of linux native object files with
6940 $srv_native_linux_obj.
6941 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6942 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6943 (linux_enable_event_reporting): Remove declaration.
6944 (my_waitpid): Moved to common/linux-waitpid.c.
6945 (linux_wait_for_event): Pass ptid when calling
6946 linux_enable_event_reporting.
6947 (linux_supports_tracefork_flag): Remove.
6948 (linux_enable_event_reporting): Likewise.
6949 (linux_tracefork_grandchild): Remove.
6950 (STACK_SIZE): Moved to common/linux-ptrace.c.
6951 (linux_tracefork_child): Remove.
6952 (linux_test_for_tracefork): Remove.
6953 (linux_look_up_symbols): Call linux_supports_traceclone.
6954 (initialize_low): Remove call to linux_test_for_tracefork.
6955 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6956 common/linux-ptrace.h.
6957 (PTRACE_TYPE_ARG4): Likewise.
6958 Include linux-ptrace.h.
6959
32940073
PA
69602013-08-21 Pedro Alves <palves@redhat.com>
6961
6962 * config.in: Renegerate.
6963
33b60d58 69642013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6965
33b60d58
LM
6966 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6967 (SFILES): Remove $(srcdir)/common/target-common.c and
6968 add $(srcdir)/target/waitstatus.c.
6969 (OBS): Remove target-common.o and add waitstatus.o.
6970 (server_h): Remove $(srcdir)/../common/target-common.h and
6971 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6972 and $(srcdir)/../target/waitstatus.h.
6973 (target-common.o): Remove.
6974 (waitstatus.o): New target object file.
6975 * target.h: Do not include target-common.h and
6976 include target/resume.h, target/wait.h and
6977 target/waitstatus.h.
6978
b8e1b30e
LM
69792013-08-13 Luis Machado <lgustavo@codesourcery.com>
6980
6981 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6982 to PTRACE_TYPE_ARG3.
6983 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6984 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6985 PTRACE_TYPE_ARG4.
6986 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6987 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6988
7a60ad40
YQ
69892013-07-27 Jie Zhang <jie@codesourcery.com>
6990 Daniel Jacobowitz <dan@codesourcery.com>
6991 Yao Qi <yao@codesourcery.com>
6992
6993 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6994 (mips-linux-watch.o): New rule.
6995 (mips_linux_watch_h): New variable.
6996 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6997 srv_tgtobj.
6998 * linux-mips-low.c: Include mips-linux-watch.h.
6999 (struct arch_process_info, struct arch_lwp_info): New.
7000 (update_watch_registers_callback): New function.
7001 (mips_linux_new_process, mips_linux_new_thread) New functions.
7002 (mips_linux_prepare_to_resume, mips_insert_point): New
7003 functions.
7004 (mips_remove_point, mips_stopped_by_watchpoint): New
7005 functions.
7006 (rsp_bp_type_to_target_hw_bp_type): New function.
7007 (mips_stopped_data_address): New function.
7008 (the_low_target): Add watchpoint support functions.
7009
de6f69ad
YQ
70102013-07-27 Yao Qi <yao@codesourcery.com>
7011
7012 * i386-low.c: Include break-common.h.
7013 (enum target_hw_bp_type): Remove.
7014
3360c0bf
LM
70152013-07-24 Luis Machado <lgustavo@codesourcery.com>
7016
7017 * Makefile.in (SFILES): /common/target-common.c.
7018 (OBS): Add target-common.o.
7019 (server_h): Add $(srcdir)/../common/target-common.h.
7020 (target-common.o): New target.
7021 * server.c (queue_stop_reply_callback): Free
7022 status string after use.
7023 * target.c (target_waitstatus_to_string): Remove.
7024 * target.h: Include target-common.h.
7025 (resume_kind): Likewise.
7026 (target_waitkind): Likewise.
7027 (target_waitstatus): Likewise.
7028 (TARGET_WNOHANG): Likewise.
7029
bd885420
YQ
70302013-07-04 Yao Qi <yao@codesourcery.com>
7031
7032 * Makefile.in (host_alias): Use @host_noncanonical@.
7033 (target_alias): Use @target_noncanonical@.
7034 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7035 ACX_NONCANONICAL_HOST.
7036 * configure: Regenerated.
7037
7038 Revert:
7039 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7040
7041 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7042 * configure: Rebuild.
7043 * Makefile.in (version_host, version_target): Get from configure.
7044 (version.c): Use $(version_host) and $(version_target).
7045
17ef446e
PA
70462013-07-03 Pedro Alves <palves@redhat.com>
7047
7048 * Makefile.in (config.status): Depend on development.sh.
7049 * acinclude.m4: Include libmcheck.m4.
7050 * configure: Regenerate.
7051
7a9a7487
MG
70522013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7053
7054 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7055 attribute inside the parentheses.
7056 (winapi_DebugSetProcessKillOnExit): Ditto.
7057 (winapi_DebugBreakProcess): Ditto.
7058 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7059
49b64de6
MG
70602013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7061
7062 * notif.h (notif_event): Add a dummy member to avoid compiler
7063 errors.
7064
d5749ee7
PA
70652013-07-01 Pedro Alves <palves@redhat.com>
7066
7067 * hostio.c (HOSTIO_PATH_MAX): Define.
7068 (require_filename, handle_open, handle_unlink, handle_readlink):
7069 Use it.
7070
d8d2a3ee
PA
70712013-07-01 Pedro Alves <palves@redhat.com>
7072
7073 * server.h: Include "pathmax.h".
7074 * linux-low.c: Don't include sys/param.h.
7075 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7076 MAXPATHLEN.
7077 * win32-low.c: Don't include sys/param.h.
7078 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7079
bc7dea8d
PA
70802013-07-01 Pedro Alves <palves@redhat.com>
7081
7082 * event-loop.c: Don't check HAVE_UNISTD_H before including
7083 <unistd.h>.
7084 * gdbreplay.c: Likewise.
7085 * remote-utils.c: Likewise.
7086 * server.c: Likewise.
7087 * configure.ac: Don't check for unistd.h.
7088 * configure: Regenerate.
7089
d6c2da54
TT
70902013-06-28 Tom Tromey <tromey@redhat.com>
7091
7092 * Makefile.in (version.c): Use version.in, not
7093 common/version.in.
7094
257b6bec
MG
70952013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7096
7097 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7098 * configure: Rebuild.
7099 * Makefile.in (version_host, version_target): Get from configure.
7100 (version.c): Use $(version_host) and $(version_target).
7101
86ebe149
DK
71022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7103
7104 Fix trace-status to output user name without trailing colon.
7105 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7106
f30aa5af
DK
71072013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7108
7109 Fix trace-status to output proper start-time and stop-time.
7110 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7111 output start time and stop time in hex as gdb expects.
7112
28a93511
YQ
71132013-06-26 Pedro Alves <pedro@codesourcery.com>
7114
7115 * tracepoint.c (build_traceframe_info_xml): Output trace state
7116 variables present in the trace buffer.
7117
01208463
TT
71182013-06-24 Tom Tromey <tromey@redhat.com>
7119
7120 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7121 create-version.sh.
7122 (version.o): Remove.
7123 * gdbreplay.c: Include version.h.
7124 (version, host_name): Don't declare.
7125 * server.h: Include version.h.
7126 (version, host_name): Don't declare.
7127
760256f9
PA
71282013-06-12 Pedro Alves <palves@redhat.com>
7129
7130 * linux-x86-low.c (linux_is_elf64): Delete global.
7131 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7132 with local linux_pid_exe_is_elf_64_file use.
7133
030031ee
PA
71342013-06-11 Pedro Alves <palves@redhat.com>
7135
7136 * linux-low.c (regset_disabled, disable_regset): New functions.
7137 (regsets_fetch_inferior_registers)
7138 (regsets_store_inferior_registers): Use them.
7139 (initialize_regsets_info); Don't allocate the disabled_regsets
7140 array here.
7141 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7142 comment.
7143
5da6eb0a
PA
71442013-06-11 Pedro Alves <palves@redhat.com>
7145
7146 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7147 xmalloc.
7148
7e5aaa09
PA
71492013-06-11 Pedro Alves <palves@redhat.com>
7150
7151 * linux-x86-low.c (initialize_low_arch): Call
7152 init_registers_x32_avx_linux.
7153
d878444c
JK
71542013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7155
7156 Fix compatibility with Android Bionic.
7157 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7158 it is not empty.
7159
3aee8918
PA
71602013-06-07 Pedro Alves <palves@redhat.com>
7161
5f2b57b5 7162 PR server/14823
3aee8918
PA
7163 * Makefile.in (OBS): Add tdesc.o.
7164 (IPA_OBJS): Add tdesc-ipa.o.
7165 (tdesc-ipa.o): New rule.
7166 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7167 interface.
7168 * linux-low.c (new_inferior): Delete.
7169 (disabled_regsets, num_regsets): Delete.
7170 (linux_add_process): Adjust to set the new per-process
7171 new_inferior flag.
7172 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7173 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7174 was a stop. When calling arch_setup, switch the current inferior
7175 to the thread that got an event.
7176 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7177 (regsets_fetch_inferior_registers)
7178 (regsets_store_inferior_registers): New regsets_info parameter.
7179 Adjust to use it.
7180 (linux_register_in_regsets): New regs_info parameter. Adjust to
7181 use it.
7182 (register_addr, fetch_register, store_register): New usrregs_info
7183 parameter. Adjust to use it.
7184 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7185 parameter regs_info. Adjust to use it.
7186 (linux_fetch_registers): Get the current inferior's regs_info, and
7187 adjust to use it.
7188 (linux_store_registers): Ditto.
7189 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7190 (initialize_low): Don't initialize the target_regsets here. Call
7191 initialize_low_arch.
7192 * linux-low.h (target_regsets): Delete declaration.
7193 (struct regsets_info): New.
7194 (struct usrregs_info): New.
7195 (struct regs_info): New.
7196 (struct process_info_private) <new_inferior>: New field.
7197 (struct linux_target_ops): Delete the num_regs, regmap, and
7198 regset_bitmap fields. New field regs_info.
7199 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7200 * i387-fp.c (num_xmm_registers): Delete.
7201 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7202 calls to new interface.
7203 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7204 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7205 Infer the number of xmm registers from the regcache's target
7206 description.
7207 * i387-fp.h (num_xmm_registers): Delete.
7208 * inferiors.c (add_thread): Don't install the thread's regcache
7209 here.
7210 * proc-service.c (gregset_info): Fetch the current inferior's
7211 regs_info. Adjust to use it.
7212 * regcache.c: Include tdesc.h.
7213 (register_bytes, reg_defs, num_registers)
7214 (gdbserver_expedite_regs): Delete.
7215 (get_thread_regcache): If the thread doesn't have a regcache yet,
7216 create one, instead of aborting gdbserver.
7217 (regcache_invalidate_one): Rename to ...
7218 (regcache_invalidate_thread): ... this.
7219 (regcache_invalidate_one): New.
7220 (regcache_invalidate): Only invalidate registers of the current
7221 process.
7222 (init_register_cache): Add target_desc parameter, and use it.
7223 (new_register_cache): Ditto. Assert the target description has a
7224 non zero registers_size.
7225 (regcache_cpy): Add assertions. Adjust.
7226 (realloc_register_cache, set_register_cache): Delete.
7227 (registers_to_string, registers_from_string): Adjust.
7228 (find_register_by_name, find_regno, find_register_by_number)
7229 (register_cache_size): Add target_desc parameter, and use it.
7230 (free_register_cache_thread, free_register_cache_thread_one)
7231 (regcache_release, register_cache_size): New.
7232 (register_size): Add target_desc parameter, and use it.
7233 (register_data, supply_register, supply_register_zeroed)
7234 (supply_regblock, supply_register_by_name, collect_register)
7235 (collect_register_as_string, collect_register_by_name): Adjust.
7236 * regcache.h (struct target_desc): Forward declare.
7237 (struct regcache) <tdesc>: New field.
7238 (init_register_cache, new_register_cache): Add target_desc
7239 parameter.
7240 (regcache_invalidate_thread): Declare.
7241 (regcache_invalidate_one): Delete declaration.
7242 (regcache_release): Declare.
7243 (find_register_by_number, register_cache_size, register_size)
7244 (find_regno): Add target_desc parameter.
7245 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7246 declarations.
7247 * remote-utils.c: Include tdesc.h.
7248 (outreg, prepare_resume_reply): Adjust.
7249 * server.c: Include tdesc.h.
7250 (gdbserver_xmltarget): Delete declaration.
7251 (get_features_xml, process_serial_event): Adjust.
7252 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7253 declare.
7254 (struct process_info) <tdesc>: New field.
7255 (ipa_tdesc): Declare.
7256 * tdesc.c: New file.
7257 * tdesc.h: New file.
7258 * tracepoint.c: Include tdesc.h.
7259 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7260 (get_context_regcache): Adjust to pass ipa_tdesc down.
7261 (do_action_at_tracepoint): Adjust to get the register cache size
7262 from the context regcache's description.
7263 (traceframe_walk_blocks): Adjust to get the register cache size
7264 from the current trace frame's description.
7265 (traceframe_get_pc): Adjust to get current trace frame's
7266 description and pass it down.
7267 (gdb_collect): Adjust to get the register cache size from the
7268 IPA's description.
7269 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7270 (gdbserver_xmltarget): Delete.
7271 (initialize_low_tracepoint): Set the ipa's target description.
7272 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7273 (initialize_low_tracepoint): Set the ipa's target description.
7274 * linux-x86-low.c: Include tdesc.h.
7275 [__x86_64__] (is_64bit_tdesc): New.
7276 (ps_get_thread_area, x86_get_thread_area): Use it.
7277 (i386_cannot_store_register): Rename to ...
7278 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7279 (i386_cannot_fetch_register): Rename to ...
7280 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7281 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7282 to new interface.
7283 (target_regsets): Rename to ...
7284 (x86_regsets): ... this.
7285 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7286 interface.
7287 (x86_siginfo_fixup): Use is_64bit_tdesc.
7288 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7289 (tdesc_x32_avx_linux, tdesc_x32_linux)
7290 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7291 Declare.
7292 (x86_linux_update_xmltarget): Delete.
7293 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7294 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7295 (AMD64_LINUX_USER64_CS): New.
7296 (x86_linux_read_description): New, based on
7297 x86_linux_update_xmltarget.
7298 (same_process_callback): New.
7299 (x86_arch_setup_process_callback): New.
7300 (x86_linux_update_xmltarget): New.
7301 (x86_regsets_info): New.
7302 (amd64_linux_regs_info): New.
7303 (i386_linux_usrregs_info): New.
7304 (i386_linux_regs_info): New.
7305 (x86_linux_regs_info): New.
7306 (x86_arch_setup): Reimplement.
7307 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7308 (x86_emit_ops): Ditto.
7309 (the_low_target): Adjust. Install x86_linux_regs_info,
7310 x86_cannot_fetch_register, and x86_cannot_store_register.
7311 (initialize_low_arch): New.
7312 * linux-ia64-low.c (tdesc_ia64): Declare.
7313 (ia64_fetch_register): Adjust.
7314 (ia64_usrregs_info, regs_info): New globals.
7315 (ia64_regs_info): New function.
7316 (the_low_target): Adjust.
7317 (initialize_low_arch): New function.
7318 * linux-sparc-low.c (tdesc_sparc64): Declare.
7319 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7320 Adjust.
7321 (sparc_arch_setup): New function.
7322 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7323 (the_low_target): Adjust.
7324 (initialize_low_arch): New function.
7325 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7326 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7327 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7328 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7329 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7330 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7331 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7332 (tdesc_powerpc_isa205_vsx64l): Declare.
7333 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7334 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7335 (ppc_set_pc, ppc_get_hwcap): Adjust.
7336 (ppc_usrregs_info): Forward declare.
7337 (!__powerpc64__) ppc_regmap_adjusted: New global.
7338 (ppc_arch_setup): Adjust to the current process'es target
7339 description.
7340 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7341 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7342 (ppc_store_evrregset): Adjust.
7343 (target_regsets): Rename to ...
7344 (ppc_regsets): ... this, and make static.
7345 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7346 (ppc_regs_info): New function.
7347 (the_low_target): Adjust.
7348 (initialize_low_arch): New function.
7349 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7350 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7351 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7352 (tdesc_s390x_linux64v2): Declare.
7353 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7354 (s390_fill_gregset, s390_store_last_break): Adjust.
7355 (target_regsets): Rename to ...
7356 (s390_regsets): ... this, and make static.
7357 (s390_get_pc, s390_set_pc): Adjust.
7358 (s390_get_hwcap): New target_desc parameter, and use it.
7359 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7360 (s390_arch_setup): Adjust to set the current process'es target
7361 description. Don't adjust the regmap.
7362 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7363 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7364 (regs_info_3264): New globals.
7365 (s390_regs_info): New function.
7366 (the_low_target): Adjust.
7367 (initialize_low_arch): New function.
7368 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7369 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7370 [__mips64] (init_registers_mips_linux)
7371 (init_registers_mips_dsp_linux): Delete defines.
7372 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7373 (have_dsp): New global.
7374 (mips_read_description): New, based on mips_arch_setup.
7375 (mips_arch_setup): Reimplement.
7376 (get_usrregs_info): New function.
7377 (mips_cannot_fetch_register, mips_cannot_store_register)
7378 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7379 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7380 (target_regsets): Rename to ...
7381 (mips_regsets): ... this, and make static.
7382 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7383 (dsp_regs_info, regs_info): New globals.
7384 (mips_regs_info): New function.
7385 (the_low_target): Adjust.
7386 (initialize_low_arch): New function.
7387 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7388 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7389 Declare.
7390 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7391 (arm_read_description): New, with bits factored from
7392 arm_arch_setup.
7393 (arm_arch_setup): Reimplement.
7394 (target_regsets): Rename to ...
7395 (arm_regsets): ... this, and make static.
7396 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7397 (arm_regs_info): New function.
7398 (the_low_target): Adjust.
7399 (initialize_low_arch): New function.
7400 * linux-m68k-low.c (tdesc_m68k): Declare.
7401 (target_regsets): Rename to ...
7402 (m68k_regsets): ... this, and make static.
7403 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7404 (m68k_regs_info): New function.
7405 (m68k_arch_setup): New function.
7406 (the_low_target): Adjust.
7407 (initialize_low_arch): New function.
7408 * linux-sh-low.c (tdesc_sharch): Declare.
7409 (target_regsets): Rename to ...
7410 (sh_regsets): ... this, and make static.
7411 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7412 (sh_regs_info, sh_arch_setup): New functions.
7413 (the_low_target): Adjust.
7414 (initialize_low_arch): New function.
7415 * linux-bfin-low.c (tdesc_bfin): Declare.
7416 (bfin_arch_setup): New function.
7417 (bfin_usrregs_info, regs_info): New globals.
7418 (bfin_regs_info): New function.
7419 (the_low_target): Adjust.
7420 (initialize_low_arch): New function.
7421 * linux-cris-low.c (tdesc_cris): Declare.
7422 (cris_arch_setup): New function.
7423 (cris_usrregs_info, regs_info): New globals.
7424 (cris_regs_info): New function.
7425 (the_low_target): Adjust.
7426 (initialize_low_arch): New function.
7427 * linux-cris-low.c (tdesc_crisv32): Declare.
7428 (cris_arch_setup): New function.
7429 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7430 (cris_regs_info): New function.
7431 (the_low_target): Adjust.
7432 (initialize_low_arch): New function.
7433 * linux-m32r-low.c (tdesc_m32r): Declare.
7434 (m32r_arch_setup): New function.
7435 (m32r_usrregs_info, regs_info): New globals.
7436 (m32r_regs_info): Adjust.
7437 (initialize_low_arch): New function.
7438 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7439 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7440 (tic6x_usrregs_info): Forward declare.
7441 (tic6x_read_description): New function, based on ...
7442 (tic6x_arch_setup): ... this. Reimplement.
7443 (target_regsets): Rename to ...
7444 (tic6x_regsets): ... this, and make static.
7445 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7446 (tic6x_regs_info): New function.
7447 (the_low_target): Adjust.
7448 (initialize_low_arch): New function.
7449 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7450 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7451 (target_regsets): Rename to ...
7452 (xtensa_regsets): ... this, and make static.
7453 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7454 globals.
7455 (xtensa_arch_setup, xtensa_regs_info): New functions.
7456 (the_low_target): Adjust.
7457 (initialize_low_arch): New function.
7458 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7459 (nios2_arch_setup): Set the current process'es tdesc.
7460 (target_regsets): Rename to ...
7461 (nios2_regsets): ... this.
7462 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7463 (nios2_regs_info): New function.
7464 (the_low_target): Adjust.
7465 (initialize_low_arch): New function.
a261b8f5
PA
7466 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7467 (aarch64_arch_setup): Set the current process'es tdesc.
7468 (target_regsets): Rename to ...
7469 (aarch64_regsets): ... this.
7470 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7471 (aarch64_regs_info): New function.
7472 (the_low_target): Adjust.
7473 (initialize_low_arch): New function.
3aee8918
PA
7474 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7475 globals.
7476 (target_regsets): Rename to ...
7477 (tile_regsets): ... this.
7478 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7479 (tile_regs_info): New function.
7480 (tile_arch_setup): Set the current process'es tdesc.
7481 (the_low_target): Adjust.
7482 (initialize_low_arch): New function.
7483 * spu-low.c (tdesc_spu): Declare.
7484 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7485 * win32-arm-low.c (tdesc_arm): Declare.
7486 (arm_arch_setup): New function.
7487 (the_low_target): Install arm_arch_setup instead of
7488 init_registers_arm.
7489 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7490 (init_windows_x86): Rename to ...
7491 (i386_arch_setup): ... this. Set `win32_tdesc'.
7492 (the_low_target): Adjust.
7493 * win32-low.c (win32_tdesc): New global.
7494 (child_add_thread): Don't create the thread cache here.
7495 (do_initial_child_stuff): Set the new process'es tdesc.
7496 * win32-low.h (struct target_desc): Forward declare.
7497 (win32_tdesc): Declare.
7498 * lynx-i386-low.c (tdesc_i386): Declare global.
7499 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7500 * lynx-low.c (lynx_tdesc): New global.
7501 (lynx_add_process): Set the new process'es tdesc.
7502 * lynx-low.h (struct target_desc): Forward declare.
7503 (lynx_tdesc): Declare global.
7504 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7505 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7506 * nto-low.c (nto_tdesc): New global.
7507 (do_attach): Set the new process'es tdesc.
7508 * nto-low.h (struct target_desc): Forward declare.
7509 (nto_tdesc): Declare.
7510 * nto-x86-low.c (tdesc_i386): Declare.
7511 (nto_x86_arch_setup): Set `nto_tdesc'.
7512
b1fbec62
GB
75132013-06-04 Gary Benson <gbenson@redhat.com>
7514
7515 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7516 to qSupported response when appropriate.
7517 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7518 with nonzero-length annex.
7519 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7520 arguments supplied in annex.
7521
d1ec4ce7
DE
75222013-05-31 Doug Evans <dje@google.com>
7523
ac44adcb 7524 PR server/15594
d1ec4ce7
DE
7525 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7526 64 bits in 64-cross-32 environment.
7527
9b25f2d3
PA
75282013-05-28 Pedro Alves <palves@redhat.com>
7529
7530 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7531 (aarch64-without-fpu.c): Delete rule.
7532 * configure.srv (aarch64*-*-linux*): Remove references to
7533 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7534 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7535 declaration.
7536
6740dc9c
PA
75372013-05-24 Pedro Alves <palves@redhat.com>
7538
7539 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7540 instead of strchr/decode_address. Error if the range isn't split
7541 with a ','. Don't assume there's be a ':' in the action.
7542
c2d6af84
PA
75432013-05-23 Yao Qi <yao@codesourcery.com>
7544 Pedro Alves <palves@redhat.com>
7545
7546 * linux-low.c (lwp_in_step_range): New function.
7547 (linux_wait_1): If the thread was range stepping and stopped
7548 outside the stepping range, report the stop to GDB. Otherwise,
7549 continue stepping. Add range stepping debug output.
7550 (linux_set_resume_request): Copy the step range from the resume
7551 request to the lwp.
7552 (linux_supports_range_stepping): New.
7553 (linux_target_ops) <supports_range_stepping>: Set to
7554 linux_supports_range_stepping.
7555 * linux-low.h (struct linux_target_ops)
7556 <supports_range_stepping>: New field.
7557 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7558 * linux-x86-low.c (x86_supports_range_stepping): New.
7559 (the_low_target) <supports_range_stepping>: Set to
7560 x86_supports_range_stepping.
7561 * server.c (handle_v_cont): Handle 'r' action.
7562 (handle_v_requests): Append ";r" if the target supports range
7563 stepping.
7564 * target.h (struct thread_resume) <step_range_start,
7565 step_range_end>: New fields.
7566 (struct target_ops) <supports_range_stepping>:
7567 New field.
7568 (target_supports_range_stepping): New macro.
7569
58794e1a
JB
75702013-05-17 Joel Brobecker <brobecker@adacore.com>
7571
7572 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7573 confusion in comment.
7574
d631c5a7
JB
75752013-05-17 Joel Brobecker <brobecker@adacore.com>
7576
7577 * lynx-low.c (struct process_info_private): New type.
7578 (lynx_add_process): New function.
7579 (lynx_create_inferior, lynx_attach): Replace calls to
7580 add_process by calls to lynx_add_process.
7581 (lynx_resume): If PTID is null, then try using
7582 current_process()->private->last_wait_event_ptid.
7583 Add comments.
7584 (lynx_clear_inferiors): Delete. The contents of that function
7585 has been inlined in lynx_mourn;
7586 (lynx_wait_1): Save the ptid in the process's private data.
7587 (lynx_mourn): Free the process' private data. Replace call
7588 to lynx_clear_inferiors by call to clear_inferiors.
7589
96f7a20f
YQ
75902013-05-17 Yao Qi <yao@codesourcery.com>
7591
7592 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7593 the right place.
7594
db0dfaa0
LM
75952013-05-16 Luis Machado <lgustavo@codesourcery.com>
7596
7597 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7598 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7599 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7600 PT_TEXT_END_ADDR guards. Update comments.
7601 (linux_target_op) <read_offsets>: Conditionally define to
7602 linux_read_offsets if the target is UCLIBC and if it defines
7603 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7604
68f5f838
SL
76052013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7606 Andrew Jenner <andrew@codesourcery.com>
7607
7608 * Makefile.in (SFILES): Add linux-nios2-low.c.
7609 (clean): Add action to delete nios2-linux.c.
7610 (nios2-linux.c): New rule.
7611 * configure.srv: Add nios2*-*-linux*.
7612 * linux-nios2-low.c: New.
7613
1ebff1fd
HAQ
76142013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7615
7616 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7617
f6150862
HZ
76182013-04-25 Hui Zhu <hui@codesourcery.com>
7619
7620 PR gdb/15186
f6150862
HZ
7621 * ax.c (ax_printf): Add fflush.
7622
614c279d
TT
76232013-04-22 Tom Tromey <tromey@redhat.com>
7624
7625 * Makefile.in (SFILES): Add filestuff.c.
7626 (OBS): Add filestuff.o.
7627 (filestuff.o): New target.
7628 * config.in, configure: Rebuild.
7629 * configure.ac: Check for fdwalk, pipe2.
7630
7d4e5717
PA
76312013-04-17 Pedro Alves <palves@redhat.com>
7632
7633 * configure.ac (USE_THREAD_DB): Delete variable.
7634 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7635 Don't AC_SUBST USE_THREAD_DB.
7636 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7637 * config.in, configure: Regenerate.
7638
d5c93e41
PA
76392013-04-16 Pedro Alves <palves@redhat.com>
7640
7641 * linux-low.h (struct lwp_info) <thread_known>: Move under
7642 the USE_THREAD_DB #ifdef.
7643
04f5fe89
PA
76442013-04-16 Pedro Alves <palves@redhat.com>
7645
7646 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7647 (linux-low.o): Delete rule.
7648 * linux-low.h: Always include "gdb_thread_db.h" instead of
7649 conditionally including thread_db.h.
7650 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7651 HAVE_THREAD_DB_H.
7652
480b27bf
JK
76532013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7654
7655 * Makefile.in (install-only): Fix make install regression.
7656
43662968
JK
76572013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7658
7659 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7660 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7661 installation.
7662 * gdbserver.1: Remove.
7663
3e74e146
PA
76642013-03-22 Pedro Alves <palves@redhat.com>
7665
7666 * linux-low.c (handle_extended_wait): Don't call
7667 linux_enable_event_reporting.
7668
a8347a2a
TT
76692013-03-15 Tony Theodore <tonyt@logyst.com>
7670
7671 PR build/9098:
7672 * Makefile.in (SHELL): Use @SHELL@.
7673
eeb56fa7
SDJ
76742013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7675
7676 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7677 compiler warning.
7678
4fa7e2ff
JB
76792013-03-13 Joel Brobecker <brobecker@adacore.com>
7680
7681 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7682 Remove extraneous NULL element.
7683
8ddb1965
YQ
76842013-03-13 Yao Qi <yao@codesourcery.com>
7685
7686 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7687 'V' block in trace frame.
7688
9accd112
MM
76892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7690
7691 * target.h (struct target_ops): Add btrace ops.
7692 (target_supports_btrace): New macro.
7693 (target_enable_btrace): New macro.
7694 (target_disable_btrace): New macro.
7695 (target_read_btrace): New macro.
7696 * gdbthread.h (struct thread_info): Add btrace field.
7697 * server.c: Include btrace-common.h.
7698 (handle_btrace_general_set): New function.
7699 (handle_btrace_enable): New function.
7700 (handle_btrace_disable): New function.
7701 (handle_general_set): Call handle_btrace_general_set.
7702 (handle_qxfer_btrace): New function.
7703 (struct qxfer qxfer_packets[]): Add btrace entry.
7704 * inferiors.c (remove_thread): Disable btrace.
7705 * linux-low: Include linux-btrace.h.
7706 (linux_low_enable_btrace): New function.
7707 (linux_low_read_btrace): New function.
7708 (linux_target_ops): Add btrace ops.
7709 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7710 Add srv_linux_btrace=yes.
7711 (x86_64-*-linux*): Add linux-btrace.o.
7712 Add srv_linux_btrace=yes.
7713 * configure.ac: Define HAVE_LINUX_BTRACE.
7714 * config.in: Regenerated.
7715 * configure: Regenerated.
7716
5cc22e4c
MM
77172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7718
7719 * server.c (handle_qxfer): Preserve error message if -3 is
7720 returned.
7721 (qxfer): Document the -3 return value.
7722
7c97f91e
MM
77232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7724
7725 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7726 (linux_btrace_h): New variable.
7727 (linux-btrace.o): New rule.
7728
be9a119c 77292013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7730 Hafiz Abid Qadeer <abidh@codesourcery.com>
7731
7732 * tracepoint.c (trace_buffer_size): New global.
7733 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7734 (init_trace_buffer): Change to one-argument function. Allocate
7735 trace buffer memory.
7736 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7737 handle QTBuffer:size packet.
7738 (cmd_bigqtbuffer_size): New function.
7739 (initialize_tracepoint): Call init_trace_buffer with
7740 DEFAULT_TRACE_BUFFER_SIZE.
7741 * server.c (handle_query): Add QTBuffer:size in the
7742 supported packets.
7743
e64f7499
YQ
77442013-03-07 Yao Qi <yao@codesourcery.com>
7745
7746 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7747 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7748 of -1.
7749 (cmd_qtsp): Adjust condition. Do post increment.
7750 Set cur_action and cur_step_action back to 0.
7751
f0ae6fc3
PA
77522013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7753
7754 PR server/15236
7755 * linux-low.c (linux_write_memory): Return early success if LEN is
7756 zero.
7757
b5b0b0af
CV
77582013-03-05 Corinna Vinschen <vinschen@redhat.de>
7759
334ad4a8 7760 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7761
589bc927
TT
77622013-02-28 Tom Tromey <tromey@redhat.com>
7763
7764 * configure.ac: Invoke AC_SYS_LARGEFILE.
7765 * configure, config.in: Rebuild.
7766
dfe07582
CV
77672013-02-28 Corinna Vinschen <vinschen@redhat.com>
7768
7769 * win32-low.c: Throughout, fix format strings and casts of
7770 printf-like functions to avoid type related warnings on all
7771 platforms.
7772 (get_child_debug_event): Print dwDebugEventCode as hex since
7773 that's how it's usually documented.
7774
736cd585
YQ
77752013-02-28 Yao Qi <yao@codesourcery.com>
7776
7777 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7778 pulongest.
7779
e1f58301
JW
77802013-02-27 Jiong Wang <jiwang@tilera.com>
7781
7782 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7783 (reg-tilegx32.c): New rule.
7784 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7785 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7786 different register info initializer according to elf class.
7787 (init_registers_tilgx32): New function. The tilegx32 register info
7788 initializer.
7789 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7790 (tile_store_gregset): Likewise.
7791
d171ca78
YQ
77922013-02-27 Yao Qi <yao@codesourcery.com>
7793
7794 * server.c (process_point_options): Print debug message when
7795 debug_threads is true.
7796
282bbdf3
YQ
77972013-02-26 Yao Qi <yao@codesourcery.com>
7798
7799 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7800
aca22551
PA
78012013-02-19 Pedro Alves <palves@redhat.com>
7802 Kai Tietz <ktietz@redhat.com>
7803
7804 PR gdb/15161
7805
7806 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7807 instead of strtoul to extract address from packet.
7808 (process_serial_event) <'z'>: Likewise.
7809
4f3cee1c
YQ
78102013-02-18 Yao Qi <yao@codesourcery.com>
7811
7812 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7813
8e1d55a3
PA
78142013-02-14 Pedro Alves <palves@redhat.com>
7815
7816 Plug memory leak.
7817
7818 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7819 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7820
458820da
PA
78212013-02-14 Pedro Alves <palves@redhat.com>
7822
7823 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7824
baea0dae
PA
78252013-02-14 Pedro Alves <palves@redhat.com>
7826
7827 * tracepoint.c (save_string): Delete.
7828 (add_tracepoint_action): Use savestring instead of save_string.
7829
0b1afbb3
PA
78302013-02-12 Pedro Alves <palves@redhat.com>
7831
7832 * linux-xtensa-low.c: Ditto.
7833 * xtensa-xtregs.c: Ditto.
7834
8a4ac37e
PA
78352013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7836
7837 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7838 thread_db.
7839
148de6bb
MS
78402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7841
7842 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7843 aarch64_num_wp_regs and aarch64_num_bp_regs to
7844 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7845
55fac6e0
MS
78462013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7847
7848 * linux-aarch64-low.c (ps_get_thread_area): Replace
7849 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7850
176eb98c
MS
78512013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7852 Marcus Shawcroft <marcus.shawcroft@arm.com>
7853 Nigel Stephens <nigel.stephens@arm.com>
7854 Yufeng Zhang <yufeng.zhang@arm.com>
7855
7856 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7857 (aarch64.c, aarch64-without-fpu.c): New targets.
7858 * configure.srv (aarch64*-*-linux*): New.
7859 * linux-aarch64-low.c: New file.
7860
56f7af9c
MS
78612013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7862
43aaf8b6 7863 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7864 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7865 (dequeue_one_deferred_signal, linux_resume_one_thread)
7866 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7867 (linux_tracefork_grandchild, linux_test_for_tracefork)
7868 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7869 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7870 where the argument is 0.
7871
60f662b0
YQ
78722013-01-25 Yao Qi <yao@codesourcery.com>
7873
7874 * event-loop.c: Include "queue.h".
7875 (gdb_event_p): New typedef.
7876 (struct gdb_event) <next_event>: Remove.
7877 (event_queue): Change to QUEUE(gdb_event_p).
7878 (async_queue_event): Remove.
7879 (gdb_event_xfree): New.
7880 (initialize_event_loop): New.
7881 (process_event): Use API from QUEUE.
7882 (wait_for_event): Likewise.
7883 * server.c (main): Call initialize_event_loop.
7884 * server.h (initialize_event_loop): Declare.
7885
5ae4861a
YQ
78862013-01-18 Yao Qi <yao@codesourcery.com>
7887
7888 * ax.h (struct eval_agent_expr_context): New.
7889 (gdb_eval_agent_expr): Update declaration.
7890 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7891 TFRAME. Add new argument CTX.
7892 * server.h (struct eval_agent_expr_context): Declare.
7893 (agent_mem_read, agent_tsv_read): Update declaration.
7894 (agent_mem_read_string): Likewise.
7895 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7896 (add_traceframe_block): Add new argument TPOINT.
7897 Increase TPOINT->traceframe_usage.
7898 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7899 eval_tracepoint_agent_expr.
7900 (condition_true_at_tracepoint): Likewise.
7901 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7902 (agent_mem_read_string, agent_tsv_read): Likewise.
7903
85e00e85
YQ
79042013-01-16 Yao Qi <yao@codesourcery.com>
7905
7906 * linux-low.c (linux_resume_one_lwp): Don't check
7907 'lwp->bp_reinsert != 0'.
7908
4039cf45
JB
79092013-01-07 Joel Brobecker <brobecker@adacore.com>
7910 Pedro Alves <palves@redhat.com>
7911
7912 * lynx-low.c (ptrace_request_to_str): Define a temporary
7913 macro and use it to simplify this function's implementation.
7914
9044dee2
JB
79152013-01-07 Joel Brobecker <brobecker@adacore.com>
7916
7917 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7918 sets errno.
7919
e6352c8f
JB
79202013-01-07 Joel Brobecker <brobecker@adacore.com>
7921
7922 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7923
50681a27
JB
79242013-01-07 Joel Brobecker <brobecker@adacore.com>
7925
7926 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7927
3f6e77ef
JB
79282013-01-07 Joel Brobecker <brobecker@adacore.com>
7929
7930 * lynx-low.c (lynx_resume): Use the resume_info parameter
7931 to determine the ptid for the lynx_ptrace call, unless
7932 it is equal to minus_one_ptid, in which case we use the
7933 ptid of the current_inferior.
7934 (lynx_wait_1): After having received a thread create/exit
7935 event, resume the inferior's execution using the signaling
7936 thread's ptid, rather than the old ptid.
7937
7fda33ae
JB
79382013-01-07 Joel Brobecker <brobecker@adacore.com>
7939
7940 * lynx-low.c (lynx_resume): Delete variable ret.
7941
b9786c74
JB
79422013-01-01 Joel Brobecker <brobecker@adacore.com>
7943
7944 * gdbreplay.c (gdbreplay_version): Update copyright year.
7945 * server.c (gdbserver_version): Likewise.
7946
8b93d60f
JB
79472012-12-17 Joel Brobecker <brobecker@adacore.com>
7948
7949 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7950 new thread.
7951
037335a7
JB
79522012-12-17 Joel Brobecker <brobecker@adacore.com>
7953
7954 * lynx-low.c (ptrace_request_to_str): Add handling for
7955 PTRACE_GETTRACESIG.
7956
52d4cbd8
JB
79572012-12-17 Joel Brobecker <brobecker@adacore.com>
7958
7959 * lynx-low.c (lynx_attach): Delete variable new_process.
7960
ab8f6ca9
JB
79612012-12-17 Joel Brobecker <brobecker@adacore.com>
7962
7963 * lynx-low.c (lynx_create_inferior): Delete variable
7964 new_process.
7965
78cbc024
JB
79662012-12-17 Joel Brobecker <brobecker@adacore.com>
7967
7968 * lynx-low.c (ptrace_request_to_str): Do not handle
7969 PTRACE_GETTHREADLIST if this macro does not exist.
7970
14a00470
YQ
79712012-12-15 Yao Qi <yao@codesourcery.com>
7972
7973 * Makefile.in (OBS): Add notif.o.
7974 * notif.c, notif.h: New.
7975 * server.c: Include "notif.h".
7976 (struct vstop_notif) <next>: Remove.
7977 <base>: New field.
7978 (queue_stop_reply): Update.
7979 (push_event, send_next_stop_reply): Remove.
7980 (discard_queued_stop_replies): Update.
7981 (notif_stop): New variable.
7982 (handle_v_stopped): Remove.
7983 (handle_v_requests): Don't call handle_v_stopped. Call
7984 handle_ack_notif instead.
7985 (queue_stop_reply_callback): Call notif_event_enque instead
7986 of queue_stop_reply.
7987 (handle_status): Don't call send_next_stop_reply, call
7988 notif_write_event instead.
7989 (kill_inferior_callback): Likewise.
7990 (detach_or_kill_inferior_callback): Likewise.
7991 (main): Call initialize_notif.
7992 (process_serial_event): Call QUEUE_is_empty.
7993 (handle_target_event): Call notif_push instead of push event.
7994 * server.h (push_event): Remove declaration.
7995
61c125b9
TT
79962012-12-10 Tom Tromey <tromey@redhat.com>
7997
7998 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7999 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8000 macros.
8001 (.c.o): Rewrite.
8002 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8003 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8004 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8005 (amd64-linux-ipa.o, ax.o): Rewrite.
8006 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8007 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8008 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8009 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8010 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8011 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8012 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8013 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8014 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8015 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8016 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8017 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8018 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8019 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8020 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8021 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8022 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8023 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8024 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8025 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8026 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8027 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8028 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8029 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8030 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8031 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8032 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8033 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8034 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8035 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8036 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8037 (reg-tilegx.o): Remove.
8038 (all_object_files): New macro.
8039 Include .deps files.
8040 * aclocal.m4, configure: Rebuild.
8041 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8042 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8043 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8044
e90e9ad9
TT
80452012-12-05 Tom Tromey <tromey@redhat.com>
8046
8047 PR gdb/14917:
8048 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8049
02d403bf 80502012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8051
8052 * configure.ac: Check for linux/perf_event.h.
8053 * config.in: Regenerated.
8054 * configure: Regenerated.
8055
0270a750
PA
80562012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8057
8058 * hostio.c (handle_readlink): Decrease buffer size
8059 parameter passed to readlink by one byte.
8060
8c29b58e
YQ
80612012-11-26 Yao Qi <yao@codesourcery.com>
8062
8063 * configure.ac (build_warnings): Append '-Wempty-body'.
8064 * configure: Regenerated.
8065 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8066 body.
8067
8bdce1ff
PM
80682012-11-15 Pierre Muller <muller@sourceware.org>
8069
8070 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8071 * config.in: Regenerate.
8072 * configure: Regenerate.
8073 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8074 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8075 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8076 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8077 header.
8078 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8079 instead of <sys/wait.h> header.
8080 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8081
02d403bf 80822012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8083
8084 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8085 (various make rules): Remove -DGDBSERVER
8086
fbd5db48
YQ
80872012-11-09 Yao Qi <yao@codesourcery.com>
8088
8089 * spu-low.c (current_ptid): Move it to ..
8090 * gdbthread.h: ... here. New.
8091 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8092 * server.c (myresume, process_serial_event): Likewise.
8093 * thread-db.c (thread_db_find_new_threads): Likewise.
8094 * tracepoint.c (run_inferior_command): Likewise.
8095
b3dc46ff
AB
80962012-10-01 Andrew Burgess <aburgess@broadcom.com>
8097
8098 * server.c (handle_search_memory_1): Include access length in
8099 warning message.
8100
07c04788
HPN
81012012-09-05 Michael Brandt <michael.brandt@axis.com>
8102
8103 * linux-crisv32-low.c: Fix compile errors.
8104
918d227b
YQ
81052012-09-04 Yao Qi <yao@codesourcery.com>
8106
8107 * tracepoint.c (cmd_qtsv): Adjust debug message.
8108 Don't check CUR_TPOINT.
8109
18c1b81a
YQ
81102012-08-28 Yao Qi <yao@codesourcery.com>
8111
8112 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8113 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8114 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8115 Remove declarations of xmalloc, xreallloc, xstrdup and
8116 freeargv.
8117 * Makefile.in (libiberty_h): New.
8118 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8119 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8120
dc82f37b
YQ
81212012-08-23 Yao Qi <yao@codesourcery.com>
8122
8123 * server.h: Remove declaration of 'xsnprintf'.
8124
406b1477
KS
81252012-08-22 Keith Seitz <keiths@redhat.com>
8126
8127 * server.h: Include build-gnulib-gbserver/config.h.
8128 * gdbreplay.c: Likewise.
8129
e6712ff1
DE
81302012-08-08 Doug Evans <dje@google.com>
8131
8132 * Makefile.in (SFILES): Add gdb_vecs.c.
8133 (OBS): Add gdb_vecs.o.
8134 (gdb_vecs_h, host_defs_h): New variables.
8135 (thread-db.o): Add $(gdb_vecs_h) dependency.
8136 (gdb_vecs.o): New rule.
8137 * thread-db.c: #include "gdb_vecs.h".
8138 (thread_db_load_search): Use a vector to iterate over path elements.
8139 Handle text appearing after "$pdir".
8140
8141 * configure.ac: Add check for strstr.
8142 * config.in: Regenerate.
8143 * configure: Regenerate.
8144
7c3270ae
UW
81452012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8146
8147 * hostio.c (handle_pread): If pread fails, fall back to attempting
8148 lseek/read.
8149 (handle_pwrite): Likewise for pwrite.
8150
b62e2b27
UW
81512012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8152
8153 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8154 between unsupported TYPE and unimplementable ADDR/LEN combination.
8155 (arm_insert_point): Act on new return value.
8156
78a99e91
PA
81572012-07-31 Pedro Alves <palves@redhat.com>
8158
8159 * server.c (process_point_options): Only skip tokens if we find
8160 one that is unrecognized. Don't treat 'X' specially while
8161 skipping unrecognized tokens.
8162
fcf303ab
UW
81632012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8164
8165 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8166 to 4-byte-align HW breakpoint addresses for Thumb.
8167
7255706c
YQ
81682012-07-27 Yao Qi <yao@codesourcery.com>
8169
8170 PR remote/14161.
8171
8172 * server.h: Declare gdb_agent_about_to_close.
8173 * target.c (kill_inferior): Include "agent.h".
8174 New. Send command 'kill'.
8175 * target.h (kill_inferior): Removed macro.
8176 * tracepoint.c (gdb_agent_about_to_close): New.
8177 (gdb_agent_helper_thread): Handle command 'close'.
8178 Wait endlessly until the inferior stops.
8179 Install gdb_agent_remove_socket to atexit hook.
8180 (agent_socket_name): New static variable.
8181 (gdb_agent_socket_init): Replace local variable 'name' with
8182 'agent_socket_name'.
8183 (gdb_agent_remove_socket): New.
8184
5a3f286f
YQ
81852012-07-27 Yao Qi <yao@codesourcery.com>
8186
8187 * server.c (process_point_options): Stop at 'X' when parsing.
8188
961bd387
ME
81892012-07-19 Michael Eager <eager@eagercon.com>
8190
a261b8f5 8191 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8192 to hw_execute.
8193 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8194 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8195 hardware breakpoint.
8196
aa7c7447
JK
81972012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8198
8199 * gdbserver/linux-low.c (initialize_low): Call
8200 linux_ptrace_init_warnings.
8201
7f216e7c
DE
82022012-07-02 Doug Evans <dje@google.com>
8203
8204 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8205 pointer to int.
8206
d3ce09f5
SS
82072012-07-02 Stan Shebs <stan@codesourcery.com>
8208
8209 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8210 (ax.o): Add it to build rule.
8211 (ax-ipa.o): Ditto.
8212 (OBS): Add format.o.
8213 (IPA_OBS): Add format.o.
8214 * server.c (handle_query): Claim support for breakpoint commands.
8215 (process_point_options): Add command case.
8216 (process_serial_event): Leave running if there are printfs in
8217 effect.
8218 * mem-break.h (any_persistent_commands): Declare.
8219 (add_breakpoint_commands): Declare.
8220 (gdb_no_commands_at_breakpoint): Declare.
8221 (run_breakpoint_commands): Declare.
8222 * mem-break.c (struct point_command_list): New struct.
8223 (struct breakpoint): New field command_list.
8224 (any_persistent_commands): New function.
8225 (add_commands_to_breakpoint): New function.
8226 (add_breakpoint_commands): New function.
8227 (gdb_no_commands_at_breakpoint): New function.
8228 (run_breakpoint_commands): New function.
8229 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8230 locally.
8231 * ax.c: Include format.h.
8232 (ax_printf): New function.
8233 (gdb_eval_agent_expr): Add printf opcode.
8234
2f8f6aed
YQ
82352012-06-13 Yao Qi <yao@codesourcery.com>
8236
8237 * server.c (start_inferior): Remove duplicated writes to fields
8238 'last_resume_kind' and 'last_status' of 'current_inferior'.
8239
0c9070b3
YQ
82402012-06-12 Yao Qi <yao@codesourcery.com>
8241 Pedro Alves <palves@redhat.com>
8242
8243 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8244 comment.
8245 * server.c (handle_v_cont): Extend comment.
8246
c52daf70
YQ
82472012-06-11 Yao Qi <yao@codesourcery.com>
8248
8249 * linux-low.c (linux_attach): Add 'static'.
8250
d38bbb0a
YQ
82512012-06-06 Yao Qi <yao@codesourcery.com>
8252
8253 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8254
89dc0afd
JK
82552012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8256
8257 Fix gcc -flto compilation warning.
8258 * server.c (main): Make variable multi_mode and attach volatile.
8259
75f62ce7
TJB
82602012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8261
8262 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8263 if the platform doesn't know about it.
8264
65f479b6
PA
82652012-05-30 Jeff Kenton <jkenton@tilera.com>
8266
8267 * Makefile.in (SFILES): Add linux-tile-low.c.
8268 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8269 * configure.srv: Handle tilegx-*-linux*.
8270 * linux-tile-low.c: New file.
8271
0c5bf5a9
JK
82722012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8273
8274 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8275
a493e3e2
PA
82762012-05-24 Pedro Alves <palves@redhat.com>
8277
8278 PR gdb/7205
8279
43aaf8b6 8280 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8281
2ea28649
PA
82822012-05-24 Pedro Alves <palves@redhat.com>
8283
8284 PR gdb/7205
8285
8286 Replace target_signal with gdb_signal throughout.
8287
8d409d16
MR
82882012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8289
8290 * linux-low.c (linux_store_registers): Avoid the copying sequence
8291 when no data has been retrieved by ptrace.
8292
23512c01
MGD
82932012-05-22 Will Deacon <will.deacon@arm.com>
8294
8295 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8296 Include asm/ptrace.h.
8297 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8298 already defined.
8299
4934b29e
MR
83002012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8301
8302 * linux-low.c (linux_store_registers): Don't re-retrieve data
8303 with ptrace that has already been obtained from /proc. Always
8304 copy any data retrieved with ptrace to the buffer supplied.
8305
bde24c0a
PA
83062012-05-11 Yao Qi <yao@codesourcery.com>
8307 Pedro Alves <palves@redhat.com>
8308
8309 * linux-low.c (enum stopping_threads_kind): New.
8310 (stopping_threads): Change type to `enum stopping_threads_kind'.
8311 (handle_extended_wait): If stopping and suspending threads, leave
8312 the new_lwp suspended too.
8313 (linux_wait_for_event): Adjust.
8314 (stop_all_lwps): Set `stopping_threads' to
8315 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8316 whether we're suspending threads or just stopping them. Assert no
8317 recursion happens.
8318
623b6bdf
YQ
83192012-04-29 Yao Qi <yao@codesourcery.com>
8320
8321 * server.h: Move some code to ...
8322 * gdbthread.h: ... here. New.
8323 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8324 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8325 (nto-low.o, win32-low.o): Likewise.
8326 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8327 * regcache.c, remote-utils.c, server.c: Likewise.
8328 * target.c, tracepoint.c, win32-low.c: Likewise.
8329
f15f9948
TJB
83302012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8331
8332 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8333 (PTRACE_ARG4_TYPE): Likewise.
8334 (PTRACE_XFER_TYPE): Likewise.
8335 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8336 ptrace to PTRACE_ARG3_TYPE.
8337 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8338 (PTRACE_ARG4_TYPE): Likewise.
8339 (PTRACE_XFER_TYPE): Likewise.
8340 (linux_detach_one_lwp): Cast fourth argument of
8341 ptrace to long then PTRACE_ARG4_TYPE.
8342 (regsets_fetch_inferior_registers): Cast third argument of
8343 ptrace to long then PTRACE_ARG3_TYPE.
8344 (regsets_store_inferior_registers): Likewise.
8345
38ea300a
PA
83462012-04-20 Pedro Alves <palves@redhat.com>
8347
8348 * configure: Regenerate.
8349
c971b7fa
PA
83502012-04-19 Pedro Alves <palves@redhat.com>
8351
43aaf8b6 8352 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8353 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8354 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8355 (all, install-only, uninstall, clean-info, all-lib, clean): No
8356 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8357 (maintainer-clean realclean distclean): Use subdir_do.
8358 (subdir_do): New.
8359 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8360 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8361 * acinclude.m4: Include acx_configure_dir.m4.
8362 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8363 calls. Call AC_PROG_RANLIB. Configure gnulib using
8364 ACX_CONFIGURE_DIR.
8365 (GNULIB): New.
8366 (GNULIB_STDINT_H): Adjust.
8367 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8368 * gdbreplay.c: Include build-gnulib/config.h.
8369 * server.h: Likewise.
8370 * aclocal.m4: Regenerate.
8371 * config.in: Regenerate.
8372 * configure: Regenerate.
c971b7fa 8373
809277f8
PA
83742012-04-19 Pedro Alves <palves@redhat.com>
8375
8376 * Makefile.in (LIBGNU, INCGNU): Adjust.
8377 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8378 (all, install-only, uninstall, clean-info, all-lib, clean)
8379 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8380 * configure.ac: Adjust AC_OUTPUT output.
8381 * aclocal.m4: Regenerate.
8382 * configure: Regenerate.
8383
fd9bb8b8
PA
83842012-04-19 Pedro Alves <palves@redhat.com>
8385
8386 * Makefile.in (generated_files): New.
8387 (server_h): Remove the explicit dependency on config.h, and depend
8388 on $generated_files.
8389
1c298c66
PA
83902012-04-19 Pedro Alves <palves@redhat.com>
8391
8392 * Makefile.in (INCGNU): Add -Ignulib.
8393
57c4b50b
PA
83942012-04-19 Pedro Alves <palves@redhat.com>
8395
8396 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8397 (INCGNU): ... this, and spell out -I here.
8398 (GNULIB_LIB): Rename to ...
8399 (LIBGNU): ... this.
8400 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8401
1030e047
PA
84022012-04-19 Pedro Alves <palves@redhat.com>
8403
8404 * config.in: Regenerate.
8405
447d4319
PA
84062012-04-19 Pedro Alves <palves@redhat.com>
8407
8408 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8409 * server.h (memmem): Remove declaration.
8410 * config.in: Regenerate.
8411 * configure: Regenerate.
8412
aad9eab9
YQ
84132012-04-19 Yao Qi <yao@codesourcery.com>
8414
8415 * Makefile.in (SFILES): Add common/vec.c.
8416 (OBS): Add vec.o.
8417 (vec.o): New rule.
8418
3e10640f
YQ
84192012-04-19 Yao Qi <yao@codesourcery.com>
8420
8421 * remote-utils.c (prepare_resume_reply): Replace with macro
8422 target_core_of_thread.
8423 * server.c (handle_qxfer_threads_proper): Likewise.
8424 * target.h (traget_core_of_thread): New macro.
8425
71622373
PA
84262012-04-18 Pedro Alves <palves@redhat.com>
8427
8428 * aclocal.m4: Regenerate.
8429 * configure: Regenerate.
8430
80d26939
YQ
84312012-04-16 Yao Qi <yao@codesourcery.com>
8432
8433 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8434 duplicated on address.
8435
42476b70
YQ
84362012-04-16 Yao Qi <yao@codesourcery.com>
8437
8438 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8439 (struct tracepoint_action_ops) <send>: New field.
8440 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8441 (agent_expr_send, x_tracepoint_action_send): New.
8442 (l_tracepoint_action_send): New.
8443 (cmd_qtdp): Download and install tracepoint
8444 according to `use_agent'.
8445 (run_inferior_command): Add one more parameter `len'.
8446 Update callers.
8447 (tracepoint_send_agent): New.
8448 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8449
7bc83639
YQ
84502012-04-16 Yao Qi <yao@codesourcery.com>
8451
8452 * tracepoint.c (download_tracepoints): Moved to ...
8453 (cmd_qtstart): ... here.
8454
5f18041e
YQ
84552012-04-14 Yao Qi <yao@codesourcery.com>
8456
8457 * tracepoint.c: Include inttypes.h.
8458 (struct collect_memory_action): Use sized types.
8459 (struct tracepoint): Likewise.
8460 (cmd_qtdp, stop_tracing): Update print specifiers.
8461 (cmd_qtp, response_tracepoint): Likewise.
8462 (collect_data_at_tracepoint): Likewise.
8463 (collect_data_at_step): Likewise.
8464
55a8c076
YQ
84652012-04-14 Yao Qi <yao@codesourcery.com>
8466
8467 Import gnulib module inttypes.
8468 * aclocal.m4, config.in, configure: Regenerated.
8469
dc750257
YQ
84702012-04-14 Yao Qi <yao@codesourcery.com>
8471
8472 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8473 Makefile and config.status at last.
8474
0ab5faf9
YQ
84752012-04-13 Yao Qi <yao@codesourcery.com>
8476
8477 * tracepoint.c: Include stdint.h unconditionally.
8478
18f5fd81
TJB
84792012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8480
8481 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8482 on BFD_HAVE_SYS_PROCFS_TYPE.
8483 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8484 * configure: Regenerate.
8485 * config.in: Likewise.
8486
4d47af5c
L
84872012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8488
8489 * Makefile.in (clean): Also remove x32.c x32-linux.c
8490 x32-avx.c x32-avx-linux.c.
8491 (x32.o): New target.
8492 (x32.c): Likewise.
8493 (x32-linux.o): Likewise.
8494 (x32-linux.c): Likewise.
8495 (x32-avx.o): Likewise.
8496 (x32-avx.c): Likewise.
8497 (x32-avx-linux.o): Likewise.
8498 (x32-avx-linux.c): Likewise.
8499
8500 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8501 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8502 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8503 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8504 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8505 i386/x32-avx-linux.xml.
8506
8507 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8508 (init_registers_x32_avx_linux): Likwise.
8509 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8510 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8511
ecedbe58
PA
85122012-04-13 Pedro Alves <palves@redhat.com>
8513
8514 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8515 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8516 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8517 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8518 the sub-make.
8519
c92b5177
L
85202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8521
8522 * linux-x86-low.c (compat_x32_clock_t): New.
8523 (compat_x32_siginfo_t): Likewise.
8524 (compat_x32_siginfo_from_siginfo): Likewise.
8525 (siginfo_from_compat_x32_siginfo): Likewise.
8526 (linux_is_elf64): Likewise.
8527 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8528 and siginfo_from_compat_x32_siginfo for x32.
8529 (x86_arch_setup): Set linux_is_elf64.
8530
214d508e
L
85312012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8532
8533 PR gdb/13969
8534 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8535 e_machine field.
8536 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8537 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8538 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8539 compatible with process.
8540
c9a1864a
YQ
85412012-04-12 Yao Qi <yao@codesourcery.com>
8542
8543 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8544 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8545 (install-only, install-info, clean): Handle sub dir gnulib.
8546 (all-lib, am--refresh): New targets.
8547 (memmem.o): Remove target.
8548 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8549 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8550 (AC_REPLACE_FUNCS): Remove memmem.
8551 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8552 (AC_OUTPUT): Generate Makefile in gnulib/.
8553 * aclocal.m4, config.in, configure: Regenerated.
8554
367ba2c2
MR
85552012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8556
8557 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8558
9d236627
PA
85592012-04-05 Pedro Alves <palves@redhat.com>
8560
8561 -Werror=strict-aliasing
8562
8563 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8564 pointer.
8565
111217b3
PA
85662012-04-04 Pedro Alves <palves@redhat.com>
8567
8568 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8569 (sparc_store_gregset_from_stack, sparc_store_gregset)
8570 (sparc_breakpoint_at): Fix formatting.
8571
8365dcf5
TJB
85722012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8573
8574 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8575 are available.
8576 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8577 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8578 * config.in: Regenerate.
8579 * configure: Likewise.
8580
689cc2ae
PA
85812012-03-29 Pedro Alves <palves@redhat.com>
8582
8583 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8584 Correct ptrace arguments.
8585
c14dfd32
PA
85862012-03-28 Pedro Alves <palves@redhat.com>
8587
8588 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8589 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8590 (IA64_FR1_REGNUM): New defines.
8591 (ia64_fetch_register): New.
8592 (the_low_target): Install it.
8593 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8594 field.
8595 * linux-low.c (linux_fetch_registers): Try the
8596 the_low_target.fetch_register hook first.
8597
8598 * linux-arm-low.c (the_low_target): Adjust.
8599 * linux-bfin-low.c (the_low_target): Adjust.
8600 * linux-cris-low.c (the_low_target): Adjust.
8601 * linux-crisv32-low.c (the_low_target): Adjust.
8602 * linux-m32r-low.c (the_low_target): Adjust.
8603 * linux-m68k-low.c (the_low_target): Adjust.
8604 * linux-mips-low.c (the_low_target): Adjust.
8605 * linux-ppc-low.c (the_low_target): Adjust.
8606 * linux-s390-low.c (the_low_target): Adjust.
8607 * linux-sh-low.c (the_low_target): Adjust.
8608 * linux-sparc-low.c (the_low_target): Adjust.
8609 * linux-tic6x-low.c (the_low_target): Adjust.
8610 * linux-x86-low.c (the_low_target): Adjust.
8611 * linux-xtensa-low.c (the_low_target): Adjust.
8612
63c88e13
PA
86132012-03-26 Pedro Alves <palves@redhat.com>
8614
8615 * server.c (handle_qxfer_libraries): Don't bail early if
8616 the_target->qxfer_libraries_svr4 is not NULL.
8617
fb723180
PA
86182012-03-26 Pedro Alves <palves@redhat.com>
8619
8620 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8621
0afae3cf
PA
86222012-03-23 Pedro Alves <palves@redhat.com>
8623
8624 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8625 "library-list-svr4" element's start tag when the the DSO list is
8626 empty.
8627
485f1ee4
PA
86282012-03-23 Pedro Alves <palves@redhat.com>
8629
8630 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8631 a variable whose type size is the same as the inferior's pointer
8632 size.
8633
a5362b9a
TS
86342012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8635
8636 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8637 struct siginfo.
8638 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8639 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8640 * linux-low.h: Include <signal.h>.
8641 (struct siginfo): Remove forward declaration.
8642 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8643 struct siginfo.
8644
d226c142
MF
86452012-03-21 Mike Frysinger <vapier@gentoo.org>
8646
8647 * .gitignore: Ignore more files.
8648
122f36ef
PA
86492012-03-19 Pedro Alves <palves@redhat.com>
8650 Jan Kratochvil <jan.kratochvil@redhat.com>
8651
8652 * server.c (cont_thread, general_thread): Add describing comments.
8653 (start_inferior): Clear `cont_thread'.
8654 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8655 of a process.
8656
fc3e5175
YQ
86572012-03-15 Yao Qi <yao@codesourcery.com>
8658
8659 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8660 handling to ...
8661 (cmd_qtdp): ... here.
8662
8d0d92cd
YQ
86632012-03-15 Yao Qi <yao@codesourcery.com>
8664
8665 * tracepoint.c (struct tracepoint_action_ops): New.
8666 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8667 (m_tracepoint_action_download): New.
8668 (r_tracepoint_action_download): New.
8669 (x_tracepoint_action_download): New.
8670 (l_tracepoint_action_download): New.
8671 (add_tracepoint_action): Install `action->ops' according type.
8672 (download_tracepoint_1): Move code `download' function pointer
8673 of various tracepoint_action_ops.
8674
87b0bb13
JK
86752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8676
8677 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8678 linux_ptrace_attach_warnings.
8679
5f572dec
JK
86802012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8681
8682 * Makefile.in (linux-ptrace.o): New.
8683 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8684 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8685 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8686 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8687 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8688 of these targets.
8689 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8690
f4647387
YQ
86912012-03-08 Yao Qi <yao@codesourcery.com>
8692 Pedro Alves <palves@redhat.com>
8693
8694 Fix PR server/13392.
8695 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8696 offset of JMP insn.
8697 * tracepoint.c (remove_tracepoint): New.
8698 (cmd_qtdp): Call remove_tracepoint when failed to install.
8699
9b224c5e
PA
87002012-03-07 Pedro Alves <palves@redhat.com>
8701
8702 * linux-low.c (get_detach_signal): New.
8703 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8704 Pass on pending signals to PTRACE_DETACH. Check the result of the
8705 ptrace call.
8706 * server.c (program_signals, program_signals_p): New.
8707 (handle_general_set): Handle QProgramSignals.
8708 * server.h (program_signals, program_signals_p): Declare.
8709
e237a7e2
JK
87102012-03-05 Pedro Alves <palves@redhat.com>
8711 Jan Kratochvil <jan.kratochvil@redhat.com>
8712
8713 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8714 New comment why.
8715
5808517f
YQ
87162012-03-03 Yao Qi <yao@codesourcery.com>
8717
8718 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8719 agent_look_up_symbols.
8720
58b4daa5
YQ
87212012-03-03 Yao Qi <yao@codesourcery.com>
8722
8723 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8724 (linux-x86-low.o): Likewise.
8725 * server.h: Remove in_process_agent_loaded.
8726 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8727 common/agent.c.
8728 Update callers.
8729
8ffcbaaf
YQ
87302012-03-03 Yao Qi <yao@codesourcery.com>
8731
8732 * tracepoint.c (gdb_agent_capability): New global.
8733 (in_process_agent_loaded_ust): Renamed to
8734 `in_process_agent_supports_ust'.
8735 Update callers.
8736 (in_process_agent_supports_ust): Call agent_capability_check.
8737 (clear_installed_tracepoints): Assert that agent supports
8738 agent.
8739
d1feda86
YQ
87402012-03-03 Yao Qi <yao@codesourcery.com>
8741
8742 * linux-low.c (linux_supports_agent): New.
8743 (linux_target_ops): Initialize field `supports_agent' with
8744 linux_supports_agent.
8745 * target.h (struct target_ops) <supports_agent>: New.
8746 (target_supports_agent): New macro.
8747 * server.c (handle_general_set): Handle packet 'QAgent'.
8748 (handle_query): Send `QAgent+'.
8749 * Makefile.in (server.o): Depends on agent.h.
8750
2fa291ac
YQ
87512012-03-03 Yao Qi <yao@codesourcery.com>
8752
8753 * Makefile.in (OBS): Add agent.o.
8754 Add new rule for agent.o.
8755 Track dependence of tracepoint.c on agent.h.
8756 * tracepoint.c (run_inferior_command_1):
8757 (run_inferior_command): Call agent_run_command.
8758 (gdb_ust_connect_sync_socket): Deleted. Move it to
8759 common/agent.c.
8760 (resume_thread, stop_thread): Likewise.
8761 (gdb_ust_socket_init): Renamed to ...
8762 (gdb_agent_socket_init): ... New.
8763 (gdb_ust_thread): Renamed to ...
8764 (gdb_agent_helper_thread): ... New.
8765 (gdb_ust_init): Move some code to ...
8766 (gdb_agent_init): ... here. New.
8767 [HAVE_UST]: Call gdb_ust_init.
8768 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8769 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8770 * config.in, configure: Regenerated.
8771
05044653
PA
87722012-03-02 Pedro Alves <palves@redhat.com>
8773
8774 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8775 * linux-low.c (struct simple_pid_list): New.
8776 (stopped_pids): New a struct simple_pid_list pointer.
8777 (add_to_pid_list, pull_pid_from_list): New.
8778 (handle_extended_wait): Don't assume the first signal new children
8779 report is SIGSTOP. Adjust call to pull_pid_from_list.
8780 (linux_wait_for_lwp): Adjust.
8781
8d00225b
YQ
87822012-03-02 Yao Qi <yao@codesourcery.com>
8783
8784 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8785 debug log.
8786
19560ba5
YQ
87872012-03-02 Yao Qi <yao@codesourcery.com>
8788
8789 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8790 `stop_pc' and `tpoint'. Update caller.
8791
1faeff08
MR
87922012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8793
8794 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8795 * linux-low.c (use_linux_regsets): New macro.
8796 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8797 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8798 (linux_register_in_regsets): New function.
8799 (usr_fetch_inferior_registers): Skip registers covered by
8800 regsets.
8801 (usr_store_inferior_registers): Likewise.
8802 (usr_fetch_inferior_registers): New macro.
8803 (usr_store_inferior_registers): Likewise.
8804 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8805 (linux_store_registers): Likewise.
8806 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8807 prototype.
8808 (init_registers_mips64_dsp_linux): Likewise.
8809 (init_registers_mips_linux): New macro.
8810 (init_registers_mips_dsp_linux): Likewise.
8811 (mips_dsp_num_regs): Likewise.
8812 (DSP_BASE, DSP_CONTROL): New fallback macros.
8813 (mips_base_regs): New macro.
8814 (mips_regmap): Use it. Fix the size.
8815 (mips_dsp_regmap): New variable.
8816 (mips_dsp_regset_bitmap): Likewise.
8817 (mips_arch_setup): New function.
8818 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8819 than mips_regmap.
8820 (mips_cannot_store_register): Likewise.
8821 (the_low_target): Update .arch_setup, .num_regs and .regmap
8822 initializers. Add .regset_bitmap initializer.
8823 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8824 initializer.
8825 * linux-bfin-low.c (the_low_target): Likewise.
8826 * linux-cris-low.c (the_low_target): Likewise.
8827 * linux-crisv32-low.c (the_low_target): Likewise.
8828 * linux-ia64-low.c (the_low_target): Likewise.
8829 * linux-m32r-low.c (the_low_target): Likewise.
8830 * linux-m68k-low.c (the_low_target): Likewise.
8831 * linux-ppc-low.c (the_low_target): Likewise.
8832 * linux-s390-low.c (the_low_target): Likewise.
8833 * linux-sh-low.c (the_low_target): Likewise.
8834 * linux-sparc-low.c (the_low_target): Likewise.
8835 * linux-tic6x-low.c (the_low_target): Likewise.
8836 * linux-x86-low.c (the_low_target): Likewise.
8837 * linux-xtensa-low.c (the_low_target): Likewise.
8838 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8839 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8840 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8841 srv_xmlfiles.
8842 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8843 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8844
c03e6ccc
YQ
88452012-02-29 Yao Qi <yao@codesourcery.com>
8846 Pedro Alves <palves@redhat.com>
8847
8848 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8849 `step_over_finished' is true.
8850
644cebc9
PA
88512012-02-27 Pedro Alves <palves@redhat.com>
8852
8853 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8854 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8855
c14d7ab2
PA
88562012-02-27 Pedro Alves <palves@redhat.com>
8857
8858 PR server/9684
8859 * linux-low.c (pid_is_stopped): New.
8860 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8861
412c89dd
LM
88622012-02-25 Luis Machado <lgustavo@codesourcery.com>
8863
8864 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8865 of conditions.
8866
b745defe
MR
88672012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8868
8869 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8870
9f3a5c85
LM
88712012-02-24 Luis Machado <lgustavo@codesourcery>
8872
8873 * server.c (handle_query): Advertise support for target-side
8874 breakpoint condition evaluation.
8875 (process_point_options): New function.
8876 (process_serial_event): When inserting a breakpoint, check for
8877 a target-side condition that should be evaluated.
8878
8879 * mem-break.c: Include regcache.h and ax.h.
8880 (point_cond_list_t): New data structure.
8881 (breakpoint) <cond_list>: New field.
8882 (find_gdb_breakpoint_at): Make non-static.
8883 (delete_gdb_breakpoint_at): Clear any target-side
8884 conditions.
8885 (clear_gdb_breakpoint_conditions): New function.
8886 (add_condition_to_breakpoint): Likewise.
8887 (add_breakpoint_condition): Likewise.
8888 (gdb_condition_true_at_breakpoint): Likewise.
8889 (gdb_breakpoint_here): Return result directly instead
8890 of going through a local variable.
8891
8892 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8893 (clear_gdb_breakpoint_conditions): Likewise.
8894 (add_breakpoint_condition): Likewise.
8895 (gdb_condition_true_at_breakpoint): Likewise.
8896
8897 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8898 (need_step_over_p): Take target-side breakpoint condition into
8899 consideration.
8900
5e1dc496
LM
89012012-02-24 Luis Machado <lgustavo@codesourcery>
8902
8903 * server.h: Include tracepoint.h.
8904 (agent_mem_read, agent_get_trace_state_variable_value,
8905 agent_set_trace_state_variable_value,
8906 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8907 get_set_tsv_func_addr): New prototypes.
8908
8909 * ax.h: New include file.
8910 * ax.c: New source file.
8911
8912 * tracepoint.c: Include ax.h.
8913 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8914 agent_expr, eval_result_type): Move to ax.h.
8915 (parse_agent_expr): Rename to ...
8916 (gdb_parse_agent_expr): ... this, make it non-static and move
8917 to ax.h.
8918 (unparse_agent_expr) Rename to ...
8919 (gdb_unparse_agent_expr): ... this, make it non-static and move
8920 to ax.h.
8921 (eval_agent_expr): Rename to ...
8922 (eval_tracepoint_agent_expr): ... this.
8923 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8924 forward declarations.
8925 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8926 (agent_get_trace_state_variable_value): New function.
8927 (agent_set_trace_state_variable_value): New function.
8928 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8929 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8930 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8931 (condition_true_at_tracepoint): Likewise.
8932 (parse_agent_expr): Rename to ...
8933 (gdb_parse_agent_expr): ... this and move to ax.c.
8934 (unparse_agent_expr): Rename to ...
8935 (gdb_unparse_agent_expr): ... this and move to ax.c.
8936 (gdb_agent_op_name): Move to ax.c.
8937 (eval_agent_expr): Rename to ...
8938 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8939 and move to ax.c.
8940 (eval_tracepoint_agent_expr): New function.
8941 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8942 non-static.
5e1dc496
LM
8943 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8944 ax.c.
8945 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8946 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8947 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8948 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8949 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8950 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8951 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8952 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8953 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8954 (compile_bytecodes): Remove forward declaration.
8955 (is_goto_target): Move to ax.c.
8956 (compile_bytecodes): Move to ax.c and call
8957 agent_get_trace_state_variable_value (...) and
8958 agent_set_trace_state_variable_value (...).
8959
8960 * Makefile.in: Update ax.c and IPA dependencies.
8961
277e4e52
PA
89622012-02-24 Pedro Alves <palves@redhat.com>
8963
8964 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8965 (cmd_bigqtbuffer_circular): ... this. Only handle
8966 'QTBuffer:circular:'.
8967 (handle_tracepoint_general_set): Adjust.
8968
bf4c19f7
YQ
89692012-02-16 Yao Qi <yao@codesourcery.com>
8970
8971 * inferiors.c: Move code to ...
8972 * dll.c: .... here. New.
8973 * server.h: Declare clear_dlls.
8974 * Makefile.in (SFILES): Add dll.c.
8975 (OBS): Add dll.o
8976 (dll.o): New rule.
8977
d73f2619
YQ
89782012-02-11 Yao Qi <yao@codesourcery.com>
8979
8980 * server.c: (handle_monitor_command): Add a new parameter
8981 `own_buf'.
8982 (handle_query): Update caller.
8983
f8255c2a
JB
89842012-02-09 Joel Brobecker <brobecker@adacore.com>
8985
8986 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8987 * configure, config.in: Regenerate.
8988 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8989 is not defined.
8990
da84f473
PA
89912012-02-02 Pedro Alves <palves@redhat.com>
8992
8993 Try SIGKILL first, then PTRACE_KILL.
8994 * linux-low.c (linux_kill_one_lwp): New.
8995 (linux_kill_one_lwp): Rename to ...
8996 (kill_one_lwp_callback): ... this. Use the new
8997 linux_kill_one_lwp.
8998
e886a173
PA
89992012-02-02 Pedro Alves <palves@redhat.com>
9000
9001 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9002 inferior.
9003
be07f1a2
PA
90042012-01-27 Pedro Alves <palves@redhat.com>
9005
9006 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9007 (elf_64_file_p): Make static.
9008 (linux_pid_exe_is_elf_64_file): New.
9009 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9010 Delete declarations.
9011 (linux_pid_exe_is_elf_64_file): Declare.
9012 * linux-x86-low.c (x86_arch_setup): Use
9013 linux_pid_exe_is_elf_64_file.
9014
d8301ad1
JK
90152012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9016
9017 * linux-low.c (linux_wait_for_event_1): Rename to ...
9018 (linux_wait_for_event): ... here and merge it with former
9019 linux_wait_for_event - new variable wait_ptid, use it.
9020 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9021
01b17894
PA
90222012-01-23 Pedro Alves <palves@redhat.com>
9023
9024 * server.c (main): Avoid yet another case of infinite loop while
9025 detaching/killing after a longjmp.
9026
e825046f
JK
90272012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9028
9029 Code cleanup.
9030 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9031
b9e7b9c3
UW
90322012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9033
9034 * hostio.c (handle_readlink): New function.
9035 (handle_vFile): Call it to handle "vFile:readlink" packets.
9036
901f9912
UW
90372012-01-20 Pedro Alves <palves@redhat.com>
9038 Ulrich Weigand <ulrich.weigand@linaro.org>
9039
9040 * server.c (handle_v_requests): Only support vAttach and vRun to
9041 start multiple processes when in extended protocol mode.
9042
fc1ab1a0
PA
90432012-01-17 Pedro Alves <palves@redhat.com>
9044
9045 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9046 memalign plus mprotect to allocate the scratch buffer.
9047
7d5d4e98
PA
90482012-01-13 Pedro Alves <palves@redhat.com>
9049
9050 * server.c (attach_inferior): Clear `cont_thread'.
9051
f128d5e9
PA
90522012-01-13 Pedro Alves <palves@redhat.com>
9053
9054 * server.c (main): Avoid infinite loop while detaching/killing
9055 after a longjmp.
9056
06db92f0
DE
90572012-01-09 Doug Evans <dje@google.com>
9058
9059 * server.c (start_inferior): Set last_ptid in --wrapper case.
9060
32d92999
YQ
90612012-01-06 Yao Qi <yao@codesourcery.com>
9062
9063 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9064 defined.
9065 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9066
5e0a92a9
YQ
90672012-01-04 Yao Qi <yao@codesourcery.com>
9068
9069 * tracepoint.c (cmd_qtdp): Print debug message
9070 for static tracepoint.
9071
ae639e8c
YQ
90722012-01-04 Yao Qi <yao@codesourcery.com>
9073
9074 * tracepoint.c (trace_vdebug): Differentiate debug message
9075 between gdbserver and IPA.
9076
f72429c5
YQ
90772012-01-03 Yao Qi <yao@codesourcery.com>
9078
9079 * tracepoint.c (tracepoint_was_hit): Don't collect for
9080 static tracepoint.
9081
12c3e59c
JB
90822012-01-02 Joel Brobecker <brobecker@adacore.com>
9083
9084 * terminal.h: Reformat copyright header.
9085
67827812
JB
90862012-01-02 Joel Brobecker <brobecker@adacore.com>
9087
9088 * server.c (gdbserver_version): Update copyright year.
9089 * gdbreplay.c (gdbreplay_version): Likewise.
9090
3e52c33d
JK
90912011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9092
9093 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9094
9095 Revert:
9096 2011-12-18 Hui Zhu <teawater@gmail.com>
9097 * linux-low.c (linux_create_inferior): Save return value to ret.
9098
66f1260e
HZ
90992011-12-18 Hui Zhu <teawater@gmail.com>
9100
9101 * linux-low.c (linux_create_inferior): Save return value to ret.
9102
e77616d7
DE
91032011-12-16 Doug Evans <dje@google.com>
9104
e7b06c57
DE
9105 * linux-low.c (linux_create_inferior): If stdio connection,
9106 redirect stdin from /dev/null, stdout to stderr.
9107 * remote-utils.c (remote_is_stdio): New static global.
9108 (remote_connection_is_stdio): New function.
9109 (remote_prepare): Handle stdio connection.
9110 (remote_open): Ditto.
9111 (remote_close): Don't close stdin for stdio connections.
9112 (read_prim,write_prim): New functions. Replace all calls to
9113 read/write to these.
9114 * server.c (main): Watch for "-" argument. Move call to
9115 remote_prepare before start_inferior.
9116 * server.h (STDIO_CONNECTION_NAME): New macro.
9117 (remote_connection_is_stdio): Declare.
9118
e77616d7
DE
9119 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9120 in debugging output.
9121
82067193
YQ
91222011-12-15 Yao Qi <yao@codesourcery.com>
9123
9124 * tracepoint.c: Include sys/syscall.h.
9125 (gdb_ust_thread): Remove preprocessor conditional.
9126
82bfbe7e
PA
91272011-12-14 Pedro Alves <pedro@codesourcery.com>
9128
9129 * linux-low.c (linux_detach_one_lwp): Call
9130 the_low_target.prepare_to_resume before detaching.
9131
712c6575
YQ
91322011-12-14 Yao Qi <yao@codesourcery.com>
9133
9134 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9135 of write.
9136
d54d1edf
YQ
91372011-12-14 Yao Qi <yao@codesourcery.com>
9138
9139 * i386-low.c (i386_low_stopped_data_address): Initialize local
9140 variable `control'.
9141
6210a125
PA
91422011-12-13 Pedro Alves <pedro@codesourcery.com>
9143
9144 PR remote/13492
9145
9146 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9147 DR_CONTROL unless necessary. Extend comments.
9148 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9149 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9150
2ece8244
YQ
91512011-12-13 Yao Qi <yao@codesourcery.com>
9152
9153 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9154 macros.
9155 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9156
784867a5
JK
91572011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9158
9159 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9160 Print new debug message for such case.
9161
6bf36717
JK
91622011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9163
9164 Fix overlapping memcpy.
9165 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9166 the read_inferior_memory transfer.
9167 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9168 write_inferior_memory transfer.
9169 (set_fast_tracepoint_jump): New variable buf. Use it for the
9170 read_inferior_memory and write_inferior_memory transfers.
9171 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9172 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9173 Use it for the write_inferior_memory transfer.
9174 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9175 buffers.
9176
50275556
MR
91772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9178
9179 * linux-low.c (fetch_register, store_register): Make code
9180 consistent, fix formatting.
9181
7325beb4
MR
91822011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9183
9184 * linux-low.c (usr_store_inferior_registers): Factor out code
9185 to handle individual registers into...
9186 (store_register): ... this new function.
9187
c642a434
UW
91882011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9189
9190 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9191 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9192 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9193 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9194 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9195 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9196 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9197 (srv_xmlfiles): Add new XML files.
9198
9199 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9200 and <sys/uio.h>.
9201 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9202 (init_registers_s390_linux32v1): Add prototype.
9203 (init_registers_s390_linux32v2): Likewise.
9204 (init_registers_s390_linux64v1): Likewise.
9205 (init_registers_s390_linux64v2): Likewise.
9206 (init_registers_s390x_linux64v1): Likewise.
9207 (init_registers_s390x_linux64v2): Likewise.
9208 (s390_num_regs): Increment to 52.
9209 (s390_regmap): Add orig_r2 register.
9210 (s390_num_regs_3264): Increment to 68.
9211 (s390_regmap_3264): Add orig_r2 register.
9212 (s390_collect_ptrace_register): Handle orig_r2 register.
9213 (s390_supply_ptrace_register): Likewise.
9214 (s390_fill_last_break): New function.
9215 (s390_store_last_break): Likewise.
9216 (s390_fill_system_call): New function.
9217 (s390_store_system_call): Likewise.
9218 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9219 register sets.
9220 (s390_check_regset): New function.
9221 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9222 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9223 Update target_regsets for available register sets.
9224
2268b414
JK
92252011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9226 Jan Kratochvil <jan.kratochvil@redhat.com>
9227
9228 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9229 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9230 New.
9231 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9232 * linux-low.h (struct process_info_private): New member r_debug.
9233 * server.c (handle_qxfer_libraries): Call
9234 the_target->qxfer_libraries_svr4.
9235 (handle_qxfer_libraries_svr4): New function.
9236 (qxfer_packets): New entry "libraries-svr4".
9237 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9238 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9239 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9240 PACKET_qXfer_libraries_svr4.
9241
d6db1fab
UW
92422011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9243
9244 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9245 PSW address/mask between 8-byte and 16-byte formats.
9246 (s390_supply_ptrace_register): Likewise.
9247 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9248 basic addressing mode bit.
9249
242f5f1c
SS
92502011-11-24 Stan Shebs <stan@codesourcery.com>
9251
9252 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9253
f196051f
SS
92542011-11-17 Stan Shebs <stan@codesourcery.com>
9255
9256 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9257 (tracing_start_time): New global.
9258 (tracing_stop_time): New global.
9259 (tracing_user_name): New global.
9260 (tracing_notes): New global.
9261 (tracing_stop_note): New global.
9262 (cmd_qtstart): Set traceframe_usage, start_time.
9263 (stop_tracing): Set stop_time.
9264 (cmd_qtstatus): Report additional status.
9265 (cmd_qtp): New function.
9266 (handle_tracepoint_query): Call it.
9267 (cmd_qtnotes): New function.
9268 (handle_tracepoint_general_set): Call it.
9269 (get_timestamp): Rename from tsv_get_timestamp.
9270
405f8e94
SS
92712011-11-14 Stan Shebs <stan@codesourcery.com>
9272 Kwok Cheung Yeung <kcy@codesourcery.com>
9273
9274 * linux-x86-low.c (small_jump_insn): New.
9275 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9276 trampoline and error message, build a trampoline and issue a small
9277 jump instruction to it.
9278 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9279 trampoline and error message.
9280 (x86_get_min_fast_tracepoint_insn_len): New.
9281 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9282 * linux-low.h (struct linux_target_ops): Add arguments to
9283 install_fast_tracepoint_jump_pad operation, add new operation.
9284 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9285 arguments.
9286 (linux_get_min_fast_tracepoint_insn_len): New function.
9287 (linux_target_op): Add new operation.
9288 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9289 (gdb_trampoline_buffer_end): Ditto.
9290 (gdb_trampoline_buffer_error): Ditto.
9291 (struct ipa_sym_addresses): Add fields for new IPA variables.
9292 (symbol_list): Add entries for new IPA variables.
9293 (struct tracepoint): Add fields to hold the address range of the
9294 trampoline used by the tracepoint.
9295 (trampoline_buffer_head): New static variable.
9296 (trampoline_buffer_tail): Ditto.
9297 (claim_trampoline_space): New function.
9298 (have_fast_tracepoint_trampoline_buffer): New function.
9299 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9300 structure.
9301 (install_fast_tracepoint): Ditto, also add error buffer argument.
9302 (cmd_qtminftpilen): New function.
9303 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9304 (fast_tracepoint_from_trampoline_address): New function.
9305 (fast_tracepoint_collecting): Handle trampoline as part of jump
9306 pad space.
9307 (set_trampoline_buffer_space): New function.
9308 (initialize_tracepoint): Initialize new IPA variables.
9309 * target.h (struct target_ops): Add arguments to
9310 install_fast_tracepoint_jump_pad operation, add new
9311 get_min_fast_tracepoint_insn_len operation.
9312 (target_get_min_fast_tracepoint_insn_len): New.
9313 (install_fast_tracepoint_jump_pad): Add arguments.
9314 * server.h (IPA_BUFSIZ): Define.
9315 * linux-i386-ipa.c: Include extra header files.
9316 (initialize_fast_tracepoint_trampoline_buffer): New function.
9317 (initialize_low_tracepoint): Call it.
9318 * server.h (set_trampoline_buffer_space): Declare.
9319 (claim_trampoline_space): Ditto.
9320 (have_fast_tracepoint_trampoline_buffer): Ditto.
9321
1e4d1764
YQ
93222011-11-14 Yao Qi <yao@codesourcery.com>
9323
9324 * server.c (handle_query): Handle InstallInTrace for qSupported.
9325 * tracepoint.c (add_tracepoint): Sort list.
9326 (install_tracepoint, download_tracepoint): New.
9327 (cmd_qtdp): Call them to install and download tracepoints.
9328 (sort_tracepoints): Removed.
9329 (cmd_qtstart): Update.
9330
5c73ff4e
YQ
93312011-11-14 Yao Qi <yao@codesourcery.com>
9332
9333 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9334 * mem-break.h: Declare.
9335 * tracepoint.c (cmd_qtstart): Move some code to ...
9336 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9337 New.
9338 (download_tracepoints): Move some code to ...
9339 (download_tracepoint_1): ... here. New.
9340
86a30030
YQ
93412011-11-08 Yao Qi <yao@codesourcery.com>
9342
9343 * remote-utils.c (relocate_instruction): A comment fix.
9344
8d26e50c
JB
93452011-11-07 Joel Brobecker <brobecker@adacore.com>
9346
9347 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9348 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9349 dr_status_mirror and dr_control_mirror from debug_reg_state.
9350 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9351 (i386_initial_stuff): Remove use of deleted globals.
9352 (i386_get_thread_context, i386_set_thread_context,
9353 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9354 from debug_reg_state.
9355
a59306a3
YQ
93562011-11-05 Yao Qi <yao@codesourcery.com>
9357
9358 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9359 address as TPOINT's.
9360
3065dfb6
SS
93612011-11-02 Stan Shebs <stan@codesourcery.com>
9362
9363 * tracepoint.c (agent_mem_read_string): New function.
9364 (eval_agent_expr): Call it for tracenz.
9365 * server.c (handle_query): Report support for tracenz.
9366
fd0d8c7c
YQ
93672011-11-02 Yao Qi <yao@codesourcery.com>
9368
9369 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9370
609086b1
YQ
93712011-11-02 Yao Qi <yao@codesourcery.com>
9372
9373 * target.h: Fix a typo in comment.
9374
b9fd1791
PA
93752011-10-31 Pedro Alves <pedro@codesourcery.com>
9376
9377 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9378 clobber the breakpoints' shadows with fast tracepoint jumps.
9379 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9380 * target.c (write_inferior_memory): Also pass MYADDR down to
9381 check_mem_write.
9382
03583c20
UW
93832011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9384
9385 * configure.ac: Check support for personality routine.
9386 * configure: Regenerate.
9387 * config.in: Likewise.
9388 * linux-low.c: Include <sys/personality.h>.
9389 Define ADDR_NO_RANDOMIZE if necessary.
9390 (linux_create_inferior): Disable address space randomization when
9391 forking inferior, if requested.
9392 (linux_supports_disable_randomization): New function.
9393 (linux_target_ops): Install it.
9394 * server.h (disable_randomization): Declare.
9395 * server.c (disable_randomization): New global variable.
9396 (handle_general_set): Handle QDisableRandomization.
9397 (handle_query): Likewise for qSupported.
9398 (main): Support --disable-randomization and --no-disable-randomization
9399 command line arguments.
9400 * target.h (struct target_ops): Add supports_disable_randomization.
9401 (target_supports_disable_randomization): New macro.
9402
723b724b
MF
94032011-09-29 Mike Frysinger <vapier@gentoo.org>
9404
9405 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9406 ifdef check.
9407 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9408 [!PT_GETDSBT] (target_loadmap): New definition.
9409 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9410 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9411 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9412 and PT_GETDSBT to LINUX_LOADMAP.
9413 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9414 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9415
55329a5c 94162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9417
9418 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9419 (arm_linux_hwbp_cap): New static variable.
9420 (arm_linux_get_hwbp_cap): Replace by ...
9421 (arm_linux_init_hwbp_cap): ... this new function.
9422 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9423 (arm_linux_get_hw_watchpoint_count): Likewise.
9424 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9425 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9426 (arm_prepare_to_resume): Use perror_with_name instead of error.
9427
55329a5c 94282011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9429
9430 * linux-arm-low.c: Include <signal.h>.
9431 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9432 (struct arm_linux_hwbp_cap): New data type.
9433 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9434 (struct arm_linux_hw_breakpoint): New data type.
9435 (MAX_BPTS, MAX_WPTS): Define.
9436 (struct arch_process_info, struct arch_lwp_info): New data types.
9437 (arm_linux_get_hwbp_cap): New function.
9438 (arm_linux_get_hw_breakpoint_count): Likewise.
9439 (arm_linux_get_hw_watchpoint_count): Likewise.
9440 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9441 (arm_hwbp_control_initialize): Likewise.
9442 (arm_hwbp_control_is_enabled): Likewise.
9443 (arm_hwbp_control_is_initialized): Likewise.
9444 (arm_hwbp_control_disable): Likewise.
9445 (arm_linux_hw_breakpoint_equal): Likewise.
9446 (arm_linux_hw_point_initialize): Likewise.
9447 (struct update_registers_data): New data structure.
9448 (update_registers_callback: New function.
9449 (arm_insert_point): Likewise.
9450 (arm_remove_point): Likewise.
9451 (arm_stopped_by_watchpoint): Likewise.
9452 (arm_stopped_data_address): Likewise.
9453 (arm_new_process): Likewise.
9454 (arm_new_thread): Likewise.
9455 (arm_prepare_to_resume): Likewise.
9456 (the_low_target): Register arm_insert_point, arm_remove_point,
9457 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9458 arm_new_thread, and arm_prepare_to_resume.
9459
6b9801d4
SS
94602011-09-15 Stan Shebs <stan@codesourcery.com>
9461
9462 * server.h (struct emit_ops): Add compare-goto fields.
9463 * tracepoint.c (gdb_agent_op_sizes): New table.
9464 (emit_eq_goto): New function.
9465 (emit_ne_goto): New function.
9466 (emit_lt_goto): New function.
9467 (emit_le_goto): New function.
9468 (emit_gt_goto): New function.
9469 (emit_ge_goto): New function.
9470 (is_goto_target): New function.
9471 (compile_bytecodes): Recognize special cases of compare-goto
9472 combinations and call specialized emitters for them.
9473 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9474 (amd64_emit_ne_goto): New function.
9475 (amd64_emit_lt_goto): New function.
9476 (amd64_emit_le_goto): New function.
9477 (amd64_emit_gt_goto): New function.
9478 (amd64_emit_ge_goto): New function.
9479 (amd64_emit_ops): Add the new functions.
9480 (i386_emit_eq_goto): New function.
9481 (i386_emit_ne_goto): New function.
9482 (i386_emit_lt_goto): New function.
9483 (i386_emit_le_goto): New function.
9484 (i386_emit_gt_goto): New function.
9485 (i386_emit_ge_goto): New function.
9486 (i386_emit_ops): Add the new functions.
9487
bf15cbda
SS
94882011-09-08 Stan Shebs <stan@codesourcery.com>
9489
9490 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9491 (i386_emit_epilogue): Restore %ebx.
9492
943ca1dd
JZ
94932011-08-31 Jie Zhang <jzhang918@gmail.com>
9494
9495 * server.c (step_thread): Remove definition.
9496 (process_serial_event): Don't handle Hs.
9497 * server.h (step_thread): Remove declaration.
9498 * target.c (set_desired_inferior): Remove use of step_thread.
9499
e3deef73
LM
95002011-08-24 Luis Machado <lgustavo@codesourcery.com>
9501
9502 * linux-low.c: Include linux-procfs.h.
9503 (linux_attach_lwp_1): Update comments.
9504 (linux_attach): Scan for existing threads when attaching to a
9505 process that is the tgid.
9506 * Makefile.in: Update dependencies.
9507
13da1c97
LM
95082011-08-24 Luis Machado <lgustavo@codesourcery.com>
9509
9510 * configure.srv: Add linux-procfs.o dependencies.
9511
881127c9
YQ
95122011-08-14 Yao Qi <yao@codesourcery.com>
9513
9514 * target.h (struct target_ops): Fix indent.
9515 * win32-low.c (win32_target_ops): Fix comment.
9516
58dbd541
YQ
95172011-08-14 Andrew Jenner <andrew@codesourcery.com>
9518 Yao Qi <yao@codesourcery.com>
9519
9520 * Makefile.in (clean): Remove tic6x-*.c files.
9521 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9522 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9523 (tic6x-c64xp-linux.c): Likewise.
9524 * configure.srv: Add support for tic6x-*-uclinux.
9525 * linux-tic6x-low.c: New.
9526 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9527
78d85199
YQ
95282011-08-14 Andrew Stubbs <ams@codesourcery.com>
9529 Yao Qi <yao@codesourcery.com>
9530
9531 * target.h (struct target_ops): Add read_loadmap.
9532 * linux-low.c (struct target_loadseg): New type.
9533 (struct target_loadmap): New type.
9534 (linux_read_loadmap): New function.
9535 (linux_target_ops): Add linux_read_loadmap.
9536 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9537 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9538 to NULL.
78d85199 9539
a959a88d
EZ
95402011-08-05 Eli Zaretskii <eliz@gnu.org>
9541
9542 * win32-low.c: Include <stdint.h>.
9543
1ced966e
PA
95442011-07-22 Pedro Alves <pedro@codesourcery.com>
9545
9546 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9547 to the inferior here.
9548 (i386_remove_aligned_watchpoint): Ditto.
9549 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9550 fit part of the watchpoint in the debug registers.
9551 (i386_update_inferior_debug_regs): New.
9552 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9553 registers, and only update the inferior on success.
9554 (i386_low_remove_watchpoint): Ditto.
9555
d26e3629
KY
95562011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9557
9558 * linux-low.c (compare_ints, unique, list_threads, show_process,
9559 linux_core_of_thread): Delete.
9560 (linux_target_ops): Change linux_core_of_thread to
9561 linux_common_core_of_thread.
9562 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9563 * utils.c (malloc_failure): Change type of argument.
9564 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9565 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9566 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9567 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9568 (IPA_OBJS): Add common-utils-ipa.o.
9569 (ptid_h, linux_osdata_h): New macros.
9570 (server_h): Add common/common-utils.h, common/xml-utils.h,
9571 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9572 common/ptid.h.
9573 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9574 ptid.o, buffer.o): New rules.
9575 (linux-low.o): Add common/linux-osdata.h as a dependency.
9576 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9577 * configure.ac: Add AC_HEADER_DIRENT check.
9578 * config.in: Regenerate.
9579 * configure: Regenerate.
9580 * remote-utils.c (xml_escape_text): Delete.
9581 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9582 buffer_xml_printf): Move to common/buffer.c.
9583 * server.c (main): Remove call to initialize_inferiors.
9584 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9585 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9586 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9587 internal_error, gdb_assert, gdb_assert_fail): Delete.
9588 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9589 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9590 common/buffer.h.
9591 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9592 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9593 initialize_inferiors): Delete.
9594
2275a1a7
PA
95952011-07-20 Pedro Alves <pedro@codesourcery.com>
9596
9597 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9598 symbol error.
9599
0a5b1e09
PA
96002011-05-31 Pedro Alves <pedro@codesourcery.com>
9601
9602 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9603 assertion.
9604 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9605
6938fd34
YQ
96062011-05-26 Yao Qi <yao@codesourcery.com>
9607
9608 * Makefile.in (thread-db.o): Track dependence to
9609 common/gdb_thread_db.h.
9610 * thread-db.c: include gdb_thread_db.h from right place.
9611
b481f9e0
TT
96122011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9613
9614 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9615 __FILE__ and __LINE__ to internal_error.
9616
98a5dd13
DE
96172011-05-13 Doug Evans <dje@google.com>
9618
9619 * thread-db.c (try_thread_db_load_from_sdir): New function.
9620 (try_thread_db_load_from_dir): New function.
9621 (thread_db_load_search): Handle $sdir, ignore $pdir.
9622 Remove trying of system directories if search of
9623 libthread-db-search-path fails, that is now done via $sdir.
9624
d248b706
KY
96252011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9626
9627 * server.c (handle_query): Add EnableDisableTracepoints to the list
9628 of supported features.
43aaf8b6 9629 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9630 tracepoints.
43aaf8b6
PA
9631 (cmd_qtenable_disable): New.
9632 (cmd_qtstart): Install tracepoints even if disabled.
9633 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9634 receiving a QTEnable or QTDisable packet.
9635 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9636 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9637 tracepoints.
9638 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9639
84e578fb
DE
96402011-05-10 Doug Evans <dje@google.com>
9641
9642 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9643
71f55dd8
DE
96442011-05-04 Doug Evans <dje@google.com>
9645
9646 * linux-low.c (linux_join): Skip process lookup.
9647 * spu-low.c (spu_join): Ditto.
9648 * server.c (join_inferiors_callback): Delete.
9649 (process_serial_event): For 'D' packet (detach) call join_inferior
9650 directly.
9651
4d393d60
JM
96522011-05-04 Joseph Myers <joseph@codesourcery.com>
9653
9654 * README: Don't mention xscale*-*-linux*.
9655 * configure.srv (xscale*-*-linux*): Don't handle target.
9656
b00ad6ff
NF
96572011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9658
9659 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9660 casting pointers.
9661 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9662 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9663 (i386_emit_void_call_2): Likewise.
9664
af96c192
YQ
96652011-04-26 Yao Qi <yao@codesourcery.com>
9666
43aaf8b6
PA
9667 * linux-low.c: Move common macros to linux-ptrace.h.
9668 Include linux-ptrace.h.
af96c192
YQ
9669 * Makefile.in (linux_ptrace_h): New.
9670 (linux-low.o): Depends on linux-ptrace.h.
9671
03f2bd59
JK
96722011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9673
9674 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9675 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9676 (remote_prepare): New function with most of the TCP code from ...
9677 (remote_open): ... here. Detect PORT here unconditionally. Move also
9678 setting transport_is_reliable.
9679 * server.c (run_once): New variable.
9680 (gdbserver_usage): Document it.
9681 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9682 the first run if RUN_ONCE.
9683 * server.h (run_once, remote_prepare): New declarations.
9684
7a9dd1b2
TT
96852011-04-19 Tom Tromey <tromey@redhat.com>
9686
9687 * win32-low.c (handle_load_dll): Remove duplicate "the".
9688
81239425
PM
96892011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9690
9691 Remove support for old Cygwin 1.5 versions.
9692 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9693 function to avoid warning.
9694 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9695 warning.
9696
9e0627f1
PM
96972011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9698
9699 * gdbserver/server.h (Macro _): Define it if not available.
9700
588eebee
MS
97012011-03-14 Michael Snyder <msnyder@vmware.com>
9702
348af9f7 9703 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9704
43f70d4c
JB
97052011-03-10 Joel Brobecker <brobecker@adacore.com>
9706
9707 * Makefile.in (maintainer-clean realclean distclean): Remove
9708 "make ... subdir_do" command.
9709
348af9f7
MS
97102011-03-10 Michael Snyder <msnyder@vmware.com>
9711
9712 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9713
9714 * server.c (handle_v_run): Free alloced buffer on early return.
9715
e637a4f5
YQ
97162011-03-09 Yao Qi <yao@codesourcery.com>
9717
9718 Revert:
9719 2011-03-04 Yao Qi <yao@codesourcery.com>
9720
9721 * Makefile.in: Remove GNU make feature --directory.
9722
9723 2011-03-05 Yao Qi <yao@codesourcery.com>
9724
9725 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9726 (subdir_do): New make target. Copied from gdb/Makefile.
9727 (maintainer-clean, realclean, distclean, clean): Call corresponding
9728 make targets in common/Makefile.
9729
9730 2011-02-11 Yao Qi <yao@codesourcery.com>
9731
9732 * configure.ac: Call AC_PROG_RANLIB.
9733 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9734 * configure: Regenerate.
9735
e6edda56
JK
97362011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9737
9738 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9739
e5141119
JB
97402011-03-06 Yao Qi <yao@codesourcery.com>
9741
9742 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9743
64794aa4
JB
97442011-03-05 Yao Qi <yao@codesourcery.com>
9745
9746 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9747 (subdir_do): New make target. Copied from gdb/Makefile.
9748 (maintainer-clean, realclean, distclean, clean): Call corresponding
9749 make targets in common/Makefile.
9750
7a762829
YQ
97512011-03-04 Yao Qi <yao@codesourcery.com>
9752
9753 * Makefile.in: Remove GNU make feature --directory.
9754
348af9f7
MS
97552011-03-04 Michael Snyder <msnyder@vmware.com>
9756
9757 * server.c (queue_stop_reply): Call xmalloc not malloc.
9758
97592011-03-02 Michael Snyder <msnyder@vmware.com>
9760
9761 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9762
9f72fee2
MS
97632011-02-28 Michael Snyder <msnyder@vmware.com>
9764
588eebee
MS
9765 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9766 (cmd_qtframe): Ditto.
9767 (cmd_qtbuffer): Ditto.
9768 (cmd_bigqtbuffer): Ditto.
9769
9f72fee2
MS
9770 * utils.c (decimal2str): Initialize 'width' to nine, then
9771 don't mess with it.
9772
8040bd49
UW
97732011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9774
9775 * hostio.c (require_data): Free *data, not data.
9776
7e52cbd0
JK
97772011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9778
9779 * hostio.c (require_data): Use free, not xfree.
9780
9130f83e
MS
97812011-02-27 Michael Snyder <msnyder@vmware.com>
9782
4b812f4e
MS
9783 * server.c (handle_query): Discard unused value.
9784
9130f83e
MS
9785 * hostio.c (require_data): Free malloc memory before returning
9786 error.
9787
69d37113
MS
97882011-02-26 Michael Snyder <msnyder@vmware.com>
9789
9790 * linux-low.c (list_threads): Call closedir for dirent.
9791
35f5825a
MS
97922011-02-27 Michael Snyder <msnyder@vmware.com>
9793
2a589cef
MS
9794 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9795 a case statement falls through.
9796
0adea5f7
MS
9797 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9798
35f5825a
MS
9799 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9800 in comparison.
9801
238f1c74
MS
98022011-02-26 Michael Snyder <msnyder@vmware.com>
9803
9804 * utils.c (decimal2str): Eliminate dead code and dead param.
9805 (pulongest): Drop dead param from call to decimal2str.
9806 (plongest): Ditto.
9807
633ff500
JB
98082011-02-24 Joel Brobecker <brobecker@adacore.com>
9809
9810 Revert the following patch (not approved yet):
9811 2011-02-21 Hui Zhu <teawater@gmail.com>
9812 * tracepoint.c (tp_printf): New function.
9813 (eval_agent_expr): Handle gdb_agent_op_printf.
9814
f9c6ff72
HZ
98152011-02-21 Hui Zhu <teawater@gmail.com>
9816
9817 * tracepoint.c (tp_printf): New function.
9818 (eval_agent_expr): Handle gdb_agent_op_printf.
9819
94d5e490
TT
98202011-02-18 Tom Tromey <tromey@redhat.com>
9821
9822 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9823 (tracepoint.o): Likewise.
9824 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9825 (gdb_agent_op_names): Likewise.
9826
c7f96d2b
TT
98272011-02-18 Tom Tromey <tromey@redhat.com>
9828
9829 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9830 gdb_agent_op_rot>: New constants.
9831 (gdb_agent_op_names): Add pick and roll.
9832 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9833 cases.
9834
0feedb2c
JK
98352011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9836
9837 * aclocal.m4: Regenerated with aclocal-1.11.1.
9838
b3b9301e
PA
98392011-02-14 Pedro Alves <pedro@codesourcery.com>
9840
9841 * server.c (handle_qxfer_traceframe_info): New.
9842 (qxfer_packets): Register "traceframe-info".
9843 (handle_query): Report support for qXfer:traceframe-info:read+.
9844 * tracepoint.c (match_blocktype): New.
9845 (traceframe_find_block_type): Rename to ...
9846 (traceframe_walk_blocks): ... this. Add callback filter argument,
9847 and use it.
9848 (traceframe_find_block_type): New, reimplemented on top of
9849 traceframe_walk_blocks.
9850 (build_traceframe_info_xml): New.
9851 (traceframe_read_info): New.
9852 * server.h (traceframe_read_info): Declare.
9853
4f3e6fb7
YQ
98542011-02-11 Yao Qi <yao@codesourcery.com>
9855
9856 * configure.ac: Call AC_PROG_RANLIB.
9857 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9858 * configure: Regenerate.
9859
764880b7
PA
98602011-02-07 Pedro Alves <pedro@codesourcery.com>
9861
9862 * server.c (gdb_read_memory): Change return semantics to allow
9863 partial transfers.
9864 (handle_search_memory_1): Adjust.
9865 (process_serial_event) <'m' packet>: Handle partial transfers.
9866 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9867
1c79eb8a
PA
98682011-01-28 Pedro Alves <pedro@codesourcery.com>
9869
9870 * regcache.c (init_register_cache): Initialize
9871 regcache->register_status.
9872 (free_register_cache): Release regcache->register_status.
9873 (regcache_cpy): Copy register_status.
9874 (registers_to_string): Print 'x's for unavailable registers.
9875 (supply_register): Mark the register's status valid or
9876 unavailable, depending on whether a buffer was passed in or not.
9877 (supply_register_zeroed): New.
9878 (supply_regblock): Mark the registers' status valid or
9879 unavailable, depending on whether a buffer was passed in or not.
9880 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9881 (struct regcache): New `register_status' field.
9882 (supply_register_zeroed): Declare.
9883 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9884 supply_register_zeroed, rather than passing a NULL buffer to
9885 supply_register.
9886 * tracepoint.c (fetch_traceframe_registers): Update comment.
9887
85724a0e
PA
98882011-01-28 Pedro Alves <pedro@codesourcery.com>
9889
9890 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9891 buffer explicit.
9892
d08aafef
PA
98932011-01-25 Pedro Alves <pedro@codesourcery.com>
9894
9895 * server.h (decode_xfer_write): Change prototype.
9896 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9897 and don't extract the annex here.
9898 * server.c (decode_xfer_read): Remove `annex' parameter,
9899 and don't extract the annex here.
9900 (decode_xfer): New.
9901 (struct qxfer): New.
9902 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9903 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9904 (handle_qxfer_statictrace): New functions, abstracted out from
9905 handle_query, and made to use the struct qxfer interface.
9906 (handle_threads_qxfer_proper): Rename to ...
9907 (handle_qxfer_threads_proper): ... this.
9908 (handle_threads_qxfer): Rename to ...
9909 (handle_qxfer_threads): ... this. Adjust.
9910 (qxfer_packets): New array.
9911 (handle_qxfer): New function.
9912 (handle_query): Use handle_qxfer.
9913
493e2a69
MS
99142011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9915
9916 * gdbreplay.c: Shorten lines of >= 80 columns.
9917 * linux-low.c: Ditto.
9918 * linux-ppc-low.c: Ditto.
9919 * linux-s390-low.c: Ditto.
9920 * linux-sparc-low.c: Ditto.
9921 * linux-x86-low.c: Ditto.
9922 * linux-xtensa-low.c: Ditto.
9923 * mem-break.c: Ditto.
9924 * nto-low.c: Ditto.
9925 * regcache.h: Ditto.
9926 * remote-utils.c: Ditto.
9927 * server.c: Ditto.
9928 * server.h: Ditto.
9929 * thread-db.c: Ditto.
9930 * tracepoint.c: Ditto.
9931 * utils.c: Ditto.
9932 * win32-low.h: Ditto.
9933
44944448
JB
99342011-01-05 Joel Brobecker <brobecker@adacore.com>
9935
9936 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9937 update.
9938
71ce852c
JB
99392011-01-01 Joel Brobecker <brobecker@adacore.com>
9940
9941 * server.c (gdbserver_version): Update copyright year in version
9942 output.
9943 * gdbreplay.c (gdbreplay_version): Ditto.
9944
eb826dc6
MF
99452010-12-29 Jie Zhang <jie.zhang@analog.com>
9946
9947 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9948 * linux-bfin-low.c: New file.
9949 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9950 PT_DATA_ADDR for BFIN targets.
9951 * Makefile.in (SFILES): Add linux-bfin-low.c.
9952 (clean): Remove reg-bfin.c.
9953 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9954 * README: Mention supported Blackfin targets.
9955
39ab222a
MF
99562010-12-23 Mike Frysinger <vapier@gentoo.org>
9957
9958 * .gitignore: New file.
9959
a1f2ce7d
MF
99602010-11-16 Mike Frysinger <vapier@gentoo.org>
9961
9962 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9963
f474844c
JZ
99642010-10-22 Jie Zhang <jie@codesourcery.com>
9965
9966 * Makefile.in: Add FLAGS_TO_PASS variable.
9967 (install): Remove dependency of install-only and recursively
9968 invoke make for install-only.
9969
f1048712
DE
99702010-10-04 Doug Evans <dje@google.com>
9971
9972 * Makefile.in (uninstall): Use $(DESTDIR).
9973
b53a1623
PA
99742010-09-24 Pedro Alves <pedro@codesourcery.com>
9975
e6ee044d
PA
9976 PR gdb/11842
9977
b53a1623
PA
9978 * linux-x86-low.c (compat_siginfo_from_siginfo)
9979 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9980 si_code is < 0. Check for si_code == SI_TIMER before checking for
9981 si_code < 0.
9982
fa1bd1e4
JB
99832010-09-13 Joel Brobecker <brobecker@adacore.com>
9984
9985 * lynx-i386-low.c: New file.
9986 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9987
47fac8f8
JB
99882010-09-13 Joel Brobecker <brobecker@adacore.com>
9989
9990 * lynx-low.c (ptrace_request_to_str): Remove handling for
9991 request values that have been removed in LynxOS 5.x.
9992
1adfc54d
JB
99932010-09-13 Joel Brobecker <brobecker@adacore.com>
9994
9995 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9996 <ptrace.h>
9997
c2a66c29
NS
99982010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9999
10000 * configure.ac: Add --enable-inprocess-agent option.
10001 * configure: Rebuilt.
10002
32fcada3
YQ
100032010-09-06 Yao Qi <yao@codesourcery.com>
10004
10005 * linux-low.c (linux_kill): Remove unused variable.
10006 (linux_stabilize_threads): Likewise.
10007 * server.c (start_inferior): Likewise.
10008 (queue_stop_reply_callback): Likewise.
10009 * tracepoint.c (do_action_at_tracepoint): Likewise.
10010
0cccb683
YQ
100112010-09-06 Yao Qi <yao@codesourcery.com>
10012
10013 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10014 on return.
10015
423ec54c
JK
100162010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10017
10018 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10019
12ac6819
PA
100202010-09-06 Pedro Alves <pedro@codesourcery.com>
10021
10022 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10023 "$(IPA_DEPFILES)".
10024
8ed54b31
JB
100252010-09-01 Joel Brobecker <brobecker@adacore.com>
10026
10027 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10028 gdbserver/lynx-ppc-low.c: New files.
10029 * Makefile.in (lynx_low_h): New variable.
10030 (lynx-low.o, lynx-ppc-low.o): New rules.
10031 * configure.ac: On LynxOS, link with -lnetinet.
10032 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10033 * configure: regenerate.
10034
bb0116a4
JB
100352010-09-01 Joel Brobecker <brobecker@adacore.com>
10036
10037 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10038 * configure.ac: Add check for vasprintf and vsnprintf.
10039 * configure, config.in: Regenerate.
10040 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10041
a778ab81 100422010-09-01 Joel Brobecker <brobecker@adacore.com>
10043
10044 * gdbreplay.c: Move include of alloca.h up, next to include of
10045 malloc.h.
10046 * server.h: Add include of malloc.h.
10047 * mem-break.c: Remove include of malloc.h.
10048 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10049
8b034a19 100502010-09-01 Joel Brobecker <brobecker@adacore.com>
10051
10052 * Makefile.in (memmem.o): Build with -Wno-error.
10053
100542010-09-01 Joel Brobecker <brobecker@adacore.com>
10055
10056 * utils.c (xsnprintf): Make non-static.
10057 * server.h: Add xsnprintf declaration.
10058 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10059 replace calls to snprintf by calls to xsnprintf throughout.
10060
100612010-09-01 Joel Brobecker <brobecker@adacore.com>
10062
10063 * configure.ac: Add configure check for alloca.
10064 * configure, config.in: Regenerate.
10065 * server.h: Include alloca.h if it exists.
10066 * gdbreplay.c: Include alloca.h if it exists.
10067
1a981360
PA
100682010-08-28 Pedro Alves <pedro@codesourcery.com>
10069
10070 * linux-low.c (__SIGRTMIN): Define if not already defined.
10071 (linux_create_inferior): Check for __ANDROID__ rather than
10072 __SIGRTMIN.
10073 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10074 are already deferred.
10075 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10076 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10077 stopped and already has a pending signal to report.
10078 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10079 a pending signal to report or is moving out of a jump pad.
10080 (linux_init_signals): Check for __ANDROID__ rather than
10081 __SIGRTMIN.
10082
b4d51a55
PA
100832010-08-28 Pedro Alves <pedro@codesourcery.com>
10084
10085 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10086 debug_threads check. Avoid a linear search when not doing debug
10087 output.
10088
ec48365d
PA
100892010-08-27 Pedro Alves <pedro@codesourcery.com>
10090
10091 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10092 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10093 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10094 (process_event): Change local fd's type to gdb_fildes_t.
10095 (create_file_handler): Adjust prototype.
10096 (delete_file_handler): Adjust prototype.
10097 (handle_file_event): Adjust prototype. Use pfildes.
10098 (create_file_event): Adjsut prototype.
10099 * remote-utils.c (remote_desc, listen_desc): Change type to
10100 gdb_fildes_t.
10101 * server.h: New gdb_fildes_t typedef.
10102 [USE_WIN32API]: Include winsock2.h.
10103 (delete_file_handler, add_file_handler): Adjust prototypes.
10104 (pfildes): Declare.
10105 * utils.c (pfildes): New.
10106
854d88f0
PA
101072010-08-27 Pedro Alves <pedro@codesourcery.com>
10108
10109 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10110 * configure: Regenerate.
10111
0146f85b
PA
101122010-08-27 Pedro Alves <pedro@codesourcery.com>
10113
10114 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10115 (linux_done_accessing_memory): ... this.
10116 (linux_target_ops): Adjust.
10117 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10118 * nto-low.c (nto_target_ops): Adjust comment.
10119 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10120 * spu-low.c (spu_target_ops): Adjust comment.
10121 * target.h (target_ops): Rename unprepare_to_access_memory field
10122 to done_accessing_memory.
10123 (unprepare_to_access_memory): Rename to ...
10124 (done_accessing_memory): ... this.
10125
90d74c30
PA
101262010-08-26 Pedro Alves <pedro@codesourcery.com>
10127
10128 * linux-low.c (linux_prepare_to_access_memory): New.
10129 (linux_unprepare_to_access_memory): New.
10130 (linux_target_ops): Install them.
10131 * server.c (read_memory): Rename to ...
10132 (gdb_read_memory): ... this. Use
10133 prepare_to_access_memory/prepare_to_access_memory.
10134 (write_memory): Rename to ...
10135 (gdb_write_memory): ... this. Use
10136 prepare_to_access_memory/prepare_to_access_memory.
10137 (handle_search_memory_1): Adjust.
10138 (process_serial_event): Adjust.
10139 * target.h (struct target_ops): New fields
10140 prepare_to_access_memory and unprepare_to_access_memory.
10141 (prepare_to_access_memory, unprepare_to_access_memory): New.
10142 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10143 prepare_to_access_memory/prepare_to_access_memory.
10144 * nto-low.c (nto_target_ops): Adjust.
10145 * spu-low.c (spu_target_ops): Adjust.
10146 * win32-low.c (win32_target_ops): Adjust.
10147
fd467969
PA
101482010-08-26 Pedro Alves <pedro@codesourcery.com>
10149
10150 * Makefile.in (WARN_CFLAGS): Get it from configure.
10151 (WERROR_CFLAGS): New.
10152 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10153 * configure.ac: Introduce --enable-werror, which adds -Werror to
10154 the compiler command line. Enabled by default. Disable with
10155 --disable-werror. Add -Wdeclaration-after-statement
10156 Wpointer-arith and -Wformat-nonliteral to warning flags.
10157 * configure: Regenerate.
10158
331e2f5f
PA
101592010-08-26 Pedro Alves <pedro@codesourcery.com>
10160
10161 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10162
e581f2b4
PA
101632010-08-26 Pedro Alves <pedro@codesourcery.com>
10164
10165 * gdbreplay.c (remote_error): New.
10166 (gdbchar): New.
10167 (expect): Use gdbchar. Check for error reading from GDB.
10168 Clarify sync error output.
10169 (play): Check for errors writing to GDB.
10170 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10171 * remote-utils.c (getpkt): Check for errors writing to the remote
10172 descriptor.
10173
3c11dd79
PA
101742010-08-25 Pedro Alves <pedro@codesourcery.com>
10175
10176 * linux-low.c (linux_wait_1): Move non-debugging code out of
10177 `debug_threads' control.
10178
d20a8ad9
PA
101792010-08-25 Pedro Alves <pedro@codesourcery.com>
10180
10181 * linux-low.c (linux_wait_1): Don't set last_status here.
10182 * server.c (push_event, queue_stop_reply_callback): Assert we're
10183 not pushing a TARGET_WAITKIND_IGNORE event.
10184 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10185 (myresume, handle_target_event): Set the thread's last_resume_kind
10186 and last_status from the target returned status.
10187
964e4306
PA
101882010-08-25 Pedro Alves <pedro@codesourcery.com>
10189
10190 PR threads/10729
10191
10192 * linux-x86-low.c (update_debug_registers_callback): New.
10193 (i386_dr_low_set_addr): Use it.
10194 (i386_dr_low_get_addr): New.
10195 (i386_dr_low_set_control): Use update_debug_registers_callback.
10196 (i386_dr_low_get_control): New.
10197 (i386_dr_low_get_status): Adjust.
10198 * linux-low.c (linux_stop_lwp): New.
10199 * linux-low.h (linux_stop_lwp): Declare.
10200
10201 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10202 argument instead of a i386_debug_reg_state.
10203 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10204 a i386_debug_reg_state.
10205 (i386_insert_aligned_watchpoint): Adjust.
10206 (i386_remove_aligned_watchpoint): Adjust.
10207 (i386_low_stopped_data_address): Read the debug registers from the
10208 inferior instead of from the mirrors.
10209 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10210 (i386_dr_low_get_addr): Declare.
10211 (i386_dr_low_get_control): Declare.
10212 (i386_dr_low_get_status): Change prototype.
10213
10214 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10215 (i386_dr_low_get_addr): New.
10216 (i386_dr_low_get_control): New.
10217 (i386_dr_low_get_status): Adjust prototype. Return
10218 dr_status_mirror.
10219 (i386_initial_stuff): Clear dr_status_mirror and
10220 dr_control_mirror.
10221 (i386_get_thread_context): Adjust.
10222 (i386_set_thread_context): Adjust.
10223 (i386_thread_added): Adjust.
10224
5f21a75b
PA
102252010-08-24 Pedro Alves <pedro@codesourcery.com>
10226
10227 * linux-low.h (linux_thread_area): Delete declaration.
10228
3e4c1235
TS
102292010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10230
10231 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10232 after its termination.
10233
1971b033
PA
102342010-08-09 Pedro Alves <pedro@codesourcery.com>
10235
10236 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10237 (gdb_wants_all_stopped): Delete.
10238 (linux_wait_1): Don't call them.
10239 * server.c (handle_v_cont): Tag all threads as want-stopped.
10240 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10241 stopped as "client-wants-stopped".
10242
310444ac
PA
102432010-07-31 Pedro Alves <pedro@codesourcery.com>
10244
10245 * Makefile.in (signals_h): New.
10246 (server_h): Depend on it.
10247 (server.o): Don't depend on $(signals_def).
10248 (signals.o): Depend on $(signals_def).
10249
a19cae16
JK
102502010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10251
10252 * Makefile.in (signals_def): New.
10253 (server_h): Append include/gdb/signals.h and signals_def.
10254 (server.o): Append signals_def.
10255
30d50328
JK
102562010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10257
10258 * server.c (handle_target_event): Use target_signal_to_host for
10259 resume_info.sig initialization.
10260 * target.h (struct thread_resume) <sig>: New comment.
10261
5c3216e2
OS
102622010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10263
c6f46ca0
OS
10264 * server.c (handle_query): strcpy() the returned string from paddress()
10265 instead of sprintf().
5c3216e2
OS
10266 * utils.c (paddress): Return phex_nz().
10267
6bd31874
JB
102682010-07-07 Joel Brobecker <brobecker@adacore.com>
10269
10270 * server.c (handle_v_cont): Call mourn_inferior if process
10271 just exited.
10272 (myresume): Likewise.
10273
0fb4aa4b
PA
102742010-07-01 Pedro Alves <pedro@codesourcery.com>
10275
10276 Static tracepoints, and integration with UST.
10277
10278 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10279 * mem-break.c (uninsert_all_breakpoints)
10280 (reinsert_all_breakpoints): New.
10281 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10282 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10283 (gdb_agent_ust_loaded, helper_thread_id)
10284 (gdb_agent_helper_thread_id): New macros.
10285 (struct ipa_sym_addresses): Add addr_ust_loaded,
10286 addr_helper_thread_id, addr_cmd_buf.
10287 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10288 (in_process_agent_loaded_ust): New.
10289 (write_e_ust_not_loaded): New.
10290 (maybe_write_ipa_ust_not_loaded): New.
10291 (struct collect_static_trace_data_action): New.
10292 (enum tracepoint_type) <static_tracepoint>: New.
10293 (struct tracepoint) <handle>: Mention static tracepoints.
10294 (struct static_tracepoint_ctx): New.
10295 (CMD_BUF_SIZE): New.
10296 (add_tracepoint_action): Handle static tracepoint actions.
10297 (unprobe_marker_at): New.
10298 (clear_installed_tracepoints): Handle static tracepoints.
10299 (cmd_qtdp): Handle static tracepoints.
10300 (probe_marker_at): New.
10301 (cmd_qtstart): Handle static tracepoints.
10302 (response_tracepoint): Handle static tracepoints.
10303 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10304 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10305 (get_context_regcache): Handle static tracepoints.
10306 (do_action_at_tracepoint): Handle static tracepoint actions.
10307 (traceframe_find_block_type): Handle static trace data blocks.
10308 (traceframe_read_sdata): New.
10309 (download_tracepoints): Download static tracepoint actions.
10310 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10311 (GDB_PROBE_NAME): New.
10312 (ust_ops): New.
10313 (GET_UST_SYM): New.
10314 (USTF): New.
10315 (dlsym_ust): New.
10316 (ust_marker_to_static_tracepoint): New.
10317 (gdb_probe): New.
10318 (collect_ust_data_at_tracepoint): New.
10319 (gdb_ust_probe): New.
10320 (UNIX_PATH_MAX, SOCK_DIR): New.
10321 (gdb_ust_connect_sync_socket): New.
10322 (resume_thread, stop_thread): New.
10323 (run_inferior_command): New.
10324 (init_named_socket): New.
10325 (gdb_ust_socket_init): New.
10326 (cstr_to_hexstr): New.
10327 (next_st): New.
10328 (first_marker, next_marker): New.
10329 (response_ust_marker): New.
10330 (cmd_qtfstm, cmd_qtsstm): New.
10331 (unprobe_marker_at, probe_marker_at): New.
10332 (cmd_qtstmat, gdb_ust_thread): New.
10333 (gdb_ust_init): New.
10334 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10335 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10336 (ST_REGENTRY): New.
10337 (x86_64_st_collect_regmap): New.
10338 (X86_64_NUM_ST_COLLECT_GREGS): New.
10339 (AMD64_RIP_REGNUM): New.
10340 (supply_static_tracepoint_registers): New.
10341 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10342 (ST_REGENTRY): New.
10343 (i386_st_collect_regmap): New.
10344 (i386_NUM_ST_COLLECT_GREGS): New.
10345 (supply_static_tracepoint_registers): New.
10346 * server.c (handle_query): Handle qXfer:statictrace:read.
10347 <qSupported>: Report support for StaticTracepoints, and
10348 qXfer:statictrace:read features.
10349 * server.h (traceframe_read_sdata)
10350 (supply_static_tracepoint_registers): Declare.
10351 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10352 (unpack_varlen_hex): Include in IPA build.
10353 * Makefile.in (ustlibs, ustinc): New.
10354 (IPA_OBJS): Add remote-utils-ipa.o.
10355 ($(IPA_LIB)): Link -ldl and -lpthread.
10356 (UST_CFLAGS): New.
10357 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10358 * config.in, configure: Regenerate.
10359
9e4344e5
PA
103602010-06-20 Ian Lance Taylor <iant@google.com>
10361 Pedro Alves <pedro@codesourcery.com>
10362
10363 * linux-x86-low.c (always_true): Delete.
10364 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10365 trying to fool the compiler with always_true.
10366
c6beb2cb
PA
103672010-06-20 Pedro Alves <pedro@codesourcery.com>
10368
10369 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10370 conditions in gdbserver.
10371
d2ed6730
UW
103722010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10373
10374 * spu-low.c (spu_read_memory): Wrap around local store limit.
10375 (spu_write_memory): Likewise.
10376
4e29fb54
PA
103772010-06-15 Pedro Alves <pedro@codesourcery.com>
10378
10379 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10380 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10381 LONGEST uses.
10382 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10383 uses.
10384 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10385 uses with LONGEST uses.
10386
6a271cae
PA
103872010-06-14 Stan Shebs <stan@codesourcery.com>
10388 Pedro Alves <pedro@codesourcery.com>
10389
10390 Bytecode compiler.
10391
10392 * linux-x86-low.c: Include limits.h.
10393 (add_insns): New.
10394 (always_true): New.
10395 (EMIT_ASM): New.
10396 (EMIT_ASM32): New.
10397 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10398 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10399 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10400 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10401 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10402 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10403 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10404 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10405 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10406 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10407 (amd64_emit_void_call_2): New.
10408 (amd64_emit_ops): New.
10409 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10410 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10411 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10412 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10413 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10414 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10415 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10416 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10417 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10418 (i386_emit_stack_adjust, i386_emit_int_call_1)
10419 (i386_emit_void_call_2): New.
10420 (i386_emit_ops): New.
10421 (x86_emit_ops): New.
10422 (the_low_target): Install x86_emit_ops.
10423 * server.h (struct emit_ops): New.
10424 (get_raw_reg_func_addr): Declare.
10425 (current_insn_ptr, emit_error): Declare.
10426 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10427 (set_trace_state_variable_value): New defines.
10428 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10429 addr_get_trace_state_variable_value and
10430 addr_set_trace_state_variable_value.
10431 (symbol_list): New fields for get_raw_reg,
10432 get_trace_state_variable_value and set_trace_state_variable_value.
10433 (condfn): New typedef.
10434 (struct tracepoint): New field `compiled_cond'.
10435 (do_action_at_tracepoint): Clear compiled_cond.
10436 (get_trace_state_variable_value, set_trace_state_variable_value):
10437 Export in the IPA.
10438 (condition_true_at_tracepoint): If there's a compiled condition,
10439 run that.
10440 (current_insn_ptr, emit_error): New globals.
10441 (struct bytecode_address): New.
10442 (get_raw_reg_func_addr): New.
10443 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10444 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10445 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10446 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10447 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10448 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10449 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10450 (compile_tracepoint_condition, compile_bytecodes): New.
10451 * target.h (emit_ops): Forward declare.
10452 (struct target_ops): New field emit_ops.
10453 (target_emit_ops): New.
10454 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10455 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10456 * linux-low.c (linux_emit_ops): New.
10457 (linux_target_ops): Install it.
10458 * linux-low.h (struct linux_target_ops): New field emit_ops.
10459
92b72907
UW
104602010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10461
10462 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10463 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10464
fa593d66
PA
104652010-06-01 Pedro Alves <pedro@codesourcery.com>
10466 Stan Shebs <stan@codesourcery.com>
10467
10468 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10469 (all): Depend on $(extra_libraries).
10470 (install-only): Install the IPA.
10471 (IPA_OBJS, IPA_LIB): New.
10472 (clean): Remove the IPA lib.
10473 (IPAGENT_CFLAGS): New.
10474 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10475 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10476 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10477 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10478 * configure.ac: Check for atomic builtins support in the compiler.
10479 (IPA_DEPFILES, extra_libraries): Define.
10480 * configure.srv (ipa_obj): Add description.
10481 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10482 (i[34567]86-*-linux*): Set ipa_obj.
10483 (x86_64-*-linux*): Set ipa_obj.
10484 * linux-low.c (stabilizing_threads): New.
10485 (supports_fast_tracepoints): New.
10486 (linux_detach): Stabilize threads before detaching.
10487 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10488 the lwp is either not stabilizing, or is moving out of a jump pad.
10489 (linux_fast_tracepoint_collecting): New.
10490 (maybe_move_out_of_jump_pad): New.
10491 (enqueue_one_deferred_signal): New.
10492 (dequeue_one_deferred_signal): New.
10493 (linux_wait_for_event_1): If moving out of a jump pad, defer
10494 pending signals to later.
10495 (linux_stabilize_threads): New.
10496 (linux_wait_1): Check if threads need moving out of jump pads, and
10497 do it if so.
10498 (stuck_in_jump_pad_callback): New.
10499 (move_out_of_jump_pad_callback): New.
10500 (lwp_running): New.
10501 (linux_resume_one_lwp): Handle moving out of jump pads.
10502 (linux_set_resume_request): Dequeue deferred signals.
10503 (need_step_over_p): Also step over fast tracepoint jumps.
10504 (start_step_over): Also uninsert fast tracepoint jumps.
10505 (finish_step_over): Also reinsert fast tracepoint jumps.
10506 (linux_install_fast_tracepoint_jump): New.
10507 (linux_target_ops): Install linux_stabilize_threads and
10508 linux_install_fast_tracepoint_jump_pad.
10509 * linux-low.h (linux_target_ops) <get_thread_area,
10510 install_fast_tracepoint_jump_pad>: New fields.
10511 (struct lwp_info) <collecting_fast_tracepoint,
10512 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10513 (linux_get_thread_area): Declare.
10514 * linux-x86-low.c (jump_insn): New.
10515 (x86_get_thread_area): New.
10516 (append_insns): New.
10517 (push_opcode): New.
10518 (amd64_install_fast_tracepoint_jump_pad): New.
10519 (i386_install_fast_tracepoint_jump_pad): New.
10520 (x86_install_fast_tracepoint_jump_pad): New.
10521 (the_low_target): Install x86_get_thread_area and
10522 x86_install_fast_tracepoint_jump_pad.
10523 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10524 (struct fast_tracepoint_jump): New.
10525 (fast_tracepoint_jump_insn): New.
10526 (fast_tracepoint_jump_shadow): New.
10527 (find_fast_tracepoint_jump_at): New.
10528 (fast_tracepoint_jump_here): New.
10529 (delete_fast_tracepoint_jump): New.
10530 (set_fast_tracepoint_jump): New.
10531 (uninsert_fast_tracepoint_jumps_at): New.
10532 (reinsert_fast_tracepoint_jumps_at): New.
10533 (set_breakpoint_at): Use write_inferior_memory.
10534 (uninsert_raw_breakpoint): Use write_inferior_memory.
10535 (check_mem_read): Mask out fast tracepoint jumps.
10536 (check_mem_write): Mask out fast tracepoint jumps.
10537 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10538 (set_fast_tracepoint_jump): Declare.
10539 (delete_fast_tracepoint_jump)
10540 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10541 (reinsert_fast_tracepoint_jumps_at): Declare.
10542 * regcache.c: Don't compile many functions when building the
10543 in-process agent library.
10544 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10545 the register buffer in the heap.
10546 (free_register_cache): If the register buffer isn't owned by the
10547 regcache, don't free it.
10548 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10549 pre-existing register caches.
10550 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10551 type.
10552 (convert_ascii_to_int): : Constify `from' parameter type.
10553 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10554 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10555 the needed buffer in-place.
10556 (relocate_instruction): New.
10557 * server.c (handle_query) <qSymbols>: If the target supports
10558 tracepoints, give it a chance of looking up symbols. Report
10559 support for fast tracepoints.
10560 (handle_status): Stabilize threads.
10561 (process_serial_event): Adjust.
10562 * server.h (struct fast_tracepoint_jump): Forward declare.
10563 (struct process_info) <fast_tracepoint_jumps>: New field.
10564 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10565 (decode_X_packet, decode_M_packet): Adjust.
10566 (relocate_instruction): Declare.
10567 (in_process_agent_loaded): Declare.
10568 (tracepoint_look_up_symbols): Declare.
10569 (struct fast_tpoint_collect_status): Declare.
10570 (fast_tracepoint_collecting): Declare.
10571 (force_unlock_trace_buffer): Declare.
10572 (handle_tracepoint_bkpts): Declare.
10573 (initialize_low_tracepoint)
10574 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10575 * target.h (struct target_ops) <stabilize_threads,
10576 install_fast_tracepoint_jump_pad>: New fields.
10577 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10578 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10579 [HAVE_STDINT_H]: Include stdint.h.
10580 (trace_debug_1): Rename to ...
10581 (trace_vdebug): ... this.
10582 (trace_debug): Rename to ...
10583 (trace_debug_1): ... this. Add `level' parameter.
10584 (trace_debug): New.
10585 (ATTR_USED, ATTR_NOINLINE): New.
10586 (IP_AGENT_EXPORT): New.
10587 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10588 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10589 (about_to_request_buffer_space, trace_buffer_is_full)
10590 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10591 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10592 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10593 (traceframe_write_count, traceframes_created)
10594 (trace_state_variables)
10595 New renaming defines.
10596 (struct ipa_sym_addresses): New.
10597 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10598 (symbol_list): New.
10599 (ipa_sym_addrs): New.
10600 (all_tracepoint_symbols_looked_up): New.
10601 (in_process_agent_loaded): New.
10602 (write_e_ipa_not_loaded): New.
10603 (maybe_write_ipa_not_loaded): New.
10604 (tracepoint_look_up_symbols): New.
10605 (debug_threads) [IN_PROCESS_AGENT]: New.
10606 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10607 (UNKNOWN_SIDE_EFFECTS): New.
10608 (stop_tracing): New.
10609 (flush_trace_buffer): New.
10610 (stop_tracing_bkpt): New.
10611 (flush_trace_buffer_bkpt): New.
10612 (read_inferior_integer): New.
10613 (read_inferior_uinteger): New.
10614 (read_inferior_data_pointer): New.
10615 (write_inferior_data_pointer): New.
10616 (write_inferior_integer): New.
10617 (write_inferior_uinteger): New.
10618 (struct collect_static_trace_data_action): Delete.
10619 (enum tracepoint_type): New.
10620 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10621 <actions_str, step_actions, step_actions_str>: Only include in
10622 GDBserver.
fa593d66
PA
10623 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10624 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10625 (tracepoints): Use IP_AGENT_EXPORT.
10626 (last_tracepoint): Don't include in the IPA.
10627 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10628 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10629 (alloced_trace_state_variables): New.
10630 (trace_state_variables): Use IP_AGENT_EXPORT.
10631 (traceframe_t): Delete unused variable.
10632 (circular_trace_buffer): Don't include in the IPA.
10633 (trace_buffer_start): Delete.
10634 (struct trace_buffer_control): New.
10635 (trace_buffer_free): Delete.
10636 (struct ipa_trace_buffer_control): New.
10637 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10638 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10639 New.
10640 (trace_buffer_ctrl): New.
10641 (TRACE_BUFFER_CTRL_CURR): New.
10642 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10643 Reimplement as macros.
10644 (trace_buffer_wrap): Delete.
10645 (traceframe_write_count, traceframe_read_count)
10646 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10647 (struct tracepoint_hit_ctx) <type>: New field.
10648 (struct fast_tracepoint_ctx): New.
10649 (memory_barrier): New.
10650 (cmpxchg): New.
10651 (record_tracepoint_error): Update atomically in the IPA.
10652 (clear_inferior_trace_buffer): New.
10653 (about_to_request_buffer_space): New.
10654 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10655 updating the same buffer.
10656 (add_tracepoint): Default the tracepoint's type to trap
10657 tracepoint, and orig_size to -1.
10658 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10659 internal variables.
10660 (create_trace_state_variable): New parameter `gdb'. Handle it.
10661 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10662 (cmd_qtdp): Handle fast tracepoints.
10663 (cmd_qtdv): Adjust.
10664 (max_jump_pad_size): New.
10665 (gdb_jump_pad_head): New.
10666 (get_jump_space_head): New.
10667 (claim_jump_space): New.
10668 (sort_tracepoints): New.
10669 (MAX_JUMP_SIZE): New.
10670 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10671 IPA.
10672 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10673 support. Upload fast traceframes, and delete internal IPA
10674 breakpoints.
10675 (stop_tracing_handler): New.
10676 (flush_trace_buffer_handler): New.
10677 (cmd_qtstop): Upload fast tracepoints.
10678 (response_tracepoint): Handle fast tracepoints.
10679 (tracepoint_finished_step): Upload fast traceframes. Set the
10680 tracepoint hit context's tracepoint type.
10681 (handle_tracepoint_bkpts): New.
10682 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10683 type. Add comment about fast tracepoints.
10684 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10685 non-existing action_str field.
10686 (get_context_regcache): Handle fast tracepoints.
10687 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10688 to the regcache.
10689 (fast_tracepoint_from_jump_pad_address): New.
10690 (fast_tracepoint_from_ipa_tpoint_address): New.
10691 (collecting_t): New.
10692 (force_unlock_trace_buffer): New.
10693 (fast_tracepoint_collecting): New.
10694 (collecting): New.
10695 (gdb_collect): New.
10696 (write_inferior_data_ptr): New.
10697 (target_tp_heap): New.
10698 (target_malloc): New.
10699 (download_agent_expr): New.
10700 (UALIGN): New.
10701 (download_tracepoints): New.
10702 (download_trace_state_variables): New.
10703 (upload_fast_traceframes): New.
10704 (IPA_FIRST_TRACEFRAME): New.
10705 (IPA_NEXT_TRACEFRAME_1): New.
10706 (IPA_NEXT_TRACEFRAME): New.
10707 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10708 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10709 (gdb_jump_pad_buffer_end): New.
10710 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10711 (initialize_tracepoint): Adjust.
10712 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10713 buffer. Initialize the low module.
10714 * utils.c (PREFIX, TOOLNAME): New.
10715 (malloc_failure): Use PREFIX.
10716 (error): In the IPA, an error causes an exit.
10717 (fatal, warning): Use PREFIX.
10718 (internal_error): Use TOOLNAME.
10719 (NUMCELLS): Increase to 10.
10720 * configure, config.in: Regenerate.
10721
d149dd1d
PA
107222010-06-01 Pedro Alves <pedro@codesourcery.com>
10723
10724 * server.c (handle_query) <qSupported>: Do two passes over the
10725 qSupported string to avoid nesting strtok.
10726
f6528abd
JK
107272010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10728
10729 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10730 (CDEPS): New.
10731 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10732 -Wl,--dynamic-list.
10733 * configure: Regenerate.
10734 * proc-service.list: New.
10735
ca2a87a0
JK
107362010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10737
10738 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10739 New comment.
10740
363a6e9f
OS
107412010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10742
10743 * gdbreplay.c (remote_open): Check error return from socket() call by
10744 its equality to -1 not by it being negative.
10745 * remote-utils.c (remote_open): Likewise.
10746
d23b6cb1
PA
107472010-05-23 Pedro Alves <pedro@codesourcery.com>
10748
10749 * config.h: Regenerate.
10750
28d3cf85
MK
107512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10752
10753 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10754 doesn't provide PTRACE_GET_THREAD_AREA.
10755
fea36a59
MK
107562010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10757
10758 * linux-m68k-low.c: Include <asm/ptrace.h>
10759 (ps_get_thread_area): Implement.
10760
24b066ba
DE
107612010-05-03 Doug Evans <dje@google.com>
10762
10763 * event-loop.c (struct callback_event): New struct.
10764 (callback_list): New global.
10765 (append_callback_event, delete_callback_event): New functions.
10766 (process_callback): New function.
10767 (start_event_loop): Call it.
10768 * remote-utils.c (NOT_SCHEDULED): Define.
10769 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10770 moved out of readchar.
10771 (readchar): Rewrite. Call reschedule before returning.
10772 (reset_readchar): New function.
10773 (remote_close): Call it.
10774 (process_remaining, reschedule): New functions.
10775 * server.h (callback_handler_func): New typedef.
10776 (append_callback_event, delete_callback_event): Declare.
10777
9836d6ea
PA
107782010-05-03 Pedro Alves <pedro@codesourcery.com>
10779
10780 * proc-service.c (ps_pglobal_lookup): Use
10781 thread_db_look_up_one_symbol.
10782 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10783 parameter. Use it instead of all_symbols_looked_up.
10784 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10785 field.
10786 (all_symbols_looked_up): Don't declare.
10787 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10788 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10789 field.
10790 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10791 Set all_symbols_looked_up here.
10792 (thread_db_look_up_one_symbol): New.
10793 (thread_db_get_tls_address): Adjust.
10794 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10795 thread_db object on the heap, and tentatively set it in the
10796 process structure.
10797 (thread_db_init): Don't set all_symbols_looked_up here.
10798 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10799
7984d532
PA
108002010-05-03 Pedro Alves <pedro@codesourcery.com>
10801
10802 * linux-low.c (linux_kill, linux_detach): Adjust.
10803 (status_pending_p_callback): Remove redundant statement. Check
10804 for !TARGET_WAITIKIND_IGNORE, instead of
10805 TARGET_WAITKIND_STOPPED.
10806 (handle_tracepoints): Make sure LWP is locked. Adjust.
10807 (linux_wait_for_event_1): Adjust.
10808 (linux_cancel_breakpoints): New.
10809 (unsuspend_one_lwp): New.
10810 (unsuspend_all_lwps): New.
10811 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10812 (send_sigstop_callback): Change return type to int, add new
10813 `except' parameter and handle it.
10814 (suspend_and_send_sigstop_callback): New.
10815 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10816 pass them down. If SUSPEND, also increment the lwp's suspend
10817 count.
10818 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10819 (need_step_over_p): Don't consider suspended LWPs.
10820 (start_step_over): Adjust.
10821 (proceed_one_lwp): Change return type to int, add new `except'
10822 parameter and handle it.
10823 (unsuspend_and_proceed_one_lwp): New.
10824 (proceed_all_lwps): Use find_inferior instead of
10825 for_each_inferior.
10826 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10827 also decrement the suspend count of LWPs. Pass `except' down,
10828 instead of hacking its suspend count.
10829 (linux_pause_all): Add `freeze' parameter. Adjust.
10830 (linux_unpause_all): New.
10831 (linux_target_ops): Install linux_unpause_all.
10832 * server.c (handle_status): Adjust.
10833 * target.h (struct target_ops): New fields `unpause_all' and
10834 `cancel_breakpoints'. Add new parameter to `pause_all'.
10835 (pause_all): Add new `freeze' parameter.
10836 (unpause_all): New.
10837 (cancel_breakpoints): New.
10838 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10839 cancel breakpoints.
10840 (cmd_qtstart): Pause threads.
10841 (stop_tracing): Pause threads, and cancel breakpoints.
10842 * win32-low.c (win32_target_ops): Adjust.
10843
e471f25b
PA
108442010-05-03 Pedro Alves <pedro@codesourcery.com>
10845
10846 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10847 the inferior right away from here...
10848 (linux_wait_1): ... to here, and adjust to check the thread's
10849 last_resume_kind instead of the lwp's step or stop_expected flags.
10850
1915ef4f
PA
108512010-05-02 Pedro Alves <pedro@codesourcery.com>
10852
10853 * README: Use consistent `GDB' and `GDBserver' spellings.
10854
f9e39928
PA
108552010-05-02 Pedro Alves <pedro@codesourcery.com>
10856
10857 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10858 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10859 (linux_detach_one_lwp): Assume the lwp is stopped.
10860 (any_thread_of): Delete.
10861 (linux_detach): Stop all lwps here. Don't blindly delete all
10862 breakpoints.
10863 (delete_lwp_callback): New.
10864 (linux_mourn): Delete all lwps of the process that is gone.
10865 (linux_wait_1): Don't delete the last lwp of the process here.
10866 * mem-break.h (mark_breakpoints_out): Declare.
10867 * mem-break.c (mark_breakpoints_out): New.
10868 (free_all_breakpoints): Use it.
10869 * server.c (handle_target_event): If the process is gone, mark
10870 breakpoints out.
10871 * thread-db.c (struct thread_db) <create_bp>: New field.
10872 (thread_db_enable_reporting): Fix prototype. Store a thread event
10873 breakpoint reference in the thread_db struct.
10874 (thread_db_load_search): Clear the thread_db object.
10875 (try_thread_db_load_1): Ditto.
10876 (switch_to_process): New.
10877 (disable_thread_event_reporting): Use it.
10878 (remove_thread_event_breakpoints): New.
10879 (thread_db_detach, thread_db_mourn): Use it.
10880
1e7fc18c
PA
108812010-05-01 Pedro Alves <pedro@codesourcery.com>
10882
10883 * linux-low.c (linux_enable_event_reporting): New.
10884 (linux_wait_for_event_1, handle_extended_wait): Use it.
10885
02fc4de7
PA
108862010-04-30 Pedro Alves <pedro@codesourcery.com>
10887
10888 * linux-low.c (linux_kill_one_lwp, linux_kill)
10889 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10890 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10891 SIGSTOP even if the LWP is stopped.
10892 (send_sigstop_callback): New.
10893 (stop_all_lwps): Use send_sigstop_callback instead.
10894 (linux_resume_one_thread): Adjust.
10895 (proceed_one_lwp): Still proceed an LWP that the client has
10896 requested to stop, if we haven't reported it as stopped yet. Make
10897 sure that LWPs the client want stopped, have a pending SIGSTOP.
10898
bc3b5632
DE
108992010-04-26 Doug Evans <dje@google.com>
10900
ae1ada35
DE
10901 * server.c (handle_general_set): Make static.
10902
bc3b5632
DE
10903 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10904 Print received char after testing for error/eof instead of before.
10905 (input_interrupt): Tweak comment.
10906
65730243
DE
109072010-04-23 Doug Evans <dje@google.com>
10908
10909 * server.c (start_inferior): Print inferior argv if --debug.
10910
a8ae7dc0
AR
109112010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10912
10913 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10914 * nto-x86-low.c: Include server.h
10915
1c07cc19
PM
109162010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10917
10918 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10919 be consistent with other sources of this directory.
10920 (init_registers_amd64): Correct name of source file of this function
10921 in the comment.
10922
e0a61e09
PM
109232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10924
10925 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10926 64-bit executables.
10927
54709339
PM
109282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10929
10930 * win32-i386-low.c: Add 64-bit support.
10931 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10932 (init_registers_amd64): Declare.
10933 (mappings): Add 64-bit version of array.
10934 (init_windows_x86): New function.
10935 (the_low_target): Change init_arch field to init_windows_x86.
10936
e8f0053d
PM
109372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10938
10939 * win32-low.c: Adapt to support also 64-bit architecture.
10940 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10941 (get_image_name): Use SIZE_T type for local variable `done'.
10942 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10943 (toolhelp_get_dll_name): Idem.
10944 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10945 Use uintptr_t typecast to avoid warning.
10946 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10947 (handle_exception): Use phex_nz to avoid warning.
10948 (win32_wait): Remove unused local variable `process'.
10949
c481e77e
PM
109502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10951
10952 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10953 `amd64-avx.o'.
10954
12ea4b69
PM
109552010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10956
10957 * configure.ac: Use `ws2_32' library for srv_mingw.
10958 * configure: Regenerate.
10959 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10960 * remote-utils.c: Likewise.
10961
f6d1620c
L
109622010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10963
10964 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10965 if __x86_64__ is defined.
10966
8e642873
PM
109672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10968
10969 * configure: Regenerate.
10970
711e434b
PM
109712010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10972
10973 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10974 * target.h (target_ops): New get_tib_address field.
10975 * win32-low.h (win32_thread_info): Add thread_local_base field.
10976 * win32-low.c (child_add_thread): Add tlb argument.
10977 Set thread_local_base field to TLB.
10978 (get_child_debug_event): Adapt to child_add_thread change.
10979 (win32_get_tib_address): New function.
10980 (win32_target_ops): Set get_tib_address field to
10981 win32_get_tib_address.
10982 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10983
505106cd
PA
109842010-04-12 Pedro Alves <pedro@codesourcery.com>
10985
505106cd
PA
10986 * linux-low.c (linux_mourn): Also remove the process.
10987 * server.c (handle_target_event): Don't remove the process here.
10988 * nto-low.c (nto_mourn): New.
10989 (nto_target_ops): Install it.
10990 * spu-low.c (spu_mourn): New.
10991 (spu_target_ops): Install it.
10992 * win32-low.c (win32_mourn): New.
10993 (win32_target_ops): Install it.
10994
e8470a06
PA
109952010-04-12 Pedro Alves <pedro@codesourcery.com>
10996
10997 * server.h (buffer_xml_printf): Remove redundant `;'.
10998
45ba0d02
PA
109992010-04-12 Pedro Alves <pedro@codesourcery.com>
11000
11001 * regcache.c (set_register_cache): Invalidate regcaches before
11002 changing the register cache layout.
11003 (regcache_invalidate_one): Allow a NULL regcache.
11004 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11005 regcaches before changing the register cache layout or the target
11006 regsets.
11007
59e04013
L
110082010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11009
11010 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11011 variable warning on Linux/x86-64.
11012
8336d594
PA
110132010-04-11 Pedro Alves <pedro@codesourcery.com>
11014
11015 GDBserver disconnected tracing support.
11016
11017 * linux-low.c (linux_remove_process): Delete.
11018 (add_lwp): Don't set last_resume_kind here.
11019 (linux_kill): Use `mourn'.
11020 (linux_detach): Use `thread_db_detach', and `mourn'.
11021 (linux_mourn): New.
11022 (linux_attach_lwp_1): Adjust comment.
11023 (linux_attach): last_resume_kind moved the thread_info; adjust.
11024 (status_pending_p_callback): Adjust.
11025 (linux_wait_for_event_1): Adjust.
11026 (count_events_callback, select_singlestep_lwp_callback)
11027 (select_event_lwp_callback, cancel_breakpoints_callback)
11028 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11029 (proceed_one_lwp): Adjust.
11030 (linux_async): Add debug output.
11031 (linux_thread_stopped): New.
11032 (linux_pause_all): New.
11033 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11034 linux_pause_all.
11035 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11036 (thread_db_free): Delete declaration.
11037 (thread_db_detach, thread_db_mourn): Declare.
11038 * thread-db.c (thread_db_init): Use thread_db_mourn.
11039 (thread_db_free): Delete, split in two.
11040 (disable_thread_event_reporting): New.
11041 (thread_db_detach): New.
11042 (thread_db_mourn): New.
11043
11044 * server.h (struct thread_info) <last_resume_kind>: New field.
11045 <attached>: Add comment.
11046 <gdb_detached>: New field.
11047 (handler_func): Change return type to int.
11048 (handle_serial_event, handle_target_event): Ditto.
11049 (gdb_connected): Declare.
11050 (tracing): Delete.
11051 (disconnected_tracing): Declare.
11052 (stop_tracing): Declare.
11053
11054 * server.c (handle_query) <qSupported>: Report support for
11055 disconnected tracing.
11056 (queue_stop_reply_callback): Account for running threads.
11057 (gdb_wants_thread_stopped): New.
11058 (gdb_wants_all_threads_stopped): New.
11059 (gdb_reattached_process): New.
11060 (handle_status): Clear the `gdb_detached' flag of all processes.
11061 In all-stop, stop all threads.
11062 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11063 (process_serial_event): If the remote connection breaks, or if an
11064 exit was forced with "monitor exit", force an event loop exit.
11065 Handle disconnected tracing on detach.
11066 (handle_serial_event): Adjust.
11067 (handle_target_event): If GDB isn't connected, forward events back
11068 to the inferior, unless the last process exited, in which case,
11069 exit gdbserver. Adjust interface.
11070
11071 * remote-utils.c (remote_open): Don't block in accept. Instead
11072 register an event loop source on the listen socket file
11073 descriptor. Refactor bits into ...
11074 (listen_desc): ... this new global.
11075 (gdb_connected): ... this new function.
11076 (enable_async_notification): ... this new function.
11077 (handle_accept_event): ... this new function.
11078 (remote_close): Clear remote_desc.
11079
11080 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11081
11082 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11083 New fields.
11084 (mourn_inferior): Define.
11085 (target_process_qsupported): Avoid the dangling else problem.
11086 (thread_stopped): Define.
11087 (pause_all): Define.
11088 (target_waitstatus_to_string): Declare.
11089 * target.c (target_waitstatus_to_string): New.
11090
11091 * tracepoint.c (tracing): Make extern.
11092 (disconnected_tracing): New.
11093 (stop_tracing): Make extern. Handle tracing stops due to GDB
11094 disconnecting.
11095 (cmd_qtdisconnected): New.
11096 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11097 (handle_tracepoint_general_set): Handle QTDisconnected.
11098
11099 * event-loop.c (event_handler_func): Change return type to int.
11100 (process_event): Bail out if the event handler wants the event
11101 loop to stop.
11102 (handle_file_event): Ditto.
11103 (start_event_loop): Bail out if the event handler wants the event
11104 loop to stop.
11105
11106 * nto-low.c (nto_target_ops): Adjust.
11107 * spu-low.c (spu_wait): Don't remove the process here.
11108 (spu_target_ops): Adjust.
11109 * win32-low.c (win32_wait): Don't remove the process here.
11110 (win32_target_ops): Adjust.
11111
5d267c4c
PA
111122010-04-11 Pedro Alves <pedro@codesourcery.com>
11113
11114 * regcache.c (realloc_register_cache): Invalidate inferior's
11115 regcache before recreating it.
11116
623ccd72
PA
111172010-04-09 Pedro Alves <pedro@codesourcery.com>
11118
11119 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11120
219f2f23
PA
111212010-04-09 Stan Shebs <stan@codesourcery.com>
11122 Pedro Alves <pedro@codesourcery.com>
11123
11124 * server.h (LONGEST): New.
11125 (struct thread_info) <while_stepping>: New field.
11126 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11127 Declare.
11128 (initialize_tracepoint, handle_tracepoint_general_set)
11129 (handle_tracepoint_query, tracepoint_finished_step)
11130 (tracepoint_was_hit, release_while_stepping_state_list):
11131 (current_traceframe): Declare.
11132 * server.c (handle_general_set): Handle tracepoint packets.
11133 (read_memory): New.
11134 (write_memory): New.
11135 (handle_search_memory_1): Use read_memory.
11136 (handle_query): Report support for conditional tracepoints, trace
11137 state variables, and tracepoint sources. Handle tracepoint
11138 queries.
11139 (main): Initialize the tracepoints module.
11140 (process_serial_event): Handle traceframe reads/writes.
11141
11142 * linux-low.c (handle_tracepoints): New.
11143 (linux_wait_1): Call it.
11144 (linux_resume_one_lwp): Handle while-stepping.
11145 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11146 (linux_target_ops): Install them.
11147 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11148 New field.
11149 * linux-x86-low.c (x86_supports_tracepoints): New.
11150 (the_low_target). Install it.
11151
11152 * mem-break.h (delete_breakpoint): Declare.
11153 * mem-break.c (delete_breakpoint): Make external.
11154
11155 * target.h (struct target_ops): Add `supports_tracepoints',
11156 `read_pc', and `write_pc' fields.
11157 (target_supports_tracepoints): Define.
11158 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11159 (phex_nz): New.
11160
11161 * regcache.h (struct regcache) <registers_owned>: New field.
11162 (init_register_cache, regcache_cpy): Declare.
11163 (regcache_read_pc, regcache_write_pc): Declare.
11164 (register_cache_size): Declare.
11165 (supply_regblock): Declare.
11166 * regcache.c (init_register_cache): New.
11167 (new_register_cache): Use it.
11168 (regcache_cpy): New.
11169 (register_cache_size): New.
11170 (supply_regblock): New.
11171 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11172
219f2f23
PA
11173 * tracepoint.c: New.
11174
11175 * Makefile.in (OBS): Add tracepoint.o.
11176 (tracepoint.o): New rule.
11177
3a13a53b
L
111782010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11179
11180 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11181 (i386-mmx.o): New.
11182 (i386-mmx.c): Likewise.
11183 (i386-mmx-linux.o): Likewise.
11184 (i386-mmx-linux.c): Likewise.
11185
11186 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11187 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11188 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11189 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11190
11191 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11192 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11193 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11194
1570b33e
L
111952010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11196
11197 * Makefile.in (clean): Updated.
11198 (i386-avx.o): New.
11199 (i386-avx.c): Likewise.
11200 (i386-avx-linux.o): Likewise.
11201 (i386-avx-linux.c): Likewise.
11202 (amd64-avx.o): Likewise.
11203 (amd64-avx.c): Likewise.
11204 (amd64-avx-linux.o): Likewise.
11205 (amd64-avx-linux.c): Likewise.
11206
11207 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11208 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11209 (srv_amd64_regobj): Add amd64-avx.o.
11210 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11211 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11212 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11213 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11214 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11215 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11216 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11217
11218 * i387-fp.c: Include "i386-xstate.h".
11219 (i387_xsave): New.
11220 (i387_cache_to_xsave): Likewise.
11221 (i387_xsave_to_cache): Likewise.
11222 (x86_xcr0): Likewise.
11223
11224 * i387-fp.h (i387_cache_to_xsave): Likewise.
11225 (i387_xsave_to_cache): Likewise.
11226 (x86_xcr0): Likewise.
11227
11228 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11229 * linux-crisv32-low.c (target_regsets): Likewise.
11230 * linux-m68k-low.c (target_regsets): Likewise.
11231 * linux-mips-low.c (target_regsets): Likewise.
11232 * linux-ppc-low.c (target_regsets): Likewise.
11233 * linux-s390-low.c (target_regsets): Likewise.
11234 * linux-sh-low.c (target_regsets): Likewise.
11235 * linux-sparc-low.c (target_regsets): Likewise.
11236 * linux-xtensa-low.c (target_regsets): Likewise.
11237
11238 * linux-low.c: Include <sys/uio.h>.
11239 (regsets_fetch_inferior_registers): Support nt_type.
11240 (regsets_store_inferior_registers): Likewise.
11241 (linux_process_qsupported): New.
11242 (linux_target_ops): Add linux_process_qsupported.
11243
11244 * linux-low.h (regset_info): Add nt_type.
11245 (linux_target_ops): Add process_qsupported.
11246
11247 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11248 and <sys/uio.h>.
11249 (init_registers_i386_avx_linux): New.
11250 (init_registers_amd64_avx_linux): Likewise.
11251 (xmltarget_i386_linux_no_xml): Likewise.
11252 (xmltarget_amd64_linux_no_xml): Likewise.
11253 (PTRACE_GETREGSET): Likewise.
11254 (PTRACE_SETREGSET): Likewise.
11255 (x86_fill_xstateregset): Likewise.
11256 (x86_store_xstateregset): Likewise.
11257 (use_xml): Likewise.
11258 (x86_linux_update_xmltarget): Likewise.
11259 (x86_linux_process_qsupported): Likewise.
11260 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11261 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11262 init_registers_i386_linux here. Call
11263 x86_linux_update_xmltarget.
11264 (the_low_target): Add x86_linux_process_qsupported.
11265
11266 * server.c (handle_query): Call target_process_qsupported.
11267
11268 * target.h (target_ops): Add process_qsupported.
11269 (target_process_qsupported): New.
11270
fc7238bb
PA
112712010-04-03 Pedro Alves <pedro@codesourcery.com>
11272
11273 * inferiors.c (add_thread): Set last_status kind to
11274 TARGET_WAITKIND_IGNORE.
11275 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11276 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11277 (linux_wait_1): Move `thread' local definition to block that uses
11278 it. Don't NULL initialize `event_child'.
11279 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11280 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11281 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11282
bdabb078
PA
112832010-04-01 Pedro Alves <pedro@codesourcery.com>
11284
11285 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11286 an extended waitstatus, or by a watchpoint.
11287 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11288 thread was stepping or has been stopped by a watchpoint.
11289
d3bbe7a0
PA
112902010-04-01 Pedro Alves <pedro@codesourcery.com>
11291
11292 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11293 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11294 of another, then delete the previous, and validate all
11295 breakpoints.
11296 (validate_inserted_breakpoint): New.
11297 (delete_disabled_breakpoints): New.
11298 (validate_breakpoints): New.
11299 (check_mem_read): Validate breakpoints before trusting their
11300 shadow. Delete disabled breakpoints.
11301 (check_mem_write): Validate breakpoints before trusting they
11302 should be inserted. Delete disabled breakpoints.
11303 * mem-break.h (validate_breakpoints):
11304 * server.c (handle_query): Validate breakpoints when we see a
11305 qSymbol query.
11306
8b07ae33
PA
113072010-04-01 Pedro Alves <pedro@codesourcery.com>
11308
11309 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11310 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11311 if we could tell there's a GDB breakpoint at stop_pc.
11312 (need_step_over_p): Don't do a step over if we find a GDB
11313 breakpoint at the resume PC.
11314
11315 * mem-break.c (struct raw_breakpoint): New.
11316 (enum bkpt_type): New type `gdb_breakpoint'.
11317 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11318 fields. New field `raw'.
11319 (find_raw_breakpoint_at): New.
11320 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11321 breakpoint instead.
11322 (set_breakpoint_at): Adjust.
11323 (delete_raw_breakpoint): New.
11324 (release_breakpoint): New.
11325 (delete_breakpoint): Rename to...
11326 (delete_breakpoint_1): ... this. Add proc parameter. Use
11327 release_breakpoint. Return ENOENT.
11328 (delete_breakpoint): Reimplement.
11329 (find_breakpoint_at): Delete.
11330 (find_gdb_breakpoint_at): New.
11331 (delete_breakpoint_at): Delete.
11332 (set_gdb_breakpoint_at): New.
11333 (delete_gdb_breakpoint_at): New.
11334 (gdb_breakpoint_here): New.
11335 (set_reinsert_breakpoint): Use release_breakpoint.
11336 (uninsert_breakpoint): Rename to ...
11337 (uninsert_raw_breakpoint): ... this.
11338 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11339 (reinsert_raw_breakpoint): Change parameter type to
11340 raw_breakpoint.
11341 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11342 instead.
11343 (check_breakpoints): Adjust. Use release_breakpoint.
11344 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11345 (breakpoint_inserted_here): Ditto.
11346 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11347 Don't trust the breakpoint's shadow if it is not inserted.
11348 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11349 (delete_all_breakpoints): Adjust.
11350 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11351 use delete_breakpoint_1.
11352
11353 * mem-break.h (breakpoints_supported): Delete declaration.
11354 (set_gdb_breakpoint_at): Declare.
11355 (gdb_breakpoint_here): Declare.
11356 (delete_breakpoint_at): Delete.
11357 (delete_gdb_breakpoint_at): Declare.
11358
11359 * server.h (struct raw_breakpoint): Forward declare.
11360 (struct process_info): New field `raw_breakpoints'.
11361
11362 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11363 breakpoints.
11364
6bf5e0ba
PA
113652010-03-24 Pedro Alves <pedro@codesourcery.com>
11366
11367 * linux-low.c (status_pending_p_callback): Fix comment.
11368 (linux_wait_for_event_1): Move most of the internal breakpoint
11369 handling from here...
11370 (linux_wait_1): ... to here.
11371 (count_events_callback): New.
11372 (select_singlestep_lwp_callback): New.
11373 (select_event_lwp_callback): New.
11374 (cancel_breakpoints_callback): New.
11375 (select_event_lwp): New.
11376 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11377 priority to all LWPs that have had events that should be reported
11378 to the client. Cancel breakpoints when about to reporting the
11379 event to the client, not while stopping lwps. No longer cancel
11380 finished single-steps here.
11381 (cancel_finished_single_step): Delete.
11382 (cancel_finished_single_steps): Delete.
11383
414a389f
PA
113842010-03-24 Pedro Alves <pedro@codesourcery.com>
11385
11386 * mem-break.c (enum bkpt_type): New.
11387 (struct breakpoint): New field `type'.
11388 (set_breakpoint_at): Change return type to struct breakpoint
11389 pointer. Set type to `other_breakpoint' by default.
11390 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11391 in the breakpoint list.
11392 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11393 (reinsert_breakpoint): Rename to ...
11394 (reinsert_raw_breakpoint): ... this.
11395 (reinsert_breakpoints_at): Adjust.
11396 * mem-break.h (struct breakpoint): Declare.
11397 (set_breakpoint_at): Change return type to struct breakpoint
11398 pointer.
11399
2280c721
PA
114002010-03-24 Pedro Alves <pedro@codesourcery.com>
11401
11402 * server.c (handle_query): Assign, not compare.
11403
d50171e4
PA
114042010-03-24 Pedro Alves <pedro@codesourcery.com>
11405
11406 Teach linux gdbserver to step-over-breakpoints.
11407
11408 * linux-low.c (can_hardware_single_step): New.
11409 (supports_breakpoints): New.
11410 (handle_extended_wait): If stopping threads, read the stop pc of
11411 the new cloned LWP.
11412 (get_pc): New.
11413 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11414 low target doesn't support retrieving the PC.
11415 (add_lwp): Set last_resume_kind to resume_continue.
11416 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11417 (linux_attach): Don't clear stop_expected. Set the lwp's
11418 last_resume_kind to resume_stop.
11419 (linux_detach_one_lwp): Don't check for removed breakpoints.
11420 (check_removed_breakpoint): Delete.
11421 (status_pending_p): Rename to ...
11422 (status_pending_p_callback): ... this. Don't check for removed
11423 breakpoints. Don't consider threads that are stopped from GDB's
11424 perspective.
11425 (linux_wait_for_lwp): Always read the stop_pc here.
11426 (cancel_breakpoint): New.
11427 (step_over_bkpt): New global.
11428 (linux_wait_for_event_1): Implement stepping over breakpoints.
11429 (gdb_wants_lwp_stopped): New.
11430 (gdb_wants_all_stopped): New.
11431 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11432 single-step traps here. Store the thread's last reported target
11433 wait status.
11434 (send_sigstop): Don't clear stop_expected. Always set it,
11435 instead.
11436 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11437 (cancel_finished_single_step): New.
11438 (cancel_finished_single_steps): New.
11439 (wait_for_sigstop): Don't cancel finished single-step traps here.
11440 (linux_resume_one_lwp): Don't check for removed breakpoints.
11441 Don't set `step' on non-hardware step archs.
11442 (linux_set_resume_request): Ignore resume_stop requests if already
11443 stopping or stopped. Set the lwp's last_resume_kind.
11444 (resume_status_pending_p): Don't check for removed breakpoints.
11445 (need_step_over_p): New.
11446 (start_step_over): New.
11447 (finish_step_over): New.
11448 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11449 requests. Clear the thread's last reported target waitstatus.
11450 Don't use the `suspended' flag. Don't consider pending breakpoints.
11451 (linux_resume): Start a step-over if necessary.
11452 (proceed_one_lwp): New.
11453 (proceed_all_lwps): New.
11454 (unstop_all_lwps): New.
11455 * linux-low.h (struct lwp_info): Rewrite comment for the
11456 `suspended' flag. Add the `stop_pc' field. Delete the
11457 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11458 Add `'last_resume_kind' and `need_step_over' fields.
11459 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11460 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11461 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11462 (set_raw_breakpoint_at): New.
11463 (set_breakpoint_at): Rewrite to use it.
11464 (reinsert_breakpoint_handler): Delete.
11465 (set_reinsert_breakpoint): New.
11466 (reinsert_breakpoint_by_bp): Delete.
11467 (delete_reinsert_breakpoints): New.
11468 (uninsert_breakpoint): Rewrite.
11469 (uninsert_breakpoints_at): New.
11470 (reinsert_breakpoint): Rewrite.
11471 (reinsert_breakpoints_at): New.
11472 (check_breakpoints): Rewrite.
11473 (breakpoint_here): New.
11474 (breakpoint_inserted_here): New.
11475 (check_mem_read): Adjust.
11476 * mem-break.h (breakpoints_supported, breakpoint_here)
11477 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11478 (reinsert_breakpoint_by_bp): Delete declaration.
11479 (delete_reinsert_breakpoints): Declare.
11480 (reinsert_breakpoint): Delete declaration.
11481 (reinsert_breakpoints_at): Declare.
11482 (uninsert_breakpoint): Delete declaration.
11483 (uninsert_breakpoints_at): Declare.
11484 (check_breakpoints): Adjust prototype.
11485 * server.h: Adjust include order.
11486 (struct thread_info): Declare here. Add a `last_status' field.
11487
30ba68cb
MS
114882010-03-23 Michael Snyder <msnyder@vmware.com>
11489
11490 * server.c (crc32): New function.
11491 (handle_query): Add handling for 'qCRC:' request.
11492
b9a881c2
PA
114932010-03-23 Pedro Alves <pedro@codesourcery.com>
11494
11495 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11496 lwp had been stopped by a watchpoint.
11497
e92d13d5
PA
114982010-03-16 Pedro Alves <pedro@codesourcery.com>
11499
11500 * server.h (internal_error): Declare.
11501 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11502 * utils.c (internal_error): New function.
11503
64daa791
AS
115042010-03-15 Andreas Schwab <schwab@redhat.com>
11505
11506 * configure.srv: Fix typo setting srv_regobj.
11507
f52cd8cd
PA
115082010-03-15 Pedro Alves <pedro@codesourcery.com>
11509
11510 * linux-low.c (fetch_register): Avoid passing a non string literal
11511 format to `error'.
11512 (usr_store_inferior_registers): Ditto.
11513
93ae6fdc
PA
115142010-03-14 Pedro Alves <pedro@codesourcery.com>
11515
11516 * linux-low.c (linux_write_memory): Bail out early if peeking
11517 memory failed.
11518
c3adc08c
PA
115192010-03-14 Pedro Alves <pedro@codesourcery.com>
11520
11521 * linux-low.h (struct lwp_info): New fields
11522 `stopped_by_watchpoint' and `stopped_data_address'.
11523 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11524 here, and cache them in the lwp object.
11525 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11526 directly.
11527 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11528 field.
11529 (linux_stopped_by_watchpoint): Rewrite.
11530 (linux_stopped_data_address): Rewrite.
11531
bce522a2
PA
115322010-03-06 Simo Melenius <simo.melenius@iki.fi>
11533
11534 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11535 switching the current inferior, not before.
11536
90884b2b
L
115372010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11538
11539 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11540 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11541 i386-linux.c and amd64-linux.c.
11542 (reg-i386.o): Removed.
11543 (reg-i386.c): Likewise.
11544 (reg-i386-linux.o): Likewise.
11545 (reg-i386-linux.c): Likewise.
11546 (reg-x86-64.o): Likewise.
11547 (reg-x86-64.c): Likewise.
11548 (reg-x86-64-linux.o): Likewise.
11549 (reg-x86-64-linux.c): Likewise.
11550 (i386.o): New.
11551 (i386.c): Likewise.
11552 (i386-linux.o): Likewise.
11553 (i386-linux.c): Likewise.
11554 (amd64.o): Likewise.
11555 (amd64.c): Likewise.
11556 (amd64-linux.o): Likewise.
11557 (amd64-linux.c): Likewise.
11558
11559 * configure.srv (srv_i386_regobj): New.
11560 (srv_i386_linux_regobj): Likewise.
11561 (srv_amd64_regobj): Likewise.
11562 (srv_amd64_linux_regobj): Likewise.
11563 (srv_i386_32bit_xmlfiles): Likewise.
11564 (srv_i386_64bit_xmlfiles): Likewise.
11565 (srv_i386_xmlfiles): Likewise.
11566 (srv_amd64_xmlfiles): Likewise.
11567 (srv_i386_linux_xmlfiles): Likewise.
11568 (srv_amd64_linux_xmlfiles): Likewise.
11569 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11570 srv_xmlfiles to $srv_i386_xmlfiles.
11571 (i[34567]86-*-mingw32ce*): Likewise.
11572 (i[34567]86-*-mingw*): Likewise.
11573 (i[34567]86-*-nto*): Likewise.
11574 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11575 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11576 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11577 (x86_64-*-linux*): Likewise.
11578
11579 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11580 (init_registers_amd64_linux): New.
11581 (x86_arch_setup): Replace init_registers_x86_64_linux with
11582 init_registers_amd64_linux.
11583
193f13e6
MK
115842010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11585
11586 * configure.ac: Check for libdl. If it is not available link against
11587 static libthread_db.
11588 * configure: Regenerate.
11589
85d721b8
PA
115902010-02-22 Pedro Alves <pedro@codesourcery.com>
11591
11592 PR9605
11593
11594 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11595 handing a read watchpoint.
11596 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11597
6076632b
DE
115982010-02-12 Doug Evans <dje@google.com>
11599
11600 * linux-low.c (linux_supports_tracefork_flag): Document.
11601 (linux_look_up_symbols): Add comment.
11602
3327ccf7
L
116032010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11604
11605 * regcache.c (supply_register): Clear regcache if buf is NULL.
11606
0718675c 116072010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11608 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11609
11610 * inferiors.c (find_inferior): Add function documentation.
11611 (unloaded_dll): Handle the case where the unloaded dll has not
11612 been previously registered in the dll list.
11613
177321bd
DJ
116142010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11615
11616 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11617 (thumb2_breakpoint): New.
11618 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11619
2b009048
DJ
116202010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11621
11622 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11623 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11624 breakpoints.
11625
3be029c7
PA
116262010-01-21 Pedro Alves <pedro@codesourcery.com>
11627
11628 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11629
18f5de3b
JK
116302010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11631
11632 * linux-s390-low.c (s390_collect_ptrace_register)
11633 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11634
3743bb4f
DE
116352010-01-21 Doug Evans <dje@google.com>
11636
14ce3065
DE
11637 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11638 (PTRACE_ARG4_TYPE): New macro.
11639 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11640 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11641 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11642 (usr_store_inferior_registers): Ditto.
11643 (linux_read_memory, linux_write_memory): Ditto.
11644 (linux_test_for_tracefork): Ditto.
11645
3743bb4f
DE
11646 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11647 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11648
8b315be5
PA
116492010-01-21 Pedro Alves <pedro@codesourcery.com>
11650
11651 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11652 target.
11653
85492558
PA
116542010-01-21 Pedro Alves <pedro@codesourcery.com>
11655
11656 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11657 prototype to take a regcache. Adjust.
11658
442ea881
PA
116592010-01-20 Pedro Alves <pedro@codesourcery.com>
11660
11661 * regcache.h (struct thread_info): Forward declare.
11662 (struct regcache): New.
11663 (new_register_cache): Adjust prototype.
11664 (get_thread_regcache): Declare.
11665 (free_register_cache): Adjust prototype.
11666 (registers_to_string, registers_from_string): Ditto.
11667 (supply_register, supply_register_by_name, collect_register)
11668 (collect_register_as_string, collect_register_by_name): Ditto.
11669 * regcache.c (struct inferior_regcache_data): Delete.
11670 (get_regcache): Rename to ...
11671 (get_thread_regcache): ... this. Adjust. Switch inferior before
11672 fetching registers.
11673 (regcache_invalidate_one): Adjust.
11674 (regcache_invalidate): Fix prototype.
11675 (new_register_cache): Return the new register cache.
11676 (free_register_cache): Change prototype.
11677 (realloc_register_cache): Adjust.
11678 (registers_to_string): Change prototype to take a regcache. Adjust.
11679 (registers_from_string): Ditto.
11680 (register_data): Ditto.
11681 (supply_register): Ditto.
11682 (supply_register_by_name): Ditto.
11683 (collect_register): Ditto.
11684 (collect_register_as_string): Ditto.
11685 (collect_register_by_name): Ditto.
11686 * server.c (process_serial_event): Adjust.
11687 * linux-low.h (regset_fill_func, regset_store_func): Change
11688 prototype.
11689 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11690 Change prototype.
11691 * linux-low.c (get_stop_pc): Adjust.
11692 (check_removed_breakpoint): Adjust.
11693 (linux_wait_for_event): Adjust.
11694 (linux_resume_one_lwp): Adjust.
11695 (fetch_register): Add regcache parameter. Adjust.
11696 (usr_store_inferior_registers): Ditto.
11697 (regsets_fetch_inferior_registers): Ditto.
11698 (regsets_store_inferior_registers): Ditto.
11699 (linux_fetch_registers, linux_store_registers): Ditto.
11700 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11701 regcache. Adjust.
43aaf8b6
PA
11702 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11703 Ditto.
442ea881
PA
11704 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11705 prototype to take a regcache.
11706 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11707 * remote-utils.c (convert_ascii_to_int, outreg)
11708 (prepare_resume_reply): Change prototype to take a regcache.
11709 Adjust.
11710 * target.h (struct target_ops) <fetch_registers, store_registers>:
11711 Change prototype to take a regcache.
11712 (fetch_inferior_registers, store_inferior_registers): Change
11713 prototype to take a regcache. Adjust.
11714 * proc-service.c (ps_lgetregs): Adjust.
11715 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11716 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11717 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11718 take a regcache. Adjust.
11719 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11720 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11721 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11722 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11723 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11724 (cris_cannot_fetch_register):
11725 (cris_breakpoint_at): Change prototype to take a regcache.
11726 Adjust.
11727 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11728 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11729 to take a regcache. Adjust.
11730 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11731 Adjust.
11732 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11733 take a regcache. Adjust.
11734 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11735 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11736 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11737 * linux-mips-low.c (mips_get_pc):
11738 (mips_set_pc): Change prototype to take a regcache. Adjust.
11739 (mips_reinsert_addr): Adjust.
11740 (mips_collect_register): Change prototype to take a regcache.
11741 Adjust.
11742 (mips_supply_register):
11743 (mips_collect_register_32bit, mips_supply_register_32bit)
11744 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11745 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11746 * linux-ppc-low.c (ppc_supply_ptrace_register)
11747 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11748 (parse_spufs_run): Adjust.
11749 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11750 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11751 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11752 take a regcache. Adjust.
11753 * linux-s390-low.c (s390_collect_ptrace_register)
11754 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11755 (s390_set_pc): Change prototype to take a regcache. Adjust.
11756 (s390_arch_setup): Adjust.
11757 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11758 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11759 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11760 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11761 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11762 regcache. Adjust.
11763 (sparc_breakpoint_at): Adjust.
11764 * linux-xtensa-low.c (xtensa_fill_gregset):
11765 (xtensa_store_gregset):
11766 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11767 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11768 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11769 prototype to take a regcache. Adjust.
11770 * win32-arm-low.c (arm_fetch_inferior_register)
11771 (arm_store_inferior_register): Change prototype to take a
11772 regcache. Adjust.
11773 * win32-i386-low.c (i386_fetch_inferior_register)
11774 (i386_store_inferior_register): Change prototype to take a
11775 regcache. Adjust.
11776 * win32-low.c (child_fetch_inferior_registers)
11777 (child_store_inferior_registers): Change prototype to take a
11778 regcache. Adjust.
11779 (win32_wait): Adjust.
11780 (win32_fetch_inferior_registers): Change prototype to take a
11781 regcache. Adjust.
11782 (win32_store_inferior_registers): Adjust.
11783 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11784 store_inferior_register>: Change prototype to take a regcache.
11785
60c3d7b0
DE
117862010-01-20 Doug Evans <dje@google.com>
11787
11788 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11789 #ifdef.
11790 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11791 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11792
dc146f7c
VP
117932010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11794
11795 * linux-low.c (linux_core_of_thread): New.
11796 (compare_ints, show_process, list_threads): New.
11797 (linux_qxfer_osdata): Report threads and cores.
11798 (linux_target_op): Register linux_core_of_thread.
11799 * remote-utils.c (prepare_resume_reply): Report the core.
11800 (buffer_xml_printf): Support %d specifier.
11801 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11802 New.
11803 (handle_query): Handle qXfer:threads. Announce availability
11804 thereof.
11805 * target.h (struct target_ops): New field core_of_thread.
11806
7803799a
UW
118072010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11808
11809 * Makefile.in (clean): Remove new generated files.
11810 (reg-s390.o, reg-s390.c): Remove rules.
11811 (reg-s390x.o, reg-s390x.c): Likewise.
11812 (s390-linux32.o, s390-linux32.c): Add rules.
11813 (s390-linux64.o, s390-linux64.c): Likewise.
11814 (s390x-linux64.o, s390x-linux64.c): Likewise.
11815 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11816 * linux-s390-low.c: Include <elf.h>.
11817 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11818 (init_registers_s390): Remove prototype.
11819 (init_registers_s390x): Likewise.
11820 (init_registers_s390_linux32): Add prototype.
11821 (init_registers_s390_linux64): Likewise.
11822 (init_registers_s390x_linux64): Likewise.
11823 (s390_num_regs_3264): New define.
11824 (s390_regmap_3264): New global variable.
11825 (s390_cannot_fetch_register): Remove obsolete check.
11826 (s390_cannot_store_register): Likewise.
11827 (s390_collect_ptrace_register): Handle upper/lower register halves.
11828 (s390_supply_ptrace_register): Likewise.
11829 (s390_fill_gregset): Update to register number changes.
11830 (s390_get_hwcap): New routine.
11831 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11832 Install appropriate regmap and register set.
11833
6e7ffa39
JB
118342010-01-01 Joel Brobecker <brobecker@adacore.com>
11835
11836 * server.c (gdbserver_version): Update copyright year to 2010.
11837 * gdbreplay.c (gdbreplay_version): Likewise.
11838
957f3f49
DE
118392009-12-28 Doug Evans <dje@google.com>
11840
11841 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11842 elf/external.h. Include <elf.h> instead but only if necessary.
11843
ca5c370d
PA
118442009-12-28 Pedro Alves <pedro@codesourcery.com>
11845
11846 * linux-low.c (linux_remove_process): Remove `detaching'
11847 parameter. Don't release/detach from thread_db here.
11848 (linux_kill): Release/detach from thread_db here, ...
11849 (linux_detach): ... and here, before actually detaching.
11850 (linux_wait_1): ... and here, when a process exits.
11851 * thread-db.c (any_thread_of): New.
11852 (thread_db_free): Switch the current inferior to a thread of the
11853 passed in process.
11854
4ee62156
DE
118552009-12-21 Doug Evans <dje@google.com>
11856
d90e6a88
DE
11857 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11858
c5f62d5f
DE
11859 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11860 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11861 warning ifndef __NR_tkill. Move setting of errno there too.
11862 Delete unnecessary resetting of errno after syscall.
11863 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11864
10e86dd7
DE
11865 * configure.ac: Check for dladdr.
11866 * config.in: Regenerate.
11867 * configure: Regenerate.
11868 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11869 (try_thread_db_load): Update.
11870
4ee62156
DE
11871 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11872
00f515da
DE
118732009-12-18 Doug Evans <dje@google.com>
11874
e9464885
DE
11875 * event-loop.c: Include unistd.h if it exists.
11876
07d4f67e
DE
11877 * linux-low.c (my_waitpid): Move definition away from being in
11878 between linux_tracefork_child/linux_test_for_tracefork.
11879
00f515da
DE
11880 * gdb_proc_service.h (psaddr_t): Fix type.
11881 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11882 signature to match glibc.
11883
1de1badb
DE
118842009-12-16 Doug Evans <dje@google.com>
11885
11886 * linux-low.c (linux_read_memory): Fix argument to read.
11887
aeeb81d1
PA
118882009-11-26 Pedro Alves <pedro@codesourcery.com>
11889
11890 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11891 events, don't leave current_inferior pointing at null.
11892
10357975
PA
118932009-11-26 Pedro Alves <pedro@codesourcery.com>
11894
11895 * win32-low.c (LOG): Delete.
11896 (OUTMSG): Output to stderr.
11897 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11898 on compile time LOG macro.
11899 (win32_wait): Fix debug output.
11900
cf6e3471
PA
119012009-11-26 Pedro Alves <pedro@codesourcery.com>
11902
11903 * win32-low.c (win32_add_one_solib): If the dll name is
11904 "ntdll.dll", prepend the system directory to the dll path.
11905
0c85e18e
MK
119062009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11907
11908 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11909
9ac544ce 119102009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11911 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11912
11913 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11914 * configure.ac: Check for __mcoldfire__ and set
11915 gdb_cv_m68k_is_coldfire.
11916 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11917 reg-cf.o and reg-m68k.o.
11918 * configure: Regenerated.
11919
fd7dd3e6
PA
119202009-11-16 Pedro Alves <pedro@codesourcery.com>
11921
11922 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11923 Pass it to thread_db_free.
11924 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11925 proper `detaching' argument to linux_remove_process.
11926 * linux-low.h (thread_db_free): Add `detaching' parameter.
11927 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11928 to thread_db_free.
11929 (thread_db_free): Add `detaching' parameter. Only
11930 call td_ta_clear_event if detaching from process.
11931
75aa492e
MK
119322009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11933
11934 * thread-db.c (thread_db_free): Fix typo.
11935
21e1bee4
PP
119362009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11937
11938 PR gdb/10838
11939 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11940
8838b45e
NS
119412009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11942
11943 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11944 with an i686 compiler.
11945 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11946 needed.
11947 * configure: Rebuilt.
11948
8a35fb51
SL
119492009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11950
11951 PR gdb/10783
11952
11953 * server.c (handle_search_memory_1): Correct read_addr initialization
11954 in loop for searching subsequent chunks.
11955
96f15937
PP
119562009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11957
11958 * configure.ac: New --with-libthread-db option.
11959 * thread-db.c: Allow direct dependence on libthread_db.
11960 (thread_db_free): Adjust.
11961 * config.in: Regenerate.
11962 * configure: Likewise.
889bf7c5 11963
5f7d1694
PP
119642009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11965
11966 PR gdb/10757
11967 * thread-db.c (attach_thread): New function.
11968 (maybe_attach_thread): Return success/failure.
11969 (find_new_threads_callback): Adjust.
889bf7c5
PA
11970 (thread_db_find_new_threads): Loop until no new threads.
11971
88e3b899
PA
119722009-10-13 Pedro Alves <pedro@codesourcery.com>
11973
11974 * proc-service.c (ps_lgetregs): Formatting.
11975
cdbfd419
PP
119762009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11977
11978 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11979 * configure.ac: Adjust.
11980 * linux-low.h (struct process_info_private): Move members to struct
11981 thread_db.
11982 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11983 * linux-low.c (linux_remove_process): Adjust.
11984 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11985 * server.c (handle_query): Move code ...
11986 (handle_monitor_command): ... here. New function.
11987 * target.h (struct target_ops): New member.
11988 * thread-db.c (struct thread_db): New.
11989 (libthread_db_search_path): New variable.
11990 (thread_db_create_event, thread_db_enable_reporting)
11991 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11992 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11993 (try_thread_db_load_1, dladdr_to_soname): New functions.
11994 (try_thread_db_load, thread_db_load_search): New functions.
11995 (thread_db_init): Search for libthread_db.
11996 (thread_db_free): New function.
11997 (thread_db_handle_monitor_command): Likewise.
11998 * config.in: Regenerate.
11999 * configure: Regenerate.
889bf7c5 12000
4168d2d6
UW
120012009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12002
12003 * spu-low.c (spu_kill): Wait for inferior to terminate.
12004 Call clear_inferiors.
12005 (spu_detach): Call clear_inferiors.
12006
81ecdfbb
RW
120072009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12008
12009 * aclocal.m4: Regenerate.
12010 * config.in: Likewise.
12011 * configure: Likewise.
12012
0b9ff2c0
UW
120132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12014
12015 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12016 (parse_spufs_run): New function.
12017 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12018 (ppc_breakpoint_at): Handle SPU breakpoints.
12019
efcbbd14
UW
120202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12021
12022 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12023 (SPUFS_MAGIC): Define.
12024 (spu_enumerate_spu_ids): New function.
12025 (linux_qxfer_spu): New function.
12026 (linux_target_ops): Install linux_qxfer_spu.
12027
f4d9bade
UW
120282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12029
12030 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12031 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12032 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12033 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12034 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12035 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12036 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12037 (init_registers_powerpc_cell32l): Add prototype.
12038 (init_registers_powerpc_cell64l): Likewise.
12039 (ppc_arch_setup): Detect Cell/B.E. architecture.
12040
96e946ca
RW
120412009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12042
12043 * Makefile.in (datarootdir): New variable.
12044
58d6951d
DJ
120452009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12046
12047 * linux-low.c (linux_write_memory): Update debugging output.
12048 * Makefile.in (clean): Add new descriptions.
12049 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12050 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12051 * configure.srv: Add new files for arm*-*-linux*.
12052 * linux-arm-low.c: Add new declarations.
12053 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12054 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12055 (HWCAP_VFPv3D16): New.
12056 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12057 instead of __IWMMXT__.
12058 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12059 (arm_arch_setup): New.
12060 (target_regsets): Remove #ifdef. Add VFP regset.
12061 (the_low_target): Use arm_arch_setup.
12062
12b42a12
DJ
120632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12064
12065 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12066 the main thread again.
12067
ac8c974e
AR
120682009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12069
12070 Adding Neutrino gdbserver.
12071 * configure: Regenerated.
12072 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12073 * configure.srv (i[34567]86-*-nto*): New target.
12074 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12075 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12076 (nto_comctrl) [__QNX__]: New function.
12077 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12078
4424e0c3 120792009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12080
12081 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12082 srv_tgtobj.
12083
912cf4ba
PA
120842009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12085 Pedro Alves <pedro@codesourcery.com>
12086
12087 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12088 don't support CONTEXT_EXTENDED_REGISTERS.
12089 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12090 (the_low_target): Install them.
12091 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12092 failing with ERROR_PIPE_NOT_CONNECTED.
12093
aa5ca48f
DE
120942009-06-30 Doug Evans <dje@google.com>
12095 Pierre Muller <muller@ics.u-strasbg.fr>
12096
12097 Add h/w watchpoint support to x86-linux, win32-i386.
12098 * Makefile.in (SFILES): Add i386-low.c
12099 (i386_low_h): Define.
12100 (i386-low.o): Add dependencies.
12101 (linux-x86-low.o): Add i386-low.h dependency.
12102 (win32-i386-low.o): Ditto.
12103 * i386-low.c: New file.
12104 * i386-low.h: New file.
12105 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12106 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12107 * linux-low.c (linux_add_process): Initialize arch_private.
12108 (linux_remove_process): Free arch_private.
12109 (add_lwp): Initialize arch_private.
12110 (delete_lwp): Free arch_private.
12111 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12112 provided.
12113 * linux-low.h (process_info_private): New member arch_private.
12114 (lwp_info): New member arch_private.
12115 (linux_target_ops): New members new_process, new_thread,
12116 prepare_to_resume.
12117 (ptid_of): New macro.
12118 * linux-x86-low.c: Include stddef.h, i386-low.h.
12119 (arch_process_info): New struct.
12120 (arch_lwp_info): New struct.
12121 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12122 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12123 (i386_dr_low_get_status): New function.
12124 (x86_insert_point, x86_remove_point): New functions.
12125 (x86_stopped_by_watchpoint): New function.
12126 (x86_stopped_data_address): New function.
12127 (x86_linux_new_process, x86_linux_new_thread): New functions.
12128 (x86_linux_prepare_to_resume): New function.
12129 (the_low_target): Add entries for insert_point, remove_point,
12130 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12131 prepare_to_resume.
12132 * server.c (debug_hw_points): New global.
12133 (monitor_show_help): Document set debug-hw-points.
12134 (handle_query): Process "set debug-hw-points".
12135 * server.h (debug_hw_points): Declare.
12136 (paddress): Declare.
12137 * utils.c (NUMCELLS, CELLSIZE): New macros.
12138 (get_sell, xsnprintf, paddress): New functions.
12139 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12140 remove_point, stopped_by_watchpoint, stopped_data_address.
12141 * win32-i386-low.c: Include i386-low.h.
12142 (debug_reg_state): Replaces dr.
12143 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12144 (i386_dr_low_get_status): New function.
12145 (i386_insert_point, i386_remove_point): New functions.
12146 (i386_stopped_by_watchpoint): New function.
12147 (i386_stopped_data_address): New function.
12148 (i386_initial_stuff): Update.
12149 (get_thread_context,set_thread_context,i386_thread_added): Update.
12150 (the_low_target): Add entries for insert_point,
12151 remove_point, stopped_by_watchpoint, stopped_data_address.
12152 * win32-low.c (win32_insert_watchpoint): New function.
12153 (win32_remove_watchpoint): New function.
12154 (win32_stopped_by_watchpoint): New function.
12155 (win32_stopped_data_address): New function.
12156 (win32_target_ops): Add entries for insert_watchpoint,
12157 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12158 * win32-low.h (win32_target_ops): New members insert_point,
12159 remove_point, stopped_by_watchpoint, stopped_data_address.
12160
d993e290
PA
121612009-06-25 Pedro Alves <pedro@codesourcery.com>
12162
12163 * server.c (process_serial_event): Re-return unsupported, not
12164 error, if the type isn't recognized. Re-allow supporting only
12165 insert or remove packets. Also call require_running for
12166 breakpoints. Add missing break statement to default case. Tidy.
12167 * target.h (struct target_ops): Rename insert_watchpoint to
12168 insert_point, and remove_watchpoint to remove_point.
12169
12170 * linux-low.h (struct linux_target_ops): Likewise.
12171 * linux-low.c (linux_insert_watchpoint): Rename to ...
12172 (linux_insert_point): ... this. Adjust.
12173 (linux_remove_watchpoint): Rename to ...
12174 (linux_remove_point): ... this. Adjust.
12175 (linux_target_ops): Adjust.
12176 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12177 (cris_insert_point): ... this.
12178 (cris_remove_watchpoint): Rename to ...
12179 (cris_remove_point): ... this.
12180 (the_low_target): Adjust.
12181
0f54c268
PM
121822009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12183
12184 * server.c (handle_v_kill): Pass signal_pid to
12185 kill_inferior if multi_process is zero.
12186
c6314022
AR
121872009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12188
12189 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12190 * target.h (target_ops): Comment for *_watchpoint to make it clear
12191 the functions can get types '0' and '1'.
12192
4463ce24
AR
121932009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12194
12195 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12196 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12197 * regcache.c (get_regcache): Likewise.
12198 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12199 * win32-low.c (child_fetch_inferior_registers): Remove check for
12200 regno 0.
12201
cf8fd78b
PA
122022009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12203 Pedro Alves <pedro@codesourcery.com>
12204
12205 * target.h (struct target_ops) <supports_multi_process>: New
12206 callback.
12207 (target_supports_multi_process): New.
12208 * server.c (handle_query): Even if GDB reports support, only
12209 enable multi-process if the target also supports it. Report
12210 multi-process support only if the target backend supports it.
12211 * linux-low.c (linux_supports_multi_process): New function.
12212 (linux_target_ops): Install it as target_supports_multi_process
12213 callback.
12214
47c0c975
DE
122152009-05-24 Doug Evans <dje@google.com>
12216
e09875d4
DE
12217 Global renaming of find_thread_pid to find_thread_ptid.
12218 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12219 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12220 All callers updated.
12221
e27d73f6
DE
12222 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12223 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12224 directly.
12225
47c0c975
DE
12226 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12227 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12228 (linux_resume_one_lwp): Ditto.
12229
2acc282a
DE
122302009-05-23 Doug Evans <dje@google.com>
12231
12232 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12233 from struct inferior_list_entry * to struct lwp_info *.
12234 All callers updated.
12235
9f1036c1
DE
122362009-05-13 Doug Evans <dje@google.com>
12237
12238 * linux-x86-low.c: Don't include assert.h.
12239 (x86_siginfo_fixup): Use fatal, not assert.
12240 (x86_arch_setup): Fix comment.
12241
d0722149
DE
122422009-05-12 Doug Evans <dje@google.com>
12243
12244 Biarch support for i386/amd64 gdbserver.
12245 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12246 Add linux-x86-low.c.
12247 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12248 (linux-x86-low.o): Add.
12249 * linux-x86-64-low.c: Delete.
12250 * linux-i386-low.c: Delete.
12251 * linux-x86-low.c: New file.
12252 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12253 linux-x86-low.o.
12254 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12255 linux-x86-low.o.
12256 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12257 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12258 (linux_child_pid_to_exec_file): New function.
12259 (elf_64_header_p, elf_64_file_p): New functions.
12260 (siginfo_fixup): New function.
12261 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12262 give target a chance to convert layout.
12263 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12264 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12265
fdeb2a12
DE
122662009-05-07 Doug Evans <dje@google.com>
12267
12268 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12269 (regsets_store_inferior_registers): Ditto.
12270
a6dbe5df
PA
122712009-05-06 Pedro Alves <pedro@codesourcery.com>
12272
12273 PR server/10048
12274
12275 * linux-low.c (must_set_ptrace_flags): Delete.
12276 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12277 of the global.
12278 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12279 `lwp->must_set_ptrace_flags' instead.
ba42693b 12280 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12281 (linux_wait_1): ... not here.
12282
5091eb23
DE
122832009-04-30 Doug Evans <dje@google.com>
12284
9f767825
DE
12285 * inferiors.c (started_inferior_callback): New function.
12286 (attached_inferior_callback): New function.
12287 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12288 * server.c (print_started_pid, print_attached_pid): New functions.
12289 (detach_or_kill_for_exit): New function.
12290 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12291 * server.h (have_started_inferiors_p): Declare.
12292 (have_attached_inferiors_p): Declare.
12293
5091eb23
DE
12294 * inferiors.c (remove_process): Fix memory leak, free process.
12295 * linux-low.c (linux_remove_process): New function.
12296 (linux_kill): Call it instead of remove_process.
12297 (linux_detach, linux_wait_1): Ditto.
12298
155c8968
PA
122992009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12300
12301 * configure.srv: Add x86 Windows CE target.
12302
7fe519cb
UW
123032009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12304
12305 * inferiors.c (get_thread_process): Make global.
12306 * server.h (get_thread_process): Add prototype.
12307 * thread-db.c (find_one_thread): Use get_thread_process
12308 instead of current_process.
12309 (thread_db_get_tls_address): Do not crash if called when
12310 thread layer is not yet initialized.
12311
5472f405
UW
123122009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12313
12314 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12315 * spu-low.c (current_tid): Rename to ...
12316 (current_ptid): ... this.
12317 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12318 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12319 ptid_get_lwp (current_ptid) instead of current_tid.
12320 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12321 instead of current_tid. Use find_process_pid to verify pid
12322 argument is valid. Pass proper argument to remove_process.
12323 (spu_thread_alive): Compare current_ptid instead of current_tid.
12324 (spu_resume): Likewise.
12325
55ac2b99
PA
123262009-04-02 Pedro Alves <pedro@codesourcery.com>
12327
12328 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12329 variable.
12330
95954743
PA
123312009-04-01 Pedro Alves <pedro@codesourcery.com>
12332
12333 Implement the multiprocess extensions, and add linux multiprocess
12334 support.
12335
12336 * server.h (ULONGEST): Declare.
12337 (struct ptid, ptid_t): New.
12338 (minus_one_ptid, null_ptid): Declare.
12339 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12340 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12341 (struct inferior_list_entry): Change `id' type from unsigned from
12342 to ptid_t.
12343 (struct sym_cache, struct breakpoint, struct
12344 process_info_private): Forward declare.
12345 (struct process_info): Declare.
12346 (current_process): Declare.
12347 (all_processes): Declare.
12348 (initialize_inferiors): Declare.
12349 (add_thread): Adjust to use ptid_t.
12350 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12351 (add_process, remove_process, find_thread_pid): Declare.
12352 (find_inferior_id): Adjust to use ptid_t.
12353 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12354 (multi_process): Declare.
12355 (push_event): Adjust to use ptid_t.
12356 (read_ptid, write_ptid): Declare.
12357 (prepare_resume_reply): Adjust to use ptid_t.
12358 (clear_symbol_cache): Declare.
12359 * inferiors.c (all_processes): New.
12360 (null_ptid, minus_one_ptid): New.
12361 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12362 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12363 (add_thread): Change unsigned long to ptid. Remove gdb_id
12364 parameter. Adjust.
12365 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12366 (gdb_id_to_thread): Rename to ...
12367 (find_thread_pid): ... this. Change unsigned long to ptid.
12368 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12369 (loaded_dll, pull_pid_from_list): Adjust.
12370 (add_process, remove_process, find_process_pid)
12371 (get_thread_process, current_process, initialize_inferiors): New.
12372 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12373 (struct target_waitstatus) <related_pid>: Ditto.
12374 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12375 return type to int.
12376 (struct target_ops) <join>: Add `pid' argument.
12377 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12378 (struct target_ops) <wait>: Add `ptid' field. Change return type
12379 to ptid.
12380 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12381 (mywait): Add `ptid' argument. Change return type to ptid_t.
12382 (target_pid_to_str): Declare.
12383 * target.c (set_desired_inferior): Adjust to use ptids.
12384 (mywait): Add new `ptid' argument. Adjust.
12385 (target_pid_to_str): New.
12386 * mem-break.h (free_all_breakpoints): Declare.
12387 * mem-break.c (breakpoints): Delelete.
12388 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12389 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12390 to use per-process breakpoint list.
12391 (free_all_breakpoints): New.
12392 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12393 (symbol_cache, all_symbols_looked_up): Delete.
12394 (hexchars): New.
12395 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12396 read_ptid): New.
12397 (prepare_resume_reply): Change ptid argument's type from unsigned
12398 long to ptid_t. Adjust. Implement W;process and X;process.
12399 (free_sym_cache, clear_symbol_cache): New.
12400 (look_up_one_symbol): Adjust to per-process symbol cache. *
12401 * server.c (cont_thread, general_thread, step_thread): Change type
12402 to ptid_t.
12403 (attached): Delete.
12404 (multi_process): New.
12405 (last_ptid): Change type to ptid_t.
12406 (struct vstop_notif) <ptid>: Change type to ptid_t.
12407 (queue_stop_reply, push_event): Change `ptid' argument's type to
12408 ptid_t.
12409 (discard_queued_stop_replies): Add `pid' argument.
12410 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12411 changes. Don't reference the `attached' global.
12412 (attach_inferior): Adjust to mywait interface changes.
12413 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12414 features. Handle and report "multiprocess+". Handle
12415 "qAttached:PID".
12416 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12417 changes.
12418 (handle_v_kill): New.
12419 (handle_v_stopped): Adjust to use target_pid_to_str.
12420 (handle_v_requests): Allow multiple attaches and runs when
12421 multiprocess extensions are in effect. Handle "vKill".
12422 (myresume): Adjust to use ptids.
12423 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12424 (handle_status): Adjust to discard_queued_stop_replies interface
12425 change.
12426 (first_thread_of, kill_inferior_callback)
12427 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12428 (main): Call initialize_inferiors. Adjust to use ptids, killing
12429 and detaching from all inferiors. Handle multiprocess packet
12430 variants.
12431 * linux-low.h: Include gdb_proc_service.h.
12432 (struct process_info_private): New.
12433 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12434 <lwpid_of>: Use ptid_get_lwp.
12435 (get_lwp_thread): Adjust.
12436 (struct lwp_info): Add `dead' member.
12437 (find_lwp_pid): Declare.
12438 * linux-low.c (thread_db_active): Delete.
12439 (new_inferior): Adjust comment.
12440 (inferior_pid): Delete.
12441 (linux_add_process): New.
12442 (handle_extended_wait): Adjust.
12443 (add_lwp): Change unsigned long to ptid.
12444 (linux_create_inferior): Add process to processes table. Adjust
12445 to use ptids. Don't set new_inferior here.
12446 (linux_attach_lwp): Rename to ...
12447 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12448 it. Adjust to use ptids.
12449 (linux_attach_lwp): New.
12450 (linux_attach): Add process to processes table. Don't set
12451 new_inferior here.
12452 (struct counter): New.
12453 (second_thread_of_pid_p, last_thread_of_process_p): New.
12454 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12455 multiple processes.
12456 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12457 processes. Remove process from process table.
12458 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12459 to multiple processes.
12460 (any_thread_of): New.
12461 (linux_detach): Add `pid' argument, and handle it. Remove process
12462 from processes table.
12463 (linux_join): Add `pid' argument. Handle it.
12464 (linux_thread_alive): Change unsighed long argument to ptid_t.
12465 Consider dead lwps as not being alive.
12466 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12467 threads we're not interested in.
12468 (same_lwp, find_lwp_pid): New.
12469 (linux_wait_for_lwp): Change `pid' argument's type from int to
12470 ptid_t. Adjust.
12471 (linux_wait_for_event): Rename to ...
12472 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12473 from int to ptid_t. Adjust.
12474 (linux_wait_for_event): New.
12475 (linux_wait_1): Add `ptid' argument. Change return type to
12476 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12477 that exit from the process table.
12478 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12479 Adjust.
12480 (mark_lwp_dead): New.
12481 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12482 stopping all threads, mark its main lwp as dead.
12483 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12484 ptids.
12485 (fetch_register, usr_store_inferior_registers)
12486 (regsets_fetch_inferior_registers)
12487 (regsets_store_inferior_registers, linux_read_memory)
12488 (linux_write_memory): Inline `inferior_pid'.
12489 (linux_look_up_symbols): Adjust to use per-process
12490 `thread_db_active'.
12491 (linux_request_interrupt): Adjust to use ptids.
12492 (linux_read_auxv): Inline `inferior_pid'.
12493 (initialize_low): Don't reference thread_db_active.
12494 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12495 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12496 (ps_getpid): Return the pid of the current inferior.
12497 * thread-db.c (proc_handle, thread_agent): Delete.
12498 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12499 per-process data.
12500 (find_one_thread): Change argument type to ptid_t. Adjust to
12501 per-process data.
12502 (maybe_attach_thread): Adjust to per-process data and ptids.
12503 (thread_db_find_new_threads): Ditto.
12504 (thread_db_init): Ditto.
12505 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12506 processes table. Adjust to use ptids.
12507 (spu_kill, spu_detach): Adjust interface. Remove process from
12508 processes table.
12509 (spu_join, spu_thread_alive): Adjust interface.
12510 (spu_wait): Adjust interface. Remove process from processes
12511 table. Adjust to use ptids.
12512 * win32-low.c (current_inferior_tid): Delete.
12513 (current_inferior_ptid): New.
12514 (debug_event_ptid): New.
12515 (thread_rec): Take a ptid. Adjust.
12516 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12517 (child_delete_thread): Ditto.
12518 (do_initial_child_stuff): Add `attached' argument. Add process to
12519 processes table.
12520 (child_fetch_inferior_registers, child_store_inferior_registers):
12521 Adjust.
12522 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12523 (win32_attach): Pass 1 to do_initial_child_stuff.
12524 (win32_kill): Adjust interface. Remove process from processes
12525 table.
12526 (win32_detach): Ditto.
12527 (win32_join): Adjust interface.
12528 (win32_thread_alive): Take a ptid.
12529 (win32_resume): Adjust to use ptids.
12530 (get_child_debug_event): Ditto.
12531 (win32_wait): Adjust interface. Remove exiting process from
12532 processes table.
12533
bd99dc85
PA
125342009-04-01 Pedro Alves <pedro@codesourcery.com>
12535
12536 Non-stop mode support.
12537
12538 * server.h (non_stop): Declare.
12539 (gdb_client_data, handler_func): Declare.
12540 (delete_file_handler, add_file_handler, start_event_loop):
12541 Declare.
12542 (handle_serial_event, handle_target_event, push_event)
12543 (putpkt_notif): Declare.
12544 * target.h (enum resume_kind): New.
12545 (struct thread_resume): Replace `step' field by `kind' field.
12546 (TARGET_WNOHANG): Define.
12547 (struct target_ops) <wait>: Add `options' argument.
12548 <supports_non_stop, async, start_non_stop>: New fields.
12549 (target_supports_non_stop, target_async): New.
12550 (start_non_stop): Declare.
12551 (mywait): Add `options' argument.
12552 * target.c (mywait): Add `options' argument. Print child exit
12553 notifications here.
12554 (start_non_stop): New.
12555 * server.c (non_stop, own_buf, mem_buf): New globals.
12556 (struct vstop_notif): New.
12557 (notif_queue): New global.
12558 (queue_stop_reply, push_event, discard_queued_stop_replies)
12559 (send_next_stop_reply): New.
12560 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12561 interface changes.
12562 (attach_inferior): In non-stop mode, don't wait for the target
12563 here.
12564 (handle_general_set): Handle QNonStop.
12565 (handle_query): When handling qC, return the current general
12566 thread, instead of the first thread of the list.
12567 (handle_query): If the backend supports non-stop mode, include
12568 QNonStop+ in the qSupported query response.
12569 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12570 and non-stop mode.
12571 (handle_v_attach, handle_v_run): Handle non-stop mode.
12572 (handle_v_stopped): New.
12573 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12574 (myresume): Adjust to use resume_kind. Handle non-stop.
12575 (queue_stop_reply_callback): New.
12576 (handle_status): Handle non-stop mode.
12577 (main): Clear non_stop flag on reconnection. Use the event-loop.
12578 Refactor serial protocol handling from here ...
12579 (process_serial_event): ... to this new function. When GDB
12580 selects any thread, select one here. In non-stop mode, wait until
12581 GDB acks all pending events before exiting.
12582 (handle_serial_event, handle_target_event): New.
12583 * remote-utils.c (remote_open): Install remote_desc in the event
12584 loop.
12585 (remote_close): Remove remote_desc from the event loop.
12586 (putpkt_binary): Rename to...
12587 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12588 (putpkt_binary): New as wrapper around putpkt_binary_1.
12589 (putpkt_notif): New.
12590 (prepare_resume_reply): In non-stop mode, don't change the
12591 general_thread.
12592 * event-loop.c: New.
12593 * Makefile.in (OBJ): Add event-loop.o.
12594 (event-loop.o): New rule.
12595
12596 * linux-low.h (pid_of): Moved here.
12597 (lwpid_of): New.
12598 (get_lwp_thread): Use lwpid_of.
12599 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12600 * linux-low.c (pid_of): Delete.
12601 (inferior_pid): Use lwpid_of.
12602 (linux_event_pipe): New.
12603 (target_is_async_p): New.
12604 (delete_lwp): New.
12605 (handle_extended_wait): Use lwpid_of.
12606 (add_lwp): Don't set lwpid field.
12607 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12608 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12609 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12610 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12611 first. Adjust to linux_wait_for_event interface changes. Use
12612 lwpid_of.
12613 (linux_detach): Don't delete the main lwp here.
12614 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12615 (status_pending_p): Don't consider explicitly suspended lwps.
12616 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12617 pointer. Add OPTIONS argument. Change return type to int. Use
12618 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12619 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12620 pointer. Add status pointer argument. Return a pid instead of a
12621 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12622 changes. In non-stop mode, don't switch to a random thread.
12623 (linux_wait): Rename to...
12624 (linux_wait_1): ... this. Add target_options argument, and handle
12625 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12626 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12627 clean exit and signal exit code. Don't stop all threads in
12628 non-stop mode. In all-stop mode, only stop all threads when
12629 reporting a stop to GDB. Handle explicit thread stop requests.
12630 (async_file_flush, async_file_mark): New.
12631 (linux_wait): New.
12632 (send_sigstop): Use lwpid_of.
12633 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12634 interface changes. In non-stop mode, don't switch to a random
12635 thread.
12636 (linux_resume_one_lwp): Use lwpid_of.
12637 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12638 (linux_resume_one_thread): ... this. Handle resume_stop. In
12639 non-stop mode, don't look for pending flag in all threads.
12640 (resume_status_pending_p): Don't consider explicitly suspended
12641 threads.
12642 (my_waitpid): Reimplement. Emulate __WALL.
12643 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12644 Use lwpid_of.
12645 (sigchld_handler, linux_supports_non_stop, linux_async)
12646 (linux_start_non_stop): New.
12647 (linux_target_ops): Register linux_supports_non_stop, linux_async
12648 and linux_start_non_stop.
12649 (initialize_low): Install SIGCHLD handler.
12650 * thread-db.c (thread_db_create_event, find_one_thread)
12651 (thread_db_get_tls_address): Use lwpid_of.
12652 * win32-low.c (win32_detach): Adjust to use resume_kind.
12653 (win32_wait): Add `options' argument.
12654 * spu-low.c (spu_resume): Adjust to use resume_kind.
12655 (spu_wait): Add `options' argument.
12656
5b1c542e
PA
126572009-04-01 Pedro Alves <pedro@codesourcery.com>
12658
12659 Decouple target code from remote protocol.
12660
12661 * target.h (enum target_waitkind): New.
12662 (struct target_waitstatus): New.
12663 (struct target_ops) <wait>: Return an unsigned long. Take a
12664 target_waitstatus pointer instead of a char pointer.
12665 (mywait): Likewise.
12666 * target.c (mywait): Change prototype to return an unsigned long.
12667 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12668 * server.h (thread_from_wait, old_thread_from_wait): Delete
12669 declarations.
12670 (prepare_resume_reply): Change prototype to take a
12671 target_waitstatus.
12672 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12673 (last_status, last_ptid): New.
12674 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12675 pid instead of a signal.
12676 (attach_inferior): Remove "status" and "signal" parameters.
12677 Adjust.
12678 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12679 not as an address.
12680 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12681 (handle_v_requests, myresume): Remove "status" and "signal"
12682 parameters. Adjust.
12683 (handle_status): New.
12684 (main): Delete local `status'. Adjust.
12685 * remote-utils.c: Include target.h.
12686 (prepare_resume_reply): Change prototype to take a
12687 target_waitstatus. Adjust.
12688
12689 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12690 interface.
12691 * spu-low.c (spu_wait): Adjust.
12692 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12693 Delete.
12694 (win32_wait): Adjust.
12695
2bd7c093
PA
126962009-04-01 Pedro Alves <pedro@codesourcery.com>
12697
12698 * target.h (struct thread_resume): Delete leave_stopped member.
12699 (struct target_ops): Add a `n' argument to the `resume' callback.
12700 * server.c (start_inferior): Adjust.
12701 (handle_v_cont, myresume): Adjust.
12702 * linux-low.c (check_removed_breakpoint): Adjust to resume
12703 interface change, and to removed leave_stopped field.
12704 (resume_ptr): Delete.
12705 (struct thread_resume_array): New.
12706 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12707 resume interface change.
12708 (linux_continue_one_thread, linux_queue_one_thread)
12709 (resume_status_pending_p): Check if the resume field is NULL
12710 instead of checking the leave_stopped member.
12711 (linux_resume): Adjust to the target resume interface change.
12712 * spu-low.c (spu_resume): Adjust to the target resume interface
12713 change.
12714 * win32-low.c (win32_detach, win32_resume): Ditto.
12715
c35fafde
PA
127162009-04-01 Pedro Alves <pedro@codesourcery.com>
12717
12718 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12719 flag.
12720 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12721 pending.
12722 (linux_continue_one_thread): Only preserve the stepping flag if
12723 there's a pending breakpoint.
12724
0a59d50b
PA
127252009-03-31 Pedro Alves <pedro@codesourcery.com>
12726
12727 * server.c (main): After the inferior having exited, call
12728 remote_close before exiting gdbserver.
12729
f04c6d38
TJB
127302009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12731
12732 Fix size of FPSCR in Power 7 processors.
12733 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12734 (PPC_FEATURE_HAS_DFP): New #define.
12735 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12736 size of the FPSCR.
12737
78e5cee6
PA
127382009-03-23 Pedro Alves <pedro@codesourcery.com>
12739
12740 * server.c (handle_query) Whitespace and formatting.
12741
1b3f6016
PA
127422009-03-22 Pedro Alves <pedro@codesourcery.com>
12743
12744 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12745 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12746 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12747 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12748 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12749 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12750 Makefile.in, configure.ac: Fix whitespace throughout.
12751 * configure: Regenerate.
12752
a07b2135
PA
127532009-03-22 Pedro Alves <pedro@codesourcery.com>
12754
12755 * inferiors.c (find_inferior): Make it safe for the callback
12756 function to delete the currently iterated inferior.
12757
67cc2626
PA
127582009-03-22 Pedro Alves <pedro@codesourcery.com>
12759
12760 * Makefile.in (linuw_low_h): Move higher.
12761 (thread-db.o): Depend on $(linux_low_h).
12762
54a0b537
PA
127632009-03-17 Pedro Alves <pedro@codesourcery.com>
12764
12765 Rename "process" to "lwp" throughout.
12766
12767 * linux-low.c (all_processes): Rename to...
12768 (all_lwps): ... this.
12769 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12770 (add_process): Rename to ...
12771 (add_lwp): ... this. Adjust.
12772 (linux_create_inferior): Adjust.
12773 (linux_attach_lwp): Adjust.
12774 (linux_attach): Adjust.
12775 (linux_kill_one_process): Rename to ...
12776 (linux_kill_one_lwp): ... this. Adjust.
12777 (linux_kill): Adjust.
12778 (linux_detach_one_process): Rename to ...
12779 (linux_detach_one_lwp): ... this. Adjust.
12780 (linux_detach): Adjust.
12781 (check_removed_breakpoint): Adjust.
12782 (status_pending_p): Adjust.
12783 (linux_wait_for_process): Rename to ...
12784 (linux_wait_for_lwp): ... this. Adjust.
12785 (linux_wait_for_event): Adjust.
12786 (send_sigstop): Adjust.
12787 (wait_for_sigstop): Adjust.
12788 (stop_all_processes): Rename to ...
12789 (stop_all_lwps): ... this.
12790 (linux_resume_one_process): Rename to ...
12791 (linux_resume_one_lwp): ... this. Adjust.
12792 (linux_set_resume_request, linux_continue_one_thread)
12793 (linux_queue_one_thread, resume_status_pending_p)
12794 (usr_store_inferior_registers, regsets_store_inferior_registers)
12795 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12796 Adjust.
12797 * linux-low.h (get_process): Rename to ...
12798 (get_lwp): ... this. Adjust.
12799 (get_thread_process): Rename to ...
12800 (get_thread_lwp): ... this. Adjust.
12801 (get_process_thread): Rename to ...
12802 (get_lwp_thread): ... this. Adjust.
12803 (struct process_info): Rename to ...
12804 (struct lwp_info): ... this.
12805 (all_processes): Rename to ...
12806 (all_lwps): ... this.
12807 * proc-service.c (ps_lgetregs): Adjust.
12808 * thread-db.c (thread_db_create_event, find_one_thread)
12809 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12810
0b16c5cf
PA
128112009-03-14 Pedro Alves <pedro@codesourcery.com>
12812
12813 * server.c (handle_query): Handle "qAttached".
12814
32de4b9d
NS
128152009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12816
12817 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12818 GPLv3, update license URL.
12819
2aecd87f
DE
128202009-03-01 Doug Evans <dje@google.com>
12821
93efd302 12822 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12823 (server_h): Add gdb_signals.h.
12824 (signals.o): Update.
12825 * server.h (target_signal_from_host,target_signal_to_host_p)
12826 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12827
86b1f9c5
PM
128282009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12829
12830 * remote-utils.c (getpkt): Also generate remote-debug
12831 information if noack_mode is set.
12832
4aa995e1
PA
128332009-02-06 Pedro Alves <pedro@codesourcery.com>
12834
12835 * server.c (handle_query): Report qXfer:siginfo:read and
12836 qXfer:siginfo:write as supported and handle them.
12837 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12838 * linux-low.c (linux_xfer_siginfo): New.
12839 (linux_target_ops): Set it.
12840
62709adf
PA
128412009-01-26 Pedro Alves <pedro@codesourcery.com>
12842
12843 * server.c (gdbserver_usage): Mention --remote-debug.
12844 (main): Accept '--remote-debug' switch.
12845
aef93bd7
DE
128462009-01-18 Doug Evans <dje@google.com>
12847
12848 * regcache.c (new_register_cache): No need to check result of xcalloc.
12849 * server.c (handle_search_memory): Back out calls to xmalloc,
12850 result is checked and error is returned to user upon failure.
12851 (handle_query): Ditto. Add more checks for result of malloc.
12852 (handle_v_cont): Check result of malloc, report error back to
12853 user upon failure.
12854 (handle_v_run): Ditto. Call freeargv.
12855 * server.h (freeargv): Declare.
12856 * utils.c (freeargv): New fn.
12857
54363045
DE
128582009-01-15 Doug Evans <dje@google.com>
12859
f626972c
DE
12860 * gdbreplay.c (perror_with_name): Make arg const char *.
12861 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12862 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12863 * utils.c (perror_with_name): Make arg const char *.
54363045 12864
18aae699
PA
128652009-01-14 Pedro Alves <pedro@codesourcery.com>
12866
12867 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12868 when handling a EXIT_PROCESS_DEBUG_EVENT.
12869
ff703abe
JB
128702009-01-06 Joel Brobecker <brobecker@adacore.com>
12871
12872 * gdbreplay.c (gdbreplay_version): Update copyright year.
12873 * server.c (gdbserver_version): Likewise.
12874
f21cc1a2 128752009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12876
12877 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12878 (handle_extended_wait): Improve comment.
0e21c1ec 12879
bca929d3
DE
128802008-12-13 Doug Evans <dje@google.com>
12881
12882 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12883 * server.h (ATTR_MALLOC): New macro.
12884 (xmalloc,xcalloc,xstrdup): Declare.
12885 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12886 * inferiors.c: Ditto.
12887 * linux-low.c: Ditto.
12888 * mem-break.c: Ditto.
12889 * regcache.c: Ditto.
12890 * remote-utils.c: Ditto.
12891 * server.c: Ditto.
12892 * target.c: Ditto.
12893 * win32-low.c: Ditto.
12894
97438e3f
DE
128952008-12-12 Doug Evans <dje@google.com>
12896
896c7fbb
DE
12897 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12898 in debugging printf.
12899
97438e3f
DE
12900 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12901
e3b886f8
DE
129022008-12-09 Doug Evans <dje@google.com>
12903
12904 * linux-low.h (struct process_info): Delete member tid, unused.
12905 * thread-db.c (find_one_thread): Update.
12906 (maybe_attach_thread): Update.
12907
07e059b5
VP
129082008-12-02 Pedro Alves <pedro@codesourcery.com>
12909
889bf7c5
PA
12910 * target.h (struct target_ops): Add qxfer_osdata member.
12911 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12912 and dirent.h.
12913 (linux_qxfer_osdata): New functions.
12914 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12915 callback.
12916 * server.c (handle_query): Handle "qXfer:osdata:read:".
12917 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12918 (buffer_xml_printf): New functions.
12919 * server.h (struct buffer): New.
12920 (buffer_grow_str, buffer_grow_str0): New macros.
12921 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12922 (buffer_xml_printf): Declare.
07e059b5 12923
4cab47ab
DE
129242008-11-24 Doug Evans <dje@google.com>
12925
12926 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12927
f142445f
DJ
129282008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12929
12930 * server.c (handle_v_run): Always use the supplied argument list.
12931
d0107bb6 129322008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12933
d0107bb6
BW
12934 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12935 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12936
2c4ad781
TJB
129372008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12938
12939 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12940 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12941 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12942 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12943 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12944 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12945 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12946 XML target descriptions.
12947 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12948 when inferior is running on an ISA 2.05 or later processor. Add
12949 special case to return offset for full 64-bit slot of FPSCR when
12950 in 32-bits.
12951
dfb64f85
DJ
129522008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12953
12954 * Makefile.in (SFILES, clean): Added sparc64 files.
12955 (reg-sparc64.o, reg-sparc64.c): New.
12956 * configure.srv (sparc*-*-linux*): New configuration.
12957 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12958 syscall arguments for SPARC.
12959 (regsets_store_inferior_registers): Likewise.
12960 * linux-sparc-low.c: New file.
12961
66b6e1dd
DE
129622008-10-21 Doug Evans <dje@google.com>
12963
12964 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12965 (READLINE_DIR,READLINE_DEP): Delete.
12966 (INTERNAL_CFLAGS): Update.
12967 (LINTFLAGS): Update.
12968
9b710a42
PA
129692008-10-10 Pedro Alves <pedro@codesourcery.com>
12970
12971 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12972 whole argv from the last run, not just argv[0].
12973
5822d809
PA
129742008-09-08 Pedro Alves <pedro@codesourcery.com>
12975
12976 * regcache.c (new_register_cache): Return NULL if the register
12977 cache size isn't known yet.
12978 (free_register_cache): Avoid dereferencing a NULL regcache.
12979
74aac56f
DJ
129802008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12981
12982 * configure.srv: Merge MIPS and MIPS64.
12983
400b20f5
MR
129842008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12985
12986 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12987
677c5bb1
LM
129882008-08-18 Luis Machado <luisgpm@br.ibm.com>
12989
12990 * Makefile.in: Add required vsx dependencies.
12991
12992 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12993 Declare init_registers_powerpc_vsx32l.
12994 Declare init_registers_powerpc_vsx64l.
12995 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12996 (ppc_arch_setup): Check for VSX in hwcap.
12997 (ppc_fill_vsxregset): New function.
12998 (ppc_store_vsxregset): New function.
12999 Add new VSX entry in regset_info target_regsets.
13000
13001 * configure.srv: Add new VSX dependencies.
13002
a6f3e723
SL
130032008-08-12 Pedro Alves <pedro@codesourcery.com>
13004
13005 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13006 (remote_open): Set or clear transport_is_reliable.
13007 (putpkt_binary): Don't expect acks in noack mode.
13008 (getpkt): Don't send ack/nac in noack mode.
13009 * server.c (handle_general_set): Handle QStartNoAckMode.
13010 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13011 qSupported.
13012 (main): Reset noack_mode on every connection.
13013 * server.h (noack_mode): Declare.
13014
a417dc56
RW
130152008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13016
13017 * Makefile.in (GDBREPLAY_OBS): New variable.
13018 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13019
3221518c
UW
130202008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13021 Daniel Jacobowitz <dan@codesourcery.com>
13022
13023 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13024 (usr_store_inferior_registers): Likewise.
13025 (regsets_store_inferior_registers): Likewise.
13026
ec56be1b
PA
130272008-07-31 Rolf Jansen <rj@surtec.com>
13028 Pedro Alves <pedro@codesourcery.com>
13029
13030 * configure.ac: Check for memmem declaration.
13031 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13032 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13033 (disable_packet_qfThreadInfo): Unconditionally compile.
13034 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13035 * configure, config.in: Regenerate.
13036
2fe5e3ff
DE
130372008-07-28 Doug Kwan <dougkwan@google.com>
13038
13039 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13040 (linux_write_memory): Remove declaration of errno.
13041
836acd6d
UW
130422008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13043
13044 * linux-low.c (handle_extended_wait): Do not use "status"
13045 variable uninitialized.
13046
aeba519e
PA
130472008-07-07 Pedro Alves <pedro@codesourcery.com>
13048
13049 * server.c (handle_v_attach): Inhibit reporting dll changes.
13050
db42f210
PA
130512008-06-27 Pedro Alves <pedro@codesourcery.com>
13052
13053 * remote-utils.c (prepare_resume_reply): If requested, don't
13054 output "thread:TID" in the T stop reply.
13055
13056 * server.c (disable_packet_vCont, disable_packet_Tthread)
13057 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13058 (handle_query): If requested, disable support for qC, qfThreadInfo
13059 and qsThreadInfo.
13060 (handle_v_requests): If requested, disable support for vCont.
13061 (gdbserver_show_disableable): New.
13062 (main): Handle --disable-packet and --disable-packet=LIST.
13063
13064 * server.h (disable_packet_vCont, disable_packet_Tthread)
13065 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13066
8e4c5421
CD
130672008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13068
13069 * server.c (gdbserver_usage): Mention --version.
13070
6e23a804
DJ
130712008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13072
13073 * Makefile.in (gdbreplay.o): New rule.
13074
90aa6a40
JM
130752008-06-06 Joseph Myers <joseph@codesourcery.com>
13076
13077 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13078 message, not gdbserver.
13079
c16158bc 130802008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13081 Nathan Sidwell <nathan@codesourcery.com>
13082 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13083
13084 * acinclude.m4: Include ../../config/acx.m4.
13085 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13086 * configure, config.in: Regenerate.
13087 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13088 * server.c (gdbserver_version): Print PKGVERSION.
13089 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13090 (main): Adjust gdbserver_usage calls.
13091 * gdbreplay.c (version, host_name): Add declarations.
13092 (gdbreplay_version, gdbreplay_usage): New.
13093 (main): Accept --version and --help options.
13094
aeb75bf5
DJ
130952008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13096
13097 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13098 (arm_breakpoint_at): Handle Thumb.
13099 (the_low_target): Add comment.
13100
76b233dd
UW
131012008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13102
13103 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13104
08388c79
DE
131052008-05-09 Doug Evans <dje@google.com>
13106
a3c83fae
DE
13107 * server.h (decode_search_memory_packet): Declare.
13108 * remote-utils.c (decode_search_memory_packet): New fn.
13109 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13110 (handle_search_memory): New fn.
13111 (handle_query): Process qSearch:memory packets.
13112
bb9c3d36
UW
131132008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13114
13115 * regcache.c (registers_length): Remove.
13116 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13117 full register packet.
13118 * regcache.h (registers_length): Remove prototype.
13119 * server.h (PBUFSIZ): Define to 16384.
13120
7284e1be
UW
131212008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13122
13123 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13124 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13125 powerpc-64l.o, and powerpc-altivec64l.o.
13126 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13127 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13128 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13129 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13130 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13131 to srv_xmlfiles.
13132
13133 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13134 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13135 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13136 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13137 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13138 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13139 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13140 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13141 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13142 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13143 (clean): Update.
13144
13145 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13146 (init_registers_powerpc_32l): ... this new prototype.
13147 (init_registers_powerpc_32): Remove, replace by ...
13148 (init_registers_powerpc_altivec32l): ... this new prototype.
13149 (init_registers_powerpc_e500): Remove, replace by ...
13150 (init_registers_powerpc_e500l): ... this new prototype.
13151 (init_registers_ppc64): Remove, replace by ...
13152 (init_registers_powerpc_64l): ... this new prototype.
13153 (init_registers_powerpc_64): Remove, replace by ...
13154 (init_registers_powerpc_altivec64l): ... this new prototype.
13155 (ppc_num_regs): Set to 73.
13156 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13157 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13158 (ppc_cannot_store_register): Handle orig_r3 and trap.
13159 (ppc_arch_setup): Update init_registers_... calls.
13160 (ppc_fill_gregset): Handle orig_r3 and trap.
13161
13162 * inferiors.c (clear_inferiors): Reset current_inferior.
13163
fdc59709
PB
131642008-04-23 Paolo Bonzini <bonzini@gnu.org>
13165
889bf7c5
PA
13166 * acinclude.m4: Add override.m4.
13167 * configure: Regenerate.
fdc59709 13168
c9b2f845
UW
131692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13170
13171 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13172 initial call to init_register_ppc64.
13173
550512b8
UW
131742008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13175
43aaf8b6
PA
13176 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13177 single powerpc*-*-linux* case.
550512b8
UW
13178 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13179
b6430ec3
UW
131802008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13181
13182 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13183 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13184 from reg_xmlfiles.
13185 * linux-ppc-low.c: Include <elf.h>.
13186 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13187 (ppc_hwcap): New global variable.
13188 (ppc_regmap): Remove __SPE__ #ifdef sections.
13189 (ppc_regmap_e500): New global variable.
13190 (ppc_cannot_store_register): Update __SPE__ special case.
13191 (ppc_get_hwcap): New function.
13192 (ppc_arch_setup): Use it to determine whether inferior supports
13193 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13194 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13195 Do not access registers if target does not support AltiVec.
13196 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13197 Do not access registers if target does not support SPE.
13198 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13199
52fa2412
UW
132002008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13201
13202 * linux-low.c (disabled_regsets, num_regsets): New.
13203 (use_regsets_p): Delete.
13204 (linux_wait_for_process): Clear disabled_regsets.
13205 (regsets_fetch_inferior_registers): Check and set it.
13206 (regsets_store_inferior_registers): Likewise.
13207 (linux_fetch_registers, linux_store_registers): Do not use
13208 use_regsets_p.
13209 (initialize_low): Allocate disabled_regsets.
13210
e28b3332
DJ
132112008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13212
13213 * Makefile.in (LIBOBJS): New.
13214 (OBS): Use LIBOBJS.
13215 (memmem.o): New rule.
13216 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13217 * configure: Regenerated.
13218
4536995d
UW
132192008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13220
13221 * server.c (handle_query): Never return "unsupported" for
13222 qXfer:features:read queries.
13223
221c031f
UW
132242008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13225
13226 * server.c (get_features_xml): Fix inverted condition.
13227 (handle_query): Always support qXfer:feature:read.
13228
ccd213ac
DJ
132292008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13230
13231 * server.c (wrapper_argv): New.
13232 (start_inferior): Handle wrapper_argv. If set, expect an extra
13233 trap.
13234 (gdbserver_usage): Document --wrapper.
13235 (main): Parse --wrapper.
13236
6fe305f7
UW
132372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13238
13239 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13240 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13241 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13242 (ppc_set_pc): Likewise.
13243 (ppc_arch_setup): New function.
13244 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13245 of collect_register.
889bf7c5 13246 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13247
5b0a002e
UW
132482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13249
13250 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13251 instead of linux-ppc64-low.o.
13252 * linux-ppc64-low.c: Remove file.
13253 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13254 (linux-ppc64-low.o): Remove rule.
13255
13256 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13257 (init_registers_powerpc_64): Likewise.
13258 (ppc_regmap): Conditionally define depending on __powerpc64__.
13259 (ppc_cannot_store_register): Do not special-case "fpscr" when
13260 compiled on __powerpc64__.
13261 (ppc_collect_ptrace_register): New function.
13262 (ppc_supply_ptrace_register): New function.
13263 (ppc_breakpoint): Change type to "unsigned int".
13264 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13265 (the_low_target): Conditionally provide initializers for the
889bf7c5 13266 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13267 collect_ptrace_register and supply_ptrace_register members.
13268
9b4b61c8
UW
132692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13270
13271 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13272 * server.c (gdbserver_xmltarget): Define.
13273 (get_features_xml): Use it to replace "target.xml" and arch_string.
13274
13275 * configure.srv: Remove srv_xmltarget. Add XML files that were
13276 mentioned there to srv_xmlfiles instead. Remove conditional tests
13277 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13278 srv_xmlfiles and srv_regobj to include all possible choices.
13279 * configure.ac (srv_xmltarget): Remove.
13280 (srv_xmlfiles): Do not add "target.xml".
13281 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13282 checks for supplementary target information.
13283 * configure: Regenerate.
13284 * Makefile.in (XML_TARGET): Remove.
13285 (target.xml): Remove rule.
13286 (clean): Do not clean up target.xml.
13287 (.PRECIOUS): Do not mention target.xml.
13288
13289 * target.h (struct target_ops): Remove arch_string member.
13290 * linux-low.c (linux_arch_string): Remove.
13291 (linux_target_ops): Remove arch_string initializer.
13292 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13293 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13294 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13295 * spu-low.c (spu_arch_string): Remove.
13296 (spu_target_ops): Remove arch_string initializer.
13297 * win32-low.c (win32_arch_string): Remove.
13298 (win32_target_ops): Remove arch_string initializer.
13299 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13300 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13301 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13302
ee1a7ae4
UW
133032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13304
13305 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13306 by collect_ptrace_register and supply_ptrace_register hooks.
13307 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13308 instead of checking for the_low_target.left_pad_xfer.
13309 (usr_store_inferior_registers): Use collect_ptrace_register callback
13310 instead of checking for the_low_target.left_pad_xfer.
13311
13312 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13313 (s390_supply_ptrace_register): Likewise.
13314 (s390_fill_gregset): Call s390_collect_ptrace_register.
13315 (the_low_target): Update.
13316
13317 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13318 (ppc_supply_ptrace_register): Likewise.
13319 (the_low_target): Update.
13320
13321 * linux-i386-low.c (the_low_target): Update.
13322 * linux-x86-64-low.c (the_low_target): Update.
13323
d61ddec4
UW
133242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13325
13326 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13327 reg-s390.o and reg-s390x.o.
13328
13329 * linux-low.c (new_inferior): New global variable.
13330 (linux_create_inferior, linux_attach): Set it.
13331 (linux_wait_for_process): Call the_low_target.arch_setup after the
13332 target has stopped for the first time.
13333 (initialize_low): Do not call the_low_target.arch_setup.
13334
13335 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13336 (s390_set_pc): Likewise.
13337 (s390_arch_setup): New function.
13338 (the_low_target): Use s390_arch_setup as arch_setup routine.
13339
13340 * regcache.c (realloc_register_cache): New function.
13341 (set_register_cache): Call it for each existing regcache.
13342
d05b4ac3
UW
133432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13344
13345 * server.h (init_registers): Remove prototype.
13346
13347 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13348 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13349 instead of init_registers ().
13350 * linux-arm-low.c (init_registers_arm): Add prototype.
13351 (init_registers_arm_with_iwmmxt): Likewise.
13352 (the_low_target): Add initializer for arch_setup field.
13353 * linux-cris-low.c (init_registers_cris): Add prototype.
13354 (the_low_target): Add initializer for arch_setup field.
13355 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13356 (the_low_target): Add initializer for arch_setup field.
13357 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13358 (the_low_target): Add initializer for arch_setup field.
13359 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13360 (the_low_target): Add initializer for arch_setup field.
13361 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13362 (the_low_target): Add initializer for arch_setup field.
13363 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13364 (the_low_target): Add initializer for arch_setup field.
13365 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13366 (init_registers_mips64_linux): Likewise.
13367 (the_low_target): Add initializer for arch_setup field.
13368 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13369 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13370 (the_low_target): Add initializer for arch_setup field.
13371 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13372 (init_registers_powerpc_64): Likewise.
13373 (the_low_target): Add initializer for arch_setup field.
13374 * linux-s390-low.c (init_registers_s390): Add prototype.
13375 (init_registers_s390x): Likewise.
13376 (the_low_target): Add initializer for arch_setup field.
13377 * linux-sh-low.c (init_registers_sh): Add prototype.
13378 (the_low_target): Add initializer for arch_setup field.
13379 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13380 (the_low_target): Add initializer for arch_setup field.
13381 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13382 (the_low_target): Add initializer for arch_setup field.
13383
13384 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13385 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13386 instead of init_registers ().
13387 * win32-arm-low.c (init_registers_arm): Add prototype.
13388 (the_low_target): Add initializer for arch_setup field.
13389 * win32-i386-low.c (init_registers_i386): Add prototype.
13390 (the_low_target): Add initializer for arch_setup field.
13391
13392 * spu-low.c (init_registers_spu): Add prototype.
13393 (initialize_low): Call initialie_registers_spu () instead of
13394 initialize_registers ().
13395
fd96d250
PA
133962008-02-19 Pedro Alves <pedro@codesourcery.com>
13397
13398 * server.c (handle_v_requests): When handling the vRun and vAttach
13399 packets, if already debugging a process, don't kill it. Return an
13400 error instead.
13401
d41b6bb4
DJ
134022008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13403
13404 * server.c (handle_query): Correct length check.
13405
5ac588cf
PA
134062008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13407
13408 * win32-low.c (do_initial_child_stuff): Add process handle
13409 parameter. Set current_process_handle and current_process_id from the
13410 parameters. Clear globals.
13411 (win32_create_inferior): Don't set current_process_handle and
13412 current_process_id here. Instead pass them on the call to
13413 do_initial_child_stuff.
13414 (win32_attach): Likewise.
13415 (win32_clear_inferiors): New.
13416 (win32_kill): Don't close the current process handle or the
13417 current thread handle here. Instead call win32_clear_inferiors.
13418 (win32_detach): Don't open a new handle to the process. Call
13419 win32_clear_inferiors.
13420 (win32_join): Don't rely on current_process_handle; open a new
13421 handle using the process id.
13422 (win32_wait): Call win32_clear_inferiors when the inferior process
13423 has exited.
13424
ecd7ecbc
DJ
134252008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13426
13427 * server.c (monitor_show_help): Add "exit".
13428
1525d545
MG
134292008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13430
ecd7ecbc 13431 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13432 (clean): Add reg-xtensa.c.
13433 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13434 * configure.srv (xtensa*-*-linux*) New target.
13435 * linux-xtensa-low.c: New.
13436 * xtensa-xtregs.c: New.
1525d545 13437
59a016f0
PA
134382008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13439
13440 * hostio.c: Don't include errno.h.
13441 (errno_to_fileio_errno): Move to hostio-errno.
13442 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13443 error number outputting to the target->hostio_last_error callback.
13444 (hostio_packet_error): Use FILEIO_EINVAL directly.
13445 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13446 calls to hostio_error.
13447 * hostio-errno.c: New.
13448 * server.h (hostio_last_error_from_errno): Declare.
13449 * target.h (target_ops): Add hostio_last_error member.
13450 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13451 as hostio_last_error handler.
889bf7c5 13452 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13453 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13454 (wince_hostio_last_error): New functions.
13455 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13456 as hostio_last_error handler.
13457 (win32_target_ops) [!_WIN32_WCE]: Register
13458 hostio_last_error_from_errno as hostio_last_error handler.
13459 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13460 (hostio-errno.o): New rule.
13461 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13462 * configure.srv (srv_hostio_err_objs): New variable. Default to
13463 hostio-errno.o.
13464 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13465 * configure: Regenerate.
13466
2d717e4f
DJ
134672008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13468
13469 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13470 (linux_kill, linux_detach): Clean up the process list.
13471 * remote-utils.c (remote_open): Improve port number parsing.
13472 (putpkt_binary, input_interrupt): Only send interrupts if the target
13473 is running.
13474 * server.c (extended_protocol): Make static.
13475 (attached): Define earlier.
13476 (exit_requested, response_needed, program_argv): New variables.
13477 (target_running): New.
13478 (start_inferior): Clear attached here.
13479 (attach_inferior): Set attached here.
13480 (require_running): Define.
13481 (handle_query): Use require_running and target_running. Implement
13482 "monitor exit".
13483 (handle_v_attach, handle_v_run): New.
13484 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13485 (gdbserver_usage): Update.
13486 (main): Redo argument parsing. Handle --debug and --multi. Handle
13487 --attach along with other options or after the port. Save
13488 program_argv. Support no initial program. Resynchronize
13489 communication with GDB after an error. Handle "monitor exit".
13490 Use require_running and target_running. Always allow the extended
13491 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13492 restart in extended mode.
13493 * README: Refer to the GDB manual. Update --attach usage.
13494
7407e2de
AS
134952007-12-20 Andreas Schwab <schwab@suse.de>
13496
13497 * linux-low.c (STACK_SIZE): Define.
13498 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13499 (linux_test_for_tracefork): Likewise.
13500
b65d95c5
DJ
135012007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13502
13503 * linux-low.c (linux_wait_for_event): Update messages. Do not
13504 reinsert auto-delete breakpoints.
13505 * mem-break.c (struct breakpoint): Change return type of handler to
13506 int.
13507 (set_breakpoint_at): Update handler type.
13508 (reinsert_breakpoint_handler): Return 1 instead of calling
13509 delete_breakpoint.
13510 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13511 setting a new one.
13512 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13513 * mem-break.h (set_breakpoint_at): Update handler type.
13514 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13515 * win32-low.c (auto_delete_breakpoint): New.
13516 (get_child_debug_event): Use it.
13517
4e799345
DJ
135182007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13519
13520 * configure.ac: Check for pread and pwrite.
13521 * hostio.c (handle_pread): Fall back to lseek and read.
13522 (handle_pwrite): Fall back to lseek and write.
13523 * config.in, configure: Regenerated.
13524
27524b67
DJ
135252007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13526
13527 * server.c (myresume): Add own_buf argument.
13528 (main): Update calls.
13529
a20d5e98
DJ
135302007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13531
13532 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13533 * remote-utils.c (remote_open): Do not call disable_async_io.
13534 (block_async_io): Delete.
13535 (unblock_async_io): Make static.
13536 (initialize_async_io): New.
13537 * server.c (handle_v_cont): Handle async I/O here.
13538 (myresume): Likewise. Move other common resume tasks here...
13539 (main): ... from here. Call initialize_async_io. Disable async
13540 I/O before the main loop.
13541 * server.h (initialize_async_io): Declare.
13542 (block_async_io, unblock_async_io): Delete prototypes.
13543 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13544
b79d787e
DJ
135452007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13546
13547 * remote-utils.c (readchar): Allow binary data in received messages.
13548
d97903b2
PA
135492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13550
13551 * win32-low.c (attaching): New global.
13552 (win32_create_inferior): Clear the `attaching' global.
13553 (win32_attach): Set the `attaching' global.
13554 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13555 attaching. Only set a breakpoint at the entry point if not
13556 attaching.
13557
311de423
PA
135582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13559
13560 * server.c (main): Don't report dll events on the initial
13561 connection on attaches.
13562
6c2d16d2
PA
135632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13564
13565 * server.c (main): Relax numerical bases supported for the pid of
13566 the --attach command line argument.
13567
5ca906e6
PA
135682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13569
13570 * win32-low.c (win32_attach): Call OpenProcess before
13571 DebugActiveProcess, not after. Add last error output to error
13572 call.
13573
9c6c8194
PA
135742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13575
13576 * win32-low.c (win32_get_thread_context)
13577 (win32_set_thread_context): New functions.
13578 (thread_rec): Use win32_get_thread_context.
13579 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13580 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13581 field.
13582
4d5d1aaa
PA
135832007-12-03 Leo Zayas
13584 Pedro Alves <pedro_alves@portugalmail.pt>
13585
13586 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13587 global variables.
13588 (child_add_thread): Minor cleanup.
13589 (child_continue): Resume artificially suspended threads before
13590 calling ContinueDebugEvent.
13591 (suspend_one_thread): New.
13592 (fake_breakpoint_event): New.
13593 (get_child_debug_event): Change return type to int. Check here if
13594 gdb sent an interrupt request. If a soft interrupt was requested,
13595 fake a breakpoint event. Return 0 if there is no event to handle,
13596 and 1 otherwise.
13597 (win32_wait): Don't check here if gdb sent an interrupt request.
13598 Ensure there is a valid event to handle.
13599 (win32_request_interrupt): Add soft interruption method as last
13600 resort.
13601
c436e841
PA
136022007-12-03 Leo Zayas
13603 Pedro Alves <pedro_alves@portugalmail.pt>
13604
13605 * win32-low.h (win32_thread_info): Add descriptions to the
13606 structure members. Replace `suspend_count' counter by a
13607 `suspended' flag.
13608 * win32-low.c (thread_rec): Update condition of when to get the
13609 context from the inferior. Rely on ContextFlags being set if it
13610 has already been retrieved. Only suspend the inferior thread if
13611 we haven't already. Warn if that fails.
13612 (continue_one_thread): s/suspend_count/suspended/. Only call
13613 ResumeThread once. Warn if that fails.
13614
e7b5fa67
PA
136152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13616
13617 * win32-low.c (win32_wait): Don't read from the inferior when it
13618 has already exited.
13619
a385171d
PA
136202007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13621
13622 * Makefile.in (win32_low_h): New variable.
13623 (win32-low.o): Add dependency on $(win32_low_h).
13624 (win32-arm-low.o, win32-i386-low.o): New rules.
13625
f80c84b3
DJ
136262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13627
13628 * hostio.c: Correct copyright year.
13629
a6b151f1
DJ
136302007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13631
13632 * Makefile.in (OBS): Add hostio.o.
13633 (hostio.o): New rule.
13634 * server.h (handle_vFile): Declare.
13635 * hostio.c: New file.
13636 * server.c (handle_v_requests): Take packet_len and new_packet_len
13637 for binary packets. Call handle_vFile.
13638 (main): Update call to handle_v_requests.
13639
f9387fc3
DJ
136402007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * linux-low.c: Include <sched.h>.
13643
51c2684e
DJ
136442007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13645
13646 * linux-low.c (linux_tracefork_grandchild): New.
13647 (linux_tracefork_child): Use clone.
13648 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13649
75f83163
JB
136502007-10-31 Joel Brobecker <brobecker@adacore.com>
13651
13652 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13653
da5898ce
DJ
136542007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13655
13656 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13657
24a09b5f
DJ
136582007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * inferiors.c (change_inferior_id): Delete.
13661 (add_pid_to_list, pull_pid_from_list): New.
13662 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13663 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13664 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13665 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13666 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13667 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13668 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13669 (using_threads): Always set to 1.
13670 (handle_extended_wait): New.
13671 (add_process): Do not set TID.
13672 (linux_create_inferior): Set must_set_ptrace_flags.
13673 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13674 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13675 (linux_thread_alive): Rename TID argument to LWPID.
13676 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13677 (linux_wait_for_event): Do not use TID or check using_threads. Update
13678 call to dead_thread_notify. Call handle_extended_wait.
13679 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13680 (send_sigstop): Delete sigstop_sent.
13681 (wait_for_sigstop): Avoid TID.
13682 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13683 (linux_test_for_tracefork): New.
13684 (linux_lookup_signals): Use thread_db_active and
13685 linux_supports_tracefork_flag.
13686 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13687 * linux-low.h (get_process_thread): Avoid TID.
13688 (struct process_ifo): Move thread_known and tid to the end. Remove
13689 sigstop_sent.
13690 (linux_attach_lwp, thread_db_init): Update prototypes.
13691 * server.h (change_inferior_id): Delete prototype.
13692 (add_pid_to_list, pull_pid_from_list): New prototypes.
13693 * thread-db.c (thread_db_use_events): New.
13694 (find_first_thread): Rename to...
13695 (find_one_thread): ...this. Update callers and messages. Do not
13696 call fatal. Check thread_db_use_events. Do not call
13697 change_inferior_id or new_thread_notify.
13698 (maybe_attach_thread): Update. Do not call new_thread_notify.
13699 (thread_db_init): Set thread_db_use_events. Check use_events.
13700 * utils.c (fatal, warning): Correct message prefix.
13701
30ed0a8f
DJ
137022007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13703
13704 * Makefile.in (clean): Remove new files.
13705 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13706 (powerpc-64.o, powerpc-64.c): New rules.
13707 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13708 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13709 with SPE.
13710 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13711 SPE targets.
13712 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13713 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13714 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13715 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13716 (target_regsets): Add AltiVec and SPE register sets.
13717 * configure.ac: Check for AltiVec and SPE.
13718 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13719 (ppc_fill_vrregset, ppc_store_vrregset): New.
13720 (target_regsets): Add AltiVec register set.
13721 * configure: Regenerated.
13722
fd462a61
DJ
137232007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * linux-low.c (O_LARGEFILE): Define.
13726 (linux_read_memory): Use /proc/PID/mem.
13727 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13728 * configure, config.in: Regenerated.
13729
69f223ed
DJ
137302007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13731
13732 * linux-low.c (linux_wait_for_event): Do not pass signals while
13733 single-stepping.
13734
aec18585
PA
137352007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13736
13737 * win32-low.c (create_process): New.
13738 (win32_create_inferior): Use create_process instead of
13739 CreateProcess. If create_process failed retry appending an ".exe"
13740 suffix. Store the GetLastError result immediatelly after
13741 create_process calls and use it on the call to error.
13742
34d86ddd
PA
137432007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13744
13745 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13746
5a0e3bd0
JB
137472007-08-23 Joel Brobecker <brobecker@adacore.com>
13748
13749 * configure.ac: Switch license to GPLv3.
13750
f88c79e6
MS
137512007-08-01 Michael Snyder <msnyder@access-company.com>
13752
13753 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13754
6b3d9b83
PA
137552007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13756
13757 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13758 typedef.
13759 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13760 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13761 CloseToolhelp32Snapshot.
13762 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13763 CloseToolhelp32Snapshot.
13764
c588c53c
MS
137652007-07-27 Michael Snyder <michael.snyder@access-company.com>
13766
13767 * server.c (main): Check for inferior exit before main loop.
13768
aa0403d9
PA
137692007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13770
13771 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13772 instead of on tmp_desc.
13773
255e7678
DJ
137742007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13775 Daniel Jacobowitz <dan@codesourcery.com>
13776
13777 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13778 (add_thread): Minor cleanups.
13779 (clear_inferiors): Move lower in the file. Clear the DLL
13780 list.
13781 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13782 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13783 (xml_escape_text): New.
13784 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13785 for qSupported.
13786 (handle_v_cont): Report errors.
13787 (gdbserver_version): Update.
13788 (main): Correct size of own_buf. Do not report initial DLL events.
13789 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13790 (unloaded_dll, xml_escape_text): New.
13791 * win32-low.c (enum target_waitkind): Update comments.
13792 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13793 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13794 (win32_EnumProcessModules, win32_GetModuleInformation)
13795 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13796 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13797 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13798 (win32_Module32First, win32_Module32Next, load_toolhelp)
13799 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13800 (get_child_debug_event): Handle DLL events.
13801 (win32_wait): Likewise.
13802
0d37add9
DJ
138032007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13806 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13807
45e2715e
PA
138082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13809
13810 * win32-low.c (handle_output_debug_string): Ignore event if not
13811 waiting.
13812
c5674cf1
PA
138132007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13814
13815 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13816
2bbe3cc1
DJ
138172007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13818
13819 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13820
ae13219e
DJ
138212007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13822
13823 * inferiors.c (change_inferior_id): Add comment.
13824 * linux-low.c (check_removed_breakpoint): Add an early
13825 prototype. Improve debug output.
13826 (linux_attach): Doc update.
13827 (linux_detach_one_process, linux_detach): Clean up before releasing
13828 each process.
13829 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13830 * linux-low.h (struct process_info): Doc improvement.
13831 * mem-break.c (delete_all_breakpoints): New.
13832 * mem-break.h (delete_all_breakpoints): New prototype.
13833 * thread-db.c (find_first_thread): New.
13834 (thread_db_create_event): Call it instead of
13835 thread_db_find_new_threads. Clean up unused variables.
13836 (maybe_attach_thread): Remove first thread handling.
13837 (thread_db_find_new_threads): Use find_first_thread.
13838 (thread_db_get_tls_address): Likewise.
13839
4105de34
DJ
138402007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13841
13842 * thread-db.c (thread_db_find_new_threads): Add prototype.
13843 (thread_db_create_event): Check for the main thread before adding
13844 a new thread.
13845 (maybe_attach_thread): Only enable event reporting if TID == 0.
13846 (thread_db_get_tls_address): Check for new threads.
13847
2b876972
DJ
138482007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13849
13850 * linux-low.c (linux_create_inferior): Try execv before execvp.
13851 * spu-low.c (spu_create_inferior): Likewise.
13852
7a245884
DJ
138532007-06-13 Mike Frysinger <vapier@gentoo.org>
13854
13855 * linux-low.c (linux_create_inferior): Change execv to execvp.
13856 * spu-low.c (spu_create_inferior): Likewies.
13857
117ce543
DJ
138582007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13859
13860 * Makefile.in (clean): Clean new files instead of deleted ones.
13861 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13862 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13863 rules.
13864 * configure.srv: Specify XML files and new regformats for MIPS and
13865 MIPS64 GNU/Linux.
13866 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13867 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13868 an entry for the restart register.
13869 (mips_cannot_fetch_register, mips_cannot_store_register)
13870 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13871 register names to match the XML descriptions.
13872 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13873 restart register instead of $0.
13874
0e7f50da
UW
138752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13876 Markus Deuling <deuling@de.ibm.com>
13877
13878 * remote-utils.c (decode_xfer_write): New function.
13879 * server.h (decode_xfer_write): Add prototype.
13880 * server.c (handle_query): Add PACKET_LEN argument. Support
13881 qXfer:spu:read and qXfer:spu:write packets.
13882 (main): Pass packet_len to handle_query.
13883 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13884 * target.h (target_ops): Add qxfer_spu.
13885
374c1d38
UW
138862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13887
13888 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13889 accessing non-seekable spufs files.
13890
bb63802a
UW
138912007-05-16 Markus Deuling <deuling@de.ibm.com>
13892
889bf7c5 13893 * server.c (handle_query): Add reply for qC packet.
bb63802a 13894
7390519e
PA
138952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13896 Leo Zayas <lerele@champenstudios@com>
13897
13898 * server.h (check_remote_input_interrupt_request): New function.
13899 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13900 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13901 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13902 (check_remote_input_interrupt_request): New function.
13903 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13904 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13905 winapi_GenerateConsoleCtrlEvent): New typedefs.
13906 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13907 to 250 ms.
13908 (win32_wait): Check for remote interrupt request
13909 with check_remote_input_interrupt_request.
13910 (win32_request_interrupt): New function.
13911 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13912
34b34921
PA
139132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13914
13915 * win32-low.c (debug_registers_changed,
13916 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13917 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13918 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13919 (thread_rec): Get context using the low target.
13920 (child_add_thread): Call thread_added on the low target,
13921 which does the same thing.
13922 (regptr): Delete.
13923 (do_initial_child_stuff): Remove debug registers references.
13924 Set context using the low target. Resume threads after
13925 setting the contexts.
13926 (child_continue): Remove dead variable. Remove debug
13927 registers references.
13928 (child_fetch_inferior_registers): Go through the low target.
13929 (do_child_store_inferior_registers): Remove.
13930 (child_store_inferior_registers): Go through the low target.
13931 (win32_resume): Remove debug registers references.
13932 Set context using the low target.
13933 (handle_exception): Change return type to void. Don't record
13934 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13935 first chance exception.
889bf7c5 13936 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13937 goto loop. Always return after waiting for debug event.
13938 (win32_wait): Convert to switch statement. Handle spurious
13939 events.
13940
13941 * win32-i386-low.c (debug_registers_changed,
13942 debug_registers_used): New.
13943 (initial_stuff): Rename to ...
13944 (i386_initial_stuff): ... this. Clear debug registers
13945 state variables.
13946 (store_debug_registers): Delete.
13947 (i386_get_thread_context): New.
13948 (load_debug_registers): Delete.
13949 (i386_set_thread_context): New.
13950 (i386_thread_added): New.
13951 (single_step): Rename to ...
13952 (i386_single_step): ... this.
13953 (do_fetch_inferior_registers): Rename to ...
13954 (i386_fetch_inferior_register): ... this.
13955 (i386_store_inferior_register): New.
13956 (the_low_target): Adapt to new interface.
13957
13958 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13959 (arm_get_thread_context): New.
13960 (arm_set_thread_context): New.
13961 (regptr): New.
13962 (do_fetch_inferior_registers): Rename to ...
13963 (arm_fetch_inferior_register): ... this.
13964 (arm_store_inferior_register): New.
13965 (arm_wince_breakpoint): Reimplement as unsigned long.
13966 (arm_wince_breakpoint_len): Define.
13967 (the_low_target): Adapt to new interface.
13968
13969 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13970 load_debug_registers. Add get_thread_context, set_thread_context,
13971 thread_added and store_inferior_register. Rename
13972 fetch_inferior_registers to fetch_inferior_register.
13973 (regptr): Remove declaration.
13974
dd6953e1
PA
139752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13976
13977 * linux-low.c (linux_detach): Change return type to int. Return 0.
13978 * spu-low.c (spu_detach): Likewise.
13979
444d6139
PA
139802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13981
13982 * target.h (target_ops): Change return type of detach to int.
13983 Add join.
13984 (join_inferior): New.
13985 * server.c (main): Don't skip detach support on mingw32.
13986 If the inferior doesn't support detaching return error.
13987 Call join_inferior instead of using waitpid.
13988 * linux-low.c (linux_join): New.
13989 (linux_target_op): Add linux_join.
13990 * spu-low.c (spu_join): New.
13991 (spu_target_ops): Add spu_join.
13992 * win32-low.c (win32_detach): Adapt to new interface.
13993 Reopen current_process_handle before detaching. Issue a child
13994 resume before detaching.
13995 (win32_join): New.
13996 (win32_target_op): Add win32_join.
13997
1d5315fe
PA
139982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13999
14000 * win32-low.c (win32-attach): Fix return value.
14001 * target.h (target_ops): Describe ATTACH return values.
14002
bf914831
PA
140032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14004
14005 * win32-low.c (GETPROCADDRESS): Define.
14006 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14007 (winapi_DebugSetProcessKillOnExit): Likewise.
14008 (win32_create_inferior): Force usage of ansi CreateProcessA.
14009 (win32_attach): Use GETPROCADDRESS.
14010 (win32_detach): Likewise.
14011
f72f3e60
PA
140122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14013
14014 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14015
ed50f18f
PA
140162007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14017
14018 * win32-low.c: Commit leftover changes from 2007-03-29.
14019
0c2ead7e
DJ
140202007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14021
14022 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14023 fields short instead of int. Add explicit padding.
14024 (i387_cache_to_fsave): Remove unnecessary casts.
14025 (i387_fsave_to_cache): Doc fix.
14026 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14027
73725ff3
DJ
140282007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14031 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14032
d99f33d8
PA
140332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14034
14035 * configure.srv (arm*-*-mingw32ce*): Move near the other
14036 arm targets.
14037
68070c10
PA
140382007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14039
2482afc6 14040 * configure.ac: Add errno checking.
68070c10
PA
14041 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14042 sys/file.h and malloc.h.
14043 (AC_CHECK_DECLS): Add perror.
14044 (srv_mingwce): Handle.
2482afc6 14045 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14046 win32-i386-low.o to srv_tgtobj.
14047 (i[34567]86-*-mingw*): Likewise.
14048 (arm*-*-mingw32ce*): Add case.
14049 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14050 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14051 [__MINGW32CE__] (strerror): New function.
14052 [__MINGW32CE__] (errno): Define to GetLastError.
14053 [__MINGW32CE__] (COUNTOF): New macro.
14054 (remote_open): Remove extra close call.
14055 * mem-break.c (delete_breakpoint_at): New function.
14056 * mem-break.h (delete_breakpoint_at): Declare.
14057 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14058 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14059 [USE_WIN32API] (read, write): Add char* casts.
14060 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14061 * server.h: Include wincecompat.h on Windows CE.
14062 [HAVE_ERRNO_H]: Check.
14063 (perror): Declare if not declared.
14064 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14065 (perror_with_name): Remove errno declaration.
14066 * wincecompat.h: New.
14067 * wincecompat.c: New.
14068 * win32-low.h: New.
14069 * win32-arm-low.c: New.
14070 * win32-i386-low.c: New.
14071 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14072 (OUTMSG2): Make it safe.
14073 (_T): New macro.
14074 (COUNTOF): New macro.
14075 (NUM_REGS): Get it from the low target.
14076 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14077 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14078 (thread_rec): Let low target handle debug registers.
14079 (child_add_thread): Likewise.
14080 (child_init_thread_list): Likewise.
14081 (continue_one_thread): Likewise.
14082 (regptr): New.
14083 (do_child_fetch_inferior_registers): Move to ...
14084 * win32-i386-low.c: ... here, and rename to ...
14085 (do_fetch_inferior_registers): ... this.
889bf7c5 14086 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14087 Go through the low target.
14088 (do_child_store_inferior_registers): Use regptr.
14089 (strwinerror): New function.
14090 (win32_create_inferior): Handle Windows CE.
14091 Use strwinerror instead of strerror on Windows error
14092 codes. Add program to the error output.
14093 Don't close the main thread handle on Windows CE.
14094 (win32_attach): Use coredll.dll on Windows CE.
14095 (win32_kill): Close current process and current
14096 thread handles.
14097 (win32_detach): Use coredll.dll on Windows CE.
14098 (win32_resume): Let low target handle debug registers, and
14099 step request.
14100 (handle_exception): Add/Remove initial breakpoint. Avoid
14101 non-existant WSTOPSIG on Windows CE.
14102 (win32_read_inferior_memory): Cast to remove warning.
14103 (win32_arch_string): Go through the low target.
14104 (initialize_low): Call set_breakpoint_data with the low
14105 target's breakpoint.
14106 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14107 FOP_REGNUM, mappings): Move to ...
14108 * win32-i386-low.c: ... here.
14109 * win32-low.c (win32_thread_info): Move to ...
14110 * win32-low.h: ... here.
14111 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14112 win32-arm-low.c and wincecompat.c.
14113 (all:): Add $EXEEXT.
14114 (install-only:): Likewise.
14115 (gdbserver:): Likewise.
14116 (gdbreplay:): Likewise.
14117 * config.in: Regenerate.
14118 * configure: Regenerate.
14119
41093d81
PA
141202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14121
14122 * win32-low.c: Rename typedef thread_info to
14123 win32_thread_info throughout.
14124
544afa54
PA
141252007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14126
14127 * win32-i386-low.c: Rename to ...
14128 * win32-low.c: ... this.
14129 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14130 * Makefile.in: Likewise.
14131
bce7165d
PA
141322007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14133
14134 * remote-utils.c (monitor_output): Constify msg parameter.
14135 * server.h (monitor_output): Likewise.
14136 * win32-i386-low.c (handle_output_debug_string): New.
14137 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14138 handle_output_debug_string.
14139 (get_child_debug_event): Likewise.
14140
506c7aa0
DJ
141412007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14142
14143 * server.c (main): Correct strtoul check.
14144
42c81e2a
DJ
141452007-03-27 Jon Ringle <jon@ringle.org>
14146
14147 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14148
9453113a
DJ
141492007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14150
14151 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14152
64a69107
DJ
141532007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14154
14155 * terminal.h: Check HAVE_SGTTY_H.
14156
141572007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14158
14159 * remote-utils.c (remote_open): Print out the assigned port number.
14160
c74d0ad8
DJ
141612007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * remote-utils.c (monitor_output): New function.
14164 * server.c (debug_threads): Define here.
14165 (monitor_show_help): New function.
14166 (handle_query): Handle qRcmd.
14167 (main): Do not handle 'd' packet.
14168 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14169 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14170 of debug_threads.
14171
de7c3b4a
PA
141722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * Makefile.in (EXEEXT): New.
14175 (clean): Use $(EXEEXT).
14176
ef57601b
PA
141772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14178
14179 * target.h (target_ops): Rename send_signal to request_interrupt,
14180 and remove enum target_signal parameter.
14181 * linux-low.c (linux_request_interrupt): Rename from
14182 linux_send_signal, and always send SIGINT.
14183 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14184 and always send SIGINT.
14185 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14186 of send_signal.
14187 (input_interrupt): Likewise.
14188
820f2bda
PA
141892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14190
14191 * server.c (get_features_xml): Check if target implemented
14192 arch_string.
14193 * win32-i386-low.c (win32_arch_string): New.
14194 (win32_target_ops): Add win32_arch_string as arch_string member.
14195
ab39bf24
UW
141962007-02-22 Markus Deuling <deuling@de.ibm.com>
14197
14198 * spu-low.c (spu_arch_string): New.
14199 (spu_target_ops): Add spu_arch_string.
14200
61ff6e04
DJ
142012007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14202
14203 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14204 * configure.ac: Do not check for terminal.h.
14205 * configure, config.in: Regenerated.
14206
fb1e4ffc
DJ
142072007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14208
14209 * Makefile.in (OBS): Add $(XML_BUILTIN).
14210 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14211 (clean): Update.
14212 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14213 (arm-with-iwmmxt.c): New.
14214 * config.in, configure: Regenerate.
14215 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14216 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14217 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14218 (arm*-*-linux*): Add iWMMXt and regset support.
14219 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14220 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14221 (arm_store_wmmxregset, target_regsets): New.
14222 * server.c (get_features_xml): Take annex argument. Check builtin
14223 XML documents.
14224 (handle_query): Handle multiple annexes.
14225
0f48aa01
DJ
142262007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * remote-utils.c [USE_WIN32API] (read, write): Define.
14229 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14230 write.
14231
23181151
DJ
142322007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14233
14234 * linux-i386-low.c (the_low_target): Set arch_string.
14235 * linux-x86-64-low.c (the_low_target): Likewise.
14236 * linux-low.c (linux_arch_string): New.
14237 (linux_target_ops): Add it.
14238 * linux-low.h (struct linux_target_ops): Add arch_string.
14239 * server.c (write_qxfer_response): Use const void * for DATA.
14240 (get_features_xml): New.
14241 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14242 * target.h (struct target_ops): Add arch_string method.
14243
9d606399
DJ
142442007-01-03 Denis Pilat <denis.pilat@st.com>
14245 Daniel Jacobowitz <dan@codesourcery.com>
14246
14247 * linux-low.c (linux_kill): Handle being called with no threads.
14248 * win32-i386-low.c (win32_kill): Likewise.
14249 (get_child_debug_event): Clear current_process_handle.
14250
142512006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14252 Daniel Jacobowitz <dan@codesourcery.com>
14253
14254 * remote-utils.c (remote_open): Check the type of specified
14255 serial port devices before opening them.
14256 * server.c (main): Kill the inferior if an error occurs during
14257 the first remote_open.
14258
a5e13d24
DJ
142592006-12-05 Markus Deuling <deuling@de.ibm.com>
14260
14261 * README: Update supported targets.
14262
186947f7
DJ
142632006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14264
14265 * Makefile.in (clean): Remove reg-mips64.c.
14266 (reg-mips64.c, reg-mips64.o): New rules.
14267 * configure.srv: Handle mips64. Include regset support for mips.
14268 * linux-mips-low.c (union mips_register): New.
14269 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14270 (mips_breakpoint, mips_breakpoint_at): Use int.
14271 (mips_collect_register, mips_supply_register)
14272 (mips_collect_register_32bit, mips_supply_register_32bit)
14273 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14274 (mips_store_fpregset, target_regsets): New.
14275 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14276
a13e2c95
UW
142772006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14278
14279 * configure.srv: Add target "spu*-*-*".
14280 * Makefile.in (clean): Remove reg-spu.c.
14281 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14282 * spu-low.c: New file.
14283
cb7283db
DJ
142842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14285
14286 * configure.ac: Correct td_thr_tls_get_addr test.
14287 * configure: Regenerated.
14288
89be2091
DJ
142892006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14290
14291 * linux-low.c (linux_wait_for_event): Reformat. Use the
14292 pass_signals array.
14293 * remote-utils.c (decode_address_to_semicolon): New.
14294 * server.c (pass_signals, handle_general_set): New.
14295 (handle_query): Mention QPassSignals for qSupported.
14296 (main): Call handle_general_set.
14297 * server.h (pass_signals, decode_address_to_semicolon): New.
14298
000ef4f0
DJ
142992006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14300
14301 * server.c (handle_query): Correct error handling for read_auxv.
14302
b7149293
UW
143032005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14304
14305 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14306 and srv_linux_thread_db to yes.
14307 * linux-s390-low.c (s390_fill_gregset): New function.
14308 (target_regsets): Define data structure.
14309
dae5f5cf
DJ
143102006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14311
14312 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14313 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14314 * config.in, configure: Regenerated.
14315 * inferiors.c (gdb_id_to_thread): New function.
14316 (gdb_id_to_thread_id): Use it.
14317 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14318 * linux-low.h (struct process_info): Add th member.
14319 (thread_db_get_tls_address): New prototype.
14320 * remote-utils.c (decode_address): Make non-static.
14321 * server.c (handle_query): Handle qGetTLSAddr.
14322 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14323 * target.h (struct target_ops): Add get_tls_address.
14324 * thread-db.c (maybe_attach_thread): Save the thread handle.
14325 (thread_db_get_tls_address): New.
14326
32ca6d61
DJ
143272006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14328
14329 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14330 (linux_resume_one_process): Take a siginfo_t *. Update all
14331 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14332 (struct pending_signals): Add a siginfo_t.
14333 (linux_wait_for_process): Always set last_status.
14334 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14335 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14336 * linux-low.h (struct process_info): Add last_status.
14337
5ffff7c1
DJ
143382006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14339
14340 * remote-utils.c (try_rle): New function.
14341 (putpkt_binary): Use it.
14342
8695c747
DJ
143432006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14346 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14347 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14348 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14349 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14350 point registers.
14351
290fadea
RS
143522006-08-08 Richard Sandiford <richard@codesourcery.com>
14353
14354 * server.c (terminal_fd): New variable.
14355 (old_foreground_pgrp): Likewise.
14356 (restore_old_foreground_pgrp): New function.
14357 (start_inferior): Record the terminal file descriptor in terminal_fd
14358 and its original foreground group in old_foreground_pgrp. Register
14359 restore_old_foreground_pgrp with atexit().
14360
9f2e1e63
DJ
143612006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * server.c (handle_query): Correct qPart to qXfer.
14364
b80864fb
DJ
143652006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * configure.ac: Check for more headers which are missing on
14368 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14369 * configure.srv: Add Cygwin and mingw32.
14370 * remote-utils.c: Don't include headers unconditionally which
14371 are missing on mingw32. Include <winsock.h> for mingw32.
14372 (remote_open): Adjust for mingw32 support. Flush
14373 standard error after writing to it.
14374 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14375 (unblock_async_io, enable_async_io, disable_async_io)
14376 (readchar, getpkt): Update for Winsock support.
14377 (prepare_resume_reply): Expect a protocol signal number.
14378 * server.c: Disable <sys/wait.h> on mingw32.
14379 (start_inferior): Adjust for mingw32 support. Flush
14380 standard error after writing to it.
14381 (attach_inferior): Likewise. Use protocol signal
14382 numbers.
14383 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14384 and names.
14385 * win32-i386-low.c: New file.
14386 * Makefile.in (XM_CLIBS): Set.
14387 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14388 (win32-i386-low.o): New dependency rule.
14389 * linux-low.c (linux_wait): Use target signal numbers.
14390 * target.h (struct target_ops): Doc fix.
14391 * server.h (target_signal_to_name): New prototype.
14392 * gdbreplay.c: Don't include headers unconditionally which
14393 are missing on mingw32. Include <winsock.h> for mingw32.
14394 (remote_close, remote_open): Adjust for Winsock support.
14395 * configure, config.in: Regenerated.
14396
0876f84a
DJ
143972006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14398
14399 * server.c (decode_xfer_read, write_qxfer_response): New.
14400 (handle_query): Take a packet length argument. Handle
14401 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14402 the qSupported response.
14403 (main): Update call to handle_query.
14404
01f9e8fa
DJ
144052006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14406
14407 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14408 (putpkt_binary): Renamed from putpkt and adjusted for binary
14409 data.
14410 (putpkt): New wrapper for putpkt_binary.
14411 (readchar): Don't mask off the high bit.
14412 (decode_X_packet): New function.
14413 * server.c (main): Call putpkt_binary if a handler sets the packet
14414 length. Save the length of the incoming packet. Handle 'X'.
14415 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14416
be2a5f71
DJ
144172006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * server.c (handle_query): Handle qSupported.
14420
ea025f5f
DJ
144212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * remote-utils.c (all_symbols_looked_up): New variable.
14424 (look_up_one_symbol): Check it.
14425 * server.h (look_up_one_symbol): New declaration.
14426 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14427
9308fc88
DJ
144282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14429
14430 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14431 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14432 (PTRACE_GET_THREAD_AREA): Define.
14433 (ps_get_thread_area): New function.
14434
52fb6437
NS
144352006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14436
14437 * configure.srv (m68k*-*-uclinux*): New target.
14438 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14439 (linux_resume_one_process): Remove extraneous cast.
14440 (linux_read_offsets): New.
14441 (linux_target_op): Add linux_read_offsets on mmuless systems.
14442 * server.c (handle_query): Add qOffsets logic.
14443 * target.h (struct target_ops): Add read_offsets.
14444
21b0f40c
DJ
144452006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14446
14447 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14448 (PTRACE_GET_THREAD_AREA): Define.
14449 (ps_get_thread_area): New function.
14450 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14451 (linux-x86-64-low.o): Update.
14452
0050a760
DJ
144532006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14454
14455 * configure.ac: Remove checks for prfpregset_t.
14456 * gdb_proc_service.h: New file.
14457 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14458 new "gdb_proc_service.h".
14459 * proc-service.c: Likewise.
14460 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14461 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14462 * Makefile.in (gdb_proc_service_h): Updated.
14463 * configure, config.in: Regenerated.
14464
b92a518e
DJ
144652006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14466
14467 * remote-utils.c (prepare_resume_reply): Move declaration
14468 of gdb_id_from_wait to the top of the block.
14469
545587ee
DJ
144702006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14471
14472 * linux-low.c (regsets_store_inferior_registers): Read the regset
14473 from the target before filling it.
14474
9db87ebd
DJ
144752006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14476
14477 * server.c (attach_inferior): Return SIGTRAP for a successful
14478 attach.
14479
dd24457d
DJ
144802006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * Makefile.in (OBS): Add version.o.
14483 (STAGESTUFF): Delete.
14484 (version.o): Add dependencies.
14485 (version.c): Replace rule.
14486 (clean): Remove version.c.
14487 * server.c (gdbserver_version): New.
14488 (gdbserver_usage): Use printf.
14489 (main): Handle --version and --help.
14490 * server.h (version, host_name): Add declarations.
14491
6f0f660e
EZ
144922005-12-23 Eli Zaretskii <eliz@gnu.org>
14493
889bf7c5
PA
14494 * linux-arm-low.c:
14495 * linux-arm-low.c:
14496 * inferiors.c:
14497 * i387-fp.h:
14498 * i387-fp.c:
14499 * gdbreplay.c:
14500 * regcache.c:
14501 * proc-service.c:
14502 * mem-break.h:
14503 * mem-break.c:
14504 * linux-x86-64-low.c:
14505 * linux-sh-low.c:
14506 * linux-s390-low.c:
14507 * linux-ppc64-low.c:
14508 * linux-ppc-low.c:
14509 * linux-mips-low.c:
14510 * linux-m68k-low.c:
14511 * linux-m32r-low.c:
14512 * linux-low.h:
14513 * linux-low.c:
14514 * linux-ia64-low.c:
14515 * linux-i386-low.c:
14516 * linux-crisv32-low.c:
14517 * thread-db.c:
14518 * terminal.h:
14519 * target.h:
14520 * target.c:
14521 * server.h:
14522 * server.c:
14523 * remote-utils.c:
14524 * regcache.h:
14525 * utils.c:
14526 * Makefile.in:
14527 * configure.ac:
6f0f660e
EZ
14528 * gdbserver.1: Add (C) after Copyright. Update the FSF
14529 address.
14530
9d1fb177
DJ
145312005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14532
14533 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14534 (arm_breakpoint_at): Recognize both breakpoints.
14535 (the_low_target): Use the correct breakpoint instruction.
14536
011a70c2
DJ
145372005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14538
14539 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14540 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14541 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14542 (the_low_target): Update.
14543
7fb85e41
AS
145442005-10-25 Andreas Schwab <schwab@suse.de>
14545
14546 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14547
14548 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14549 (ia64_num_regs): Reduce to 462.
14550
3db0444b
DJ
145512005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14552
14553 * acinclude.m4: Correct quoting.
14554 * aclocal.m4: Regenerated.
14555
14556 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14557 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14558 (thread_db_init): Call thread_db_err_str.
14559 * configure.ac: Check for TD_VERSION.
14560 * config.in, configure: Regenerated.
14561
bee0189a
DJ
145622005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14563
14564 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14565
e9d25b98
DJ
145662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14567
14568 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14569 is not available. Define HAVE_PTRACE_GETREGS if it is.
14570 * config.in, configure: Regenerated.
14571 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14572 * linux-i386-low.c, linux-m68k-low.c: Update to use
14573 HAVE_PTRACE_GETREGS.
14574 * linux-low.c (regsets_fetch_inferior_registers)
14575 (regsets_store_inferior_registers): Only return 0 if we processed
14576 GENERAL_REGS.
14577 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14578 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14579
a06660f7
DJ
145802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14581
14582 * inferiors.c (struct thread_info): Add gdb_id.
14583 (add_thread): Add gdb_id argument.
14584 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14585 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14586 calls to add_thread.
14587 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14588 * server.c (handle_query): Use thread_to_gdb_id.
14589 (handle_v_cont, main): Use gdb_id_to_thread_id.
14590 * server.h (add_thread): Update prototype.
14591 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14592 prototypes.
14593
5a1f5858
DJ
145942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14595
14596 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14597 left-padded registers.
14598 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14599 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14600
e122f1f5
SE
146012005-07-01 Steve Ellcey <sje@cup.hp.com>
14602
14603 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14604 * configure: Regenerate.
14605 * config.in: Regenerate.
14606 * server.h (NEED_DECLARATION_STRERROR):
14607 Replace with !HAVE_DECL_STRERROR.
14608
d592fa2f
DJ
146092005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14610
14611 * linux-low.c (linux_wait, linux_send_signal): Don't test
14612 an unsigned long variable for > 0 if it could be MAX_ULONG.
14613 * server.c (myresume): Likewise.
14614 * target.c (set_desired_inferior): Likewise.
14615
ccbd4912
MK
146162005-06-13 Mark Kettenis <kettenis@gnu.org>
14617
14618 * configure.ac: Simplify and improve check for socklen_t.
14619 * configure, config.in: Regenerate.
14620
f450004a
DJ
146212005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14622
14623 * acconfig.h: Remove.
14624 * configure.ac: Add a test for socklen_t. Use three-argument
14625 AC_DEFINE throughout.
14626 * config.in: Regenerated using autoheader 2.59.
14627 * configure: Regenerated.
14628
14629 * gdbreplay.c (socklen_t): Provide a default.
14630 (remote_open): Use socklen_t.
14631 * remote-utils.c (socklen_t): Provide a default.
14632 (remote_open): Use socklen_t.
14633 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14634 unsigned char.
14635
14636 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14637 char for buffers.
14638 * linux-low.c (linux_read_memory, linux_write_memory)
14639 (linux_read_auxv): Likewise.
14640 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14641 (check_mem_write): Likewise.
14642 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14643 Likewise.
14644 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14645 (registers_from_string, register_data): Likewise.
14646 * server.c (handle_query, main): Likewise.
14647 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14648 (decode_M_packet): Likewise.
14649 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14650 * target.h (struct target_ops): Update read_memory, write_memory,
14651 and read_auxv.
14652 (read_inferior_memory, write_inferior_memory): Update.
14653 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14654 to unsigned char *.
14655 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14656 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14657 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14658 linux-s390-low.c, linux-sh-low.c: Update for changes in
14659 read_inferior_memory and the_low_target->breakpoint.
14660
eee84df1
DJ
146612005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14664 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14665 * configure.srv: Add powerpc64-*-linux*.
14666 * linux-ppc64-low.c: New file.
14667
45b134e5
OF
146682005-05-23 Orjan Friberg <orjanf@axis.com>
14669
14670 * linux-cris-low.c: New file with support for CRIS.
14671 * linux-crisv32-low.c: Ditto for CRISv32.
14672 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14673 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14674 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14675 reg-crisv32.o, and reg-crisv32.c to make rules.
14676 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14677 recognized targets.
14678
48d93c75
UW
146792005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14680
14681 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14682 of sizeof (PTRACE_XFER_TYPE).
14683 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14684
e013ee27
OF
146852005-05-12 Orjan Friberg <orjanf@axis.com>
14686
889bf7c5 14687 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14688 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14689 pointers for hardware watchpoint support.
14690 * linux-low.h (struct linux_target_ops): Ditto.
14691 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14692 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14693 to linux_target_ops.
14694 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14695 reply packet.
14696 * server.c (main): Recognize 'Z' and 'z' packets.
14697
b0ded00b
UW
146982005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14699
14700 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14701 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14702 (the_low_target): Add new members.
14703
8643e2ad
DJ
147042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * proc-service.c (ps_lgetregs): Search all_processes instead of
14707 all_threads.
14708
fc620387
DJ
147092005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * server.c (start_inferior): Change return type to int.
14712 (attach_inferior): Change sigptr to int *.
14713 (handle_v_cont, handle_v_requests): Change signal to int *.
14714 (main): Change signal to int.
14715
147162005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14717
14718 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14719 * configure.srv: Add m32r*-*-linux*.
14720 * linux-m32r-low.c: New file.
14721
e0e76420
DJ
147222005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14723
14724 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14725
a1928bad
DJ
147262005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14727
14728 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14729 Take unsigned long arguments for PIDs.
14730 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14731 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14732 (wait_for_sigstop, linux_resume_one_process)
14733 (regsets_fetch_inferior_registers, linux_send_signal)
14734 (linux_read_auxv): Likewise. Update the types of variables holding
14735 PIDs. Update format string specifiers.
14736 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14737 * remote-utils.c (prepare_resume_reply): Likewise.
14738 * server.c (cont_thread, general_thread, step_thread)
14739 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14740 unsigned long.
14741 (handle_query): Update format specifiers.
14742 (handle_v_cont, main): Use strtoul for thread IDs.
14743 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14744 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14745 (general_thread, step_thread, thread_from_wait)
14746 (old_thread_from_wait): Update.
14747 * target.h (struct thread_resume): Use unsigned long for THREAD.
14748 (struct target_ops): Use unsigned long for arguments to attach and
14749 thread_alive.
14750
dcdb98d2
DJ
147512005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14752
14753 * acinclude.m4: Include bfd/bfd.m4 directly.
14754 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14755 <agriffis@toolchain.org>.
14756 * aclocal.m4, configure: Regenerated.
14757
bec39cab
AC
147582005-01-07 Andrew Cagney <cagney@gnu.org>
14759
14760 * configure.ac: Rename configure.in, require autoconf 2.59.
14761 * configure: Re-generate.
14762
434c4c77
DJ
147632004-12-08 Daniel Jacobowitz <dan@debian.org>
14764
14765 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14766 LIBS when finished.
14767 * aclocal.m4: Regenerated.
14768 * configure: Regenerated.
14769
db1d3e1b
AS
147702004-11-21 Andreas Schwab <schwab@suse.de>
14771
14772 * linux-m68k-low.c (m68k_num_gregs): Define.
14773 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14774 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14775 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14776 (m68k_breakpoint_at): New. Add to the_low_target.
14777
14778 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14779 srv_linux_thread_db to yes.
14780
43360365
JB
147812004-10-20 Joel Brobecker <brobecker@gnat.com>
14782
14783 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14784 (ARCH_SET_FS): Likewise.
14785 (ARCH_GET_FS): Likewise.
14786 (ARCH_GET_GS): Likewise.
14787
fd500816
DJ
147882004-10-16 Daniel Jacobowitz <dan@debian.org>
14789
14790 * linux-i386-low.c (ps_get_thread_area): New.
14791 * linux-x86-64-low.c (ps_get_thread_area): New.
14792 * linux-low.c: Include <sys/syscall.h>.
14793 (linux_kill_one_process): Don't kill the first thread here.
14794 (linux_kill): Kill the first thread here.
14795 (kill_lwp): New function.
14796 (send_sigstop, linux_send_signal): Use it.
14797 * proc-service.c: Clean up #ifdefs.
14798 (fpregset_info): Delete.
14799 (ps_lgetregs): Update and enable implementation.
14800 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14801 implementations.
14802 * remote-utils.c (struct sym_cache, symbol_cache): New.
14803 (input_interrupt): Print a clearer message.
14804 (async_io_enabled): New variable.
14805 (enable_async_io, disable_async_io): Use it. Update comments.
14806 (look_up_one_symbol): Use the symbol cache.
14807 * thread-db.c (thread_db_look_up_symbols): New function.
14808 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14809
f6de3c42
DJ
148102004-10-16 Daniel Jacobowitz <dan@debian.org>
14811
14812 * configure.in: Test for -rdynamic.
14813 * configure: Regenerated.
14814 * Makefile (INTERNAL_LDFLAGS): New.
14815 (gdbserver, gdbreplay): Use it.
14816
2c0fc042
AC
148172004-09-02 Andrew Cagney <cagney@gnu.org>
14818
14819 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14820
075b3282
DJ
148212004-03-23 Daniel Jacobowitz <drow@mvista.com>
14822
14823 * linux-low.c (linux_wait): Clear all_processes list also.
14824
fa6a77dc
DJ
148252004-03-12 Daniel Jacobowitz <drow@mvista.com>
14826
14827 * linux-low.c: Include <errno.h>. Remove extern declaration of
14828 errno.
14829
6d782a97
DJ
148302004-03-12 Daniel Jacobowitz <drow@mvista.com>
14831
14832 * gdbreplay.c, server.h, utils.c: Update copyright years.
14833
3a7fb99b
DJ
148342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14835
14836 * server.c (main): Print child status or termination signal from
14837 variable 'signal', not 'sig'.
14838
c3e735a6
DJ
148392004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14840
14841 * linux-low.c (linux_read_memory): Change return type to
14842 int. Check for and return error from ptrace().
14843 * target.c (read_inferior_memory): Change return type to int. Pass
14844 back return status from the_target->read_memory().
14845 * target.h (struct target_ops): Adapt *read_memory() prototype.
14846 Update comment.
14847 (read_inferior_memory): Adapt prototype.
14848 * server.c (main): Return an error packet if
14849 read_inferior_memory() returns an error.
14850
a59d1c82
DJ
148512004-03-04 Daniel Jacobowitz <drow@mvista.com>
14852
14853 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14854 Unify with other clean targets.
14855
dc3f8883
DJ
148562004-02-29 Daniel Jacobowitz <drow@mvista.com>
14857
14858 * server.c (handle_v_cont): Call set_desired_inferior.
14859
89a208da
DJ
148602004-02-29 Daniel Jacobowitz <drow@mvista.com>
14861
14862 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14863
62ea82f5
DJ
148642004-02-29 Daniel Jacobowitz <drow@mvista.com>
14865
14866 * linux-low.c (linux_wait): Unblock async I/O.
14867 (linux_resume): Block and enable async I/O.
14868 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14869 * server.h (block_async_io, unblock_async_io): Add prototypes.
14870
6910d122
DJ
148712004-02-29 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * remote-utils.c (remote_open): Print a status notice after
14874 opening a TCP port.
14875 * server.c (attach_inferior): Print a status notice after
14876 attaching.
14877
148782004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14879
14880 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14881
c89dc5d4
DJ
148822004-02-26 Daniel Jacobowitz <drow@mvista.com>
14883
14884 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14885 error packet.
14886 * server.c, target.h: Update copyright years.
14887
4b8dad4a
RM
148882004-02-25 Roland McGrath <roland@redhat.com>
14889
14890 * target.h (struct target_ops): New member `read_auxv'.
14891 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14892 * linux-low.c (linux_read_auxv): New function.
14893 (linux_target_ops): Initialize `read_auxv' member to that.
14894
d7446758
JB
148952004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14896
14897 Committed by Jim Blandy <jimb@redhat.com>.
14898
14899 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14900 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14901 instead of GPR_SIZE to distiguish s390 and s390x targets.
14902
5544ad89
DJ
149032004-01-31 Daniel Jacobowitz <drow@mvista.com>
14904
14905 * linux-low.c: Update copyright year.
14906 (check_removed_breakpoint): Clear pending_is_breakpoint.
14907 (linux_set_resume_request, linux_queue_one_thread)
14908 (resume_status_pending_p): New functions.
14909 (linux_continue_one_thread): Use process->resume.
14910 (linux_resume): Only resume threads if there are no pending events.
14911 * linux-low.h (struct process_info): Add resume request
14912 pointer.
14913
2a68b70e
DJ
149142004-01-30 Daniel Jacobowitz <drow@mvista.com>
14915
14916 * regcache.c (new_register_cache): Clear the allocated register
14917 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14918
64386c31
DJ
149192003-10-13 Daniel Jacobowitz <drow@mvista.com>
14920
14921 * linux-low.c (linux_resume): Take a struct thread_resume *
14922 argument.
14923 (linux_wait): Update call.
14924 (resume_ptr): New static variable.
14925 (linux_continue_one_thread): Renamed from
14926 linux_continue_one_process. Use resume_ptr.
14927 (linux_resume): Use linux_continue_one_thread.
14928 * server.c (handle_v_cont, handle_v_requests): New functions.
14929 (myresume): New function.
14930 (main): Handle 'v' case.
14931 * target.h (struct thread_resume): New type.
14932 (struct target_ops): Change argument of "resume" to struct
14933 thread_resume *.
14934 (myresume): Delete macro.
14935
c938e9b0
L
149362003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14937
14938 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14939 (uninstall): Support DESTDIR.
14940
7f313d07
BC
14941Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14942
14943 * configure.srv: Add xscale*linux copy of arm*linux entry.
14944
3b2fc2ea
DJ
149452003-07-24 Daniel Jacobowitz <drow@mvista.com>
14946
14947 * linux-arm-low.c (arm_reinsert_addr): New function.
14948 (the_low_target): Add arm_reinsert_addr.
14949
1c0a559e
MK
149502003-07-08 Mark Kettenis <kettenis@gnu.org>
14951
14952 * mem-break.c: Remove whitespace at end of file.
14953
43d5792c
DJ
149542003-06-28 Daniel Jacobowitz <drow@mvista.com>
14955
14956 * configure.in: Check whether we need to prototype strerror.
14957 * server.h: Optionally prototype strerror.
14958 * gdbreplay.c (perror_with_name): Use strerror.
14959 * linux-low.c (linux_attach_lwp): Use strerror.
14960 * utils.c (perror_with_name): Use strerror.
14961 * config.in, configure: Regenerated.
14962
c8a86edf
DJ
149632003-06-28 Daniel Jacobowitz <drow@mvista.com>
14964
14965 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14966 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14967
73d37363
DJ
149682003-06-20 Daniel Jacobowitz <drow@mvista.com>
14969
14970 * Makefile.in (SFILES): Update.
14971 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14972 low-sun3.c: Remove files.
14973
6ad8ae5c
DJ
149742003-06-17 Daniel Jacobowitz <drow@mvista.com>
14975
14976 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14977 (linux_detach_one_process, linux_detach): New functions.
14978 (linux_target_ops): Add linux_detach.
14979 * server.c (main): Handle 'D' packet.
14980 * target.h (struct target_ops): Add "detach" member.
14981 (detach_inferior): Define.
14982
1581182a
MK
149832003-06-13 Mark Kettenis <kettenis@gnu.org>
14984
14985 From Kelley Cook <kelleycook@wideopenwest.com>:
14986 * configure.srv: Accept i[34567]86 variants.
14987
e5379b03
DJ
149882003-06-05 Daniel Jacobowitz <drow@mvista.com>
14989
14990 * linux-low.c (linux_wait_for_event): Correct comment typos.
14991 (linux_resume_one_process): Call check_removed_breakpoint.
14992 (linux_send_signal): New function.
14993 (linux_target_ops): Add linux_send_signal.
14994 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14995 of kill.
14996 * target.h (struct target_ops): Add send_signal.
14997
2ff29de4
JB
149982003-05-29 Jim Blandy <jimb@redhat.com>
14999
15000 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15001 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15002 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15003 away part of the register's value.
15004
254787d4
DJ
150052003-03-26 Daniel Jacobowitz <drow@mvista.com>
15006
15007 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15008 (linux_wait_for_event, linux_init_signals): Likewise.
15009
94e10508
DJ
150102003-03-17 Daniel Jacobowitz <drow@mvista.com>
15011
15012 * configure.in: Check for stdlib.h.
15013 * configure: Regenerated.
15014 * config.in: Regenerated.
15015
4c0711e0
DJ
150162003-01-04 Andreas Schwab <schwab@suse.de>
15017
15018 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15019
ef66e766
AC
150202003-01-02 Andrew Cagney <ac131313@redhat.com>
15021
15022 * Makefile.in: Remove obsolete code.
15023
a1358604
DJ
150242002-11-20 Daniel Jacobowitz <drow@mvista.com>
15025
15026 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15027 defined(PT_FPR0_HI).
15028
23ce3b1c
DJ
150292002-11-17 Stuart Hughes <seh@zee2.com>
15030
15031 * linux-arm-low.c (arm_num_regs): Increase.
15032 (arm_regmap): Include status register.
15033
150342002-11-17 Daniel Jacobowitz <drow@mvista.com>
15035
15036 * linux-low.c (register_addr): Remove incorrect -1 check.
15037
a9fa9f7d
DJ
150382002-08-29 Daniel Jacobowitz <drow@mvista.com>
15039
15040 * linux-low.c (linux_create_inferior): Call setpgid. Return
15041 the new PID.
15042 (unstopped_p, linux_signal_pid): Remove.
15043 (linux_target_ops): Remove linux_signal_pid.
15044 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15045 global instead of target method.
15046 * target.h (struct target_ops): Remove signal_pid. Update comment
15047 for create_inferior.
15048 * server.c (signal_pid): New variable.
15049 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15050 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15051 (attach_inferior): Set signal_pid.
15052
17574093
DJ
150532002-08-23 Daniel Jacobowitz <drow@mvista.com>
15054
15055 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15056
150572002-08-20 Jim Blandy <jimb@redhat.com>
15058
15059 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15060 default for this.
15061
150622002-08-01 Andrew Cagney <cagney@redhat.com>
15063
15064 * Makefile.in: Make chill references obsolete.
15065
150662002-07-24 Kevin Buettner <kevinb@redhat.com>
15067
15068 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15069 * configure: Regenerate.
15070 * config.in: Regenerate.
15071
150722002-07-09 David O'Brien <obrien@FreeBSD.org>
15073
15074 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15075 (perror_with_name, remote_close, remote_open, expect, play): Static.
15076
150772002-07-04 Michal Ludvig <mludvig@suse.cz>
15078
4b8dad4a 15079 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15080 byte offsets instead of an array of indexes.
15081 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15082
150832002-06-13 Daniel Jacobowitz <drow@mvista.com>
15084
15085 * regcache.c: Add comment.
15086
150872002-06-11 Daniel Jacobowitz <drow@mvista.com>
15088
15089 * thread-db.c: New file.
15090 * proc-service.c: New file.
15091 * acinclude.m4: New file.
15092 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15093 proc-service.o, and thread-db.o.
15094 (linux-low.o): Add USE_THREAD_DB.
15095 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15096 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15097 * aclocal.m4: Regenerated.
15098 * config.in: Regenerated.
15099 * configure: Regenerated.
15100 * configure.in: Check for proc_service.h, sys/procfs.h,
15101 thread_db.h, and linux/elf.h headrs.
15102 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15103 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15104 Check for -lthread_db and thread support.
15105 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15106 PowerPC, and SuperH.
15107 * i387-fp.c: Constify arguments.
15108 * i387-fp.h: Likewise.
15109 * inferiors.c: (struct thread_info): Renamed from
15110 `struct inferior_info'. Remove PID member. Use generic inferior
15111 list header. All uses updated.
15112 (inferiors, signal_pid): Removed.
15113 (all_threads): New variable.
15114 (get_thread): Define.
15115 (add_inferior_to_list): New function.
15116 (for_each_inferior): New function.
15117 (change_inferior_id): New function.
15118 (add_inferior): Removed.
15119 (remove_inferior): New function.
15120 (add_thread): New function.
15121 (free_one_thread): New function.
15122 (remove_thread): New function.
15123 (clear_inferiors): Use for_each_inferior and free_one_thread.
15124 (find_inferior): New function.
15125 (find_inferior_id): New function.
15126 (inferior_target_data): Update argument type.
15127 (set_inferior_target_data): Likewise.
15128 (inferior_regcache_data): Likewise.
15129 (set_inferior_regcache_data): Likewise.
15130 * linux-low.c (linux_bp_reinsert): Remove.
15131 (all_processes, stopping_threads, using_thrads)
15132 (struct pending_signals, debug_threads, pid_of): New.
15133 (inferior_pid): Replace with macro.
15134 (struct inferior_linux_data): Remove.
15135 (get_stop_pc, add_process): New functions.
15136 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15137 Use add_process and add_thread.
15138 (linux_attach_lwp): New function, based on old linux_attach. Use
15139 add_process and add_thread. Set stop_expected for new threads.
15140 (linux_attach): New function.
15141 (linux_kill_one_process): New function.
15142 (linux_kill): Kill all LWPs.
15143 (linux_thread_alive): Use find_inferior_id.
15144 (check_removed_breakpoints, status_pending_p): New functions.
15145 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15146 Update. Use WNOHANG. Wait for cloned processes also. Update process
15147 struct for the found process.
15148 (linux_wait_for_event): New function.
15149 (linux_wait): Use it. Support LWPs.
15150 (send_sigstop, wait_for_sigstop, stop_all_processes)
15151 (linux_resume_one_process, linux_continue_one_process): New functions.
15152 (linux_resume): Support LWPs.
15153 (REGISTER_RAW_SIZE): Remove.
15154 (fetch_register): Use register_size instead. Call supply_register.
15155 (usr_store_inferior_registers): Likewise. Call collect_register.
15156 Fix recursive case.
15157 (regsets_fetch_inferior_registers): Improve error message.
15158 (regsets_store_inferior_registers): Add debugging.
15159 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15160 (unstopped_p, linux_signal_pid): New functions.
15161 (linux_target_ops): Add linux_signal_pid.
15162 (linux_init_signals): New function.
15163 (initialize_low): Call it. Initialize using_threads.
15164 * regcache.c (inferior_regcache_data): Add valid
15165 flag.
15166 (get_regcache): Fetch registers lazily. Add fetch argument
15167 and update all callers.
15168 (regcache_invalidate_one, regcache_invalidate): New
15169 functions.
15170 (new_register_cache): Renamed from create_register_cache.
15171 Return the new regcache.
15172 (free_register_cache): Change argument to a void *.
15173 (registers_to_string, registers_from_string): Call get_regcache
15174 with fetch flag set.
15175 (register_data): Make static. Pass fetch flag to get_regcache.
15176 (supply_register): Call get_regcache with fetch flag clear.
15177 (collect_register): Call get_regcache with fetch flag set.
15178 (collect_register_as_string): New function.
15179 * regcache.h: Update.
15180 * remote-utils.c (putpkt): Flush after debug output and use
15181 stderr.
15182 Handle input interrupts while waiting for an ACK.
15183 (input_interrupt): Use signal_pid method.
15184 (getpkt): Flush after debug output and use stderr.
15185 (outreg): Use collect_register_as_string.
15186 (new_thread_notify, dead_thread_notify): New functions.
15187 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15188 and general_thread.
15189 (look_up_one_symbol): Flush after debug output.
15190 * server.c (step_thread, server_waiting): New variables.
15191 (start_inferior): Don't use signal_pid. Update call to mywait.
15192 (attach_inferior): Update call to mywait.
15193 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15194 (main): Don't fetch/store registers explicitly. Use
15195 set_desired_inferior. Support proposed ``Hs'' packet. Update
15196 calls to mywait.
15197 * server.h: Update.
15198 (struct inferior_list, struct_inferior_list_entry): New.
15199 * target.c (set_desired_inferior): New.
15200 (write_inferior_memory): Constify.
15201 (mywait): New function.
15202 * target.h: Update.
15203 (struct target_ops): New signal_pid method.
15204 (mywait): Removed macro, added prototype.
15205
15206 * linux-low.h (regset_func): Removed.
15207 (regset_fill_func, regset_store_func): New.
15208 (enum regset_type): New.
15209 (struct regset_info): Add type field. Use new operation types.
15210 (struct linux_target_ops): stop_pc renamed to get_pc.
15211 Add decr_pc_after_break and breakpoint_at.
15212 (get_process, get_thread_proess, get_process_thread)
15213 (strut process_info, all_processes, linux_attach_lwp)
15214 (thread_db_init): New.
15215
15216 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15217 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15218 (the_low_target): Add new members.
15219 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15220 (i386_store_fpxregset): Constify.
15221 (target_regsets): Add new kind identifier.
15222 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15223 (i386_set_pc): Add debugging.
15224 (i386_breakpoint_at): New function.
15225 (the_low_target): Add new members.
15226 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15227 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15228 (mips_breakpoint_at): New.
15229 (the_low_target): Add new members.
15230 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15231 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15232 (the_low_target): Add new members.
15233 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15234 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15235 (the_low_target): Add new members.
15236 * linux-x86-64-low.c (target_regsets): Add new kind
15237 identifier.
15238
152392002-05-15 Daniel Jacobowitz <drow@mvista.com>
15240
15241 From Martin Pool <mbp@samba.org>:
15242 * server.c (gdbserver_usage): New function.
15243 (main): Call it.
15244
152452002-05-14 Daniel Jacobowitz <drow@mvista.com>
15246
15247 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15248 stop_at -> stop_pc.
15249
152502002-05-04 Andrew Cagney <ac131313@redhat.com>
15251
15252 * Makefile.in: Remove obsolete code.
15253
152542002-04-24 Michal Ludvig <mludvig@suse.cz>
15255
15256 * linux-low.c (regsets_fetch_inferior_registers),
15257 (regsets_store_inferior_registers): Removed cast to int from
15258 ptrace() calls.
15259 * regcache.h: Added declaration of struct inferior_info.
15260
152612002-04-20 Daniel Jacobowitz <drow@mvista.com>
15262
15263 * inferiors.c (struct inferior_info): Add regcache_data.
15264 (add_inferior): Call create_register_cache.
15265 (clear_inferiors): Call free_register_cache.
15266 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15267 * regcache.c (struct inferior_regcache_data): New.
15268 (registers): Remove.
15269 (get_regcache): New function.
15270 (create_register_cache, free_register_cache): New functions.
15271 (set_register_cache): Don't initialize the register cache here.
15272 (registers_to_string, registers_from_string, register_data): Call
15273 get_regcache.
15274 * regcache.h: Add prototypes.
15275 * server.h: Likewise.
15276
152772002-04-20 Daniel Jacobowitz <drow@mvista.com>
15278
15279 * mem-break.c: New file.
15280 * mem-break.h: New file.
15281 * Makefile.in: Add mem-break.o rule; update server.h
15282 dependencies.
15283 * inferiors.c (struct inferior_info): Add target_data
15284 member.
15285 (clear_inferiors): Free target_data member if set.
15286 (inferior_target_data, set_inferior_target_data): New functions.
15287 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15288 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15289 * linux-low.c (linux_bp_reinsert): New variable.
15290 (struct inferior_linux_data): New.
15291 (linux_create_inferior): Use set_inferior_target_data.
15292 (linux_attach): Likewise. Call add_inferior.
15293 (linux_wait_for_one_inferior): New function.
15294 (linux_wait): Call it.
15295 (linux_write_memory): Add const.
15296 (initialize_low): Call set_breakpoint_data.
15297 * linux-low.h (struct linux_target_ops): Add breakpoint
15298 handling members.
15299 * server.c (attach_inferior): Remove extra add_inferior
15300 call.
15301 * server.h: Include mem-break.h. Update inferior.c
15302 prototypes.
15303 * target.c (read_inferior_memory)
15304 (write_inferior_memory): New functions.
15305 * target.h (read_inferior_memory)
15306 (write_inferior_memory): Change macros to prototypes.
15307 (struct target_ops): Update comments. Add const to write_memory
15308 definition.
15309
153102002-04-11 Daniel Jacobowitz <drow@mvista.com>
15311
15312 * linux-low.c (usr_store_inferior_registers): Support
15313 registers which are allowed to fail to store.
15314 * linux-low.h (linux_target_ops): Likewise.
15315 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15316 (ppc_cannot_store_register): FPSCR may not be storable.
15317
153182002-04-09 Daniel Jacobowitz <drow@mvista.com>
15319
15320 * server.h: Include <string.h> if HAVE_STRING_H.
15321 * ChangeLog: Correct paths in last ChangeLog entry.
15322
153232002-04-09 Daniel Jacobowitz <drow@mvista.com>
15324
15325 * linux-low.h: Remove obsolete prototypes.
15326 (struct linux_target_ops): New.
15327 (extern the_low_target): New.
15328 * linux-low.c (num_regs, regmap): Remove declarations.
15329 (register_addr): Use the_low_target explicitly.
15330 (fetch_register): Likewise.
15331 (usr_fetch_inferior_registers): Likewise.
15332 (usr_store_inferior_registers): Likewise.
15333 * linux-arm-low.c (num_regs): Remove.
15334 (arm_num_regs): Define.
15335 (arm_regmap): Renamed from regmap, made static.
15336 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15337 made static.
15338 (arm_cannot_store_register): Renamed from cannot_store_register,
15339 made static.
15340 (the_low_target): New.
15341 * linux-i386-low.c (num_regs): Remove.
15342 (i386_num_regs): Define.
15343 (i386_regmap): Renamed from regmap, made static.
15344 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15345 made static.
15346 (i386_cannot_store_register): Renamed from cannot_store_register,
15347 made static.
15348 (the_low_target): New.
15349 * linux-ia64-low.c (num_regs): Remove.
15350 (ia64_num_regs): Define.
15351 (ia64_regmap): Renamed from regmap, made static.
15352 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15353 made static.
15354 (ia64_cannot_store_register): Renamed from cannot_store_register,
15355 made static.
15356 (the_low_target): New.
15357 * linux-m68k-low.c (num_regs): Remove.
15358 (m68k_num_regs): Define.
15359 (m68k_regmap): Renamed from regmap, made static.
15360 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15361 made static.
15362 (m68k_cannot_store_register): Renamed from cannot_store_register,
15363 made static.
15364 (the_low_target): New.
15365 * linux-mips-low.c (num_regs): Remove.
15366 (mips_num_regs): Define.
15367 (mips_regmap): Renamed from regmap, made static.
15368 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15369 made static.
15370 (mips_cannot_store_register): Renamed from cannot_store_register,
15371 made static.
15372 (the_low_target): New.
15373 * linux-ppc-low.c (num_regs): Remove.
15374 (ppc_num_regs): Define.
15375 (ppc_regmap): Renamed from regmap, made static.
15376 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15377 made static.
15378 (ppc_cannot_store_register): Renamed from cannot_store_register,
15379 made static.
15380 (the_low_target): New.
15381 * linux-s390-low.c (num_regs): Remove.
15382 (s390_num_regs): Define.
15383 (s390_regmap): Renamed from regmap, made static.
15384 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15385 made static.
15386 (s390_cannot_store_register): Renamed from cannot_store_register,
15387 made static.
15388 (the_low_target): New.
15389 * linux-sh-low.c (num_regs): Remove.
15390 (sh_num_regs): Define.
15391 (sh_regmap): Renamed from regmap, made static.
15392 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15393 made static.
15394 (sh_cannot_store_register): Renamed from cannot_store_register,
15395 made static.
15396 (the_low_target): New.
15397 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15398 (the_low_target): New.
15399
154002002-04-09 Daniel Jacobowitz <drow@mvista.com>
15401
15402 * Makefile.in: Add stamp-h target.
15403 * configure.in: Create stamp-h.
15404 * configure: Regenerated.
15405
154062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15407
15408 * inferiors.c: New file.
15409 * target.c: New file.
15410 * target.h: New file.
15411 * Makefile.in: Add target.o and inferiors.o. Update
15412 dependencies.
15413 * linux-low.c (inferior_pid): New static variable,
15414 moved from server.c.
15415 (linux_create_inferior): Renamed from create_inferior.
15416 Call add_inferior. Return 0 on success instead of a PID.
15417 (linux_attach): Renamed from myattach.
15418 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15419 (linux_thread_alive): Renamed from mythread_alive.
15420 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15421 child dies.
15422 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15423 (regsets_store_inferior_registers): Correct error message.
15424 Add missing ``return 0''.
15425 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15426 (linux_store_registers): Renamed from store_inferior_registers.
15427 (linux_read_memory): Renamed from read_inferior_memory.
15428 (linux_write_memory): Renamed from write_inferior_memory.
15429 (linux_target_ops): New structure.
15430 (initialize_low): Call set_target_ops ().
15431 * remote-utils.c (unhexify): New function.
15432 (hexify): New function.
15433 (input_interrupt): Send signals to ``signal_pid''.
15434 * server.c (inferior_pid): Remove.
15435 (start_inferior): Update create_inferior call.
15436 (attach_inferior): Call add_inferior.
15437 (handle_query): New function.
15438 (main): Call handle_query for `q' packets.
15439 * server.h: Include "target.h". Remove obsolete prototypes.
15440 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15441
154422002-04-09 Daniel Jacobowitz <drow@mvista.com>
15443
15444 * Makefile.in: Add WARN_CFLAGS. Update configury
15445 dependencies.
15446 * configure.in: Check for <string.h>
15447 * configure: Regenerate.
15448 * config.in: Regenerate.
15449 * gdbreplay.c: Include needed system headers.
15450 (remote_open): Remove strchr prototype.
15451 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15452 * regcache.c (supply_register): Change buf argument to const void *.
15453 (supply_register_by_name): Likewise.
15454 (collect_register): Change buf argument to void *.
15455 (collect_register_by_name): Likewise.
15456 * regcache.h: Add missing prototypes.
15457 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15458 * server.c (handle_query): New function.
15459 (attached): New static variable, moved out of main.
15460 (main): Quiet longjmp clobber warnings.
15461 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15462 * utils.c (error): Remove NORETURN.
15463 (fatal): Likewise.