]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Introduce gdb_tilde_expand
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7da0a886
SDJ
12017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4 (OBS): Add gdb_tilde_expand.o.
5
289a6840
SM
62017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7
8 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
9 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
10
256642e8
PA
112017-09-29 Pedro Alves <palves@redhat.com>
12
13 * ax.c (gdb_parse_agent_expr): Constify.
14 * ax.h (gdb_parse_agent_expr): Constify.
15 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
16 Constify.
17 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
18 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
19 * remote-utils.h (read_ptid): Constify.
20 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
21 (process_point_options, process_serial_event): Constify.
22 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
23 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
24 (cmd_qtbuffer): Constify.
25
5b9ca4d4
PA
262017-09-29 Pedro Alves <palves@redhat.com>
27
28 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
29 fails.
30
94c207e0
PA
312017-09-29 Pedro Alves <palves@redhat.com>
32
33 * linux-low.c (handle_extended_wait): Pass parent thread instead
34 of process to thread_db_notice_clone.
35 * linux-low.h (thread_db_notice_clone): Replace parent process
36 parameter with parent thread parameter.
37 * thread-db.c (find_one_thread): Add comment.
38 (thread_db_notice_clone): Replace parent process parameter with
39 parent thread parameter. Temporarily switch to the parent thread.
40
75352e28
SDJ
412017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
42
43 * gdbthread.h: Include "common-gdbthread.h".
44 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
45 "if" when validating the ptid.
46 * remote-utils.c: Include "gdbthread.h".
47 (prepare_resume_reply): Use "switch_to_thread".
48 * target.c (done_accessing_memory): Likewise.
49
ad339634
AA
502017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
51
52 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
53 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
54 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
55 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
56 s390x-gs-linux64-ipa.o to ipa_obj.
57 * linux-s390-low.c (HWCAP_S390_GS): New define.
58 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
59 New functions.
60 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
61 (s390_arch_setup): Check for guarded-storage support and choose
62 appropriate tdesc.
63 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
64 init_registers_s390x_gs_linux64.
65 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
66 enum value.
67 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
68 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
69
cc4d742f
SM
702017-09-22 Simon Marchi <simon.marchi@ericsson.com>
71
72 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
73
f6327dcb
KB
742017-09-21 Kevin Buettner <kevinb@redhat.com>
75
76 * linux-low.h (struct lwp_info): Add new field, thread_handle.
77 (thread_db_thread_handle): Declare.
78 * linux-low.c (linux_target_ops): Initialize thread_handle.
79 * server.c (handle_qxfer_threads_worker): Add support for
80 "handle" attribute.
81 * target.h (struct target_ops): Add new function pointer,
82 thread_handle.
83 (target_thread_handle): Define.
84 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
85 field in lwp.
86 (thread_db_thread_handle): New function.
87
86299109
KB
882017-09-21 Kevin Buettner <kevinb@redhat.com>
89
90 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
91 * linux-low.h (thread_db_notice_clone): Declare.
92 * thread-db.c (thread_db_notice_clone): New function.
93
f557a88a
PA
942017-09-21 Pedro Alves <palves@redhat.com>
95
96 * server.c (gdb_read_memory, handle_status, process_serial_event)
97 (handle_serial_event, handle_target_event): Adjust to
98 set_desired_thread prototype change.
99 * target.c (set_desired_thread): Remove 'use_general' parameter
100 and adjust.
101 * target.h (set_desired_thread): Remove 'use_general' parameter.
102
223ffa71
TT
1032017-09-20 Tom Tromey <tom@tromey.com>
104
105 * target.c (target_terminal::terminal_state): Define.
106 (target_terminal::init): Rename from target_terminal_init.
107 (target_terminal::inferior): Rename from
108 target_terminal_inferior.
109 (target_terminal::ours): Rename from target_terminal_ours.
110 (target_terminal::ours_for_output, target_terminal::info): New.
111
04fd3ba9
SM
1122017-09-16 Simon Marchi <simon.marchi@ericsson.com>
113
114 * server.c (accumulate_file_name_length): Remove.
115 (emit_dll_description): Adjust to std::string change.
116 (handle_qxfer_libraries): Use std::string to hold document.
117
5e187554
SM
1182017-09-16 Simon Marchi <simon.marchi@ericsson.com>
119
120 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
121 return type of xml_escape_text.
122 * server.c (emit_dll_description): Likewise.
123
1526853e
SM
1242017-09-16 Simon Marchi <simon.marchi@ericsson.com>
125
126 * server.c (captured_main): Accept argument for --selftest.
127 Update run_tests call.
128 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
129 when registering selftests.
130
c4dfafab
SDJ
1312017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
132
133 * regcache.c (get_thread_regcache): Update code to use "std::vector"
134 instead of "VEC" for "target_desc.reg_defs".
135 (regcache_cpy): Likewise.
136 (registers_to_string): Likewise.
137 (registers_from_string): Likewise.
138 (find_regno): Likewise.
139 (supply_regblock): Likewise.
140 (regcache_raw_read_unsigned): Likewise.
141 * tdesc.c (init_target_desc): Likewise.
142 (tdesc_create_reg): Likewise.
143 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
144 (struct target_desc) <reg_defs>: Convert to "std::vector".
145 (target_desc): Do not initialize "reg_defs".
146 (~target_desc): Update code to use "std::vector" instead of "VEC"
147 for "target_desc.reg_defs".
148 (operator==): Likewise.
149
124aceb4
SM
1502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
151
152 * inferiors.h (thread_to_gdb_id): Remove.
153 * inferiors.c (thread_to_gdb_id): Remove.
154 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
155 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
156 lynx_store_registers, lynx_read_memory, lynx_write_memory):
157 Likewise.
158 * nto-low.c (nto_fetch_registers, nto_store_registers,
159 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
160
96cde54f
SM
1612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
162
163 * inferiors.h (gdb_id_to_thread_id): Remove.
164 * inferiors.c (gdb_id_to_thread_id): Remove.
165 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
166 removal. Move pid declaration closer to where it's used.
167
e8ca139e
SM
1682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
169
170 * server.c (handle_detach): New function.
171 (process_serial_event): Move code out, call handle_detach.
172
f8a4e119
SM
1732017-09-15 Simon Marchi <simon.marchi@ericsson.com>
174
175 * server.c (require_running): Rename to ...
176 (require_running_or_return): ... this ...
177 (require_running_or_break): ... and this.
178 (handle_query, process_serial_event): Adjust.
179
0eb0a407
SM
1802017-09-15 Simon Marchi <simon.marchi@ericsson.com>
181
182 * linux-low.c (linux_set_resume_request): Remove unused
183 variables.
184
785922a5
SM
1852017-09-15 Simon Marchi <simon.marchi@ericsson.com>
186
187 * server.c (first_thread_of): Remove.
188 (process_serial_event): Replace usage of first_thread_of with
189 find_any_thread_of_pid.
190 * tracepoint.c (same_process_p): Remove.
191 (gdb_agent_about_to_close): Replace usage of same_process_p with
192 find_any_thread_of_pid.
193 * linux-x86-low.c (same_process_callback): Remove.
194 (x86_arch_setup_process_callback): Replace usage of
195 same_process_callback with find_any_thread_of_pid.
196 * thread-db.c (any_thread_of): Remove.
197 (switch_to_process): Replace usage of any_thread_of with
198 find_any_thread_of_pid.
199 * inferiors.c (thread_pid_matches_callback): Remove.
200 (find_thread_process): Adjust to use find_any_thread_of_pid.
201
a059f00c
SDJ
2022017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
203
204 * regcache.c (get_thread_regcache): Guard calls to "memset"
205 with "!VEC_empty".
206
cc397f3a
SDJ
2072017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
208
209 * linux-low.c (handle_extended_wait): Use
210 "allocate_target_description" instead of "XNEW".
211 * linux-x86-low.c (initialize_low_arch): Likewise.
212
22916b07
YQ
2132017-09-05 Yao Qi <yao.qi@linaro.org>
214
215 * configure.srv (srv_i386_regobj): Remove.
216 (srv_amd64_regobj): Remove.
217 (srv_regobj): Set it to "" for x86 non-linux targets.
218 * linux-x86-tdesc.c (i386_linux_read_description):
219 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
220 (init_registers_i386): Remove the declaration.
221 (tdesc_i386): Remove the declaration.
222 (lynx_i386_arch_setup): Call i386_create_target_description.
223 * nto-x86-low.c: Likewise.
224 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
225 [!__x86_64__]: include arch/i386.h.
226 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
227
38602d55
YQ
2282017-09-05 Yao Qi <yao.qi@linaro.org>
229
230 * configure.srv (srv_amd64_linux_xmlfiles): Remove
231 i386/amd64-XXX-linux from it.
232
44b886ff
YQ
2332017-09-05 Yao Qi <yao.qi@linaro.org>
234
235 * configure.srv: Empty srv_amd64_linux_regobj if $development is
236 false.
237 (ipa_amd64_linux_regobj): Remove.
238 (ipa_x32_linux_regobj): Remove.
239
b4570e4b
YQ
2402017-09-05 Yao Qi <yao.qi@linaro.org>
241
242 * Makefile.in (arch-amd64.o): New rule.
243 * configure.srv: Append arch-amd64.o.
244 * linux-amd64-ipa.c: Include common/x86-xstate.h.
245 (get_ipa_tdesc): Call amd64_linux_read_description.
246 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
247 and init_registers_amd64_XXX.
248 * linux-x86-low.c (x86_linux_read_description): Call
249 amd64_linux_read_description.
250 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
251 (initialize_low_arch): Don't call init_registers_x32_XXX and
252 init_registers_amd64_XXX.
253 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
254 and tdesc_amd64_XXX.
255 [__x86_64__] (amd64_tdesc_test): New function.
256 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
257 and init_registers_amd64_XXX.
258 * linux-x86-tdesc.c: Include arch/amd64.h.
259 (xcr0_to_tdesc_idx): New function.
260 (i386_linux_read_description): New function.
261 (amd64_get_ipa_tdesc_idx): New function.
262 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
263 (amd64_get_ipa_tdesc): Declare.
264
d1f28ea2
YQ
2652017-09-05 Yao Qi <yao.qi@linaro.org>
266
267 * configure.srv (srv_i386_linux_xmlfiles): Remove
268 i386/i386-XXX-linux.xml from it.
269
25a93583
YQ
2702017-09-05 Yao Qi <yao.qi@linaro.org>
271
272 * configure.srv: Set srv_i386_linux_regobj empty if $development
273 is false.
274 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
275 initialize_low_tdesc.
276 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
277 with #if initialize_low_tdesc.
278 * linux-x86-tdesc-selftest.c: New file.
279 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
280
5f035c07
YQ
2812017-09-05 Yao Qi <yao.qi@linaro.org>
282
283 * Makefile.in (arch-i386.o): New rule.
284 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
285 (x86_64-*-linux*): Likewise.
286 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
287 include arch/i386.h.
288 (i386_linux_read_description): Remove code and call
289 i386_create_target_description.
290 * tdesc.c (allocate_target_description): New function.
291 * tdesc.h (set_tdesc_architecture): Remove declaration.
292 (set_tdesc_osabi): Likewise.
293
0abe8a89
YQ
2942017-09-05 Yao Qi <yao.qi@linaro.org>
295
296 * linux-x86-tdesc.c: Don't include <inttypes.h>.
297 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
298 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
299 .xmltarget.
300 * server.c (get_features_xml): Call tdesc_get_features_xml.
301 * tdesc.c (set_tdesc_architecture): New function.
302 (set_tdesc_osabi): New function.
303 (tdesc_get_features_xml): New function.
304 (tdesc_create_feature): Add an argument.
305 * tdesc.h (struct target_desc) <features>: New field.
306 <arch, osabi>: New field.
307 (~target_desc): xfree features, arch, and osabi.
308 (target_desc::oerator==): Don't compare .xmltarget.
309 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
310 (set_tdesc_osabi): Likewise.
311 (tdesc_get_features_xml): Likewise.
312
0a188386
YQ
3132017-09-05 Yao Qi <yao.qi@linaro.org>
314
315 * linux-x86-tdesc.c: Include selftest.h.
316 (i386_tdesc_test): New function.
317 (initialize_low_tdesc): Call selftests::register_test.
318 * tdesc.h: Include regdef.h.
319 (target_desc): Override operator == and !=.
320
f49ff000
YQ
3212017-09-05 Yao Qi <yao.qi@linaro.org>
322
323 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
324 (ipa_obj): Likewise.
325 * linux-i386-ipa.c: Include common/x86-xstate.h
326 (get_ipa_tdesc): Call i386_linux_read_description.
327 (initialize_low_tracepoint): Don't call init_registers_XXX
328 functions, call initialize_low_tdesc instead.
329 * linux-x86-low.c (x86_linux_read_description): Call
330 i386_linux_read_description.
331 (initialize_low_arch): Don't call init_registers_i386_XXX
332 functions, call initialize_low_tdesc.
333 * linux-x86-tdesc.c: New file.
334 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
335 (i386_get_ipa_tdesc_idx): Declare.
336 (i386_get_ipa_tdesc): Declare.
337 (initialize_low_tdesc): Declare.
338
2b68ef2f
YQ
3392017-09-05 Yao Qi <yao.qi@linaro.org>
340
341 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
342 instead of 0.
343
f7000548
YQ
3442017-09-05 Yao Qi <yao.qi@linaro.org>
345
346 * Makefile.in (IPA_OBJS): Add vec-ipa.o
347 * regcache.c (get_thread_regcache): Use VEC_length.
348 (init_register_cache): Likewise.
349 (regcache_cpy): Likewise.
350 (registers_to_string): Iterate reg_defs via VEC_iterate.
351 (find_regno): Likewise.
352 (find_register_by_number): Use VEC_index.
353 (register_size): Call find_register_by_number.
354 (register_data): Call find_register_by_number.
355 (supply_regblock): Use VEC_length.
356 (regcache_raw_read_unsigned): Likewise.
357 * tdesc.c (init_target_desc): Iterate reg_defs via
358 VEC_iterate.
359 (default_description): Update initializer.
360 (copy_target_description): Don't update field num_registers.
361 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
362 <num_registers>: Remove.
363
50a421ac
SM
3642017-09-04 Simon Marchi <simon.marchi@ericsson.com>
365
366 * Makefile.in (.SECONDARY): Define target.
367
23fdd69e
SM
3682017-09-03 Simon Marchi <simon.marchi@ericsson.com>
369
370 * linux-low.c (linux_wait_1): Adjust.
371 * server.c (queue_stop_reply_callback): Adjust.
372
0a2dde4a
SDJ
3732017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
374
375 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
376 QEnvironmentUnset and QEnvironmentReset packets.
377 (handle_query): Inform remote that QEnvironmentHexEncoded,
378 QEnvironmentUnset and QEnvironmentReset are supported.
379
6afd337d
SM
3802017-08-25 Simon Marchi <simon.marchi@ericsson.com>
381
382 * inferiors.h (inferior_target_data): Rename to ...
383 (thread_target_data): ... this.
384 (inferior_regcache_data): Rename to ...
385 (thread_regcache_data): ... this.
386 (set_inferior_regcache_data): Rename to ...
387 (set_thread_regcache_data): ... this.
388 * inferiors.c (inferior_target_data): Rename to ...
389 (thread_target_data): ... this.
390 (inferior_regcache_data): Rename to ...
391 (thread_regcache_data): ... this.
392 (set_inferior_regcache_data): Rename to ...
393 (set_thread_regcache_data): ... this.
394 (free_one_thread): Update.
395 * linux-low.h (get_thread_lwp): Update.
396 * regcache.c (get_thread_regcache): Update.
397 (regcache_invalidate_thread): Update.
398 (free_register_cache_thread): Update.
399 * win32-i386-low.c (update_debug_registers_callback): Update.
400 (win32_get_current_dr): Update.
401 * win32-low.c (thread_rec): Update.
402 (delete_thread_info): Update.
403 (continue_one_thread): Update.
404 (suspend_one_thread): Update.
405
a160cc46
SM
4062017-08-24 Simon Marchi <simon.marchi@ericsson.com>
407
408 * inferiors.c (set_inferior_target_data): Remove.
409 * inferiors.h (set_inferior_target_data): Remove.
410
6d580b63
YQ
4112017-08-18 Yao Qi <yao.qi@linaro.org>
412
413 * Makefile.in (OBS): Add selftest.o.
414 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
415 * configure, config.in: Re-generated.
416 * server.c: Include common/sefltest.h.
417 (captured_main): Handle option --selftest.
418
f5a29eb0
YQ
4192017-08-09 Yao Qi <yao.qi@linaro.org>
420
421 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
422 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
423 i386-avx-mpx.o and i386-mmx.o.
424 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
425 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
426 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
427 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
428 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
429 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
430 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
431 i386/amd64-avx-mpx.xml.
432
57757c2f
YQ
4332017-08-09 Yao Qi <yao.qi@linaro.org>
434
435 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
436 and x32-avx-avx512.o.
437 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
438 i386/x32-avx-avx512.xml.
439
229d26fc
SM
4402017-07-26 Simon Marchi <simon.marchi@ericsson.com>
441
442 * tracepoint.h (enum class fast_tpoint_collect_result): New
443 enumeration.
444 (fast_tracepoint_collecting): Change return type to
445 fast_tpoint_collect_result.
446 * tracepoint.c (fast_tracepoint_collecting): Likewise.
447 * linux-low.h: Include tracepoint.h.
448 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
449 fast_tpoint_collect_result.
450 * linux-low.c (handle_tracepoints): Adjust.
451 (linux_fast_tracepoint_collecting): Change return type to
452 fast_tpoint_collect_result.
453 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
454 linux_wait_1, stuck_in_jump_pad_callback,
455 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
456 proceed_one_lwp): Adjust to type change.
457
2e1e43e1
YQ
4582017-07-10 Yao Qi <yao.qi@linaro.org>
459
460 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
461
adc764e7
YQ
4622017-06-29 Yao Qi <yao.qi@linaro.org>
463
464 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
465 Remove.
466 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
467
a206891a
SM
4682017-06-20 Simon Marchi <simon.marchi@ericsson.com>
469
470 * Makefile.in (IPA_OBJS): Sort and format one item per line.
471
9a6c7d9c
SDJ
4722017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
473
474 * linux-low.c (linux_create_inferior): Adjust code to access the
475 environment information via 'gdb_environ' class.
476 * lynx-low.c (lynx_create_inferior): Likewise.
477 * server.c (our_environ): Make it an instance of 'gdb_environ'.
478 (get_environ): Return a pointer to 'our_environ'.
479 (captured_main): Initialize 'our_environ'.
480 * server.h (get_environ): Adjust prototype.
481 * spu-low.c (spu_create_inferior): Adjust code to access the
482 environment information via 'gdb_environ' class.
483
ae3e2ccf
SM
4842017-06-17 Simon Marchi <simon.marchi@ericsson.com>
485
486 * linux-low.c (linux_read_memory, linux_write_memory): Remove
487 usage of "register" keyword.
488
3e019bdc
SM
4892017-06-17 Simon Marchi <simon.marchi@ericsson.com>
490
491 * configure: Re-generate.
492
8465943a
SM
4932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
494
495 * configure: Re-generate.
496
cf0dd6f0
SM
4972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
498
499 * Makefile.in (COMPILE.pre): Add "-x c++".
500
9845682b
SDJ
5012017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
502
503 * fork-child.c: Conditionally include <signal.h>.
504
aefd8b33
SDJ
5052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
506
507 * server.c (handle_general_set): Handle new packet
508 "QStartupWithShell".
509 (handle_query): Add "QStartupWithShell" to the list of supported
510 packets.
511 (gdbserver_usage): Add help text explaining the
512 new "--startup-with-shell" and "--no-startup-with-shell" CLI
513 options.
514 (captured_main): Recognize and act upon the presence of the new
515 CLI options.
516
2090129c
SDJ
5172017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
518 Pedro Alves <palves@redhat.com>
519
520 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
521 * configure: Regenerate.
522 * configure.srv (srv_linux_obj): Add "fork-child.o" and
523 "fork-inferior.o".
524 (i[34567]86-*-lynxos*): Likewise.
525 (spu*-*-*): Likewise.
526 * fork-child.c: New file.
527 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
528 and "environ.h".
529 (linux_ptrace_fun): New function.
530 (linux_create_inferior): Adjust function prototype to reflect
531 change on "target.h". Adjust function code to use
532 "fork_inferior".
533 (linux_request_interrupt): Delete "signal_pid".
534 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
535 (lynx_ptrace_fun): New function.
536 (lynx_create_inferior): Adjust function prototype to reflect
537 change on "target.h". Adjust function code to use
538 "fork_inferior".
539 * nto-low.c (nto_create_inferior): Adjust function prototype and
540 code to reflect change on "target.h". Update comments.
541 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
542 "common-terminal.h" and "environ.h".
543 (terminal_fd): Moved to fork-child.c.
544 (old_foreground_pgrp): Likewise.
545 (restore_old_foreground_pgrp): Likewise.
546 (last_status): Make it global.
547 (last_ptid): Likewise.
548 (our_environ): New variable.
549 (startup_with_shell): Likewise.
550 (program_name): Likewise.
551 (program_argv): Rename to...
552 (program_args): ...this.
553 (wrapper_argv): New variable.
554 (start_inferior): Delete function.
555 (get_exec_wrapper): New function.
556 (get_exec_file): Likewise.
557 (get_environ): Likewise.
558 (prefork_hook): Likewise.
559 (post_fork_inferior): Likewise.
560 (postfork_hook): Likewise.
561 (postfork_child_hook): Likewise.
562 (handle_v_run): Update code to deal with arguments coming from the
563 remote host. Update calls from "start_inferior" to
564 "create_inferior".
565 (captured_main): Likewise. Initialize environment variable. Call
566 "have_job_control".
567 * server.h (post_fork_inferior): New prototype.
568 (get_environ): Likewise.
569 (last_status): Declare.
570 (last_ptid): Likewise.
571 (signal_pid): Likewise.
572 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
573 (spu_ptrace_fun): New function.
574 (spu_create_inferior): Adjust function prototype to reflect change
575 on "target.h". Adjust function code to use "fork_inferior".
576 * target.c (target_terminal_init): New function.
577 (target_terminal_inferior): Likewise.
578 (target_terminal_ours): Likewise.
579 * target.h: Include <vector>.
580 (struct target_ops) <create_inferior>: Update prototype.
581 (create_inferior): Update macro.
582 * utils.c (gdb_flush_out_err): New function.
583 * win32-low.c (win32_create_inferior): Adjust function prototype
584 and code to reflect change on "target.h".
585
043a4934
SDJ
5862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
587
588 * inferiors.c (switch_to_thread): New function.
589
15652511
SDJ
5902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
591
592 * Makefile.in (SFILE): Add "common/job-control.c".
593 (OBS): Add "job-control.o".
594
21ea5acd
SDJ
5952017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
596
597 * Makefile: Remove "@host_makefile_frag@".
598
e13cb306
PA
5992017-05-05 Pedro Alves <palves@redhat.com>
600
601 * configure: Regenerate.
602
c94fee56
SDJ
6032017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
604
605 * configure: Regenerate.
606
a0ff9e1a
SM
6072017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
608
609 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
610 software_single_step change of return type to
611 std::vector<CORE_ADDR>.
612 * linux-low.c (install_software_single_step_breakpoints):
613 Likewise.
614 * linux-low.h (install_software_single_step_breakpoints):
615 Likewise.
616
be628ab8
SDJ
6172017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
618
619 * remote-utils.c: Include "gdb_termios.h" instead of
620 "terminal.h".
621 * terminal.h: Delete file.
622
7c5ded6a
SDJ
6232017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
624
625 * server.c: Include <vector>.
626 <program_argv, wrapper_argv>: Convert to std::vector.
627 (start_inferior): Rewrite function to use C++.
628 (handle_v_run): Likewise. Update code that calculates the argv
629 based on the vRun packet; use C++.
630 (captured_main): Likewise.
631
436252de
SM
6322017-04-06 Simon Marchi <simon.marchi@ericsson.com>
633
634 * server.c (handle_v_cont): Initialize thread_resume::thread
635 with null_ptid.
636
9bf2a700
PA
6372017-04-05 Pedro Alves <palves@redhat.com>
638
639 * configure: Regenerate.
640
a121b7c1
PA
6412017-04-05 Pedro Alves <palves@redhat.com>
642
643 * gdbreplay.c (sync_error): Constify.
644 * linux-x86-low.c (push_opcode): Constify.
645
21c8a587
PA
6462017-04-05 Pedro Alves <palves@redhat.com>
647
648 * win32-low.c (get_child_debug_event)
649 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
650 Report TARGET_WAITKIND_SPURIOUS instead.
651
fb32b4f7
PA
6522017-04-05 Pedro Alves <palves@redhat.com>
653
654 * remote-utils.c (remote_prepare, remote_open): Constify.
655 * remote-utils.h (remote_prepare, remote_open): Constify.
656 * server.c (captured_main): Constify 'port' handling.
657
65dd1e59
SM
6582017-04-04 Simon Marchi <simon.marchi@ericsson.com>
659
660 * Makefile.in (clean): Clear .deps.
661
8fa5b777
SM
6622017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
663
664 * .gitignore: Remove generated files, replace with wildcard.
665 * (clean): Replace removal of generated files with wildcard.
666 (version.c): Replace with...
667 (version-generated.c): ...this.
668 (xml-builtin.c): Replace with...
669 (xml-builtin-generated.c): ...this.
670 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
671 (%.c: *regformats*): Replace with...
672 (%-generated.c: *regformats*): ...this.
673
a12e714b
MF
6742017-03-27 Max Filippov <jcmvbkbc@gmail.com>
675
676 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
677 (xtensa_fill_gregset): Call collect_register_by_name for
678 threadptr register.
679 (xtensa_store_gregset): Call supply_register_by_name for
680 threadptr register.
681
1a09b50a
MF
6822017-03-27 Max Filippov <jcmvbkbc@gmail.com>
683
684 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
685 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
686 (xtensa_store_gregset): Call supply_register for all registers in
687 a0_regnum..a0_regnum + C0_NREGS range.
688
1a01e7c6
SM
6892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
692 (ax-ipa.o: ax.c): Remove.
693 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
694 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
695 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
696 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
697 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
698
36bc18a8
SM
6992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
700
701 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
702 (print-utils-ipa.o: ../common/print-utils.c): Remove.
703 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
704 (errors-ipa.o: ../common/errors.c): Remove.
705 (format-ipa.o: ../common/format.c): Remove.
706 (common-utils-ipa.o: ../common/common-utils.c): Remove.
707
a8ebe3d5
SM
7082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
709
710 * Makefile.in (%-ipa.o: %.c): New rule.
711 (tracepoint-ipa.o: tracepoint.c): Remove.
712 (utils-ipa.o: utils.c): Remove.
713 (remote-utils-ipa.o: remote-utils.c): Remove.
714 (regcache-ipa.o: regcache.c): Remove.
715 (i386-linux-ipa.o: i386-linux.c): Remove.
716 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
717 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
718 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
719 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
720 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
721 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
722 (amd64-linux-ipa.o: amd64-linux.c): Remove.
723 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
724 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
725 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
726 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
727 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
728 (aarch64-ipa.o: aarch64.c): Remove.
729 (s390-linux32-ipa.o: s390-linux32.c): Remove.
730 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
731 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
732 (s390-linux64-ipa.o: s390-linux64.c): Remove.
733 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
734 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
735 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
736 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
737 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
738 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
739 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
740 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
741 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
742 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
743 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
744 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
745 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
746 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
747 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
748 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
749 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
750 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
751 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
752 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
753 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
754 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
755 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
756 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
757 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
758 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
759 (tdesc-ipa.o: tdesc.c): Remove.
760 (x32-linux-ipa.o: x32-linux.c): Remove.
761 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
762 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
763
50cfacb7
SM
7642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
765
766 * Makefile.in (%.o: ../arch/%.c): New rule.
767 (arm.o: ../arch/arm.c): Remove.
768 (arm-linux.o: ../arch/arm-linux.c): Remove.
769 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
770 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
771
c5a22423
SM
7722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
773
774 * Makefile.in (%.o: ../nat/%.c): New rule.
775 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
776 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
777 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
778 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
779 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
780 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
781 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
782 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
783 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
784 (linux-personality.o: ../nat/linux-personality.c): Remove.
785 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
786 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
787 (x86-linux.o: ../nat/x86-linux.c): Remove.
788 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
789 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
790
6bda016b
SM
7912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
792
793 * Makefile.in (%.o: ../common/%.c): New rule.
794 (signals.o: ../common/signals.c): Remove.
795 (print-utils.o: ../common/print-utils.c): Remove.
796 (rsp-low.o: ../common/rsp-low.c): Remove.
797 (common-utils.o: ../common/common-utils.c): Remove.
798 (posix-strerror.o: ../common/posix-strerror.c): Remove.
799 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
800 (vec.o: ../common/vec.c): Remove.
801 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
802 (xml-utils.o: ../common/xml-utils.c): Remove.
803 (ptid.o: ../common/ptid.c): Remove.
804 (buffer.o: ../common/buffer.c): Remove.
805 (format.o: ../common/format.c): Remove.
806 (filestuff.o: ../common/filestuff.c): Remove.
807 (agent.o: ../common/agent.c): Remove.
808 (errors.o: ../common/errors.c): Remove.
809 (environ.o: ../common/environ.c): Remove.
810 (common-debug.o: ../common/common-debug.c): Remove.
811 (cleanups.o: ../common/cleanups.c): Remove.
812 (common-exceptions.o: ../common/common-exceptions.c): Remove.
813 (fileio.o: ../common/fileio.c): Remove.
814 (common-regcache.o: ../common/common-regcache.c): Remove.
815 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
816 (new-op.o: ../common/new-op.c): Remove.
817 (btrace-common.o: ../common/btrace-common.c): Remove.
818
21122961
SM
8192017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
820
821 * Makefile.in (%.o: ../target/%.c): New rule.
822 (waitstatus.o: ../target/waitstatus.c): Remove.
823
c362e621
SM
8242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
825
826 * Makefile.in
827 (%.c: ../regformats/%.dat,
828 (%.c: ../regformats/arm/%.dat,
829 (%.c: ../regformats/i386/%.dat,
830 (%.c: ../regformats/rs6000/%.dat): New rules.
831 (aarch64.c): Remove.
832 (reg-arm.c): Remove.
833 (arm-with-iwmmxt.c): Remove.
834 (arm-with-vfpv2.c): Remove.
835 (arm-with-vfpv3.c): Remove.
836 (arm-with-neon.c): Remove.
837 (reg-bfin.c): Remove.
838 (reg-cris.c): Remove.
839 (reg-crisv32.c): Remove.
840 (i386.c): Remove.
841 (i386-linux.c): Remove.
842 (i386-avx.c): Remove.
843 (i386-avx-linux.c): Remove.
844 (i386-avx-avx512.c): Remove.
845 (i386-avx-avx512-linux.c): Remove.
846 (i386-mpx.c): Remove.
847 (i386-mpx-linux.c): Remove.
848 (i386-avx-mpx-avx512-pku.c): Remove.
849 (i386-avx-mpx-avx512-pku-linux.c): Remove.
850 (i386-avx-mpx.c): Remove.
851 (i386-avx-mpx-linux.c): Remove.
852 (i386-mmx.c): Remove.
853 (i386-mmx-linux.c): Remove.
854 (reg-ia64.c): Remove.
855 (reg-m32r.c): Remove.
856 (reg-m68k.c): Remove.
857 (reg-cf.c): Remove.
858 (mips-linux.c): Remove.
859 (mips-dsp-linux.c): Remove.
860 (mips64-linux.c): Remove.
861 (mips64-dsp-linux.c): Remove.
862 (nios2-linux.c): Remove.
863 (powerpc-32.c): Remove.
864 (powerpc-32l.c): Remove.
865 (powerpc-altivec32l.c): Remove.
866 (powerpc-cell32l.c): Remove.
867 (powerpc-vsx32l.c): Remove.
868 (powerpc-isa205-32l.c): Remove.
869 (powerpc-isa205-altivec32l.c): Remove.
870 (powerpc-isa205-vsx32l.c): Remove.
871 (powerpc-e500l.c): Remove.
872 (powerpc-64l.c): Remove.
873 (powerpc-altivec64l.c): Remove.
874 (powerpc-cell64l.c): Remove.
875 (powerpc-vsx64l.c): Remove.
876 (powerpc-isa205-64l.c): Remove.
877 (powerpc-isa205-altivec64l.c): Remove.
878 (powerpc-isa205-vsx64l.c): Remove.
879 (s390-linux32.c): Remove.
880 (s390-linux32v1.c): Remove.
881 (s390-linux32v2.c): Remove.
882 (s390-linux64.c): Remove.
883 (s390-linux64v1.c): Remove.
884 (s390-linux64v2.c): Remove.
885 (s390-te-linux64.c): Remove.
886 (s390-vx-linux64.c): Remove.
887 (s390-tevx-linux64.c): Remove.
888 (s390x-linux64.c): Remove.
889 (s390x-linux64v1.c): Remove.
890 (s390x-linux64v2.c): Remove.
891 (s390x-te-linux64.c): Remove.
892 (s390x-vx-linux64.c): Remove.
893 (s390x-tevx-linux64.c): Remove.
894 (tic6x-c64xp-linux.c): Remove.
895 (tic6x-c64x-linux.c): Remove.
896 (tic6x-c62x-linux.c): Remove.
897 (reg-sh.c): Remove.
898 (reg-sparc64.c): Remove.
899 (reg-spu.c): Remove.
900 (amd64.c): Remove.
901 (amd64-linux.c): Remove.
902 (amd64-avx.c): Remove.
903 (amd64-avx-linux.c): Remove.
904 (amd64-avx-avx512.c): Remove.
905 (amd64-avx-avx512-linux.c): Remove.
906 (amd64-mpx.c): Remove.
907 (amd64-mpx-linux.c): Remove.
908 (amd64-avx-mpx-avx512-pku.c): Remove.
909 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
910 (amd64-avx-mpx.c): Remove.
911 (amd64-avx-mpx-linux.c): Remove.
912 (x32.c): Remove.
913 (x32-linux.c): Remove.
914 (x32-avx.c): Remove.
915 (x32-avx-linux.c): Remove.
916 (x32-avx-avx512.c): Remove.
917 (x32-avx-avx512-linux.c): Remove.
918 (reg-xtensa.c): Remove.
919 (reg-tilegx.c): Remove.
920 (reg-tilegx32.c): Remove.
921
1672e0d9
SDJ
9222017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
923
924 * Makefile.in (SFILES): Add "common/environ.c".
925 (OBJS): Add "common/environ.h".
926
239b6d10
WT
9272017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
928
929 * configure.ac: Check if the fs_base and gs_base members of
930 `struct user_regs_struct' exist.
931 * config.in: Regenerated.
932 * configure: Likewise.
933
694b382c
AT
9342017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
935
936 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
937 target_read_memory.
938 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
939 (get_next_pcs_syscall_next_pc): Likewise.
940
7dc53023
LM
9412016-12-23 Luis Machado <lgustavo@codesourcery.com>
942
943 * win32-i386-low.c: Fix incorrect reference to a couple source files.
944 * nto-x86-low.c: Likewise.
945
ad02e4fe
SM
9462016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
947
948 * Makefile.in: Include disable-implicit-rules.mk.
949
dcb07cfa
PA
9502016-11-23 Pedro Alves <palves@redhat.com>
951
952 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
953 (debug_vprintf): Use std::chrono::steady_clock instead of
954 gettimeofday. Use '.' instead of ':'.
955 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
956 (get_timestamp): Use std::chrono::steady_clock instead of
957 gettimeofday.
958
8629c02c
SM
9592016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
960
961 * Makefile.in: Fix whitespace formatting.
962
b593ecca
SM
9632016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * Makefile.in (SFILES, OBS): Flatten list and order
966 alphabetically.
967
9986ba08
PA
9682016-11-23 Pedro Alves <palves@redhat.com>
969
970 * event-loop.c (handle_file_event): Use warning.
971 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
972 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
973 Use warning.
974
4eefa7bc
PA
9752016-11-23 Pedro Alves <palves@redhat.com>
976
977 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
978 output.
979 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
980 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
981 debug_printf and debug_flush for debug output.
982 * server.c (handle_general_set): Likewise.
983 * thread-db.c (try_thread_db_load): Use debug_printf for debug
984 output.
985
5443506e
SM
9862016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
987
988 * Makefile.in (.c.o): Replace rule with ...
989 (%.o: %.c): ... this one.
990
3b165252
SM
9912016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
992
993 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
994 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
995 make.
996 * configure.ac: Remove checks for the make program.
997 * configure: Re-generate.
998
0bcda685
PA
9992016-10-28 Pedro Alves <palves@redhat.com>
1000
1001 * Makefile.in (CXX_DIALECT): Get from configure.
1002 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1003 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1004 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1005 * config.in: Regenerate.
1006 * configure: Regenerate.
1007
c3805894
YQ
10082016-10-27 Yao Qi <yao.qi@linaro.org>
1009
1010 * linux-low.c (linux_supports_range_stepping): Return true if
1011 can_software_single_step return true.
1012
89342618
YQ
10132016-10-27 Yao Qi <yao.qi@linaro.org>
1014
1015 * inferiors.c (find_inferior_in_random): New function.
1016 * inferiors.h (find_inferior_in_random): Declare.
1017 * linux-low.c (linux_wait_for_event_filtered): Call
1018 find_inferior_in_random instead of find_inferior.
1019
e3652c84
YQ
10202016-10-27 Yao Qi <yao.qi@linaro.org>
1021
1022 * linux-low.c (linux_wait_1): If single-step breakpoints are
1023 inserted, remove them.
1024
5a04c4cf
PA
10252016-10-26 Pedro Alves <palves@redhat.com>
1026
1027 * linux-low.c (handle_extended_wait): Link parent/child fork
1028 threads.
1029 (linux_wait_1): Unlink them.
1030 (linux_set_resume_request): Ignore resume requests for
1031 already-resumed and unhandled fork child threads.
1032 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1033 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1034 New functions.
1035 (handle_v_requests) <vCont>: Don't call require_running.
1036 * server.h (in_queued_stop_replies): New declaration.
1037
cb93dc7f
YQ
10382016-10-24 Yao Qi <yao.qi@linaro.org>
1039
1040 PR server/20733
1041 * linux-aarch64-low.c (append_insns): Cast the return value to
1042 'uint32_t *'.
1043
a1078bea
YQ
10442016-10-10 Yao Qi <yao.qi@linaro.org>
1045
1046 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1047
1fb77080
SDJ
10482016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1049
1050 * target.c (target_supports_multi_process): New function, moved
1051 from...
1052 * target.h (target_supports_multi_process): ... here. Remove
1053 macro.
1054
39b5a3b9
TT
10552016-10-05 Tom Tromey <tom@tromey.com>
1056
1057 PR remote/20655:
1058 * tracepoint.c (handle_tracepoint_bkpts): Check
1059 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1060
c1d0b70a
YQ
10612016-10-05 Yao Qi <yao.qi@linaro.org>
1062
1063 * configure.srv: Update the path of arm-*.xml files.
1064
0a69eedb
YQ
10652016-10-05 Terry Guo <terry.guo@arm.com>
1066 Yao Qi <yao.qi@linaro.org>
1067
1068 * Makefile.in: Adjust the path of rules.
1069 * configure.srv: Update the path of xml files.
1070 * regformats/arm-with-iwmmxt.dat: Regenerated.
1071 * regformats/arm-with-neon.dat: Likewise.
1072 * regformats/arm-with-vfpv2.dat: Likewise.
1073 * regformats/arm-with-vfpv3.dat Likewise.
1074
17e16485
YQ
10752016-09-30 Yao Qi <yao.qi@linaro.org>
1076
1077 PR gdbserver/20627
1078 * target.c (target_stop_and_wait): Don't call
1079 target_continue_no_signal, use resume_stop instead.
1080
edeeb602
YQ
10812016-09-26 Yao Qi <yao.qi@linaro.org>
1082
1083 * linux-low.c (linux_wait_1): Call debug_exit.
1084
503b1c39
PA
10852016-09-23 Pedro Alves <palves@redhat.com>
1086
1087 * Makefile.in (SFILES): Add common/new-op.c.
1088 (OBS): Add common/new-op.o.
1089 (new-op.o): New rule.
1090
74172ecf
SM
10912016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 * .gitinore: Ignore more files.
1094
fc6cda2e
YQ
10952016-09-21 Yao Qi <yao.qi@linaro.org>
1096
1097 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1098 23.
1099
bc1e6c81
SDJ
11002016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1101
1102 * server.c (start_inferior): Call target_mourn_inferior instead of
1103 mourn_inferior; pass ptid_t argument to it.
1104 (resume): Likewise.
1105 (handle_target_event): Likewise.
1106 * target.c (target_mourn_inferior): New function.
1107 * target.h (mourn_inferior): Delete macro.
1108
0e00e962
AA
11092016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1110
1111 * linux-low.c (lwp_is_stepping): New function.
1112
1d8cb77d
CL
11132016-09-06 Carl Love <cel@us.ibm.com>
1114
1115 * server.c (start_inferior): Fixed comment, requested comment change
1116 didn't get updated correctly. Removed reference to ptrace () call as
1117 it is only true on Linux systems.
1118
7313bced
CL
11192016-09-06 Carl Love <cel@us.ibm.com>
1120
1121 * server.c (start_inferior): Do not call
1122 function target_post_create_inferior () if the
1123 inferior process has already exited.
1124
cf6de44d
PA
11252016-09-05 Pedro Alves <palves@redhat.com>
1126
1127 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1128 (COMPILE.pre, CC_LD): Use CXX directly.
1129 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1130 * acinclude.m4: Don't include build-with-cxx.m4.
1131 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1132 * configure: Regenerate.
1133
c1da6748
AT
11342016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1135
1136 PR gdb/19495
1137 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1138 call writing data to own_buf.
1139
f2b9e3df
SDJ
11402016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1141
1142 * target.c (mywait): Call target_wait instead of
1143 the_target->wait.
1144 (target_wait): New function.
1145
049a8570
SDJ
11462016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1147
1148 * server.c (start_inferior): New variable 'ptid'. Replace calls
1149 to the_target->resume by target_continue{,_no_signal}, depending
1150 on the case.
1151 * target.c (target_stop_and_wait): Call target_continue_no_signal
1152 instead of the_target->resume.
1153 (target_continue): New function.
1154
3aa5cfa0
AT
11552016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1156
1157 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1158
754653a7
AZ
11592016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1160
1161 PR server/20491
1162 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1163 ps_prochandle.
1164 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1165 * linux-arm-low.c (ps_get_thread_area): Likewise.
1166 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1167 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1168 * linux-mips-low.c (ps_get_thread_area): Likewise.
1169 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1170 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1171 * linux-x86-low.c (ps_get_thread_area): Likewise.
1172 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1173
ed036b40
PA
11742016-08-19 Pedro Alves <palves@redhat.com>
1175
1176 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1177
c8ef42ee
PA
11782016-08-19 Pedro Alves <palves@redhat.com>
1179
1180 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1181 comment. Use memcpy instead of casting through unsigned long.
1182
9c235a72
PA
11832016-08-19 Pedro Alves <palves@redhat.com>
1184
1185 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1186 allocating around 0x80000000.
1187
201506da
PA
11882016-08-19 Pedro Alves <palves@redhat.com>
1189
1190 PR gdb/20415
1191 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1192 (x32-avx512-linux-ipa.o): New rules.
1193 * configure.ac (x86_64-*-linux*): New x32 check.
1194 * configure.srv (ipa_x32_linux_regobj): New.
1195 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1196 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1197 descriptions.
1198 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1199 descriptions.
1200 * configure: Regenerate.
1201
f348d89a
PA
12022016-08-09 Pedro Alves <palves@redhat.com>
1203
1204 PR gdb/18653
1205 * Makefile.in (OBS): Add signals-state-save-restore.o.
1206 (signals-state-save-restore.o): New rule.
1207 * config.in: Regenerate.
1208 * configure: Regenerate.
1209 * linux-low.c: Include "signals-state-save-restore.h".
1210 (linux_create_inferior): Call
1211 restore_original_signals_state.
1212 * server.c: Include "dispositions-save-restore.h".
1213 (captured_main): Call save_original_signals_state.
1214
1baf5149
PA
12152016-08-05 Pedro Alves <palves@redhat.com>
1216
1217 * configure: Regenerate.
1218
fcd4a73d
YQ
12192016-08-04 Yao Qi <yao.qi@linaro.org>
1220
1221 * linux-low.c (regsets_fetch_inferior_registers): Check
1222 errno is ESRCH or not.
1223
979659d0
YQ
12242016-08-02 Yao Qi <yao.qi@linaro.org>
1225
1226 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1227 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1228 (thread_db_load_search): Update.
1229 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1230 td_ta_set_event and td_ta_event_getmsg.
1231
6598661d
PA
12322016-07-26 Pedro Alves <palves@redhat.com>
1233
1234 PR server/20414
1235 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1236 of unsigned long for 64-bit registers and use uint32_t instead of
1237 unsigned int for 32-bit registers.
1238
9cf12d57
PA
12392016-07-26 Pedro Alves <palves@redhat.com>
1240
1241 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1242 to 'ptrace'.
1243
305450ed
TT
12442016-07-21 Tom Tromey <tom@tromey.com>
1245
1246 * configure: Rebuild.
1247
2583da7c
YQ
12482016-07-21 Yao Qi <yao.qi@linaro.org>
1249
1250 * mem-break.c (find_gdb_breakpoint): Cast bp to
1251 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1252
21536b36
YQ
12532016-07-21 Yao Qi <yao.qi@linaro.org>
1254
1255 * server.c (handle_v_requests): Support s and S actions
1256 if target_supports_software_single_step return true.
1257
8901d193
YQ
12582016-07-21 Yao Qi <yao.qi@linaro.org>
1259
1260 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1261 is resume_step, call maybe_hw_step.
1262 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1263 and unstop them.
1264 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1265 breakpoints or not.
1266 (proceed_one_lwp): If resume request is resume_step, install
1267 reinsert breakpoints and call maybe_hw_step.
1268
0e9a339e
YQ
12692016-07-21 Yao Qi <yao.qi@linaro.org>
1270
1271 * linux-low.c (proceed_one_lwp): Declare.
1272 (linux_resume_one_thread): Remove local variable 'step'.
1273 Lift code enqueue signal. Call proceed_one_lwp instead of
1274 linux_resume_one_lwp.
1275
4281b351
YQ
12762016-07-21 Yao Qi <yao.qi@linaro.org>
1277
1278 * linux-low.c (linux_resume_one_thread): Call
1279 enqueue_pending_signal.
1280
984a2c04
YQ
12812016-07-21 Yao Qi <yao.qi@linaro.org>
1282
1283 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1284 * inferiors.c (do_restore_current_thread_cleanup): New function.
1285 (make_cleanup_restore_current_thread): Likewise.
1286 * linux-low.c (install_software_single_step_breakpoints): Call
1287 make_cleanup_restore_current_thread. Switch current_thread to
1288 thread.
1289
bec903c9
YQ
12902016-07-21 Yao Qi <yao.qi@linaro.org>
1291
1292 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1293 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1294 (clone_one_breakpoint): Likewise.
1295 (delete_reinsert_breakpoints): Change parameter to thread.
1296 Callers updated.
1297 (has_reinsert_breakpoints): Likewise.
1298 (uninsert_reinsert_breakpoints): Likewise.
1299 (reinsert_reinsert_breakpoints): Likewise.
1300 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1301 (delete_reinsert_breakpoints): Likewise.
1302 (reinsert_reinsert_breakpoints): Likewise.
1303 (uninsert_reinsert_breakpoints): Likewise.
1304 (has_reinsert_breakpoints): Likewise.
1305
63c40ec7
YQ
13062016-07-21 Yao Qi <yao.qi@linaro.org>
1307
1308 * inferiors.c (get_thread_process): Make parameter const.
1309 * inferiors.h (get_thread_process): Update declaration.
1310 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1311 Add new parameters child_thread and parent_thread. Callers
1312 updated.
1313 * mem-break.h (clone_all_breakpoints): Update declaration.
1314
9aa76cd0
YQ
13152016-07-21 Yao Qi <yao.qi@linaro.org>
1316
1317 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1318 <command_list, handler>: Remove.
1319 (struct gdb_breakpoint): New.
1320 (struct other_breakpoint): New.
1321 (struct reinsert_breakpoint): New.
1322 (is_gdb_breakpoint): New function.
1323 (any_persistent_commands): Update command_list if
1324 is_gdb_breakpoint returns true.
1325 (set_breakpoint): Create breakpoints according to their types.
1326 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1327 (set_gdb_breakpoint_1): Likewise.
1328 (set_gdb_breakpoint): Likewise.
1329 (clear_breakpoint_conditions): Change parameter type to
1330 'struct gdb_breakpoint *'.
1331 (clear_breakpoint_commands): Likewise.
1332 (clear_breakpoint_conditions_and_commands): Likewise.
1333 (add_condition_to_breakpoint): Likewise.
1334 (add_breakpoint_condition): Likewise.
1335 (add_commands_to_breakpoint): Likewise.
1336 (check_breakpoints): Check other_breakpoint.
1337 (clone_one_breakpoint): Clone breakpopint according to its type.
1338 * mem-break.h (struct gdb_breakpoint): Declare.
1339 (set_gdb_breakpoint): Update declaration.
1340 (clear_breakpoint_conditions_and_commands): Likewise.
1341 (add_breakpoint_condition): Likewise.
1342 (add_breakpoint_commands): Likewise.
1343 * server.c (process_point_options): Change parameter type to
1344 'struct gdb_breakpoint *'.
1345
811f8301
YQ
13462016-07-21 Yao Qi <yao.qi@linaro.org>
1347
1348 * mem-break.c (set_breakpoint_at): Rename it to ...
1349 (set_breakpoint_type_at): ... it.
1350 (set_breakpoint_at): Call set_breakpoint_type_at.
1351 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1352 * mem-break.h (set_breakpoint_at): Update comments.
1353
b1c51e36
CLT
13542016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1355
1356 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1357 to buf parameter.
1358 (nios2_store_gregset): Likewise.
1359
ced2dffb
PA
13602016-07-01 Pedro Alves <palves@redhat.com>
1361 Antoine Tremblay <antoine.tremblay@ericsson.com>
1362
1363 * linux-low.c: Change interface to take the target lwp_info
1364 pointer directly and return void. Handle detaching from a zombie
1365 thread.
1366 (linux_detach_lwp_callback): New function.
1367 (linux_detach): Detach from the leader thread after detaching from
1368 the clone threads.
1369
2ac09a5b
YQ
13702016-06-28 Yao Qi <yao.qi@linaro.org>
1371
1372 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1373 for variable new_offset.
1374 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1375 (aarch64_ftrace_insn_reloc_cb): Likewise.
1376 (aarch64_ftrace_insn_reloc_tb): Likewise.
1377 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1378 PRIx64 instead of PRIx32.
1379
79e7fd4f
YQ
13802016-06-28 Yao Qi <yao.qi@linaro.org>
1381
1382 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1383 (the_low_target): Install arm_get_syscall_trapinfo.
1384
061fc021
YQ
13852016-06-28 Yao Qi <yao.qi@linaro.org>
1386
1387 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1388 function.
1389 (the_low_target): Install aarch64_get_syscall_trapinfo.
1390
4cc32bec
YQ
13912016-06-28 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1394 Callers updated.
1395 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1396 Remove parameter sysno.
1397 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1398 sysret.
1399
782c1122
AA
14002016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1401
1402 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1403 (s390_emit_ne_goto): Likewise.
1404 (s390_emit_lt_goto): Likewise.
1405 (s390_emit_le_goto): Likewise.
1406 (s390_emit_gt_goto): Likewise.
1407 (s390_emit_ge_goto): Likewise.
1408 (s390x_emit_eq_goto): Likewise.
1409 (s390x_emit_ne_goto): Likewise.
1410 (s390x_emit_lt_goto): Likewise.
1411 (s390x_emit_le_goto): Likewise.
1412 (s390x_emit_gt_goto): Likewise.
1413 (s390x_emit_ge_goto): Likewise.
1414 (s390_emit_ops_impl): Mark variable static.
1415 (s390x_emit_ops): Likewise.
1416
2e7b624b
YQ
14172016-06-17 Yao Qi <yao.qi@linaro.org>
1418
1419 * linux-low.c (handle_extended_wait): Call
1420 uninsert_reinsert_breakpoints for the parent process. Remove
1421 reinsert breakpoints from the child process. Reinsert them to
1422 the parent process when vfork is done.
1423 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1424 (reinsert_reinsert_breakpoints): New function.
1425 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1426 (reinsert_reinsert_breakpoints): Declare.
1427
8a81c5d7
YQ
14282016-06-17 Yao Qi <yao.qi@linaro.org>
1429
1430 * linux-low.c (handle_extended_wait): If the parent is doing
1431 step-over, remove the reinsert breakpoints from the forked child.
1432
f50bf8e5
YQ
14332016-06-17 Yao Qi <yao.qi@linaro.org>
1434
1435 * linux-low.c (unsuspend_all_lwps): Declare.
1436 (linux_low_filter_event): If thread exited, call finish_step_over.
1437 If step-over is finished, unsuspend other threads.
1438
8376a3cb
YQ
14392016-06-17 Yao Qi <yao.qi@linaro.org>
1440
1441 * linux-low.c (linux_resume_one_lwp_throw): Assert
1442 has_reinsert_breakpoints returns false.
1443 * mem-break.c (delete_disabled_breakpoints): Assert
1444 bp type isn't reinsert_breakpoint.
1445
f79b145d
YQ
14462016-06-17 Yao Qi <yao.qi@linaro.org>
1447
1448 * linux-low.c (maybe_hw_step): New function.
1449 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1450 (finish_step_over): Switch current_thread to lwp temporarily,
1451 and assert has_reinsert_breakpoints returns true.
1452 (proceed_one_lwp): Call maybe_hw_step.
1453 * mem-break.c (has_reinsert_breakpoints): New function.
1454 * mem-break.h (has_reinsert_breakpoints): Declare.
1455
0ae534d2
JT
14562016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1457
1458 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1459
fcdad592
YQ
14602016-05-17 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1463 instead of find_inferior.
1464
9e784964
YQ
14652016-05-05 Yao Qi <yao.qi@linaro.org>
1466
1467 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1468 Initialize res to zero.
1469
cf2ebb6e
YQ
14702016-05-05 Yao Qi <yao.qi@linaro.org>
1471
1472 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1473 to uint32_t.
1474
c1aebf87
UW
14752016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1476
1477 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1478 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1479 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1480
35fd2deb 14812016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1482 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1483
1484 * tracepoint.c (write_inferior_int8): New function.
1485 (cmd_qtenable_disable): Write enable flag using
1486 write_inferior_int8.
1487
484b3c32
YQ
14882016-04-25 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1491 (need_step_over_p): Return zero if the LWP has pending signals
1492 can be delivered on software single step target.
1493
85ba7d86
YQ
14942016-04-25 Yao Qi <yao.qi@linaro.org>
1495
1496 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1497 return instead of error.
1498
3539aa13
YQ
14992016-04-22 Yao Qi <yao.qi@linaro.org>
1500
1501 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1502 to 23.
1503
5b061e98
YQ
15042016-04-22 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1507 signal when stepping over breakpoint with software single
1508 step.
1509
3451269c
PA
15102016-04-21 Pedro Alves <palves@redhat.com>
1511
1512 * linux-s390-low.c (s390_collect_ptrace_register)
1513 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1514 add casts.
1515 (s390_check_regset): Use void * instead of gdb_byte *.
1516
a2358508
PA
15172016-04-20 Pedro Alves <palves@redhat.com>
1518
1519 * configure: Renegerate.
1520
6885166d
YQ
15212016-04-20 Yao Qi <yao.qi@linaro.org>
1522
1523 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1524 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1525 number 16.
1526 (arm_store_gregset): Likewise.
1527
2b863f51
WT
15282016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1529
1530 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1531 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1532 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1533 (amd64-avx-mpx-linux.c): New rules.
1534 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1535 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1536 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1537 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1538 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1539 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1540 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1541 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1542 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1543 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1544 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1545 * linux-x86-low.c (x86_linux_read_description): Add case for
1546 X86_XSTATE_AVX_MPX_MASK.
1547 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1548 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1549 init_registers_i386_avx_mpx_linux.
1550 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1551 (initialize_low_tracepoint): Call
1552 init_registers_i386_avx_mpx_linux.
1553 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1554 (initialize_low_tracepoint): Call
1555 init_registers_amd64_avx_mpx_linux.
1556 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1557 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1558 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1559 declarations.
1560
9b30624b
PA
15612016-04-18 Pedro Alves <palves@redhat.com>
1562
1563 * configure: Regenerate.
1564
45e3745e
AT
15652016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1566
1567 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1568 (aarch64_emit_sub): Likewise.
1569
2afc13ff
PA
15702016-04-12 Pedro Alves <palves@redhat.com>
1571
1572 * utils.c (prepare_to_throw_exception): Delete.
1573
6e774b13
SM
15742016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1575
1576 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1577
4dca19f8
MK
15782016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1579
1580 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1581
d0a9981f
MK
15822016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1583
1584 * linux-aarch64-ipa.c: Add <elf.h> include.
1585 * linux-ppc-ipa.c: Add <elf.h> include.
1586 * linux-s390-ipa.c: Add <elf.h> include.
1587
252db07e
MK
15882016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1589
1590 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1591 (get_raw_reg_ptr): Likewise.
1592 (get_trace_state_variable_value_ptr): Likewise.
1593 (set_trace_state_variable_value_ptr): Likewise.
1594 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1595 char *.
1596
14e2b6d9
MK
15972016-03-31 Wei-cheng Wang <cole945@gmail.com>
1598 Marcin Kościelnicki <koriakin@0x04.net>
1599
1600 PR/17221
1601 * linux-ppc-low.c (emit_insns): New function.
1602 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1603 (ppc_emit_prologue): New function.
1604 (ppc_emit_epilogue): New function.
1605 (ppc_emit_add): New function.
1606 (ppc_emit_sub): New function.
1607 (ppc_emit_mul): New function.
1608 (ppc_emit_lsh): New function.
1609 (ppc_emit_rsh_signed): New function.
1610 (ppc_emit_rsh_unsigned): New function.
1611 (ppc_emit_ext): New function.
1612 (ppc_emit_zero_ext): New function.
1613 (ppc_emit_log_not): New function.
1614 (ppc_emit_bit_and): New function.
1615 (ppc_emit_bit_or): New function.
1616 (ppc_emit_bit_xor): New function.
1617 (ppc_emit_bit_not): New function.
1618 (ppc_emit_equal): New function.
1619 (ppc_emit_less_signed): New function.
1620 (ppc_emit_less_unsigned): New function.
1621 (ppc_emit_ref): New function.
1622 (ppc_emit_const): New function.
1623 (ppc_emit_reg): New function.
1624 (ppc_emit_pop): New function.
1625 (ppc_emit_stack_flush): New function.
1626 (ppc_emit_swap): New function.
1627 (ppc_emit_stack_adjust): New function.
1628 (ppc_emit_call): New function.
1629 (ppc_emit_int_call_1): New function.
1630 (ppc_emit_void_call_2): New function.
1631 (ppc_emit_if_goto): New function.
1632 (ppc_emit_goto): New function.
1633 (ppc_emit_eq_goto): New function.
1634 (ppc_emit_ne_goto): New function.
1635 (ppc_emit_lt_goto): New function.
1636 (ppc_emit_le_goto): New function.
1637 (ppc_emit_gt_goto): New function.
1638 (ppc_emit_ge_goto): New function.
1639 (ppc_write_goto_address): New function.
1640 (ppc_emit_ops_impl): New static variable.
1641 (ppc64v1_emit_prologue): New function.
1642 (ppc64v2_emit_prologue): New function.
1643 (ppc64_emit_epilogue): New function.
1644 (ppc64_emit_add): New function.
1645 (ppc64_emit_sub): New function.
1646 (ppc64_emit_mul): New function.
1647 (ppc64_emit_lsh): New function.
1648 (ppc64_emit_rsh_signed): New function.
1649 (ppc64_emit_rsh_unsigned): New function.
1650 (ppc64_emit_ext): New function.
1651 (ppc64_emit_zero_ext): New function.
1652 (ppc64_emit_log_not): New function.
1653 (ppc64_emit_bit_and): New function.
1654 (ppc64_emit_bit_or): New function.
1655 (ppc64_emit_bit_xor): New function.
1656 (ppc64_emit_bit_not): New function.
1657 (ppc64_emit_equal): New function.
1658 (ppc64_emit_less_signed): New function.
1659 (ppc64_emit_less_unsigned): New function.
1660 (ppc64_emit_ref): New function.
1661 (ppc64_emit_const): New function.
1662 (ppc64v1_emit_reg): New function.
1663 (ppc64v2_emit_reg): New function.
1664 (ppc64_emit_pop): New function.
1665 (ppc64_emit_stack_flush): New function.
1666 (ppc64_emit_swap): New function.
1667 (ppc64v1_emit_call): New function.
1668 (ppc64v2_emit_call): New function.
1669 (ppc64v1_emit_int_call_1): New function.
1670 (ppc64v2_emit_int_call_1): New function.
1671 (ppc64v1_emit_void_call_2): New function.
1672 (ppc64v2_emit_void_call_2): New function.
1673 (ppc64_emit_if_goto): New function.
1674 (ppc64_emit_eq_goto): New function.
1675 (ppc64_emit_ne_goto): New function.
1676 (ppc64_emit_lt_goto): New function.
1677 (ppc64_emit_le_goto): New function.
1678 (ppc64_emit_gt_goto): New function.
1679 (ppc64_emit_ge_goto): New function.
1680 (ppc64v1_emit_ops_impl): New static variable.
1681 (ppc64v2_emit_ops_impl): New static variable.
1682 (ppc_emit_ops): New function.
1683 (linux_low_target): Wire in ppc_emit_ops.
1684
a2174ba4
MK
16852016-03-31 Wei-cheng Wang <cole945@gmail.com>
1686 Marcin Kościelnicki <koriakin@0x04.net>
1687
1688 PR/17221
1689 * Makefile.in: Add powerpc-*-ipa.o
1690 * configure.srv: Add ipa_obj for powerpc*-linux.
1691 * linux-ppc-ipa.c: New file.
1692 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1693 includes.
1694 (PPC_FIELD): New macro.
1695 (PPC_SEXT): New macro.
1696 (PPC_OP6): New macro.
1697 (PPC_BO): New macro.
1698 (PPC_LI): New macro.
1699 (PPC_BD): New macro.
1700 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1701 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1702 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1703 (ppc_get_thread_area): New function.
1704 (is_elfv2_inferior): New function.
1705 (gen_ds_form): New function.
1706 (GEN_STD): New macro.
1707 (GEN_STDU): New macro.
1708 (GEN_LD): New macro.
1709 (GEN_LDU): New macro.
1710 (gen_d_form): New function.
1711 (GEN_ADDI): New macro.
1712 (GEN_ADDIS): New macro.
1713 (GEN_LI): New macro.
1714 (GEN_LIS): New macro.
1715 (GEN_ORI): New macro.
1716 (GEN_ORIS): New macro.
1717 (GEN_LWZ): New macro.
1718 (GEN_STW): New macro.
1719 (GEN_STWU): New macro.
1720 (gen_xfx_form): New function.
1721 (GEN_MFSPR): New macro.
1722 (GEN_MTSPR): New macro.
1723 (GEN_MFCR): New macro.
1724 (GEN_MTCR): New macro.
1725 (GEN_SYNC): New macro.
1726 (GEN_LWSYNC): New macro.
1727 (gen_x_form): New function.
1728 (GEN_OR): New macro.
1729 (GEN_MR): New macro.
1730 (GEN_LWARX): New macro.
1731 (GEN_STWCX): New macro.
1732 (GEN_CMPW): New macro.
1733 (gen_md_form): New function.
1734 (GEN_RLDICL): New macro.
1735 (GEN_RLDICR): New macro.
1736 (gen_i_form): New function.
1737 (GEN_B): New macro.
1738 (GEN_BL): New macro.
1739 (gen_b_form): New function.
1740 (GEN_BNE): New macro.
1741 (GEN_LOAD): New macro.
1742 (GEN_STORE): New macro.
1743 (gen_limm): New function.
1744 (gen_atomic_xchg): New function.
1745 (gen_call): New function.
1746 (ppc_relocate_instruction): New function.
1747 (ppc_install_fast_tracepoint_jump_pad): New function.
1748 (ppc_get_min_fast_tracepoint_insn_len): New function.
1749 (ppc_get_ipa_tdesc_idx): New function.
1750 (the_low_target): Wire in the new functions.
1751 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1752 tdescs.
1753 * linux-ppc-tdesc.h: New file.
1754
a13c4696
MK
17552016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1756
1757 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1758 (alloc_jump_pad_buffer): New function.
1759 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1760 (alloc_jump_pad_buffer): New function.
1761 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1762 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1763 (alloc_jump_pad_buffer): New function.
1764 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1765 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1766 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1767 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1768
1cda1512
MK
17692016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1770
1771 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1772 * linux-amd64-ipa.c: Likewise.
1773 * linux-i386-ipa.c: Likewise.
1774 * linux-s390-ipa.c: Likewise.
1775 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1776 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1777 set_trace_state_variable_value_ptr.
1778 (struct ipa_sym_addresses): Likewise.
1779 (symbol_list): Likewise.
1780 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1781 accessing gdb_collect directly.
1782 (gdb_collect_ptr_type): New typedef.
1783 (get_raw_reg_ptr_type): New typedef.
1784 (get_trace_state_variable_value_ptr_type): New typedef.
1785 (set_trace_state_variable_value_ptr_type): New typedef.
1786 (gdb_collect_ptr): New global.
1787 (get_raw_reg_ptr): New global.
1788 (get_trace_state_variable_value_ptr): New global.
1789 (set_trace_state_variable_value_ptr): New global.
1790 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1791 accessing get_raw_reg directly.
1792 (get_get_tsv_func_addr): Likewise for
1793 get_trace_state_variable_value_ptr.
1794 (get_set_tsv_func_addr): Likewise for
1795 set_trace_state_variable_value_ptr.
1796 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1797
72fb5488
SM
17982016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1799
1800 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1801
28170b88
MK
18022016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1803
1804 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1805 packets.
1806 (relocate_instruction): Remove own_buf.
1807 * server.c (own_buf): Make global.
1808 (handle_v_requests): Make global.
1809 * server.h (own_buf): New declaration.
1810 (handle_v_requests): New prototype.
1811
f39e8743
MK
18122016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1813
1814 PR 18377
1815 * linux-s390-low.c (add_insns): New function.
1816 (s390_emit_prologue): New function.
1817 (s390_emit_epilogue): New function.
1818 (s390_emit_add): New function.
1819 (s390_emit_sub): New function.
1820 (s390_emit_mul): New function.
1821 (s390_emit_lsh): New function.
1822 (s390_emit_rsh_signed): New function.
1823 (s390_emit_rsh_unsigned): New function.
1824 (s390_emit_ext): New function.
1825 (s390_emit_log_not): New function.
1826 (s390_emit_bit_and): New function.
1827 (s390_emit_bit_or): New function.
1828 (s390_emit_bit_xor): New function.
1829 (s390_emit_bit_not): New function.
1830 (s390_emit_equal): New function.
1831 (s390_emit_less_signed): New function.
1832 (s390_emit_less_unsigned): New function.
1833 (s390_emit_ref): New function.
1834 (s390_emit_if_goto): New function.
1835 (s390_emit_goto): New function.
1836 (s390_write_goto_address): New function.
1837 (s390_emit_litpool): New function.
1838 (s390_emit_const): New function.
1839 (s390_emit_call): New function.
1840 (s390_emit_reg): New function.
1841 (s390_emit_pop): New function.
1842 (s390_emit_stack_flush): New function.
1843 (s390_emit_zero_ext): New function.
1844 (s390_emit_swap): New function.
1845 (s390_emit_stack_adjust): New function.
1846 (s390_emit_set_r2): New function.
1847 (s390_emit_int_call_1): New function.
1848 (s390_emit_void_call_2): New function.
1849 (s390_emit_eq_goto): New function.
1850 (s390_emit_ne_goto): New function.
1851 (s390_emit_lt_goto): New function.
1852 (s390_emit_le_goto): New function.
1853 (s390_emit_gt_goto): New function.
1854 (s390_emit_ge_goto): New function.
1855 (s390x_emit_prologue): New function.
1856 (s390x_emit_epilogue): New function.
1857 (s390x_emit_add): New function.
1858 (s390x_emit_sub): New function.
1859 (s390x_emit_mul): New function.
1860 (s390x_emit_lsh): New function.
1861 (s390x_emit_rsh_signed): New function.
1862 (s390x_emit_rsh_unsigned): New function.
1863 (s390x_emit_ext): New function.
1864 (s390x_emit_log_not): New function.
1865 (s390x_emit_bit_and): New function.
1866 (s390x_emit_bit_or): New function.
1867 (s390x_emit_bit_xor): New function.
1868 (s390x_emit_bit_not): New function.
1869 (s390x_emit_equal): New function.
1870 (s390x_emit_less_signed): New function.
1871 (s390x_emit_less_unsigned): New function.
1872 (s390x_emit_ref): New function.
1873 (s390x_emit_if_goto): New function.
1874 (s390x_emit_const): New function.
1875 (s390x_emit_call): New function.
1876 (s390x_emit_reg): New function.
1877 (s390x_emit_pop): New function.
1878 (s390x_emit_stack_flush): New function.
1879 (s390x_emit_zero_ext): New function.
1880 (s390x_emit_swap): New function.
1881 (s390x_emit_stack_adjust): New function.
1882 (s390x_emit_int_call_1): New function.
1883 (s390x_emit_void_call_2): New function.
1884 (s390x_emit_eq_goto): New function.
1885 (s390x_emit_ne_goto): New function.
1886 (s390x_emit_lt_goto): New function.
1887 (s390x_emit_le_goto): New function.
1888 (s390x_emit_gt_goto): New function.
1889 (s390x_emit_ge_goto): New function.
1890 (s390_emit_ops): New function.
1891 (struct linux_target_ops): Fill in emit_ops hook.
1892
abd9baf9
MK
18932016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1894
1895 PR 18377
1896 * Makefile.in: Add s390 IPA files.
1897 * configure.srv: Build IPA for s390.
1898 * linux-s390-ipa.c: New file.
1899 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1900 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1901 (tdesc_s390_linux32): Likewise.
1902 (init_registers_s390_linux32v1): Likewise.
1903 (tdesc_s390_linux32v1): Likewise.
1904 (init_registers_s390_linux32v2): Likewise.
1905 (tdesc_s390_linux32v2): Likewise.
1906 (init_registers_s390_linux64): Likewise.
1907 (tdesc_s390_linux64): Likewise.
1908 (init_registers_s390_linux64v1): Likewise.
1909 (tdesc_s390_linux64v1): Likewise.
1910 (init_registers_s390_linux64v2): Likewise.
1911 (tdesc_s390_linux64v2): Likewise.
1912 (init_registers_s390_te_linux64): Likewise.
1913 (tdesc_s390_te_linux64): Likewise.
1914 (init_registers_s390_vx_linux64): Likewise.
1915 (tdesc_s390_vx_linux64): Likewise.
1916 (init_registers_s390_tevx_linux64): Likewise.
1917 (tdesc_s390_tevx_linux64): Likewise.
1918 (init_registers_s390x_linux64): Likewise.
1919 (tdesc_s390x_linux64): Likewise.
1920 (init_registers_s390x_linux64v1): Likewise.
1921 (tdesc_s390x_linux64v1): Likewise.
1922 (init_registers_s390x_linux64v2): Likewise.
1923 (tdesc_s390x_linux64v2): Likewise.
1924 (init_registers_s390x_te_linux64): Likewise.
1925 (tdesc_s390x_te_linux64): Likewise.
1926 (init_registers_s390x_vx_linux64): Likewise.
1927 (tdesc_s390x_vx_linux64): Likewise.
1928 (init_registers_s390x_tevx_linux64): Likewise.
1929 (tdesc_s390x_tevx_linux64): Likewise.
1930 (have_hwcap_s390_vx): New static variable.
1931 (s390_arch_setup): Fill have_hwcap_s390_vx.
1932 (s390_get_thread_area): New function.
1933 (s390_ft_entry_gpr_esa): New const.
1934 (s390_ft_entry_gpr_zarch): New const.
1935 (s390_ft_entry_misc): New const.
1936 (s390_ft_entry_fr): New const.
1937 (s390_ft_entry_vr): New const.
1938 (s390_ft_main_31): New const.
1939 (s390_ft_main_64): New const.
1940 (s390_ft_exit_fr): New const.
1941 (s390_ft_exit_vr): New const.
1942 (s390_ft_exit_misc): New const.
1943 (s390_ft_exit_gpr_esa): New const.
1944 (s390_ft_exit_gpr_zarch): New const.
1945 (append_insns): New function.
1946 (s390_relocate_instruction): New function.
1947 (s390_install_fast_tracepoint_jump_pad): New function.
1948 (s390_get_min_fast_tracepoint_insn_len): New function.
1949 (s390_get_ipa_tdesc_idx): New function.
1950 (struct linux_target_ops): Wire in the above functions.
1951 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1952 * linux-s390-tdesc.h: New file.
1953
a4105d04
MK
19542016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1955
1956 * linux-s390-low.c (s390_supports_tracepoints): New function.
1957 (struct linux_target_ops): Fill supports_tracepoints hook.
1958
35ac8b3e
YQ
19592016-03-18 Yao Qi <yao.qi@linaro.org>
1960
1961 * linux-low.c (lwp_signal_can_be_delivered): New function.
1962 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1963
94610ec4
YQ
19642016-03-18 Yao Qi <yao.qi@linaro.org>
1965
1966 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1967 0 if signal is enqueued. Remove 'signal' from one debugging
1968 message. Move one debugging message to some lines below.
1969 Remove code setting 'signal' to 0.
1970
80aea927
YQ
19712016-03-18 Yao Qi <yao.qi@linaro.org>
1972
1973 * linux-low.c (linux_low_filter_event): Remove redundant
1974 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1975
b04fd3be
MK
19762016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1977
1978 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1979 (struct linux_target_ops): Wire in the above.
1980
c40c8d4b
YQ
19812016-03-03 Yao Qi <yao.qi@linaro.org>
1982
1983 * linux-low.c: Update comments to start_step_over.
1984
0f8288ae
YQ
19852016-03-03 Yao Qi <yao.qi@linaro.org>
1986
1987 PR server/19736
1988 * linux-low.c (handle_extended_wait): Set child suspended
1989 if event_lwp->bp_reinsert isn't zero.
1990
fdbd04a8
YQ
19912016-03-02 Yao Qi <yao.qi@linaro.org>
1992
1993 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1994 enqueue_pending_signal.
1995
6896a8fa
MK
19962016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1997
1998 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1999 is actually loaded.
2000
ab503087
MK
20012016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2002
2003 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2004 (s390_regmap_3264) [!__s390x__]: New global.
2005 (s390_collect_ptrace_register): Skip map entries containing -1.
2006 (s390_supply_ptrace_register): Ditto.
2007 (s390_fill_gprs_high): New function.
2008 (s390_store_gprs_high): New function.
2009 (s390_regsets): Add NT_S390_HIGH_GPRS.
2010 (s390_get_hwcap): Enable on 31-bit.
2011 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2012 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2013 Detect NT_S390_HIGH_GPRS.
2014 (s390_usrregs_info_3264): Enable on 31-bit.
2015 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2016 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2017
ae91f625
MK
20182016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2019
2020 PR gdb/13808
2021 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2022 * configure.srv: Ditto.
2023 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2024 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2025 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2026 (init_registers_amd64_linux): Remove prototype.
2027 (tdesc_amd64_linux): Remove declaration.
2028 (get_ipa_tdesc): New function.
2029 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2030 initialize remaining tdescs.
2031 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2032 (init_registers_i386_linux): Remove prototype.
2033 (tdesc_i386_linux): Remove declaration.
2034 (get_ipa_tdesc): New function.
2035 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2036 initialize remaining tdescs.
2037 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2038 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2039 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2040 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2041 (x86_get_ipa_tdesc_idx): New function.
2042 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2043 * linux-x86-tdesc.h: New file.
2044 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2045 (target_get_ipa_tdesc_idx): New macro.
2046 * tracepoint.c (ipa_tdesc_idx): New macro.
2047 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2048 (symbol_list): Add ipa_tdesc_idx.
2049 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2050 (ipa_tdesc): Remove.
2051 (ipa_tdesc_idx): New variable.
2052 (get_context_regcache): Use get_ipa_tdesc.
2053 (gdb_collect): Ditto.
2054 (gdb_probe): Ditto.
2055 * tracepoint.h (get_ipa_tdesc): New prototype.
2056 (ipa_tdesc): Remove.
2057
e7ad2f14
PA
20582016-02-24 Pedro Alves <palves@redhat.com>
2059
2060 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2061 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2062 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2063 Factor out common code between the USE_SIGTRAP_SIGINFO and
2064 !USE_SIGTRAP_SIGINFO blocks.
2065 (linux_low_filter_event): Call save_stop_reason instead of
2066 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2067 Update comments.
2068 (linux_wait_1): Update comments.
2069
657f9cde
WW
20702016-02-24 Wei-cheng Wang <cole945@gmail.com>
2071
2072 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2073 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2074 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2075 ppc_insert_point, ppc_remove_point.
2076
b00b61e1
MK
20772016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2078
2079 * linux-s390-low.c (s390_supports_z_point_type): New function.
2080 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2081
553cb527
YQ
20822016-02-16 Yao Qi <yao.qi@linaro.org>
2083
2084 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2085 PC. Get pc from regcache_read_pc.
2086
a5652c21
YQ
20872016-02-12 Yao Qi <yao.qi@linaro.org>
2088
2089 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2090 or linux_get_pc_32bit.
2091 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2092
ed443b61
YQ
20932016-02-12 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2096 arm_linux_get_next_pcs_fixup.
2097
020ecd38
MK
20982016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2099
2100 * tracepoint.c (x_tracepoint_action_download): Change
2101 write_inferior_data_ptr to write_inferior_data_pointer.
2102 (cmd_qtstart): Likewise.
2103 (write_inferior_data_ptr): Remove.
2104 (download_agent_expr): Change write_inferior_data_ptr to
2105 write_inferior_data_pointer.
2106 (download_tracepoint_1): Likewise.
2107 (download_tracepoint): Likewise.
2108 (download_trace_state_variables): Likewise.
2109
7cae9051
WW
21102016-02-11 Wei-cheng Wang <cole945@gmail.com>
2111 Marcin Kościelnicki <koriakin@0x04.net>
2112
2113 * tracepoint.c (struct tracepoint_action_ops): Remove.
2114 (struct tracepoint_action): Remove ops.
2115 (m_tracepoint_action_download, r_tracepoint_action_download)
2116 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2117 size and offset accordingly.
2118 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2119 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2120 (tracepoint_action_send, tracepoint_action_download): New functions.
2121 Helpers for trace action handlers.
2122 (add_tracepoint_action): Remove setup actions ops.
2123 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2124
9f6a71b4
YQ
21252016-02-10 Yao Qi <yao.qi@linaro.org>
2126
2127 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2128
1e94266c
SM
21292016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2130
2131 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2132 to AC_OUTPUT.
2133 * configure: Regenerate.
2134
8adce034
SM
21352016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2136
2137 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2138 void * to gdb_byte *.
2139 * linux-low.c (siginfo_fixup): Likewise.
2140 (linux_xfer_siginfo): Likewise.
2141 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2142 Likewise.
2143 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2144
93813b37
WT
21452016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2146
2147 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2148 to srv_tgtobj.
2149 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2150 to srv_tgtobj.
2151 * linux-x86-low.c [__x86_64__]: Include
2152 "nat/amd64-linux-siginfo.h".
2153 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2154 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2155 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2156 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2157 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2158 (cpt_si_fd, si_timerid, si_overrun): Move from
2159 nat/amd64-linux-siginfo.c.
2160 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2161
8424cc97
SM
21622016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2163
2164 * server.c (skip_to_semicolon): Remove.
2165 (process_point_options): Use strchrnul instead of
2166 skip_to_semicolon.
2167
4d18591b
YQ
21682016-01-26 Yao Qi <yao.qi@linaro.org>
2169
2170 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2171 * linux-low.c (install_software_single_step_breakpoints): Don't
2172 call regcache_read_pc.
2173 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2174 argument pc.
2175
d8020970
YQ
21762016-01-26 Yao Qi <yao.qi@linaro.org>
2177
2178 * linux-low.c (install_software_single_step_breakpoints): Call
2179 regcache_read_pc instead of get_pc.
2180
8b207339
YQ
21812016-01-26 Yao Qi <yao.qi@linaro.org>
2182
2183 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2184 (unblock_async_io): Rename to ...
2185 (block_unblock_async_io): ... it. New function.
2186 (enable_async_io): Don't install SIGIO handler. Unblock it
2187 instead.
2188 (disable_async_io): Don't ignore SIGIO. Block it instead.
2189 (initialize_async_io): Install SIGIO handler. Don't call
2190 unblock_async_io.
2191
18879fef
YQ
21922016-01-26 Yao Qi <yao.qi@linaro.org>
2193
2194 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2195 first character is '\003', call *the_target->request_interrupt.
2196
a0f8e08a
YQ
21972016-01-25 Yao Qi <yao.qi@linaro.org>
2198
2199 * remote-utils.c (new_thread_notify): Remove.
2200 (dead_thread_notify): Likewise.
2201 * remote-utils.h (new_thread_notify): Remove declaration.
2202 (dead_thread_notify): Likewise.
2203
cc5fd9ab
MK
22042016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2205
2206 * gdb.trace/pending.exp: Fix expected message on continue.
2207
99e8eb11
MK
22082016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2209
2210 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2211 it works properly on big-endian machines where sizeof (CORE_ADDR)
2212 != sizeof (void *).
2213
a994041d
PA
22142016-01-21 Pedro Alves <palves@redhat.com>
2215
2216 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2217 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2218 * configure: Regenerate.
2219
f7a6a40d
YQ
22202016-01-21 Yao Qi <yao.qi@linaro.org>
2221
2222 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2223 is_thumb and set it according to CPSR saved on the stack.
2224 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2225 arm_sigreturn_next_pc.
2226
6f69e520
YQ
22272016-01-18 Yao Qi <yao.qi@linaro.org>
2228
2229 * linux-low.c (linux_set_pc_64bit): New function.
2230 (linux_get_pc_64bit): New function.
2231 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2232 Declare.
2233 * linux-sparc-low.c (debug_threads): Remove declaration.
2234 (sparc_get_pc): Remove.
2235 (the_low_target): Use linux_get_pc_64bit instead of
2236 sparc_get_pc.
2237 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2238 (the_low_target): Use linux_get_pc_64bit and
2239 linux_set_pc_64bit.
2240
276d4552
YQ
22412016-01-18 Yao Qi <yao.qi@linaro.org>
2242
2243 * linux-arm-low.c (debug_threads): Remove declaration.
2244 (arm_get_pc, arm_set_pc): Remove.
2245 (the_low_target): Use linux_get_pc_32bit and
2246 linux_set_pc_32bit.
2247 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2248 (the_low_target): Use linux_get_pc_32bit and
2249 linux_set_pc_32bit.
2250 * linux-cris-low.c (debug_threads): Remove declaration.
2251 (cris_get_pc, cris_set_pc,): Remove.
2252 (the_low_target): Use linux_get_pc_32bit and
2253 linux_set_pc_32bit.
2254 * linux-crisv32-low.c (debug_threads): Remove declaration.
2255 (cris_get_pc, cris_set_pc): Remove.
2256 (the_low_target): Use linux_get_pc_32bit and
2257 linux_set_pc_32bit.
2258 * linux-low.c: Include inttypes.h.
2259 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2260 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2261 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2262 (the_low_target): Use linux_get_pc_32bit and
2263 linux_set_pc_32bit.
2264 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2265 (the_low_target): Use linux_get_pc_32bit and
2266 linux_set_pc_32bit.
2267 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2268 (the_low_target): Use linux_get_pc_32bit and
2269 linux_set_pc_32bit.
2270 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2271 (the_low_target): Use linux_get_pc_32bit and
2272 linux_set_pc_32bit.
2273 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2274 (the_low_target): Use linux_get_pc_32bit and
2275 linux_set_pc_32bit.
2276
eb0edac8
GB
22772016-01-18 Gary Benson <gbenson@redhat.com>
2278
2279 * configure.ac (AC_FUNC_FORK): New check.
2280 * config.in: Regenerate.
2281 * configure: Likewise.
2282
1b451dda
YQ
22832016-01-14 Yao Qi <yao.qi@linaro.org>
2284
2285 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2286 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2287 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2288 arm_get_next_pcs_ctor.
2289
82075af2
JS
22902016-01-12 Josh Stone <jistone@redhat.com>
2291 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2292
2293 * inferiors.h: Include "gdb_vecs.h".
2294 (struct process_info): Add syscalls_to_catch.
2295 * inferiors.c (remove_process): Free syscalls_to_catch.
2296 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2297 syscall_return stops.
2298 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2299 * server.c (handle_general_set): Handle QCatchSyscalls.
2300 (handle_query): Report support for QCatchSyscalls.
2301 * target.h (struct target_ops): Add supports_catch_syscall.
2302 (target_supports_catch_syscall): New macro.
2303 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2304 (struct lwp_info): Add syscall_state.
2305 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2306 Maintain syscall_state and syscalls_to_catch across exec.
2307 (get_syscall_trapinfo): New function, proxy to the_low_target.
2308 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2309 (linux_low_filter_event): Toggle syscall_state entry/return for
2310 syscall traps, and set it ignored for all others.
2311 (gdb_catching_syscalls_p): New function.
2312 (gdb_catch_this_syscall_p): New function.
2313 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2314 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2315 (linux_supports_catch_syscall): New function.
2316 (linux_target_ops): Install it.
2317 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2318 (the_low_target): Install it.
2319
8f13a3ce
MF
23202016-01-12 Mike Frysinger <vapier@gentoo.org>
2321
2322 * acinclude.m4: Include new ../warning.m4 file.
2323 * configure: Regenerated.
2324 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2325
5b3da067
MF
23262016-01-12 Mike Frysinger <vapier@gentoo.org>
2327
2328 * ax.c (is_goto_target): Mark static.
2329 * linux-low.c (register_addr): Likewise.
2330 (linux_fetch_registers, linux_store_registers): Likewise.
2331 * mem-break.c (any_persistent_commands): Fix old prototype.
2332 (add_commands_to_breakpoint): Mark static.
2333 * regcache.c (find_register_by_name): Delete unused func.
2334 * remote-utils.c (hex_or_minus_one): Mark static.
2335 * server.c (monitor_show_help): Mark static.
2336 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2337 handle_v_requests): Likewise.
2338
bc504a31
PA
23392016-01-12 Pedro Alves <palves@redhat.com>
2340
2341 Remove use of the registered trademark symbol throughout.
2342
5a0dd67a
YQ
23432016-01-08 Yao Qi <yao.qi@linaro.org>
2344
2345 * remote-utils.c (getpkt): If c is '\003', call target hook
2346 request_interrupt.
2347
b2ca446f
YQ
23482016-01-06 Yao Qi <yao.qi@linaro.org>
2349
2350 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2351 linux-aarch32-low.c.
2352 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2353 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2354 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2355 (thumb2_breakpoint): Declare.
2356 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2357 linux-aarch32-low.h.
2358 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2359 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2360 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2361
edd88788
JB
23622016-01-01 Joel Brobecker <brobecker@adacore.com>
2363
2364 * gdbreplay.c (gdbreplay_version): Change copyright year in
2365 version message.
2366 * server.c (gdbserver_version): Likewise.
2367
65da7f14
PP
23682015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2369
2370 * server.c (crc32_table): Delete.
2371 (crc32): Use libiberty's xcrc32 function.
2372
4abd5ed2
JB
23732015-12-22 Joel Brobecker <brobecker@adacore.com>
2374
2375 * lynx-low.c (lynx_delete_thread_callback): New function.
2376 (lynx_mourn): Properly delete our process and all of its
2377 threads. Remove call to clear_inferiors.
2378
0e50fe5c
JB
23792015-12-22 Joel Brobecker <brobecker@adacore.com>
2380
2381 * target.c (thread_search_callback): Add check that
2382 the thread_stopped target callback is not NULL before
2383 calling it.
2384
35adc03f
YQ
23852015-12-21 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2388 arm breakpoint.
2389
bd2b2909
AT
23902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2391
2392 * server.c (handle_query): Call target_supports_software_single_step.
2393
7fe5e27e
AT
23942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2395
2396 * linux-low.c (single_step): New function.
2397 (linux_resume_one_lwp_throw): Call single_step.
2398 (start_step_over): Likewise.
2399
d9311bfa
AT
24002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2401
2402 * Makefile.in (SFILES): Append arch/arm-linux.c,
2403 arch/arm-get-next-pcs.c.
2404 (arm-linux.o): New rule.
2405 (arm-get-next-pcs.o): New rule.
2406 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2407 arm-linux.o.
2408 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2409 to linux-aarch32-low.c.
2410 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2411 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2412 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2413 (thumb2_breakpoint_len): Likewise.
2414 (arm_is_thumb_mode): Make non-static.
2415 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2416 from linux-aarch32-low.c.
2417 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2418 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2419 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2420 (thumb2_breakpoint_len): Likewise.
2421 (arm_is_thumb_mode): New declaration.
2422 * linux-arm-low.c: Include arch/arm-linux.h
2423 aarch/arm-get-next-pcs.h, sys/syscall.h.
2424 (get_next_pcs_ops): New struct.
2425 (get_next_pcs_addr_bits_remove): New function.
2426 (get_next_pcs_is_thumb): New function.
2427 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2428 (arm_sigreturn_next_pc): Likewise.
2429 (get_next_pcs_syscall_next_pc): Likewise.
2430 (arm_gdbserver_get_next_pcs): Likewise.
2431 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2432 Initialize.
2433 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2434 * server.h: Include gdb_vecs.h.
2435
68ce2059
AT
24362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2437
2438 * Makefile.in (SFILES): Append common/common-regcache.c.
2439 (OBS): Append common-regcache.o.
2440 (common-regcache.o): New rule.
2441 * regcache.c (init_register_cache): Initialize cache to
2442 REG_UNAVAILABLE.
2443 (regcache_raw_read_unsigned): New function.
2444 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2445 register_status enum.
2446
fa5308bd
AT
24472015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2448
2449 * linux-aarch64-low.c (the_low_targets): Rename
2450 breakpoint_reinsert_addr to get_next_pcs.
2451 * linux-arm-low.c (the_low_targets): Likewise.
2452 * linux-bfin-low.c (the_low_targets): Likewise.
2453 * linux-cris-low.c (the_low_targets): Likewise.
2454 * linux-crisv32-low.c (the_low_targets): Likewise.
2455 * linux-low.c (can_software_single_step): Likewise.
2456 (install_software_single_step_breakpoints): New function.
2457 (start_step_over): Use install_software_single_step_breakpoints.
2458 * linux-low.h: New CORE_ADDR vector.
2459 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2460 get_next_pcs.
2461 * linux-mips-low.c (the_low_targets): Likewise.
2462 * linux-nios2-low.c (the_low_targets): Likewise.
2463 * linux-sparc-low.c (the_low_targets): Likewise.
2464
4a6ed09b
PA
24652015-12-17 Pedro Alves <palves@redhat.com>
2466
2467 * linux-low.c (linux_kill_one_lwp): Remove references to
2468 LinuxThreads.
2469 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2470 to 'kill'.
2471 (linux_init_signals): Delete.
2472 (initialize_low): Adjust.
2473 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2474
7544db95
PA
24752015-12-16 Pedro Alves <palves@redhat.com>
2476
2477 * configure.ac (compiler warning flags): When testing a
2478 -Wno-foo option, check whether -Wfoo works instead.
2479 * configure: Regenerate.
2480
8020350c
DB
24812015-12-11 Don Breazeal <donb@codesourcery.com>
2482
2483 * server.c (process_serial_event): Don't exit from gdbserver
2484 in remote mode if there are still active inferiors.
2485
db91f502
YQ
24862015-12-11 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2489 arm_breakpoint_at if the process is 32-bit.
2490
b37a6290
YQ
24912015-12-11 Yao Qi <yao.qi@linaro.org>
2492
2493 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2494 arm breakpoint.
2495
17b1509a
YQ
24962015-12-07 Yao Qi <yao.qi@linaro.org>
2497
2498 * configure.srv: Append arm.o to srv_tgtobj for
2499 aarch64*-*-linux* target.
2500 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2501 from linux-arm-low.c.
2502 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2503 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2504 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2505 (thumb2_breakpoint_len): Likewise.
2506 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2507 (arm_breakpoint_kinds): Likewise.
2508 (arm_breakpoint_kind_from_pc): Likewise.
2509 (arm_sw_breakpoint_from_kind): Likewise.
2510 (arm_breakpoint_kind_from_current_state): Likewise.
2511 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2512 (arm_sw_breakpoint_from_kind): Declare.
2513 (arm_breakpoint_kind_from_current_state): Declare.
2514 (arm_breakpoint_at): Declare.
2515 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2516 arm_sw_breakpoint_from_kind if process is 32-bit.
2517 (aarch64_breakpoint_kind_from_pc): New function.
2518 (aarch64_breakpoint_kind_from_current_state): New function.
2519 (the_low_target): Initialize fields breakpoint_kind_from_pc
2520 and breakpoint_kind_from_current_state.
2521 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2522 linux-aarch32-low.c.
2523 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2524 (arm_breakpoint, arm_breakpoint_len): Likewise.
2525 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2526 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2527 (arm_is_thumb_mode): Likewise.
2528 (arm_breakpoint_at): Likewise.
2529 (arm_breakpoint_kind_from_pc): Likewise.
2530 (arm_sw_breakpoint_from_kind): Likewise.
2531 (arm_breakpoint_kind_from_current_state): Likewise.
2532
2533 Revert:
2534 2015-08-04 Yao Qi <yao.qi@linaro.org>
2535
2536 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2537 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2538 * server.c (extended_protocol): Remove "static".
2539 * server.h (extended_protocol): Declare it.
2540
ece66d65
JS
25412015-12-04 Josh Stone <jistone@redhat.com>
2542
2543 * target.h (struct target_ops) <arch_setup>: Rename to ...
2544 (struct target_ops) <post_create_inferior>: ... this.
2545 (target_arch_setup): Rename to ...
2546 (target_post_create_inferior): ... this, calling post_create_inferior.
2547 * server.c (start_inferior): Update target_arch_setup calls to
2548 target_post_create_inferior.
2549 * linux-low.c (linux_low_ptrace_options): Forward declare.
2550 (linux_arch_setup): Update its comment for general use.
2551 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2552 (struct linux_target_ops): Use linux_post_create_inferior.
2553 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2554 to post_create_inferior.
2555 * nto-low.c (struct nto_target_ops): Likewise.
2556 * spu-low.c (struct spu_target_ops): Likewise.
2557 * win32-low.c (struct win32_target_ops): Likewise.
2558
e58c48b4
AT
25592015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2560
2561 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2562
fbec8956
AT
25632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2564
2565 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2566 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2567 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2568 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2569 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2570 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2571 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2572 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2573 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2574 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2575 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2576 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2577
9b4c5f87
AT
25782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2579
2580 * linux-low.c (linux_look_up_symbols): Don't call
2581 linux_supports_traceclone.
2582 * linux-low.h (thread_db_init): Remove use_events argument.
2583 * thread-db.c (thread_db_use_event): Remove global variable.
2584 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2585 (struct thread_db) <td_create_bp>: Remove field.
2586 (thread_db_create_event): Remove function.
2587 (thread_db_enable_reporting): Likewise.
2588 (find_one_thread): Don't check for thread_db_use_events.
2589 (attach_thread): Likewise.
2590 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2591 (try_thread_db_load_1): Don't check for thread_db_use_events.
2592 (thread_db_init): Remove use_events argument and thread events
2593 handling.
2594 (remove_thread_event_breakpoints): Remove function.
2595 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2596
7d00775e
AT
25972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2598
2599 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2600 New function.
2601 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2602 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2604 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2605 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2606 Initialize.
2607 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2608 New function.
2609 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2610 * linux-low.c (can_hardware_single_step): Use
2611 supports_hardware_single_step.
2612 (can_software_single_step): New function.
2613 (start_step_over): Call can_software_single_step.
2614 (linux_supports_hardware_single_step): New function.
2615 (struct target_ops) <supports_software_single_step>: Initialize.
2616 * linux-low.h (struct linux_target_ops)
2617 <supports_hardware_single_step>: Initialize.
2618 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2619 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2620 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2621 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2622 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2623 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2624 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2625 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2626 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2627 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2628 Initialize.
2629 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2630 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2631 Initialize.
2632 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2633 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2634 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2635 New function.
2636 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2637 * target.h (struct target_ops): <supports_software_single_step>:
2638 New field.
2639 (target_supports_software_single_step): New macro.
2640
2d97cd35
AT
26412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2642
2643 * linux-low.c (linux_wait_1): Fix pc advance condition.
2644 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2645 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2646
769ef81f
AT
26472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2648
2649 * linux-arm-low.c (arm_is_thumb_mode): New function.
2650 (arm_breakpoint_at): Use arm_is_thumb_mode.
2651 (arm_breakpoint_kind_from_current_state): New function.
2652 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2653 Initialize.
2654 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2655 (linux_breakpoint_kind_from_current_state): New function.
2656 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2657 * linux-low.h (struct linux_target_ops)
2658 <breakpoint_kind_from_current_state>: New field.
2659 * target.h (struct target_ops): Likewise.
2660 (target_breakpoint_kind_from_current_state): New macro.
2661
1bebeeca
PA
26622015-11-30 Pedro Alves <palves@redhat.com>
2663
2664 * linux-low.c (linux_resume): Wake up the event loop before
2665 returning.
2666
a67a9fae
PA
26672015-11-30 Pedro Alves <palves@redhat.com>
2668
2669 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2670 check.
2671 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2672 to -1.
2673 * target.c (struct thread_search): New structure.
2674 (thread_search_callback): New function.
2675 (prev_general_thread): New global.
2676 (prepare_to_access_memory, done_accessing_memory): New functions.
2677 * target.h (prepare_to_access_memory, done_accessing_memory):
2678 Replace macros with function declarations.
2679
f2faf941
PA
26802015-11-30 Pedro Alves <palves@redhat.com>
2681
2682 PR 14618
2683 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2684 report TARGET_WAITKIND_NO_RESUMED.
2685 * remote-utils.c (prepare_resume_reply): Handle
2686 TARGET_WAITKIND_NO_RESUMED.
2687 * server.c (report_no_resumed): New global.
2688 (handle_query) <qSupported>: Handle "no-resumed+". Report
2689 "no-resumed+" support.
2690 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2691 return error if the client doesn't support no-resumed events.
2692 (push_stop_notification): New function.
2693 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2694 events if the client supports them.
2695
a681f9c9
PA
26962015-11-30 Pedro Alves <palves@redhat.com>
2697
2698 * linux-low.c (thread_still_has_status_pending_p): Don't check
2699 vCont;t here.
2700 (lwp_resumed): New function.
2701 (status_pending_p_callback): Return early if the LWP is not
2702 supposed to be resumed.
2703
65706a29
PA
27042015-11-30 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (handle_extended_wait): Assert that the LWP's
2707 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2708 thread create events, leave the new child's status pending.
2709 (linux_low_filter_event): If GDB wants to hear about thread exit
2710 events, leave the LWP marked dead and don't delete it.
2711 (linux_wait_for_event_filtered): Don't check for thread exit.
2712 (filter_exit_event): New function.
2713 (linux_wait_1): Use it, when returning an exit event.
2714 (linux_resume_one_lwp_throw): Assert that the LWP's
2715 waitstatus is TARGET_WAITKIND_IGNORE.
2716 * remote-utils.c (prepare_resume_reply): Handle
2717 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2718 * server.c (report_thread_events): New global.
2719 (handle_general_set): Handle QThreadEvents.
2720 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2721 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2722 TARGET_WAITKIND_THREAD_EXITED.
2723 * server.h (report_thread_events): Declare.
2724
56cf4bed
PA
27252015-11-30 Pedro Alves <palves@redhat.com>
2726
2727 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2728 the thread's last_resume_kind was resume_stop.
2729
500c1d85
PA
27302015-11-30 Pedro Alves <palves@redhat.com>
2731
2732 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2733 before returning.
2734
de979965
PA
27352015-11-30 Pedro Alves <palves@redhat.com>
2736
2737 * server.c (handle_v_requests): Handle vCtrlC.
2738
34c65914
PA
27392015-11-30 Pedro Alves <palves@redhat.com>
2740
2741 * gdbthread.h (find_any_thread_of_pid): Declare.
2742 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2743 functions.
2744 * server.c (handle_query): If current_thread is NULL, look for
2745 another thread of the selected process.
2746
79efa585 27472015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2748 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2749
2750 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2751 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2752 name in reply.
2753 * target.h (struct target_ops) <thread_name>: New field.
2754 (target_thread_name): New macro.
2755
80d82c19
JB
27562015-11-23 Joel Brobecker <brobecker@adacore.com>
2757
2758 * regcache.h (regcache_invalidate_pid): Add declaration.
2759 * regcache.c (regcache_invalidate_pid): New function, extracted
2760 from regcache_invalidate.
2761 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2762 Add trivial documentation comment.
2763 * lynx-low.c: Use regcache_invalidate_pid instead of
2764 regcache_invalidate.
2765
64da5dd5
JB
27662015-11-23 Joel Brobecker <brobecker@adacore.com>
2767
2768 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2769 and Elf64_auxv_t if the target is Android.
2770
37ce4055
DE
27712015-11-22 Doug Evans <xdje42@gmail.com>
2772
2773 * target.h: #include <sys/types.h>.
2774
06e03fff
PA
27752015-11-19 Pedro Alves <palves@redhat.com>
2776
2777 * linux-low.c (linux_process_qsupported): Change prototype.
2778 Adjust.
2779 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2780 Change prototype.
2781 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2782 and adjust to loop over all features.
2783 * server.c (handle_query) <qSupported>: Adjust to call
2784 target_process_qsupported once, passing it a vector of unprocessed
2785 features.
2786 * target.h (struct target_ops) <process_qsupported>: Change
2787 prototype.
2788 (target_process_qsupported): Adjust.
2789
9a084706
PA
27902015-11-19 Pedro Alves <palves@redhat.com>
2791
2792 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2793 mode.
2794 * configure: Regenerate.
2795
dad44a1f
PA
27962015-11-19 Pedro Alves <palves@redhat.com>
2797
2798 * configure: Regenerate.
2799
231c0592
YQ
28002015-11-19 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2803 type to uint32_t.
2804
6c1c9a8b
YQ
28052015-11-19 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2808 (struct aarch64_operand): Move enum out.
2809
9caa3311
YQ
28102015-11-19 Yao Qi <yao.qi@linaro.org>
2811
2812 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2813 struct user_fpsimd_state *.
2814 (aarch64_store_fpregset): Likewise.
2815
6a69a054
YQ
28162015-11-19 Yao Qi <yao.qi@linaro.org>
2817
2818 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2819 struct user_pt_regs *.
2820 (aarch64_store_gregset): Likewise.
2821
1798301e
PA
28222015-11-18 Pedro Alves <palves@redhat.com>
2823
2824 * Makefile.in (all_object_files): Add $IPA_OBJS.
2825
ce7715e2
PA
28262015-11-17 Pedro Alves <palves@redhat.com>
2827
2828 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2829 GDB_SIGNAL_0 and gdb_signal_to_string.
2830
c0879059
PA
28312015-11-17 Pedro Alves <palves@redhat.com>
2832
2833 * win32-low.c (handle_output_debug_string): Remove parameter.
2834 (win32_kill): Remove our_status local and adjust call to
2835 handle_output_debug_string.
2836 (get_child_debug_event): Adjust call to
2837 handle_output_debug_string.
2838
1996e237
SM
28392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2840
2841 * linux-mips-low.c (mips_fill_gregset): Add cast.
2842 (mips_store_gregset): Likewise.
2843 (mips_fill_fpregset): Likewise.
2844 (mips_store_fpregset): Likewise.
2845
cbec665b
SM
28462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2847
2848 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2849 priv.
2850
eb3e3c67
SM
28512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2852
2853 * linux-mips-low.c (mips_linux_new_thread): Change type of
2854 watch_type to enum target_hw_bp_type.
2855
171de4b8
SM
28562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2857
2858 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2859 Change return type to arm_hwbp_type.
2860
04248ead
SM
28612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2862
2863 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2864 (arm_store_gregset): Likewise.
2865 * linux-arm-low.c (arm_get_hwcap): Likewise.
2866 (arm_read_description): Likewise.
2867
04b3479c
SM
28682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2869
2870 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2871
2bc84e8a
SM
28722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2873
2874 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2875 (ppc_fill_vsxregset): Likewise.
2876 (ppc_store_vsxregset): Likewise.
2877 (ppc_fill_vrregset): Likewise.
2878 (ppc_store_vrregset): Likewise.
2879 (ppc_fill_evrregset): Likewise.
2880 (ppc_store_evrregset): Likewise.
2881
e6c5bb05
SM
28822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2883
2884 * linux-ppc-low.c (ppc_usrregs_info): Remove
2885 forward-declaration.
2886 (ppc_arch_setup): Move lower in file.
2887
7ea45d72
SM
28882015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2889
2890 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2891 (ps_pdwrite): Likewise.
2892
69291610
HW
28932015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2894
2895 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2896 to after assert checks.
2897
b42945fd
SM
28982015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2899
2900 * proc-service.c (ps_pdread): Add/adjust casts.
2901 (ps_pdwrite): Add/adjust casts.
2902
d6f85c84
SM
29032015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2904
2905 * server.c (handle_search_memory_1): Cast return value of
2906 memmem.
2907
f98cd059
SM
29082015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2909
2910 * server.c (write_qxfer_response): Change type of data to
2911 gdb_byte *.
2912
d2412fa5
PA
29132015-10-29 Pedro Alves <palves@redhat.com>
2914
2915 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2916
c17414a2
PA
29172015-10-29 Pedro Alves <palves@redhat.com>
2918
2919 * tracepoint.c (clear_installed_tracepoints): Add casts.
2920
e053fbc4
PA
29212015-10-29 Pedro Alves <palves@redhat.com>
2922
2923 * server.c (handle_v_cont, process_serial_event): Add enum
2924 gdb_signal casts to signal parsing code.
2925
add67df8
PA
29262015-10-29 Pedro Alves <palves@redhat.com>
2927
2928 * linux-low.h (NULL_REGSET): Define.
2929 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2930 * linux-arm-low.c (arm_regsets): Likewise.
2931 * linux-crisv32-low.c (cris_regsets): Likewise.
2932 * linux-m68k-low.c (m68k_regsets): Likewise.
2933 * linux-mips-low.c (mips_regsets): Likewise.
2934 * linux-nios2-low.c (nios2_regsets): Likewise.
2935 * linux-ppc-low.c (ppc_regsets): Likewise.
2936 * linux-s390-low.c (s390_regsets): Likewise.
2937 * linux-sh-low.c (sh_regsets): Likewise.
2938 * linux-sparc-low.c (sparc_regsets): Likewise.
2939 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2940 * linux-tile-low.c (tile_regsets): Likewise.
2941 * linux-x86-low.c (x86_regsets): Likewise.
2942 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2943
50bc912a
PA
29442015-10-29 Pedro Alves <palves@redhat.com>
2945
2946 * linux-low.h (NULL_REGSET): Define.
2947 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2948 * linux-arm-low.c (arm_regsets): Likewise.
2949 * linux-crisv32-low.c (cris_regsets): Likewise.
2950 * linux-m68k-low.c (m68k_regsets): Likewise.
2951 * linux-mips-low.c (mips_regsets): Likewise.
2952 * linux-nios2-low.c (nios2_regsets): Likewise.
2953 * linux-ppc-low.c (ppc_regsets): Likewise.
2954 * linux-s390-low.c (s390_regsets): Likewise.
2955 * linux-sh-low.c (sh_regsets): Likewise.
2956 * linux-sparc-low.c (sparc_regsets): Likewise.
2957 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2958 * linux-tile-low.c (tile_regsets): Likewise.
2959 * linux-x86-low.c (x86_regsets): Likewise.
2960 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2961
682b2546
DE
29622015-10-26 Doug Evans <dje@google.com>
2963
2964 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2965
963843d4
DE
29662015-10-26 Doug Evans <dje@google.com>
2967
2968 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2969
d41401ac
DE
29702015-10-26 Doug Evans <dje@google.com>
2971
2972 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2973 for debug_printf.
2974 (attach_thread, find_new_threads_callback): Ditto.
2975
3db28855
AT
29762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2977
2978 * mem-break.h (set_breakpoint_data): Remove.
2979
fb78e89c
AT
29802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2981
2982 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2983 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2984 (initialize_low): Remove set_breakpoint_data call.
2985 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2986 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2987 (initialize_low): Remove set_breakpoint_data call.
2988 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2989 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2990 (initialize_low): Remove set_breakpoint_data call.
2991
2e6ee069
AT
29922015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2993
2994 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2995 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2996 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2997 * target.h (target_breakpoint_kind_from_pc): New macro.
2998
1652a986
AT
29992015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3000
3001 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3002 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3003 the default breakpoint kind.
3004
abeead09
AT
30052015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3006
3007 * linux-arm-low.c (arm_supports_z_point_type): Add software
3008 breakpoint support.
3009
b0b4b501
AT
30102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3011
3012 * linux-arm-low.c: Refactor breakpoint definitions.
3013 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3014 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3015
8689682c
AT
30162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3017
3018 * Makefile.in: Add arm.c/o.
3019 * configure.srv: Likewise.
3020 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3021 (arm_breakpoint_kind_from_pc): New function.
3022 (arm_sw_breakpoint_from_kind): Return proper kind.
3023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3024
27165294
AT
30252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3026
3027 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3028 removal.
3029 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3030 (struct raw_breakpoint) <size>: Remove.
3031 (struct raw_breakpoint) <kind>: Add.
3032 (bp_size): New function.
3033 (bp_opcode): Likewise.
3034 (find_raw_breakpoint_at): Adjust for kind.
3035 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3036 (remove_memory_breakpoint): Adjust for kind call bp_size.
3037 (set_raw_breakpoint_at): Adjust for kind.
3038 (set_breakpoint): Likewise.
3039 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3040 (delete_raw_breakpoint): Adjust for kind.
3041 (delete_breakpoint): Likewise.
3042 (find_gdb_breakpoint): Likewise.
3043 (set_gdb_breakpoint_1): Likewise.
3044 (set_gdb_breakpoint): Likewise.
3045 (delete_gdb_breakpoint_1): Likewise.
3046 (delete_gdb_breakpoint): Likewise.
3047 (uninsert_raw_breakpoint): Likewise.
3048 (reinsert_raw_breakpoint): Likewise.
3049 (set_breakpoint_data): Remove.
3050 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3051 (check_mem_read): Adjust for kind call bp_size.
3052 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3053 (clone_one_breakpoint): Adjust for kind.
3054 * mem-break.h (set_gdb_breakpoint): Likewise.
3055 (delete_gdb_breakpoint): Likewise.
3056 * server.c (process_serial_event): Likewise.
3057
dd373349
AT
30582015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3059
3060 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3061 (struct linux_target_ops) <breakpoint>: Remove.
3062 (struct linux_target_ops) <breakpoint_len>: Remove.
3063 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3064 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3065 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3066 (arm_sw_breakpoint_from_kind): New function.
3067 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3068 (struct linux_target_ops) <breakpoint>: Remove.
3069 (struct linux_target_ops) <breakpoint_len>: Remove.
3070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3072 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3073 (struct linux_target_ops) <breakpoint>: Remove.
3074 (struct linux_target_ops) <breakpoint_len>: Remove.
3075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3077 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3078 (struct linux_target_ops) <breakpoint>: Remove.
3079 (struct linux_target_ops) <breakpoint_len>: Remove.
3080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3082 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3083 and sw_breakpoint_from_kind to increment the pc.
3084 (linux_breakpoint_kind_from_pc): New function.
3085 (linux_sw_breakpoint_from_kind): New function.
3086 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3087 (initialize_low): Call breakpoint_kind_from_pc and
3088 sw_breakpoint_from_kind to replace breakpoint_data/len.
3089 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3090 New field.
3091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3092 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3093 (struct linux_target_ops) <breakpoint>: Remove.
3094 (struct linux_target_ops) <breakpoint_len>: Remove.
3095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3097 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3098 (struct linux_target_ops) <breakpoint>: Remove.
3099 (struct linux_target_ops) <breakpoint_len>: Remove.
3100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3102 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3103 (struct linux_target_ops) <breakpoint>: Remove.
3104 (struct linux_target_ops) <breakpoint_len>: Remove.
3105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3107 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3108 (struct linux_target_ops) <breakpoint>: Remove.
3109 (struct linux_target_ops) <breakpoint_len>: Remove.
3110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3112 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3113 (struct linux_target_ops) <breakpoint>: Remove.
3114 (struct linux_target_ops) <breakpoint_len>: Remove.
3115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3117 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3118 (struct linux_target_ops) <breakpoint>: Remove.
3119 (struct linux_target_ops) <breakpoint_len>: Remove.
3120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3122 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3123 (struct linux_target_ops) <breakpoint>: Remove.
3124 (struct linux_target_ops) <breakpoint_len>: Remove.
3125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3127 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3128 (struct linux_target_ops) <breakpoint>: Remove.
3129 (struct linux_target_ops) <breakpoint_len>: Remove.
3130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3132 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3133 (struct linux_target_ops) <breakpoint>: Remove.
3134 (struct linux_target_ops) <breakpoint_len>: Remove.
3135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3137 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3138 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3139 (struct linux_target_ops) <breakpoint>: Remove.
3140 (struct linux_target_ops) <breakpoint_len>: Remove.
3141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3143 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3144 (struct linux_target_ops) <breakpoint>: Remove.
3145 (struct linux_target_ops) <breakpoint_len>: Remove.
3146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3148
4cd98a19
AT
31492015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3150
3151 * linux-cris-low.c (cris_get_pc): Remove void arg.
3152
774ee6d2
AR
31532015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3154
3155 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3156 variable name.
3157
833dcd29
AR
31582015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3159
3160 * inferiors.c (thread_pid_matches_callback): New function.
3161 (find_thread_process): New function.
3162 (remove_thread): Reset current_thread.
3163 (remove_process): Assert threads have been removed first.
3164
8d689ee5
YQ
31652015-10-15 Yao Qi <yao.qi@linaro.org>
3166
3167 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3168 if it is 3.
3169 (aarch64_remove_point): Likewise.
3170 * regcache.c (regcache_register_size): New function.
3171
1c2e1515
YQ
31722015-10-12 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c: Update all callers as emit_load_store
3175 is renamed to aarch64_emit_load_store.
3176
e1c587c3
YQ
31772015-10-12 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-aarch64-low.c: Update all callers of function renaming
3180 from emit_insn to aarch64_emit_insn.
3181
b6542f81
YQ
31822015-10-12 Yao Qi <yao.qi@linaro.org>
3183
3184 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3185 arch/aarch64-insn.h.
3186 (struct aarch64_memory_operand): Likewise.
3187 (ENCODE): Likewise.
3188 (emit_insn): Move to arch/aarch64-insn.c.
3189 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3190 (emit_load_store): Move to arch/aarch64-insn.c.
3191 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3192 (can_encode_int32): Remove.
3193
246994ce
YQ
31942015-10-12 Yao Qi <yao.qi@linaro.org>
3195
3196 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3197 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3198 (aarch64_relocate_instruction): Likewise.
3199 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3200 (struct aarch64_insn_visitor): Likewise.
3201
0badd99f
YQ
32022015-10-12 Yao Qi <yao.qi@linaro.org>
3203
3204 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3205 (struct aarch64_insn_visitor): New.
3206 (struct aarch64_insn_relocation_data): New.
3207 (aarch64_ftrace_insn_reloc_b): New function.
3208 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3209 (aarch64_ftrace_insn_reloc_cb): Likewise.
3210 (aarch64_ftrace_insn_reloc_tb): Likewise.
3211 (aarch64_ftrace_insn_reloc_adr): Likewise.
3212 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3213 (aarch64_ftrace_insn_reloc_others): Likewise.
3214 (visitor): New.
3215 (aarch64_relocate_instruction): Use visitor.
3216
dfaffe9d
YQ
32172015-10-12 Yao Qi <yao.qi@linaro.org>
3218
3219 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3220 int. Add argument buf.
3221 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3222 aarch64_relocate_instruction.
3223
70b439f0
YQ
32242015-10-12 Yao Qi <yao.qi@linaro.org>
3225
3226 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3227 argument insn. Remove local variable insn. Don't call
3228 target_read_uint32.
3229 (aarch64_install_fast_tracepoint_jump_pad): Call
3230 target_read_uint32.
3231
7781c06f
YQ
32322015-09-30 Yao Qi <yao.qi@linaro.org>
3233
3234 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3235 (emit_load_store_pair): Likewise.
3236
9a3c8263
SM
32372015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3238
3239 * dll.c (match_dll): Add cast(s).
3240 (unloaded_dll): Likewise.
3241 * linux-low.c (second_thread_of_pid_p): Likewise.
3242 (delete_lwp_callback): Likewise.
3243 (count_events_callback): Likewise.
3244 (select_event_lwp_callback): Likewise.
3245 (linux_set_resume_request): Likewise.
3246 * server.c (accumulate_file_name_length): Likewise.
3247 (emit_dll_description): Likewise.
3248 (handle_qxfer_threads_worker): Likewise.
3249 (visit_actioned_threads): Likewise.
3250 * thread-db.c (any_thread_of): Likewise.
3251 * tracepoint.c (same_process_p): Likewise.
3252 (match_blocktype): Likewise.
3253 (build_traceframe_info_xml): Likewise.
3254
224c3ddb
SM
32552015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3256
3257 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3258 assignment.
3259 (gdb_unparse_agent_expr): Likewise.
3260 * hostio.c (require_data): Likewise.
3261 (handle_pread): Likewise.
3262 * linux-low.c (disable_regset): Likewise.
3263 (fetch_register): Likewise.
3264 (store_register): Likewise.
3265 (get_dynamic): Likewise.
3266 (linux_qxfer_libraries_svr4): Likewise.
3267 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3268 (set_fast_tracepoint_jump): Likewise.
3269 (uninsert_fast_tracepoint_jumps_at): Likewise.
3270 (reinsert_fast_tracepoint_jumps_at): Likewise.
3271 (validate_inserted_breakpoint): Likewise.
3272 (clone_agent_expr): Likewise.
3273 * regcache.c (init_register_cache): Likewise.
3274 * remote-utils.c (putpkt_binary_1): Likewise.
3275 (decode_M_packet): Likewise.
3276 (decode_X_packet): Likewise.
3277 (look_up_one_symbol): Likewise.
3278 (relocate_instruction): Likewise.
3279 (monitor_output): Likewise.
3280 * server.c (handle_search_memory): Likewise.
3281 (handle_qxfer_exec_file): Likewise.
3282 (handle_qxfer_libraries): Likewise.
3283 (handle_qxfer): Likewise.
3284 (handle_query): Likewise.
3285 (handle_v_cont): Likewise.
3286 (handle_v_run): Likewise.
3287 (captured_main): Likewise.
3288 * target.c (write_inferior_memory): Likewise.
3289 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3290 * tracepoint.c (init_trace_buffer): Likewise.
3291 (add_tracepoint_action): Likewise.
3292 (add_traceframe): Likewise.
3293 (add_traceframe_block): Likewise.
3294 (cmd_qtdpsrc): Likewise.
3295 (cmd_qtdv): Likewise.
3296 (cmd_qtstatus): Likewise.
3297 (response_source): Likewise.
3298 (response_tsv): Likewise.
3299 (cmd_qtnotes): Likewise.
3300 (gdb_collect): Likewise.
3301 (initialize_tracepoint): Likewise.
3302
afbe19f8
PL
33032015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3304
3305 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3306 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3307 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3308 <NOP>: New.
3309 (enum aarch64_condition_codes): New enum.
3310 (w0): New static global.
3311 (fp): Likewise.
3312 (lr): Likewise.
3313 (struct aarch64_memory_operand) <type>: New
3314 MEMORY_OPERAND_POSTINDEX type.
3315 (postindex_memory_operand): New helper function.
3316 (emit_ret): New function.
3317 (emit_load_store_pair): New function, factored out of emit_stp
3318 with support for MEMORY_OPERAND_POSTINDEX.
3319 (emit_stp): Rewrite using emit_load_store_pair.
3320 (emit_ldp): New function.
3321 (emit_load_store): Likewise.
3322 (emit_ldr): Mention post-index instruction in comment.
3323 (emit_ldrh): New function.
3324 (emit_ldrb): New function.
3325 (emit_ldrsw): Mention post-index instruction in comment.
3326 (emit_str): Likewise.
3327 (emit_subs): New function.
3328 (emit_cmp): Likewise.
3329 (emit_and): Likewise.
3330 (emit_orr): Likewise.
3331 (emit_orn): Likewise.
3332 (emit_eor): Likewise.
3333 (emit_mvn): Likewise.
3334 (emit_lslv): Likewise.
3335 (emit_lsrv): Likewise.
3336 (emit_asrv): Likewise.
3337 (emit_mul): Likewise.
3338 (emit_sbfm): Likewise.
3339 (emit_sbfx): Likewise.
3340 (emit_ubfm): Likewise.
3341 (emit_ubfx): Likewise.
3342 (emit_csinc): Likewise.
3343 (emit_cset): Likewise.
3344 (emit_nop): Likewise.
3345 (emit_ops_insns): New helper function.
3346 (emit_pop): Likewise.
3347 (emit_push): Likewise.
3348 (aarch64_emit_prologue): New function.
3349 (aarch64_emit_epilogue): Likewise.
3350 (aarch64_emit_add): Likewise.
3351 (aarch64_emit_sub): Likewise.
3352 (aarch64_emit_mul): Likewise.
3353 (aarch64_emit_lsh): Likewise.
3354 (aarch64_emit_rsh_signed): Likewise.
3355 (aarch64_emit_rsh_unsigned): Likewise.
3356 (aarch64_emit_ext): Likewise.
3357 (aarch64_emit_log_not): Likewise.
3358 (aarch64_emit_bit_and): Likewise.
3359 (aarch64_emit_bit_or): Likewise.
3360 (aarch64_emit_bit_xor): Likewise.
3361 (aarch64_emit_bit_not): Likewise.
3362 (aarch64_emit_equal): Likewise.
3363 (aarch64_emit_less_signed): Likewise.
3364 (aarch64_emit_less_unsigned): Likewise.
3365 (aarch64_emit_ref): Likewise.
3366 (aarch64_emit_if_goto): Likewise.
3367 (aarch64_emit_goto): Likewise.
3368 (aarch64_write_goto_address): Likewise.
3369 (aarch64_emit_const): Likewise.
3370 (aarch64_emit_call): Likewise.
3371 (aarch64_emit_reg): Likewise.
3372 (aarch64_emit_pop): Likewise.
3373 (aarch64_emit_stack_flush): Likewise.
3374 (aarch64_emit_zero_ext): Likewise.
3375 (aarch64_emit_swap): Likewise.
3376 (aarch64_emit_stack_adjust): Likewise.
3377 (aarch64_emit_int_call_1): Likewise.
3378 (aarch64_emit_void_call_2): Likewise.
3379 (aarch64_emit_eq_goto): Likewise.
3380 (aarch64_emit_ne_goto): Likewise.
3381 (aarch64_emit_lt_goto): Likewise.
3382 (aarch64_emit_le_goto): Likewise.
3383 (aarch64_emit_gt_goto): Likewise.
3384 (aarch64_emit_ge_got): Likewise.
3385 (aarch64_emit_ops_impl): New static global variable.
3386 (aarch64_emit_ops): New target function, return
3387 &aarch64_emit_ops_impl.
3388 (struct linux_target_ops): Install it.
3389
bb903df0
PL
33902015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3391
3392 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3393 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3394 aarch64-ipa.o.
3395 * linux-aarch64-ipa.c: New file.
3396 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3397 and endian.h.
3398 (aarch64_get_thread_area): New target method.
3399 (extract_signed_bitfield): New helper function.
3400 (aarch64_decode_ldr_literal): New function.
3401 (enum aarch64_opcodes): New enum.
3402 (struct aarch64_register): New struct.
3403 (struct aarch64_operand): New struct.
3404 (x0): New static global.
3405 (x1): Likewise.
3406 (x2): Likewise.
3407 (x3): Likewise.
3408 (x4): Likewise.
3409 (w2): Likewise.
3410 (ip0): Likewise.
3411 (sp): Likewise.
3412 (xzr): Likewise.
3413 (aarch64_register): New helper function.
3414 (register_operand): Likewise.
3415 (immediate_operand): Likewise.
3416 (struct aarch64_memory_operand): New struct.
3417 (offset_memory_operand): New helper function.
3418 (preindex_memory_operand): Likewise.
3419 (enum aarch64_system_control_registers): New enum.
3420 (ENCODE): New macro.
3421 (emit_insn): New helper function.
3422 (emit_b): New function.
3423 (emit_bcond): Likewise.
3424 (emit_cb): Likewise.
3425 (emit_tb): Likewise.
3426 (emit_blr): Likewise.
3427 (emit_stp): Likewise.
3428 (emit_ldp_q_offset): Likewise.
3429 (emit_stp_q_offset): Likewise.
3430 (emit_load_store): Likewise.
3431 (emit_ldr): Likewise.
3432 (emit_ldrsw): Likewise.
3433 (emit_str): Likewise.
3434 (emit_ldaxr): Likewise.
3435 (emit_stxr): Likewise.
3436 (emit_stlr): Likewise.
3437 (emit_data_processing_reg): Likewise.
3438 (emit_data_processing): Likewise.
3439 (emit_add): Likewise.
3440 (emit_sub): Likewise.
3441 (emit_mov): Likewise.
3442 (emit_movk): Likewise.
3443 (emit_mov_addr): Likewise.
3444 (emit_mrs): Likewise.
3445 (emit_msr): Likewise.
3446 (emit_sevl): Likewise.
3447 (emit_wfe): Likewise.
3448 (append_insns): Likewise.
3449 (can_encode_int32_in): New helper function.
3450 (aarch64_relocate_instruction): New function.
3451 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3452 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3453 (struct linux_target_ops): Install aarch64_get_thread_area,
3454 aarch64_install_fast_tracepoint_jump_pad and
3455 aarch64_get_min_fast_tracepoint_insn_len.
3456
787749ea
PL
34572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3458
3459 * Makefile.in (aarch64-insn.o): New rule.
3460 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3461
9812b2e6
YQ
34622015-09-21 Yao Qi <yao.qi@linaro.org>
3463
3464 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3465
18fe412b
YQ
34662015-09-21 Yao Qi <yao.qi@linaro.org>
3467
3468 * tracepoint.c (max_jump_pad_size): Remove.
3469
a0cc84cd
YQ
34702015-09-18 Yao Qi <yao.qi@linaro.org>
3471
3472 * linux-aarch64-low.c: Don't include sys/uio.h.
3473 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3474
d78908cf
WW
34752015-09-16 Wei-cheng Wang <cole945@gmail.com>
3476
3477 * tracepoint.c (eval_result_type): Change prototype.
3478 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3479
d57e0d50
PA
34802015-09-15 Pedro Alves <palves@redhat.com>
3481
3482 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3483 Check whether to report exec events instead of checking whether
3484 multiprocess is enabled.
3485
5a676acc
PA
34862015-09-15 Pedro Alves <palves@redhat.com>
3487
3488 PR remote/18965
3489 * remote-utils.c (prepare_resume_reply): Merge
3490 TARGET_WAITKIND_VFORK_DONE switch case with the
3491 TARGET_WAITKIND_FORKED case.
3492
7c5d0fad
YQ
34932015-09-15 Yao Qi <yao.qi@linaro.org>
3494
3495 * server.c (handle_query): Check string comparison using
3496 "else if" instead of "if".
3497
750ce8d1
YQ
34982015-09-15 Yao Qi <yao.qi@linaro.org>
3499
3500 * server.c (vCont_supported): New global variable.
3501 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3502 matches. Append ";vContSupported+" to own_buf.
3503 (handle_v_requests): Append ";s;S" to own_buf if target supports
3504 hardware single step or vCont_supported is false.
3505 (capture_main): Set vCont_supported to zero.
3506
70b90b91
YQ
35072015-09-15 Yao Qi <yao.qi@linaro.org>
3508
3509 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3510 it to ...
3511 (linux_supports_hardware_single_step): ... New function.
3512 (linux_target_ops): Update.
3513 * lynx-low.c (lynx_target_ops): Set field
3514 supports_hardware_single_step to target_can_do_hardware_single_step.
3515 * nto-low.c (nto_target_ops): Likewise.
3516 * spu-low.c (spu_target_ops): Likewise.
3517 * win32-low.c (win32_target_ops): Likewise.
3518 * target.c (target_can_do_hardware_single_step): New function.
3519 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3520 Remove. <supports_hardware_single_step>: New field.
3521 (target_supports_conditional_breakpoints): Remove.
3522 (target_supports_hardware_single_step): New macro.
3523 (target_can_do_hardware_single_step): Declare.
3524 * server.c (handle_query): Use target_supports_hardware_single_step
3525 instead of target_supports_conditional_breakpoints.
3526
ade90bde
YQ
35272015-09-15 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3530 function.
3531 (struct linux_target_ops the_low_target): Install
3532 aarch64_linux_siginfo_fixup.
3533
94585166
DB
35342015-09-11 Don Breazeal <donb@codesourcery.com>
3535 Luis Machado <lgustavo@codesourcery.com>
3536
3537 * linux-low.c (linux_mourn): Static declaration.
3538 (linux_arch_setup): Move in front of
3539 handle_extended_wait.
3540 (linux_arch_setup_thread): New function.
3541 (handle_extended_wait): Handle exec events. Call
3542 linux_arch_setup_thread. Make event_lwp argument a
3543 pointer-to-a-pointer.
3544 (check_zombie_leaders): Do not check stopped threads.
3545 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3546 (linux_low_filter_event): Add lwp and thread for exec'ing
3547 non-leader thread if leader thread has been deleted.
3548 Refactor code into linux_arch_setup_thread and call it.
3549 Pass child lwp pointer by reference to handle_extended_wait.
3550 (linux_wait_for_event_filtered): Update comment.
3551 (linux_wait_1): Prevent clobbering exec event status.
3552 (linux_supports_exec_events): New function.
3553 (linux_target_ops) <supports_exec_events>: Initialize new member.
3554 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3555 new member.
3556 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3557 * server.c (report_exec_events): New global variable.
3558 (handle_query): Handle qSupported query for exec-events feature.
3559 (captured_main): Initialize report_exec_events.
3560 * server.h (report_exec_events): Declare new global variable.
3561 * target.h (struct target_ops) <supports_exec_events>: New
3562 member.
3563 (target_supports_exec_events): New macro.
3564 * win32-low.c (win32_target_ops) <supports_exec_events>:
3565 Initialize new member.
3566
0568462b
MM
35672015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3568
3569 * linux-low.c (linux_low_enable_btrace): Remove.
3570 (linux_target_ops): Replace linux_low_enable_btrace with
3571 linux_enable_btrace.
3572
39edd165
YQ
35732015-09-03 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch64-low.c (aarch64_insert_point): Call
3576 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3577 returns true.
3578
1db33b5a
UW
35792015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3580
3581 * linux-low.c (check_stopped_by_breakpoint): Use
3582 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3583
ab290430
PA
35842015-08-27 Pedro Alves <palves@redhat.com>
3585
3586 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3587
8d749320
SM
35882015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3589
6711b7f8
SM
3590 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3591 the XNEW-family equivalent.
8d749320
SM
3592 (compile_bytecodes): Likewise.
3593 * dll.c (loaded_dll): Likewise.
3594 * event-loop.c (append_callback_event): Likewise.
3595 (create_file_handler): Likewise.
3596 (create_file_event): Likewise.
3597 * hostio.c (handle_open): Likewise.
3598 * inferiors.c (add_thread): Likewise.
3599 (add_process): Likewise.
3600 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3601 * linux-arm-low.c (arm_new_process): Likewise.
3602 (arm_new_thread): Likewise.
3603 * linux-low.c (add_to_pid_list): Likewise.
3604 (linux_add_process): Likewise.
3605 (handle_extended_wait): Likewise.
3606 (add_lwp): Likewise.
3607 (enqueue_one_deferred_signal): Likewise.
3608 (enqueue_pending_signal): Likewise.
3609 (linux_resume_one_lwp_throw): Likewise.
3610 (linux_resume_one_thread): Likewise.
3611 (linux_read_memory): Likewise.
3612 (linux_write_memory): Likewise.
3613 * linux-mips-low.c (mips_linux_new_process): Likewise.
3614 (mips_linux_new_thread): Likewise.
3615 (mips_add_watchpoint): Likewise.
3616 * linux-x86-low.c (initialize_low_arch): Likewise.
3617 * lynx-low.c (lynx_add_process): Likewise.
3618 * mem-break.c (set_raw_breakpoint_at): Likewise.
3619 (set_breakpoint): Likewise.
3620 (add_condition_to_breakpoint): Likewise.
3621 (add_commands_to_breakpoint): Likewise.
3622 (clone_agent_expr): Likewise.
3623 (clone_one_breakpoint): Likewise.
3624 * regcache.c (new_register_cache): Likewise.
3625 * remote-utils.c (look_up_one_symbol): Likewise.
3626 * server.c (queue_stop_reply): Likewise.
3627 (start_inferior): Likewise.
3628 (queue_stop_reply_callback): Likewise.
3629 (handle_target_event): Likewise.
3630 * spu-low.c (fetch_ppc_memory): Likewise.
3631 (store_ppc_memory): Likewise.
3632 * target.c (set_target_ops): Likewise.
3633 * thread-db.c (thread_db_load_search): Likewise.
3634 (try_thread_db_load_1): Likewise.
3635 * tracepoint.c (add_tracepoint): Likewise.
3636 (add_tracepoint_action): Likewise.
3637 (create_trace_state_variable): Likewise.
3638 (cmd_qtdpsrc): Likewise.
3639 (cmd_qtro): Likewise.
3640 (add_while_stepping_state): Likewise.
3641 * win32-low.c (child_add_thread): Likewise.
3642 (get_image_name): Likewise.
3643
ed8b7b42
YQ
36442015-08-25 Yao Qi <yao.qi@linaro.org>
3645
3646 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3647
db3cb7cb
YQ
36482015-08-25 Yao Qi <yao.qi@linaro.org>
3649
3650 * Makefile.in (aarch64-linux.o): New rule.
3651 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3652 srv_tgtobj.
3653 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3654 (aarch64_init_debug_reg_state): Make it extern.
3655 (aarch64_linux_prepare_to_resume): Remove.
3656
f6011a1c
YQ
36572015-08-25 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3660 lwp_arch_private_info and ptid_of_lwp.
3661
88e2cf7e
YQ
36622015-08-25 Yao Qi <yao.qi@linaro.org>
3663
3664 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3665 Find proc_info by find_process_pid. All callers updated.
3666
5e35436e
YQ
36672015-08-25 Yao Qi <yao.qi@linaro.org>
3668
3669 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3670 Remove.
3671 (debug_reg_change_callback): Remove.
3672 (aarch64_notify_debug_reg_change): Remove.
3673
4a8a7965
YQ
36742015-08-25 Yao Qi <yao.qi@linaro.org>
3675
3676 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3677 Call current_lwp_ptid.
3678
32a271ee
YQ
36792015-08-25 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-aarch64-low.c (debug_reg_change_callback): Use
3682 debug_printf.
3683
0d51c8d7
YQ
36842015-08-25 Yao Qi <yao.qi@linaro.org>
3685
3686 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3687
31a43dd5
YQ
36882015-08-25 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3691
8ee52567
YQ
36922015-08-25 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3695 the code.
3696
ff3f0f45
YQ
36972015-08-25 Yao Qi <yao.qi@linaro.org>
3698
3699 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3700 Remove.
3701 (debug_reg_change_callback): Remove argument entry and add argument
3702 lwp. Remove local variable thread. Don't print thread id in the
3703 debugging output. Don't check whether pid of thread equals to pid.
3704 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3705 iterate_over_lwps instead find_inferior.
3706
3d40fbb5
PA
37072015-08-24 Pedro Alves <palves@redhat.com>
3708
3709 * inferiors.c (get_first_process): New function.
3710 * inferiors.h (get_first_process): New declaration.
3711 * remote-utils.c (read_ptid): Default to the first process in the
3712 list, instead of to the current thread's process.
3713
438e1e42
PA
37142015-08-24 Pedro Alves <palves@redhat.com>
3715
3716 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3717 * event-loop.c: Likewise.
3718 * remote-utils.c: Likewise.
3719 * tracepoint.c: Likewise.
3720
a8c6d4fc
PA
37212015-08-24 Pedro Alves <palves@redhat.com>
3722
3723 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3724 ptid_get_lwp.
3725
99b0bb12
PA
37262015-08-21 Pedro Alves <palves@redhat.com>
3727
3728 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3729 instead of literal 1.
3730
f8904751
PA
37312015-08-21 Pedro Alves <palves@redhat.com>
3732
3733 * tdesc.c (default_description): Explicitly zero-initialize.
3734
465a859e
PA
37352015-08-21 Pedro Alves <palves@redhat.com>
3736
3737 PR gdb/18749
3738 * inferiors.c (remove_thread): Discard any pending stop reply for
3739 this thread.
3740 * server.c (remove_all_on_match_pid): Rename to ...
3741 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3742 instead of a pid.
3743 (discard_queued_stop_replies): Change parameter to a ptid. Now
3744 extern.
3745 (handle_v_kill, kill_inferior_callback, captured_main)
3746 (process_serial_event): Adjust.
3747 * server.h (discard_queued_stop_replies): Declare.
3748
f0db101d
PA
37492015-08-21 Pedro Alves <palves@redhat.com>
3750
3751 * linux-low.c (wait_for_sigstop): Always switch to no thread
3752 selected if the previously current thread dies.
3753 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3754 process instead of the current thread's.
3755 * remote-utils.c (input_interrupt): Don't check if there's no
3756 current thread.
3757 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3758 current thread to the general thread fails, error out.
3759 (handle_qxfer_auxv, handle_qxfer_libraries)
3760 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3761 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3762 (handle_query): Check if there's a thread selected instead of
3763 checking whether there's any thread in the thread list.
3764 (handle_qxfer_threads, handle_qxfer_btrace)
3765 (handle_qxfer_btrace_conf): Don't error out early if there's no
3766 thread in the thread list.
3767 (handle_v_cont, myresume): Don't set the current thread to the
3768 continue thread.
3769 (process_serial_event) <Hg handling>: Also set thread_id if the
3770 previous general thread is still alive.
3771 (process_serial_event) <g/G handling>: If setting the current
3772 thread to the general thread fails, error out.
3773 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3774 thread's lwp instead of the current thread's.
3775 * target.c (set_desired_thread): If the desired thread was not
3776 found, leave the current thread pointing to NULL. Return an int
3777 (boolean) indicating success.
3778 * target.h (set_desired_thread): Change return type to int.
3779
40045d91
MF
37802015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3781
3782 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3783 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3784 #includes.
3785 (ps_get_thread_area): New function.
3786
45face3b
GB
37872015-08-19 Gary Benson <gbenson@redhat.com>
3788
3789 * hostio.c (handle_pread): Do not attempt to read more data
3790 than hostio_reply_with_data can fit in a packet.
3791
16d5f642
JB
37922015-08-18 Joel Brobecker <brobecker@adacore.com>
3793
3794 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3795
a738da3a
MF
37962015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3797
3798 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3799
33ebda9d
PA
38002015-08-06 Pedro Alves <palves@redhat.com>
3801
3802 * tracepoint.c (expr_eval_result): Now an int.
3803
a44892be
PA
38042015-08-06 Pedro Alves <palves@redhat.com>
3805
3806 * gdbthread.h (struct regcache): Forward declare.
3807 (struct thread_info) <regcache_data>: Now a struct regcache
3808 pointer.
3809 * inferiors.c (inferior_regcache_data)
3810 (set_inferior_regcache_data): Now work with struct regcache
3811 pointers.
3812 * inferiors.h (struct regcache): Forward declare.
3813 (inferior_regcache_data, set_inferior_regcache_data): Now work
3814 with struct regcache pointers.
3815 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3816 (free_register_cache_thread): Remove struct regcache pointer
3817 casts.
3818
608a1e46
PA
38192015-08-06 Pedro Alves <palves@redhat.com>
3820
3821 * server.c (captured_main): On error, print the exception message
3822 to stderr, and if run_once is set, throw a quit.
3823
f0ce0d3a
PA
38242015-08-06 Pedro Alves <palves@redhat.com>
3825
3826 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3827 the current thread.
3828
bf47e248
PA
38292015-08-06 Pedro Alves <palves@redhat.com>
3830
3831 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3832 reading beyond the passed in buffer length.
3833
b6b9ffcc
PL
38342015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3835
3836 * tracepoint.c (symbol_list) <required>: Remove.
3837
863d01bd
PA
38382015-08-06 Pedro Alves <palves@redhat.com>
3839
3840 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3841 count if stopping and suspending threads.
3842 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3843 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3844 (linux_detach): Complete an ongoing step-over.
3845 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3846 throughout.
3847 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3848 (linux_wait_1): If passing a signal to the inferior after
3849 finishing a step-over, unsuspend and re-resume all lwps. If we
3850 see a single-step event but the thread should be continuing, don't
3851 pass the trap to gdb.
3852 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3853 internal_error instead of gdb_assert.
3854 (enqueue_pending_signal): New function.
3855 (check_ptrace_stopped_lwp_gone): Add debug output.
3856 (start_step_over): Use internal_error instead of gdb_assert.
3857 (complete_ongoing_step_over): New function.
3858 (linux_resume_one_thread): Don't resume a suspended thread.
3859 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3860 it stepping.
3861
00db26fa
PA
38622015-08-06 Pedro Alves <palves@redhat.com>
3863
3864 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3865 (linux_thread_alive): Use lwp_is_marked_dead.
3866 (extended_event_reported): Delete.
3867 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3868 instead of extended_event_reported.
3869 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3870 as well.
3871 (lwp_is_marked_dead): New function.
3872 (lwp_running): Use lwp_is_marked_dead.
3873 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3874 comment.
3875
ad071a30
PA
38762015-08-06 Pedro Alves <palves@redhat.com>
3877
3878 * linux-low.c (linux_wait_1): Move fork event output out of the
3879 !report_to_gdb check. Pass event_child->waitstatus to
3880 target_waitstatus_to_string instead of ourstatus.
3881
524b57e6
YQ
38822015-08-04 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3885 if current_thread is 32 bit.
3886
6085d6f6
YQ
38872015-08-04 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3890 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3891 * server.c (extended_protocol): Remove "static".
3892 * server.h (extended_protocol): Declare it.
3893
8a7e4587
YQ
38942015-08-04 Yao Qi <yao.qi@linaro.org>
3895
3896 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3897 both aarch64 and aarch32.
3898 (aarch64_set_pc): Likewise.
3899
3b53ae99
YQ
39002015-08-04 Yao Qi <yao.qi@linaro.org>
3901
3902 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3903 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3904 arm-with-neon.xml to srv_xmlfiles.
3905 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3906 (is_64bit_tdesc): New function.
3907 (aarch64_linux_read_description): New function.
3908 (aarch64_arch_setup): Call aarch64_linux_read_description.
3909 (regs_info): Rename to regs_info_aarch64.
3910 (aarch64_regs_info): Return right regs_info.
3911 (initialize_low_arch): Call initialize_low_arch_aarch32.
3912
bd9e6534
YQ
39132015-08-04 Yao Qi <yao.qi@linaro.org>
3914
3915 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3916 * linux-aarch32-low.c: New file.
3917 * linux-aarch32-low.h: New file.
3918 * linux-arm-low.c (arm_fill_gregset): Move it to
3919 linux-aarch32-low.c.
3920 (arm_store_gregset): Likewise.
3921 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3922 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3923 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3924 (regs_info): Rename to regs_info_arm.
3925 (arm_regs_info): Return regs_info_aarch32 if
3926 have_ptrace_getregset is 1 and target description is
3927 arm_with_neon or arm_with_vfpv3.
3928 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3929 Call initialize_low_arch_aarch32 instead.
3930
ded48a5e
YQ
39312015-08-04 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3934 * linux-low.c: ... here.
3935 * linux-low.h (have_ptrace_getregset): Declare it.
3936
96e9210f
PA
39372015-08-04 Pedro Alves <palves@redhat.com>
3938
3939 * thread-db.c (struct thread_db): Use new typedefs.
3940 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3941 CHK calls.
3942 (disable_thread_event_reporting): Cast result of dlsym to
3943 destination function pointer type.
3944 (thread_db_mourn): Use td_ta_delete_ftype.
3945
af60a1ef
SL
39462015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3947
3948 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3949 arch variant.
3950 (CDX_BREAKPOINT): Define for R2.
3951 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3952 (the_low_target): Add comments.
3953
e8b41681
YQ
39542015-07-30 Yao Qi <yao.qi@linaro.org>
3955
3956 * linux-arm-low.c (arm_hwcap): Remove it.
3957 (arm_read_description): New local variable arm_hwcap. Don't
3958 set arm_hwcap to zero.
3959
89abb039
YQ
39602015-07-30 Yao Qi <yao.qi@linaro.org>
3961
3962 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3963 Use regcache->tdesc instead.
3964 (arm_store_wmmxregset): Likewise.
3965 (arm_fill_vfpregset): Likewise.
3966 (arm_store_vfpregset): Likewise.
3967
deca266c
YQ
39682015-07-30 Yao Qi <yao.qi@linaro.org>
3969
3970 * linux-arm-low.c: Include arch/arm.h.
3971 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3972 (arm_store_gregset): Likewise.
3973
aa58a496
SM
39742015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3975
3976 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3977 ptrace's 4th parameter.
3978
50904b25
YQ
39792015-07-27 Yao Qi <yao.qi@linaro.org>
3980
3981 * configure.srv (case aarch64*-*-linux*): Don't set
3982 srv_linux_usrregs.
3983
5826e159
PA
39842015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3985
3986 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3987 sys/ptrace.h.
3988 * linux-arm-low.c: Likewise.
3989 * linux-cris-low.c: Likewise.
3990 * linux-crisv32-low.c: Likewise.
3991 * linux-low.c: Likewise.
3992 * linux-m68k-low.c: Likewise.
3993 * linux-mips-low.c: Likewise.
3994 * linux-nios2-low.c: Likewise.
3995 * linux-s390-low.c: Likewise.
3996 * linux-sparc-low.c: Likewise.
3997 * linux-tic6x-low.c: Likewise.
3998 * linux-tile-low.c: Likewise.
3999 * linux-x86-low.c: Likewise.
4000
54019719
PA
40012015-07-24 Pedro Alves <palves@redhat.com>
4002
4003 * config.in: Regenerate.
4004 * configure: Regenerate.
4005
eb7aa561
PA
40062015-07-24 Pedro Alves <palves@redhat.com>
4007
4008 * acinclude.m4: Include ../ptrace.m4.
4009 * configure.ac: Call GDB_AC_PTRACE.
4010 * config.in, configure: Regenerate.
4011
55d7b841
YQ
40122015-07-24 Yao Qi <yao.qi@linaro.org>
4013
4014 * linux-low.c (linux_create_inferior): Remove setting to
4015 proc->priv->new_inferior.
4016 (linux_attach): Likewise.
4017 (linux_low_filter_event): Likewise.
4018 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4019
c06cbd92
YQ
40202015-07-24 Yao Qi <yao.qi@linaro.org>
4021
4022 * linux-low.c (linux_arch_setup): New function.
4023 (linux_low_filter_event): If proc->tdesc is NULL and
4024 proc->attached is true, call the_low_target.arch_setup.
4025 Otherwise, keep status pending, and return.
4026 (linux_resume_one_lwp_throw): Don't call get_pc if
4027 thread->while_stepping isn't NULL. Don't call
4028 get_thread_regcache if proc->tdesc is NULL.
4029 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4030 (linux_target_ops): Install arch_setup.
4031 * server.c (start_inferior): Call the_target->arch_setup.
4032 * target.h (struct target_ops) <arch_setup>: New field.
4033 (target_arch_setup): New marco.
4034 * lynx-low.c (lynx_target_ops): Update.
4035 * nto-low.c (nto_target_ops): Update.
4036 * spu-low.c (spu_target_ops): Update.
4037 * win32-low.c (win32_target_ops): Update.
4038
5ae3ebba
YQ
40392015-07-24 Yao Qi <yao.qi@linaro.org>
4040
4041 * linux-low.c (linux_add_process): Don't set
4042 proc->priv->new_inferior.
4043 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4044 (linux_attach): Likewise.
4045
eb97750b
YQ
40462015-07-24 Yao Qi <yao.qi@linaro.org>
4047
4048 * server.c (start_inferior): Code refactor.
4049
51aee833
YQ
40502015-07-24 Yao Qi <yao.qi@linaro.org>
4051
4052 * server.c (process_serial_event): Set general_thread.
4053
af1b22f3
YQ
40542015-07-21 Yao Qi <yao.qi@linaro.org>
4055
4056 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4057 aarch64_linux_get_debug_reg_capacity.
4058
554717a3
YQ
40592015-07-17 Yao Qi <yao.qi@linaro.org>
4060
4061 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4062 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4063 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4064 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4065 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4066 (AARCH64_HWP_ALIGNMENT): Likewise.
4067 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4068 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4069 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4070 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4071 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4072 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4073 (struct aarch64_debug_reg_state): Likewise.
4074 (struct arch_lwp_info): Likewise.
4075 (aarch64_align_watchpoint): Likewise.
4076 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4077 (aarch64_watchpoint_length): Likewise.
4078 (aarch64_point_encode_ctrl_reg): Likewise
4079 (aarch64_point_is_aligned): Likewise.
4080 (aarch64_align_watchpoint): Likewise.
4081 (aarch64_linux_set_debug_regs):
4082 (aarch64_dr_state_insert_one_point): Likewise.
4083 (aarch64_dr_state_remove_one_point): Likewise.
4084 (aarch64_handle_breakpoint): Likewise.
4085 (aarch64_handle_aligned_watchpoint): Likewise.
4086 (aarch64_handle_unaligned_watchpoint): Likewise.
4087 (aarch64_handle_watchpoint): Likewise.
4088
c67ca4de
YQ
40892015-07-17 Yao Qi <yao.qi@linaro.org>
4090
4091 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4092 and don't aarch64_get_debug_reg_state. All callers update.
4093 (aarch64_handle_aligned_watchpoint): Likewise.
4094 (aarch64_handle_unaligned_watchpoint): Likewise.
4095 (aarch64_handle_watchpoint): Likewise.
4096 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4097 (aarch64_remove_point): Likewise.
4098
25abf979
YQ
40992015-07-17 Yao Qi <yao.qi@linaro.org>
4100
4101 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4102 debug_printf.
4103 (aarch64_handle_unaligned_watchpoint): Likewise.
4104
db1ff28b
JK
41052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4106
4107 Revert the previous 3 commits:
4108 Move gdb_regex* to common/
4109 Move linux_find_memory_regions_full & co.
4110 gdbserver build-id attribute generator
4111
700ca40f
JK
41122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4113 Jan Kratochvil <jan.kratochvil@redhat.com>
4114
4115 gdbserver build-id attribute generator.
4116 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4117 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4118 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4119 (find_phdr): New.
4120 (get_dynamic): Use find_pdhr to traverse program headers.
4121 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4122 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4123 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4124 (get_hex_build_id): New.
4125 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4126 to reply XML document.
4127
9904185c
JK
41282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4129 Jan Kratochvil <jan.kratochvil@redhat.com>
4130
4131 * target.c: Include target/target-utils.h and fcntl.h.
4132 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4133 (target_fileio_read_stralloc): New functions.
4134
6e5b4429
JK
41352015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4136
4137 * Makefile.in (OBS): Add gdb_regex.o.
4138 (gdb_regex.o): New.
4139 * config.in: Rebuilt.
4140 * configure: Rebuilt.
4141
ddc98fbf
JK
41422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4143 Jan Kratochvil <jan.kratochvil@redhat.com>
4144
4145 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4146 * Makefile.in (OBS): Add target-utils.o.
4147 (linux-maps.o, target-utils.o): New.
4148 * configure.srv (srv_linux_obj): Add linux-maps.o.
4149
e57bb7a0
PL
41502015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4151
4152 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4153 function, return 1.
4154 (the_low_target): Install it.
4155
586b02a9
PA
41562015-07-14 Pedro Alves <palves@redhat.com>
4157
4158 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4159 Instead, ignore ECHILD, and throw an error for other errnos.
4160
58c1b36c
PA
41612015-07-10 Pedro Alves <palves@redhat.com>
4162
4163 * event-loop.c (struct callback_event) <data>: Change type to
4164 gdb_client_data instance instead of gdb_client_data pointer.
4165 (append_callback_event): Adjust.
4166
421530db
PL
41672015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4168
4169 * linux-aarch64-low.c: Add comments for each linux_target_ops
4170 method. Remove comments already covered in target_ops and
4171 linux_target_ops definitions.
4172 (the_low_target): Add comments for each unimplemented method.
4173
c2d65f38
YQ
41742015-07-09 Yao Qi <yao.qi@linaro.org>
4175
4176 * linux-aarch64-low.c (aarch64_regmap): Remove.
4177 (aarch64_usrregs_info): Remove.
4178 (regs_info): Set field usrregs to NULL.
4179
b20a6524
MM
41802015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4181
4182 * linux-low.c: Include "rsp-low.h"
4183 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4184 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4185 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4186 (handle_btrace_enable_pt): New.
4187 (handle_btrace_general_set): Support "pt".
4188 (handle_btrace_conf_general_set): Support "pt:size".
4189
96c97461
PL
41902015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4191
4192 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4193 Z_PACKET_SW_BP.
4194
37d66942
PL
41952015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4196
4197 * linux-aarch64-low.c: Remove comment about endianness.
4198 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4199 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4200 memcmp.
4201
dc06243f
GB
42022015-06-24 Gary Benson <gbenson@redhat.com>
4203
4204 * linux-i386-ipa.c (stdint.h): Do not include.
4205 * lynx-i386-low.c (stdint.h): Likewise.
4206 * lynx-ppc-low.c (stdint.h): Likewise.
4207 * mem-break.c (stdint.h): Likewise.
4208 * thread-db.c (stdint.h): Likewise.
4209 * tracepoint.c (stdint.h): Likewise.
4210 * win32-low.c (stdint.h): Likewise.
4211
124e13d9
SM
42122015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4213
4214 * server.c (write_qxfer_response): Update call to
4215 remote_escape_output.
4216
909c2cda
JK
42172015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4218 Jan Kratochvil <jan.kratochvil@redhat.com>
4219
4220 Merge multiple hex conversions.
4221 * gdbreplay.c (tohex): Rename to 'fromhex'.
4222 (logchar): Use fromhex.
4223
24c05f46
JK
42242015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4225
4226 * server.c (handle_qxfer_libraries): Set `version' attribute for
4227 <library-list>.
4228
14d2069a
GB
42292015-06-10 Gary Benson <gbenson@redhat.com>
4230
4231 * target.h (struct target_ops) <multifs_open>: New field.
4232 <multifs_unlink>: Likewise.
4233 <multifs_readlink>: Likewise.
4234 * linux-low.c (nat/linux-namespaces.h): New include.
4235 (linux_target_ops): Initialize the_target->multifs_open,
4236 the_target->multifs_unlink and the_target->multifs_readlink.
4237 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4238 * hostio.c (hostio_fs_pid): New static variable.
4239 (hostio_handle_new_gdb_connection): New function.
4240 (handle_setfs): Likewise.
4241 (handle_open): Use the_target->multifs_open as appropriate.
4242 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4243 (handle_readlink): Use the_target->multifs_readlink as
4244 appropriate.
4245 (handle_vFile): Handle vFile:setfs packets.
4246 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4247 after target_handle_new_gdb_connection.
4248
4b8b5e72
GB
42492015-06-10 Gary Benson <gbenson@redhat.com>
4250
4251 * configure.ac (AC_CHECK_FUNCS): Add setns.
4252 * config.in: Regenerate.
4253 * configure: Likewise.
4254 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4255 (linux-namespaces.o): New rule.
4256 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4257
3ac2e371
GB
42582015-06-09 Gary Benson <gbenson@redhat.com>
4259
4260 * hostio.c (handle_open): Process mode argument with
4261 fileio_to_host_mode.
4262
ca9b78ce
YQ
42632015-06-01 Yao Qi <yao.qi@linaro.org>
4264
4265 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4266 * linux-x86-low.c: Likewise.
4267
bfacd19d
DB
42682015-05-28 Don Breazeal <donb@codesourcery.com>
4269
4270 * linux-low.c (handle_extended_wait): Initialize
4271 thread_info.last_resume_kind for new fork children.
4272
452003ef
PA
42732015-05-15 Pedro Alves <palves@redhat.com>
4274
4275 * target.h (target_handle_new_gdb_connection): Rewrite using if
4276 wrapped in do/while.
4277
1041a03c
JB
42782015-05-14 Joel Brobecker <brobecker@adacore.com>
4279
4280 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4281 * configure, config.in: Regenerate.
4282 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4283 Declare typedef.
4284
c269dbdb
DB
42852015-05-12 Don Breazeal <donb@codesourcery.com>
4286
4287 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4288 PTRACE_EVENT_VFORK_DONE.
4289 (linux_low_ptrace_options, extended_event_reported): Add vfork
4290 events.
4291 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4292 and "vforkdone" for RSP 'T' Stop Reply Packet.
4293 * server.h (report_vfork_events): Declare
4294 global variable.
4295
3a8a0396
DB
42962015-05-12 Don Breazeal <donb@codesourcery.com>
4297
4298 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4299 (the_low_target) <new_fork>: Initialize new member.
4300 * linux-arm-low.c (arm_new_fork): New function.
4301 (the_low_target) <new_fork>: Initialize new member.
4302 * linux-low.c (handle_extended_wait): Call new target function
4303 new_fork.
4304 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4305 * linux-mips-low.c (mips_add_watchpoint): New function
4306 extracted from mips_insert_point.
4307 (the_low_target) <new_fork>: Initialize new member.
4308 (mips_linux_new_fork): New function.
4309 (mips_insert_point): Call mips_add_watchpoint.
4310 * linux-x86-low.c (x86_linux_new_fork): New function.
4311 (the_low_target) <new_fork>: Initialize new member.
4312
de0d863e
DB
43132015-05-12 Don Breazeal <donb@codesourcery.com>
4314
4315 * linux-low.c (handle_extended_wait): Implement return value,
4316 rename argument 'event_child' to 'event_lwp', handle
4317 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4318 (linux_low_ptrace_options): New function.
4319 (linux_low_filter_event): Call linux_low_ptrace_options,
4320 use different argument fo linux_enable_event_reporting,
4321 use return value from handle_extended_wait.
4322 (extended_event_reported): New function.
4323 (linux_wait_1): Call extended_event_reported and set
4324 status to report fork events.
4325 (linux_write_memory): Add pid to debug message.
4326 (reset_lwp_ptrace_options_callback): New function.
4327 (linux_handle_new_gdb_connection): New function.
4328 (linux_target_ops): Initialize new structure member.
4329 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4330 * lynx-low.c: Initialize new structure member.
4331 * remote-utils.c (prepare_resume_reply): Implement stop reason
4332 "fork" for "T" stop message.
4333 * server.c (handle_query): Call handle_new_gdb_connection.
4334 * server.h (report_fork_events): Declare global flag.
4335 * target.h (struct target_ops) <handle_new_gdb_connection>:
4336 New member.
4337 (target_handle_new_gdb_connection): New macro.
4338 * win32-low.c: Initialize new structure member.
4339
ddcbc397
DB
43402015-05-12 Don Breazeal <donb@codesourcery.com>
4341
4342 * mem-break.c (APPEND_TO_LIST): Define macro.
4343 (clone_agent_expr): New function.
4344 (clone_one_breakpoint): New function.
4345 (clone_all_breakpoints): New function.
4346 * mem-break.h: Declare new functions.
4347
89245bc0
DB
43482015-05-12 Don Breazeal <donb@codesourcery.com>
4349
4350 * linux-low.c (linux_supports_fork_events): New function.
4351 (linux_supports_vfork_events): New function.
4352 (linux_target_ops): Initialize new structure members.
4353 (initialize_low): Call linux_check_ptrace_features.
4354 * lynx-low.c (lynx_target_ops): Initialize new structure
4355 members.
4356 * server.c (report_fork_events, report_vfork_events):
4357 New global flags.
4358 (handle_query): Add new features to qSupported packet and
4359 response.
4360 (captured_main): Initialize new global variables.
4361 * target.h (struct target_ops) <supports_fork_events>:
4362 New member.
4363 <supports_vfork_events>: New member.
4364 (target_supports_fork_events): New macro.
4365 (target_supports_vfork_events): New macro.
4366 * win32-low.c (win32_target_ops): Initialize new structure
4367 members.
4368
835205d0
GB
43692015-05-12 Gary Benson <gbenson@redhat.com>
4370
4371 * server.c (handle_qxfer_exec_file): Use current process
4372 if annex is empty.
4373
21e94bd9
SL
43742015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4375
4376 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4377 Remove HAVE_PTRACE_GETREGS conditionals.
4378 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4379 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4380
45614f15
YQ
43812015-05-08 Yao Qi <yao.qi@linaro.org>
4382
4383 * linux-low.c (linux_supports_conditional_breakpoints): New
4384 function.
4385 (linux_target_ops): Install new target method.
4386 * lynx-low.c (lynx_target_ops): Install NULL hook for
4387 supports_conditional_breakpoints.
4388 * nto-low.c (nto_target_ops): Likewise.
4389 * spu-low.c (spu_target_ops): Likewise.
4390 * win32-low.c (win32_target_ops): Likewise.
4391 * server.c (handle_query): Check
4392 target_supports_conditional_breakpoints.
4393 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4394 New field.
4395 (target_supports_conditional_breakpoints): New macro.
4396
80ad801e
PA
43972015-05-06 Pedro Alves <palves@redhat.com>
4398
4399 PR server/18081
4400 * server.c (start_inferior): If the process exits, mourn it.
4401
819843c7
GB
44022015-04-21 Gary Benson <gbenson@redhat.com>
4403
4404 * hostio.c (fileio_open_flags_to_host): Factored out to
4405 fileio_to_host_openflags in common/fileio.c. Single use
4406 updated.
4407
a2d5a9d7
MF
44082015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4409
4410 * linux-xtensa-low.c (xtensa_fill_gregset)
4411 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4412 XCHAL_HAVE_LOOP.
4413
deb44829
MF
44142015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4415
4416 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4417 (regs_info): Replace usrregs pointer with NULL.
4418
e57f1de3
GB
44192015-04-17 Gary Benson <gbenson@redhat.com>
4420
4421 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4422 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4423 * server.c (handle_qxfer_exec_file): New function.
4424 (qxfer_packets): Add exec-file entry.
4425 (handle_query): Report qXfer:exec-file:read as supported packet.
4426
62828379
RN
44272015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4428
4429 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4430
b88bb450
GB
44312015-04-09 Gary Benson <gbenson@redhat.com>
4432
4433 * hostio-errno.c (errno_to_fileio_error): Remove function.
4434 Update caller to use remote_fileio_to_fio_error.
4435
c8f4bfdd
YQ
44362015-04-09 Yao Qi <yao.qi@linaro.org>
4437
4438 * linux-low.c (linux_insert_point): Call
4439 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4440 (linux_remove_point): Call remove_memory_breakpoint if type is
4441 raw_bkpt_type_sw.
4442 * linux-x86-low.c (x86_insert_point): Don't call
4443 insert_memory_breakpoint.
4444 (x86_remove_point): Don't call remove_memory_breakpoint.
4445
41f98f02
PA
44462015-04-01 Pedro Alves <palves@redhat.com>
4447 Cleber Rosa <crosa@redhat.com>
4448
4449 * server.c (gdbserver_usage): Reorganize and extend the usage
4450 message.
4451
2bf6fb9d
PA
44522015-03-24 Pedro Alves <palves@redhat.com>
4453
4454 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4455 output. Also dump TRAP_TRACE.
4456 (linux_low_filter_event): In debug output, distinguish a
4457 resume_stop SIGSTOP from a delayed SIGSTOP.
4458
369f6daa
GB
44592015-03-24 Gary Benson <gbenson@redhat.com>
4460
4461 * linux-x86-low.c (x86_linux_new_thread): Moved to
4462 nat/x86-linux.c.
4463 (x86_linux_prepare_to_resume): Likewise.
4464
8e5d4070
GB
44652015-03-24 Gary Benson <gbenson@redhat.com>
4466
4467 * Makefile.in (x86-linux-dregs.o): New rule.
4468 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4469 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4470 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4471 (x86_linux_dr_get): Likewise.
4472 (x86_linux_dr_set): Likewise.
4473 (update_debug_registers_callback): Likewise.
4474 (x86_linux_dr_set_addr): Likewise.
4475 (x86_linux_dr_get_addr): Likewise.
4476 (x86_linux_dr_set_control): Likewise.
4477 (x86_linux_dr_get_control): Likewise.
4478 (x86_linux_dr_get_status): Likewise.
4479 (x86_linux_update_debug_registers): Likewise.
4480
2b95d440
GB
44812015-03-24 Gary Benson <gbenson@redhat.com>
4482
4483 * linux-x86-low.c (x86_linux_update_debug_registers):
4484 New function, factored out from...
4485 (x86_linux_prepare_to_resume): ...this.
4486
14b0bc68
GB
44872015-03-24 Gary Benson <gbenson@redhat.com>
4488
4489 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4490 (x86_linux_dr_set): Likewise.
4491 (update_debug_registers_callback): Likewise.
4492 (x86_linux_dr_set_addr): Likewise.
4493 (x86_linux_dr_get_addr): Likewise.
4494 (x86_linux_dr_set_control): Likewise.
4495 (x86_linux_dr_get_control): Likewise.
4496 (x86_linux_dr_get_status): Likewise.
4497 (x86_linux_prepare_to_resume): Likewise.
4498
5dfe6ca8
GB
44992015-03-24 Gary Benson <gbenson@redhat.com>
4500
4501 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4502 Use perror_with_name. Pass string through gettext.
4503 (x86_linux_dr_set): Likewise.
4504
d33472ad
GB
45052015-03-24 Gary Benson <gbenson@redhat.com>
4506
4507 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4508 (x86_linux_dr_set_addr): ...this.
4509 (x86_dr_low_get_addr): Rename to...
4510 (x86_linux_dr_get_addr): ...this.
4511 (x86_dr_low_set_control): Rename to...
4512 (x86_linux_dr_set_control): ...this.
4513 (x86_dr_low_get_control): Rename to...
4514 (x86_linux_dr_get_control): ...this.
4515 (x86_dr_low_get_status): Rename to...
4516 (x86_linux_dr_get_status): ...this.
4517 (x86_dr_low): Update with new function names.
4518
4b134ca1
GB
45192015-03-24 Gary Benson <gbenson@redhat.com>
4520
4521 * Makefile.in (x86-linux.o): New rule.
4522 * configure.srv: Add x86-linux.o to relevant targets.
4523 * linux-low.c (lwp_set_arch_private_info): New function.
4524 (lwp_arch_private_info): Likewise.
4525 * linux-x86-low.c: Include nat/x86-linux.h.
4526 (arch_lwp_info): Removed structure.
4527 (update_debug_registers_callback):
4528 Use lwp_set_debug_registers_changed.
4529 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4530 and lwp_set_debug_registers_changed.
4531 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4532
34c703da
GB
45332015-03-24 Gary Benson <gbenson@redhat.com>
4534
4535 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4536 * linux-arm-low.c (arm_new_thread): Likewise.
4537 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4538 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4539 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4540 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4541
cff068da
GB
45422015-03-24 Gary Benson <gbenson@redhat.com>
4543
4544 * linux-low.c (ptid_of_lwp): New function.
4545 (lwp_is_stopped): Likewise.
4546 (lwp_stop_reason): Likewise.
4547 * linux-x86-low.c (update_debug_registers_callback):
4548 Use lwp_is_stopped.
4549 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4550 lwp_stop_reason.
4551
b2f7c7e8
GB
45522015-03-24 Gary Benson <gbenson@redhat.com>
4553
4554 * linux-low.h (linux_stop_lwp): Remove declaration.
4555
6d4ee8c6
GB
45562015-03-24 Gary Benson <gbenson@redhat.com>
4557
4558 * linux-low.h: Include nat/linux-nat.h.
4559 * linux-low.c (iterate_over_lwps_args): New structure.
4560 (iterate_over_lwps_filter): New function.
4561 (iterate_over_lwps): Likewise.
4562 * linux-x86-low.c (update_debug_registers_callback):
4563 Update signature to what iterate_over_lwps expects.
4564 Remove PID check that iterate_over_lwps now performs.
4565 (x86_dr_low_set_addr): Use iterate_over_lwps.
4566 (x86_dr_low_set_control): Likewise.
4567
70a0bb6b
GB
45682015-03-24 Gary Benson <gbenson@redhat.com>
4569
4570 * linux-x86-low.c (x86_debug_reg_state): New function.
4571 (x86_linux_prepare_to_resume): Use the above.
4572
7b669087
GB
45732015-03-24 Gary Benson <gbenson@redhat.com>
4574
4575 * linux-low.c (current_lwp_ptid): New function.
4576 * linux-x86-low.c: Include nat/linux-nat.h.
4577 (x86_dr_low_get_addr): Use current_lwp_ptid.
4578 (x86_dr_low_get_control): Likewise.
4579 (x86_dr_low_get_status): Likewise.
4580
eef49a3d
PA
45812015-03-20 Pedro Alves <palves@redhat.com>
4582
4583 * tracepoint.c (cmd_qtstatus): Make "str" const.
4584
b2333d22
PA
45852015-03-20 Pedro Alves <palves@redhat.com>
4586
4587 * server.c (handle_general_set): Make "req_str" const.
4588
23f238d3
PA
45892015-03-19 Pedro Alves <palves@redhat.com>
4590
4591 * linux-low.c (linux_resume_one_lwp): Rename to ...
4592 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4593 instead call perror_with_name.
4594 (check_ptrace_stopped_lwp_gone): New function.
4595 (linux_resume_one_lwp): Reimplement as wrapper around
4596 linux_resume_one_lwp_throw that swallows errors if the LWP is
4597 gone.
4598
91baf43f
PA
45992015-03-19 Pedro Alves <palves@redhat.com>
4600
4601 * linux-low.c (count_events_callback, select_event_lwp_callback):
4602 No longer check whether the thread has resume_stop as last resume
4603 kind.
4604
8bf3b159
PA
46052015-03-19 Pedro Alves <palves@redhat.com>
4606
4607 * linux-low.c (count_events_callback, select_event_lwp_callback):
4608 Use the lwp's status_pending_p field, not the thread's.
4609
b90fc188
PA
46102015-03-19 Pedro Alves <palves@redhat.com>
4611
4612 * linux-low.c (select_event_lwp_callback): Update comments to
4613 no longer mention SIGTRAP.
4614
464b0089
GB
46152015-03-18 Gary Benson <gbenson@redhat.com>
4616
4617 * server.c (handle_query): Do not report vFile:fstat as supported.
4618
aa9e327f
GB
46192015-03-11 Gary Benson <gbenson@redhat.com>
4620
4621 * hostio.c (sys/types.h): New include.
4622 (sys/stat.h): Likewise.
4623 (common-remote-fileio.h): Likewise.
4624 (handle_fstat): New function.
4625 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4626
791c0056
GB
46272015-03-11 Gary Benson <gbenson@redhat.com>
4628
4629 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4630 struct stat.st_blocks and struct stat.st_blksize.
4631 * configure: Regenerate.
4632 * config.in: Likewise.
4633 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4634 (OBS): Add common-remote-fileio.o.
4635 (common-remote-fileio.o): New rule.
4636
9a9df970
PA
46372015-03-09 Pedro Alves <palves@redhat.com>
4638
4639 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4640 'struct sockaddr' pointer in 'accept' call.
4641
9eb1356e
PA
46422015-03-09 Pedro Alves <palves@redhat.com>
4643
4644 Revert:
4645 2015-03-07 Pedro Alves <palves@redhat.com>
4646 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4647 or <winsock2.h> here. Instead include "gdb_socket.h".
4648 (remote_open): Use union gdb_sockaddr_u.
4649 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4650 or <winsock2.h> here. Instead include "gdb_socket.h".
4651 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4652 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4653 or <sys/un.h>.
4654 (init_named_socket, gdb_agent_helper_thread): Use union
4655 gdb_sockaddr_u.
4656
aac331e4
PA
46572015-03-07 Pedro Alves <palves@redhat.com>
4658
4659 * configure.ac (build_warnings): Move
4660 -Wdeclaration-after-statement to the C-specific set.
4661 * configure: Regenerate.
4662
366c75fc
PA
46632015-03-07 Pedro Alves <palves@redhat.com>
4664
4665 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4666 or <winsock2.h> here. Instead include "gdb_socket.h".
4667 (remote_open): Use union gdb_sockaddr_u.
4668 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4669 or <winsock2.h> here. Instead include "gdb_socket.h".
4670 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4671 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4672 or <sys/un.h>.
4673 (init_named_socket, gdb_agent_helper_thread): Use union
4674 gdb_sockaddr_u.
4675
492d29ea
PA
46762015-03-07 Pedro Alves <palves@redhat.com>
4677
4678 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4679 instead.
4680
60a191ed
YQ
46812015-03-06 Yao Qi <yao.qi@linaro.org>
4682
4683 * linux-aarch64-low.c (aarch64_insert_point): Use
4684 show_debug_regs as a boolean.
4685 (aarch64_remove_point): Likewise.
4686
f5771b1d
PA
46872015-03-05 Pedro Alves <palves@redhat.com>
4688
4689 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4690 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4691 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4692 * nto-low.c (nto_target_ops): Likewise.
4693 * spu-low.c (spu_target_ops): Likewise.
4694 * win32-low.c (win32_target_ops): Likewise.
4695
3e572f71
PA
46962015-03-04 Pedro Alves <palves@redhat.com>
4697
72f4393d 4698 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4699 Decide whether a breakpoint triggered based on the SIGTRAP's
4700 siginfo.si_code.
72f4393d
L
4701 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4702 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4703 (linux_low_filter_event): Check for breakpoints before checking
4704 watchpoints.
4705 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4706 siginfo.si_code.
72f4393d
L
4707 (linux_stopped_by_sw_breakpoint)
4708 (linux_supports_stopped_by_sw_breakpoint)
4709 (linux_stopped_by_hw_breakpoint)
4710 (linux_supports_stopped_by_hw_breakpoint): New functions.
4711 (linux_target_ops): Install new target methods.
3e572f71 4712
1ec68e26
PA
47132015-03-04 Pedro Alves <palves@redhat.com>
4714
4715 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4716 * server.c (swbreak_feature, hwbreak_feature): New globals.
4717 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4718 (captured_main): Clear swbreak_feature and hwbreak_feature.
4719 * server.h (swbreak_feature, hwbreak_feature): Declare.
4720 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4721 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4722 supports_stopped_by_hw_breakpoint>: New fields.
4723 (target_supports_stopped_by_sw_breakpoint)
4724 (target_stopped_by_sw_breakpoint)
4725 (target_supports_stopped_by_hw_breakpoint)
4726 (target_stopped_by_hw_breakpoint): Declare.
4727
15c66dd6
PA
47282015-03-04 Pedro Alves <palves@redhat.com>
4729
4730 enum lwp_stop_reason -> enum target_stop_reason
4731 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4732 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4733 (linux_wait_1, stuck_in_jump_pad_callback)
4734 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4735 (linux_stopped_by_watchpoint):
4736 * linux-low.h (enum lwp_stop_reason): Delete.
4737 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4738 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4739
98fc70d6
YQ
47402015-03-04 Yao Qi <yao.qi@linaro.org>
4741
4742 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4743
dd2ac174
GB
47442015-03-03 Gary Benson <gbenson@redhat.com>
4745
4746 * hostio.c (handle_vFile): Fix prefix lengths.
4747
d68e53f4
MM
47482015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4749
4750 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4751 ptr_bits.
4752
bf2d68ab
AA
47532015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4754
4755 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4756 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4757 (clean): Add "rm -f" for above C files.
4758 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4759 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4760 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4761 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4762 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4763 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4764 (init_registers_s390x_vx_linux64)
4765 (init_registers_s390x_tevx_linux64)
4766 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4767 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4768 declarations.
4769 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4770 (s390_store_vxrs_high): New functions.
4771 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4772 NT_S390_VXRS_HIGH.
4773 (s390_arch_setup): Add logic for selecting one of the new target
4774 descriptions. Activate the new vector regsets if applicable.
4775 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4776 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4777 and init_registers_s390x_tevx_linux64.
4778
c966a859
PA
47792015-03-01 Pedro Alves <palves@redhat.com>
4780
4781 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4782 parameter.
4783
4180215b
PA
47842015-02-27 Pedro Alves <palves@redhat.com>
4785
4786 * linux-x86-low.c (u_debugreg_offset): New function.
4787 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4788
749bab01
PA
47892015-02-27 Pedro Alves <palves@redhat.com>
4790
4791 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4792 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4793 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4794 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4795 (ps_lsetfpregs, ps_getpid)
4796 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4797 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4798 (ps_lsetxregs, ps_plog): Declare.
4799
3c14e5a3
PA
48002015-02-27 Pedro Alves <palves@redhat.com>
4801
4802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4803 IP_AGENT_EXPORT_FUNC.
4804 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4805 IP_AGENT_EXPORT_FUNC.
4806 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4807 (IP_AGENT_EXPORT): Delete.
4808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4809 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4810 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4811 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4812 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4813 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4814 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4815 (traceframe_read_count, traceframe_write_count)
4816 (traceframes_created, trace_state_variables, get_raw_reg)
4817 (get_trace_state_variable_value, set_trace_state_variable_value)
4818 (ust_loaded, helper_thread_id, cmd_buf): Use
4819 IPA_SYM_EXPORTED_NAME.
4820 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4821 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4822 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4823 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4824 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4825 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4826 EXTERN_C_PUSH/EXTERN_C_POP.
4827 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4828 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4829 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4830 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4831 (traceframe_write_count, traceframe_read_count)
4832 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4833 (about_to_request_buffer_space, get_trace_state_variable_value)
4834 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4835 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4836 EXTERN_C_PUSH/EXTERN_C_POP.
4837 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4838 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4839 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4840 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4841 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4842 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4843 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4844 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4845 Define.
4846 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4847 (IP_AGENT_EXPORT_VAR_DECL): Define.
4848 (tracing): Declare.
4849 (gdb_agent_get_raw_reg): Declare.
4850
fe978cb0
PA
48512015-02-27 Tom Tromey <tromey@redhat.com>
4852 Pedro Alves <palves@redhat.com>
4853
4854 Rename symbols whose names are reserved C++ keywords throughout.
4855
3bc3d82a
PA
48562015-02-27 Pedro Alves <palves@redhat.com>
4857
4858 * Makefile.in (COMPILER): New, get it from autoconf.
4859 (CXX): Get from autoconf instead.
4860 (COMPILE.pre): Use COMPILER.
4861 (CC-LD): Rename to ...
4862 (CC_LD): ... this. Use COMPILER.
4863 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4864 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4865 * acinclude.m4: Include build-with-cxx.m4.
4866 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4867 Disable -Werror by default if building in C++ mode.
4868 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4869 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4870 the C++ compiler. Save/restore CXXFLAGS too.
4871 * configure: Regenerate.
4872
07697489
PA
48732015-02-27 Pedro Alves <palves@redhat.com>
4874
4875 * acinclude.m4: Include libiberty.m4.
4876 * configure.ac: Call libiberty_INIT.
4877 * config.in, configure: Regenerate.
4878
9beb7c4e
PA
48792015-02-26 Pedro Alves <palves@redhat.com>
4880
4881 * linux-low.c (linux_wait_1): When incrementing the PC past a
4882 program breakpoint always use the_low_target.breakpoint_len as
4883 increment, rather than the maximum between that and
4884 the_low_target.decr_pc_after_break.
4885
8090aef2
PA
48862015-02-23 Pedro Alves <palves@redhat.com>
4887
4888 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4889 thread was doing a step-over; always adjust the PC if
4890 we stepped over a permanent breakpoint.
4891 (linux_wait_1): If we stepped over breakpoint that was on top of a
4892 permanent breakpoint, manually advance the PC past it.
4893
bc9540e8
PA
48942015-02-23 Pedro Alves <palves@redhat.com>
4895
4896 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4897 modes.
4898 (x86_fill_gregset, x86_store_gregset): Use it when handling
4899 $orig_eax.
4900
2db9a427
PA
49012015-02-20 Pedro Alves <palves@redhat.com>
4902
4903 * thread-db.c: Include "nat/linux-procfs.h".
4904 (thread_db_init): Skip listing new threads if the kernel supports
4905 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4906
afa8d396
PA
49072015-02-20 Pedro Alves <palves@redhat.com>
4908
4909 * linux-low.c (status_pending_p_callback): Use ptid_match.
4910
c9587f88
AT
49112015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4912
4913 PR breakpoints/16812
4914 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4915 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4916 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4917
b05ec7a5
AT
49182015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4919
4920 PR breakpoints/15956
4921 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4922
d33501a5
MM
49232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4924
4925 * linux-low.c (linux_low_btrace_conf): Print size.
4926 * server.c (handle_btrace_conf_general_set): New.
4927 (hanle_general_set): Call handle_btrace_conf_general_set.
4928 (handle_query): Report Qbtrace-conf:bts:size as supported.
4929
f4abbc16
MM
49302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4931
4932 * linux-low.c (linux_low_enable_btrace): Update parameters.
4933 (linux_low_btrace_conf): New.
4934 (linux_target_ops)<to_btrace_conf>: Initialize.
4935 * server.c (current_btrace_conf): New.
4936 (handle_btrace_enable): Rename to ...
4937 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4938 to target_enable_btrace. Update comment. Update users.
4939 (handle_qxfer_btrace_conf): New.
4940 (qxfer_packets): Add btrace-conf entry.
4941 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4942 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4943 (target_ops)<read_btrace_conf>: New.
4944 (target_enable_btrace): Update parameters.
4945 (target_read_btrace_conf): New.
4946
043c3577
MM
49472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4948
4949 * server.c (handle_btrace_general_set): Remove call to
4950 target_supports_btrace.
4951 (supported_btrace_packets): New.
4952 (handle_query): Call supported_btrace_packets.
4953 * target.h: include btrace-common.h.
4954 (btrace_target_info): Removed.
4955 (supports_btrace, target_supports_btrace): Update parameters.
4956
734b0e4b
MM
49572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4958
4959 * Makefile.in (SFILES): Add common/btrace-common.c.
4960 (OBS): Add common/btrace-common.o.
4961 (btrace-common.o): Add build rules.
4962 * linux-low: Include btrace-common.h.
4963 (linux_low_read_btrace): Use struct btrace_data. Call
4964 btrace_data_init and btrace_data_fini.
4965
d6c146e9
PA
49662015-02-06 Pedro Alves <palves@redhat.com>
4967
4968 * thread-db.c (find_new_threads_callback): Add debug output.
4969
20ba1ce6
PA
49702015-02-04 Pedro Alves <palves@redhat.com>
4971
4972 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4973 (resume_stopped_resumed_lwps): New function.
4974 (linux_wait_for_event_filtered): Use it.
4975
8cc73a39
SDJ
49762015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4977
4978 * Makefile.in (SFILES): Add linux-personality.c.
4979 (linux-personality.o): New rule.
4980 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4981 list of objects to be built.
4982 * linux-low.c: Include nat/linux-personality.h.
4983 (linux_create_inferior): Remove code to disable address space
4984 randomization (moved to ../nat/linux-personality.c). Create
4985 cleanup to disable address space randomization.
4986
fb23d554
SDJ
49872015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4988
4989 * Makefile.in (posix-strerror.o): New rule.
4990 (mingw-strerror.o): Likewise.
4991 * configure: Regenerated.
4992 * configure.ac: Source file ../common/common.host. Initialize new
4993 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4994
cdf43629
YQ
49952015-01-14 Yao Qi <yao@codesourcery.com>
4996
4997 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4998 (ppc-linux.o): New rule.
4999 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5000 * configure.ac: AC_CHECK_FUNCS(getauxval).
5001 * config.in: Re-generated.
5002 * configure: Re-generated.
5003 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5004 ppc64_64bit_inferior_p
5005
514c5338
YQ
50062015-01-14 Yao Qi <yao@codesourcery.com>
5007
5008 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5009 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5010 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5011 (PT_ORIG_R3, PT_TRAP): Likewise.
5012 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5013 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5014 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5015
3368c1e5
JB
50162015-01-10 Joel Brobecker <brobecker@adacore.com>
5017
5018 * i387-fp.c (i387_cache_to_xsave): In look over
5019 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5020 zmmh_low_space field by use of zmmh_high_space.
5021
582511be
PA
50222015-01-09 Pedro Alves <palves@redhat.com>
5023
5024 * linux-low.c (step_over_bkpt): Move higher up in the file.
5025 (handle_extended_wait): Don't store the stop_pc here.
5026 (get_stop_pc): Adjust comments and rename to ...
5027 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5028 stopped for a software breakpoint or hardware breakpoint.
5029 (thread_still_has_status_pending_p): New function.
5030 (status_pending_p_callback): Use
5031 thread_still_has_status_pending_p. If the event is no longer
5032 interesting, resume the LWP.
5033 (handle_tracepoints): Add assert.
5034 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5035 (wstatus_maybe_breakpoint): New function.
5036 (cancel_breakpoint): Delete function.
5037 (check_stopped_by_watchpoint): New function, factored out from
5038 linux_low_filter_event.
5039 (lp_status_maybe_breakpoint): Delete function.
5040 (linux_low_filter_event): Remove filter_ptid argument.
5041 Leave thread group exits pending here. Store the LWP's stop PC.
5042 Always leave events pending.
5043 (linux_wait_for_event_filtered): Pull all events out of the
5044 kernel, and leave them all pending.
5045 (count_events_callback, select_event_lwp_callback): Consider all
5046 events.
5047 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5048 (select_event_lwp): Only give preference to the stepping LWP in
5049 all-stop mode. Adjust comments.
5050 (ignore_event): New function.
5051 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5052 references to cancel_breakpoints. Adjust to renames. Also give
5053 equal priority to all LWPs that have had events in non-stop mode.
5054 If reporting a software breakpoint event, unadjust the LWP's PC.
5055 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5056 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5057 Adjust.
5058 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5059 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5060 (linux_stopped_by_watchpoint): Adjust.
5061 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5062 * linux-low.h (enum lwp_stop_reason): New.
5063 (struct lwp_info) <stop_pc>: Adjust comment.
5064 <stopped_by_watchpoint>: Delete field.
5065 <stop_reason>: New field.
5066 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5067 * mem-break.c (software_breakpoint_inserted_here)
5068 (hardware_breakpoint_inserted_here): New function.
5069 * mem-break.h (software_breakpoint_inserted_here)
5070 (hardware_breakpoint_inserted_here): Declare.
5071 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5072 (cancel_breakpoints): Delete.
5073 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5074 (upload_fast_traceframes): Remove references to
5075 cancel_breakpoints.
5076
a33e3959
PA
50772015-01-09 Pedro Alves <palves@redhat.com>
5078
5079 * thread-db.c (find_new_threads_callback): Ignore thread if the
5080 kernel thread ID is -1.
5081
8784d563
PA
50822015-01-09 Pedro Alves <palves@redhat.com>
5083
5084 * linux-low.c (linux_attach_fail_reason_string): Move to
5085 nat/linux-ptrace.c, and rename.
5086 (linux_attach_lwp): Update comment.
5087 (attach_proc_task_lwp_callback): New function.
5088 (linux_attach): Adjust to rename and use
5089 linux_proc_attach_tgid_threads.
5090 (linux_attach_fail_reason_string): Delete declaration.
5091
76f2b779
JB
50922015-01-01 Joel Brobecker <brobecker@adacore.com>
5093
5094 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5095 * server.c (gdbserver_version): Likewise.
5096
fafcc06a
SDJ
50972014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5098
5099 * remote-utils.c: Include ctype.h.
5100 (input_interrupt): Explicitly handle the case when the char
5101 received is the NUL byte. Improve the printing of non-ASCII
5102 characters.
5103
beed38b8
JB
51042014-12-16 Joel Brobecker <brobecker@adacore.com>
5105
5106 * linux-low.c (linux_low_filter_event): Update call to
5107 linux_enable_event_reporting following the addition of
5108 a new parameter to that function.
5109
bf330350
CU
51102014-12-16 Catalin Udma <catalin.udma@freescale.com>
5111
5112 PR server/17457
5113 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5114 (AARCH64_FPCR_REGNO): Likewise.
5115 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5116 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5117 (aarch64_store_fpregset): Likewise.
5118
5227d625
JB
51192014-12-15 Joel Brobecker <brobecker@adacore.com>
5120
5121 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5122 Remove FIXME comment about assumption about N.
5123
f93b65a0
JB
51242014-12-13 Joel Brobecker <brobecker@adacore.com>
5125
5126 * configure.ac: If large-file support is disabled in GDBserver,
5127 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5128 * configure: Regenerate.
5129
e5a9158d
AA
51302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5131
5132 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5133 warning upon ENODATA from ptrace.
5134 * linux-s390-low.c (s390_store_tdb): New.
5135 (s390_regsets): Add regset for NT_S390_TDB.
5136
feea5f36
AA
51372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5138
5139 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5140 without a fill_function.
5141 * linux-s390-low.c (s390_fill_last_break): Remove.
5142 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5143 (s390_arch_setup): Use regset's size instead of fill_function for
5144 loop end condition.
5145
098dbe61
AA
51462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5147
5148 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5149 the regset's store function when ptrace returned an error.
5150 * regcache.c (get_thread_regcache): Invalidate register cache
5151 before fetching inferior's registers.
5152
28eef672
AA
51532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5154
5155 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5156 while-loop as for-loop.
5157 (regsets_store_inferior_registers): Likewise.
5158
bdca27a2
YQ
51592014-11-28 Yao Qi <yao@codesourcery.com>
5160
5161 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5162 * config.in, configure: Re-generate.
5163 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5164 is defined.
5165
9c232dda
YQ
51662014-11-21 Yao Qi <yao@codesourcery.com>
5167
5168 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5169 (AC_CHECK_HEADERS): Remove malloc.h.
5170 * configure: Re-generated.
5171 * config.in: Re-generated.
5172 * server.h: Don't include alloca.h and malloc.h.
5173 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5174 Don't include malloc.h.
5175
43968415
JB
51762014-11-17 Joel Brobecker <brobecker@adacore.com>
5177
5178 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5179 corresponding ERRNO check in same block.
5180
40e91bc7
PA
51812014-11-12 Pedro Alves <palves@redhat.com>
5182
5183 * server.c (cont_thread): Update comment.
5184 (start_inferior, attach_inferior): No longer clear cont_thread.
5185 (handle_v_cont): No longer set cont_thread.
5186 (captured_main): Clear cont_thread each time a GDB connects.
5187
c2c118cf
PA
51882014-11-12 Pedro Alves <palves@redhat.com>
5189
5190 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5191 thread, and don't resume all threads if the Hc thread has exited.
5192
78708b7c
PA
51932014-11-12 Pedro Alves <palves@redhat.com>
5194
5195 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5196 the process group instead of to a specific LWP.
5197
a2abc7de
PA
51982014-10-15 Pedro Alves <palves@redhat.com>
5199
5200 PR server/17487
5201 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5202 parameter.
5203 (arm_set_thread_context): Delete.
5204 (the_low_target): Adjust.
5205 * win32-i386-low.c (debug_registers_changed)
5206 (debug_registers_used): Delete.
5207 (update_debug_registers_callback): New function.
5208 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5209 needing to update their debug registers.
5210 (win32_get_current_dr): New function.
5211 (x86_dr_low_get_addr, x86_dr_low_get_control)
5212 (x86_dr_low_get_status): Fetch the debug register from the thread
5213 record's context.
5214 (i386_initial_stuff): Adjust.
5215 (i386_get_thread_context): Remove current_event parameter. Don't
5216 clear debug_registers_changed nor copy DR values to
5217 debug_reg_state.
5218 (i386_set_thread_context): Delete.
5219 (i386_prepare_to_resume): New function.
5220 (i386_thread_added): Mark the thread as needing to update irs
5221 debug registers.
5222 (the_low_target): Remove i386_set_thread_context and install
5223 i386_prepare_to_resume.
5224 * win32-low.c (win32_get_thread_context): Adjust.
5225 (win32_set_thread_context): Use SetThreadContext
5226 directly.
5227 (win32_prepare_to_resume): New function.
5228 (win32_require_context): New function, factored out from ...
5229 (thread_rec): ... this.
5230 (continue_one_thread): Call win32_prepare_to_resume on each thread
5231 we're about to continue.
5232 (win32_resume): Call win32_prepare_to_resume on the event thread.
5233 * win32-low.h (struct win32_thread_info)
5234 <debug_registers_changed>: New field.
5235 (struct win32_target_ops): Change prototype of set_thread_context,
5236 delete set_thread_context and add prepare_to_resume.
5237 (win32_require_context): New declaration.
5238
a442d071
GB
52392014-10-08 Gary Benson <gbenson@redhat.com>
5240
5241 * server.h: Do not include common-exceptions.h.
5242
6f1947e8
GB
52432014-10-08 Gary Benson <gbenson@redhat.com>
5244
5245 * server.h: Do not include cleanups.h.
5246
63b434a4
JH
52472014-09-30 James Hogan <james.hogan@imgtec.com>
5248
5249 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5250 mips64-dsp-linux.c.
5251
c4d9ceb6
YQ
52522014-09-23 Yao Qi <yao@codesourcery.com>
5253
5254 * linux-low.c (lp_status_maybe_breakpoint): New function.
5255 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5256 (count_events_callback): Likewise.
5257 (select_event_lwp_callback): Likewise.
5258 (cancel_breakpoints_callback): Likewise.
5259
89a5711c
DB
52602014-09-19 Don Breazeal <donb@codesourcery.com>
5261
5262 * linux-low.c (handle_extended_wait): Call
5263 linux_ptrace_get_extended_event.
5264 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5265 linux_is_extended_waitstatus.
5266
bffc0964
JB
52672014-09-16 Joel Brobecker <brobecker@adacore.com>
5268
5269 * Makefile.in (CPPFLAGS): Define.
5270 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5271 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5272
0bfdf32f
GB
52732014-09-16 Gary Benson <gbenson@redhat.com>
5274
5275 * inferiors.h (current_inferior): Renamed as...
5276 (current_thread): New variable. All uses updated.
5277 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5278 (maybe_move_out_of_jump_pad): Likewise.
5279 (cancel_breakpoint): Likewise.
5280 (linux_low_filter_event): Likewise.
5281 (wait_for_sigstop): Likewise.
5282 (linux_resume_one_lwp): Likewise.
5283 (need_step_over_p): Likewise.
5284 (start_step_over): Likewise.
5285 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5286 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5287 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5288 and save_inferior as saved_thread.
5289 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5290 saved_thread.
5291 (regcache_invalidate_thread): Likewise.
5292 * remote-utils.c (prepare_resume_reply): Likewise.
5293 * thread-db.c (thread_db_get_tls_address): Likewise.
5294 (disable_thread_event_reporting): Likewise.
5295 (remove_thread_event_breakpoints): Likewise.
5296 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5297 as saved_thread.
5298 * target.h (set_desired_inferior): Renamed as...
5299 (set_desired_thread): New declaration. All uses updated.
5300 * server.c (myresume): Updated comment to reference thread instead
5301 of inferior.
5302 (handle_serial_event): Likewise.
5303 (handle_target_event): Likewise.
5304
361c8ade
GB
53052014-09-12 Tom Tromey <tromey@redhat.com>
5306 Gary Benson <gbenson@redhat.com>
5307
5308 * regcache.h: Include common-regcache.h.
5309 (regcache_read_pc): Don't declare.
5310 * regcache.c (get_thread_regcache_for_ptid): New function.
5311
bd9269f7
GB
53122014-09-11 Tom Tromey <tromey@redhat.com>
5313 Gary Benson <gbenson@redhat.com>
5314
5315 * symbol.c: New file.
5316 * Makefile.in (SFILES): Add symbol.c.
5317 (OBS): Add symbol.o.
5318
f8c1d06b
GB
53192014-09-11 Gary Benson <gbenson@redhat.com>
5320
5321 * target.c (target_stop_ptid, target_continue_ptid): New
5322 functions.
5323
721ec300
GB
53242014-09-11 Tom Tromey <tromey@redhat.com>
5325 Gary Benson <gbenson@redhat.com>
5326
5327 * target.h: Include target/target.h.
5328 * target.c (target_read_memory, target_read_uint32)
5329 (target_write_memory): New functions.
5330
c5e92cca
GB
53312014-09-11 Gary Benson <gbenson@redhat.com>
5332
5333 * server.h (debug_hw_points): Don't declare.
5334 * server.c (debug_hw_points): Don't define. Replace all uses
5335 with show_debug_regs.
5336 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5337 all uses with show_debug_regs.
5338
2e4bb98a
EBM
53392014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5340
5341 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5342 endianness into account.
5343 (ppc_supply_ptrace_register): Likewise.
5344
ac740bc7
JH
53452014-09-03 James Hogan <james.hogan@imgtec.com>
5346
5347 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5348 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5349
97ea6506
GB
53502014-09-03 Gary Benson <gbenson@redhat.com>
5351
5352 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5353 ALL_DEBUG_ADDRESS_REGISTERS.
5354
df7e5265
GB
53552014-09-02 Gary Benson <gbenson@redhat.com>
5356
5357 * i386-low.h: Renamed as...
5358 * x86-low.h: New file. All type, function and variable name
5359 prefixes changed from "i386_" to "x86_". All references updated.
5360 * i386-low.c: Renamed as...
5361 * x86-low.c: New file. All type, function and variable name
5362 prefixes changed from "i386_" to "x86_". All references updated.
5363
ed859da7
GB
53642014-09-02 Gary Benson <gbenson@redhat.com>
5365
5366 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5367 (x86_linux_new_thread): Likewise.
5368
860789c7
GB
53692014-08-29 Gary Benson <gbenson@redhat.com>
5370
5371 * server.h (setjmp.h): Do not include.
5372 (toplevel): Do not declare.
5373 (common-exceptions.h): Include.
5374 (cleanups.h): Likewise.
5375 * server.c (toplevel): Do not define.
5376 (exit_code): New static global.
5377 (detach_or_kill_for_exit_cleanup): New function.
5378 (main): New function. Original main renamed to...
5379 (captured_main): New function.
5380 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5381
ff55e1b5
GB
53822014-08-29 Gary Benson <gbenson@redhat.com>
5383
5384 * Makefile.in (SFILES): Add common/common-exceptions.c.
5385 (OBS): Add common-exceptions.o.
5386 (common-exceptions.o): New rule.
5387 * utils.c (prepare_to_throw_exception): New function.
5388
e9bcb658
GB
53892014-08-29 Gary Benson <gbenson@redhat.com>
5390
5391 * config.in: Regenerate.
5392 * configure: Likewise.
5393
e3180625
GB
53942014-08-29 Gary Benson <gbenson@redhat.com>
5395
5396 * Makefile.in (SFILES): Add common/cleanups.c.
5397 (OBS): cleanups.o.
5398 (cleanups.o): New rule.
5399
e3d6ba5d
GB
54002014-08-29 Gary Benson <gbenson@redhat.com>
5401
5402 * utils.c (internal_vwarning): New function.
5403
7096e886
GB
54042014-08-28 Gary Benson <gbenson@redhat.com>
5405
5406 * utils.h (fatal): Remove declaration.
5407 * utils.c (fatal): Remove function.
5408
14ce3192
GB
54092014-08-28 Gary Benson <gbenson@redhat.com>
5410
5411 * tracepoint.c (gdb_agent_init): Replace fatal with
5412 perror_with_name.
5413 (initialize_tracepoint): Likewise.
5414
50278d59
GB
54152014-08-28 Gary Benson <gbenson@redhat.com>
5416
5417 * remote-utils.c (remote_prepare): Replace fatal with error.
5418
aa96c426
GB
54192014-08-28 Gary Benson <gbenson@redhat.com>
5420
5421 * linux-low.c (linux_async): Replace fatal with warning.
5422 Tidy up and return.
5423 (linux_start_non_stop): Return -1 if linux_async failed.
5424
f7160e97
GB
54252014-08-28 Gary Benson <gbenson@redhat.com>
5426
5427 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5428 gdb_assert.
5429 (i386_dr_low_get_addr): Remove vague comment.
5430 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5431 gdb_assert.
5432
38e08fca
GB
54332014-08-28 Gary Benson <gbenson@redhat.com>
5434
5435 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5436 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5437 internal_error.
5438 (linux_resume_one_lwp): Likewise.
5439 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5440 gdb_assert.
5441 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5442 with internal_error.
5443 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5444 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5445 (find_register_by_name): Replace fatal with internal_error.
5446 (find_regno): Likewise.
5447 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5448 * thread-db.c (thread_db_create_event): Likewise.
5449 (thread_db_load_search): Likewise.
5450 (try_thread_db_load_1): Likewise.
5451 * tracepoint.c (get_jump_space_head): Replace fatal with
5452 internal_error.
5453 (claim_trampoline_space): Likewise.
5454 (have_fast_tracepoint_trampoline_buffer): Likewise.
5455 (cmd_qtstart): Likewise.
5456 (stop_tracing): Likewise.
5457 (fast_tracepoint_collecting): Likewise.
5458 (target_malloc): Likewise.
5459 (download_tracepoint): Likewise.
5460 (download_trace_state_variables): Replace check with gdb_assert.
5461 (upload_fast_traceframes): Replace fatal with internal_error.
5462
34abf635
GB
54632014-08-19 Tom Tromey <tromey@redhat.com>
5464 Gary Benson <gbenson@redhat.com>
5465
5466 * Makefile.in (SFILES): Add common/common-debug.c.
5467 (OBS): Add common-debug.o.
5468 (common-debug.o): New rule.
5469 * debug.h (debug_printf): Don't declare.
5470 * debug.c (debug_printf): Renamed and rewritten as...
5471 (debug_vprintf): New function.
5472
f6e94d78
GB
54732014-08-19 Gary Benson <gbenson@redhat.com>
5474
5475 * utils.h: Do not include print-utils.h.
5476
9239eeab
GB
54772014-08-19 Tom Tromey <tromey@redhat.com>
5478 Gary Benson <gbenson@redhat.com>
5479
5480 * server.h: Add static assertion.
5481 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5482
ef87c8bb
GB
54832014-08-19 Tom Tromey <tromey@redhat.com>
5484 Gary Benson <gbenson@redhat.com>
5485
5486 * Makefile.in (SFILES): Add common/errors.c.
5487 (OBS): Add errors.o.
5488 (IPA_OBS): Add errors-ipa.o.
5489 (errors.o): New rule.
5490 (errors-ipa.o): Likewise.
5491 * utils.h (perror_with_name, error, warning): Don't declare.
5492 * utils.c (warning): Renamed and rewritten as...
5493 (vwarning): New function.
5494 (error): Renamed and rewritten as...
5495 (verror): New function.
5496 (internal_error): Renamed and rewritten as...
5497 (internal_verror): New function.
5498
bb974a24
GB
54992014-08-07 Gary Benson <gbenson@redhat.com>
5500
5501 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5502 * configure: Regenerate.
5503 * config.in: Likewise.
5504 * server.h: Do not include errno.h.
5505 * event-loop.c: Likewise.
5506 * hostio-errno.c: Likewise.
5507 * linux-low.c: Likewise.
5508 * remote-utils.c: Likewise.
5509 * spu-low.c: Likewise.
5510 * utils.c: Likewise.
5511 * gdbreplay.c: Unconditionally include errno.h.
5512
6d3d12eb
GB
55132014-08-07 Gary Benson <gbenson@redhat.com>
5514
5515 * server.h: Do not include string.h.
5516 * event-loop.c: Likewise.
5517 * linux-low.c: Likewise.
5518 * regcache.c: Likewise.
5519 * remote-utils.c: Likewise.
5520 * spu-low.c: Likewise.
5521 * utils.c: Likewise.
5522
dccbb609
GB
55232014-08-07 Gary Benson <gbenson@redhat.com>
5524
5525 * server.h: Do not include gdb_assert.h.
5526
e76df0d0
GB
55272014-08-07 Gary Benson <gbenson@redhat.com>
5528
5529 * server.h: Do not include common-utils.h.
5530
4cb9c816
GB
55312014-08-07 Gary Benson <gbenson@redhat.com>
5532
5533 * server.h: Do not include ptid.h.
5534 * notif.h: Likewise.
5535
3995eeee
GB
55362014-08-07 Gary Benson <gbenson@redhat.com>
5537
5538 * server.h: Do not include gdb_locale.h.
5539
cb9f1a9b
GB
55402014-08-07 Gary Benson <gbenson@redhat.com>
5541
5542 * server.h: Do not include gdb/signals.h.
5543 * win32-low.c: Likewise.
5544
a5fceff8
GB
55452014-08-07 Gary Benson <gbenson@redhat.com>
5546
5547 * server.h: Do not include pathmax.h.
5548
b9391142
GB
55492014-08-07 Gary Benson <gbenson@redhat.com>
5550
5551 * server.h: Do not include libiberty.h.
5552 * linux-bfin-low.c: Likewise.
5553
0e443c87
GB
55542014-08-07 Gary Benson <gbenson@redhat.com>
5555
5556 * server.h: Do not include ansidecl.h.
5557
8ebb3f56
GB
55582014-08-07 Gary Benson <gbenson@redhat.com>
5559
5560 * linux-x86-low.c: Do not include stddef.h.
5561 * lynx-ppc-low.c: Likewise.
5562 * tracepoint.c: Likewise.
5563
8980bdf6
GB
55642014-08-07 Gary Benson <gbenson@redhat.com>
5565
5566 * server.h: Do not include stdarg.h.
5567 * nto-low.c: Likewise.
5568
d7096f71
GB
55692014-08-07 Gary Benson <gbenson@redhat.com>
5570
5571 * server.h: Do not include stdlib.h.
5572 * inferiors.c: Likewise.
5573 * linux-low.c: Likewise.
5574 * regcache.c: Likewise.
5575 * spu-low.c: Likewise.
5576 * tracepoint.c: Likewise.
5577 * utils.c: Likewise.
5578
d02f550d
GB
55792014-08-07 Gary Benson <gbenson@redhat.com>
5580
5581 * server.h: Do not include stdio.h.
5582 * linux-low.c: Likewise.
5583 * remote-utils.c: Likewise.
5584 * spu-low.c: Likewise.
5585 * utils.c: Likewise.
5586 * wincecompat.c: Likewise.
5587
87f6c4e3
GB
55882014-08-06 Gary Benson <gbenson@redhat.com>
5589
5590 * regcache.c (init_register_cache): Move conditionals inside if.
5591
7089dca4
GB
55922014-08-06 Gary Benson <gbenson@redhat.com>
5593
5594 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5595
462f517e
GB
55962014-07-31 Gary Benson <gbenson@redhat.com>
5597
5598 * ax.h: Do not include server.h.
5599 * gdbthread.h: Likewise.
5600 * lynx-low.h: Likewise.
5601 * notif.h: Likewise.
5602
976411d6
GB
56032014-07-30 Gary Benson <gbenson@redhat.com>
5604
5605 * server.h: Include common-defs.h.
5606 Do not include config.h or build-gnulib-gdbserver/config.h.
5607
d41f6d8e
GB
56082014-07-30 Gary Benson <gbenson@redhat.com>
5609
5610 * hostio-errno.c: Move server.h to top of includes list.
5611 * inferiors.c: Likewise.
5612 * linux-x86-low.c: Likewise.
5613 * notif.c: Include server.h.
5614
314c6a35
TT
56152014-07-24 Tom Tromey <tromey@redhat.com>
5616 Gary Benson <gbenson@redhat.com>
5617
5618 * server.h (CORE_ADDR): Now unsigned.
5619
69ff6be5
PA
56202014-07-16 Pedro Alves <palves@redhat.com>
5621
5622 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5623
ce9e3fe7
PA
56242014-07-15 Pedro Alves <palves@redhat.com>
5625
5626 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5627 copy.
5628
e76126e8
PA
56292014-07-11 Pedro Alves <palves@redhat.com>
5630
5631 * linux-low.c (kill_wait_lwp): New function, based on
5632 kill_one_lwp_callback, but use my_waitpid directly.
5633 (kill_one_lwp_callback, linux_kill): Use it.
5634
8e9db26e
PA
56352014-06-23 Pedro Alves <palves@redhat.com>
5636
5637 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5638 before setting DR0..DR3.
5639
698b3e08
GB
56402014-06-20 Gary Benson <gbenson@redhat.com>
5641
5642 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5643 * configure: Regenerated.
5644 * config.in: Likewise.
5645
125f8a3d
GB
56462014-06-20 Gary Benson <gbenson@redhat.com>
5647
5648 * Makefile.in (SFILES): Update locations for files moved
5649 from common to nat.
5650 (object file files): Reordered.
5651
42995dbd
GB
56522014-06-20 Gary Benson <gbenson@redhat.com>
5653
5654 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5655 (i386_dr_low_set_addr): Likewise.
5656 (i386_dr_low_get_addr): Likewise.
5657 (i386_dr_low_can_set_control): Likewise.
5658 (i386_dr_low_set_control): Likewise.
5659 (i386_dr_low_get_control): Likewise.
5660 (i386_dr_low_get_status): Likewise.
5661 (i386_get_debug_register_length): Likewise.
5662 * linux-x86-low.c (i386_dr_low_set_addr):
5663 Changed signature. Made static.
5664 (i386_dr_low_get_addr): Likewise.
5665 (i386_dr_low_set_control): Likewise.
5666 (i386_dr_low_get_control): Likewise.
5667 (i386_dr_low_get_status): Likewise.
5668 (i386_dr_low): New global variable.
5669 * win32-i386-low.c (i386_dr_low_set_addr):
5670 Changed signature. Made static.
5671 (i386_dr_low_get_addr): Likewise.
5672 (i386_dr_low_set_control): Likewise.
5673 (i386_dr_low_get_control): Likewise.
5674 (i386_dr_low_get_status): Likewise.
5675 (i386_dr_low): New global variable.
5676
e1d2394b
MS
56772014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5678
5679 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5680 * Makefile.in (AR, AR_FLAGS): Define.
5681 * configure: Regenerate.
5682
3a8ee006
GB
56832014-06-19 Gary Benson <gbenson@redhat.com>
5684
5685 * Makefile.in (i386-dregs.o): New rule.
5686 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5687 * i386-low.c (target.h): Remove include.
5688 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5689 (DR_CONTROL_SHIFT): Likewise.
5690 (DR_CONTROL_SIZE): Likewise.
5691 (DR_RW_EXECUTE): Likewise.
5692 (DR_RW_WRITE): Likewise.
5693 (DR_RW_READ): Likewise.
5694 (DR_RW_IORW): Likewise.
5695 (DR_LEN_1): Likewise.
5696 (DR_LEN_2): Likewise.
5697 (DR_LEN_4): Likewise.
5698 (DR_LEN_8): Likewise.
5699 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5700 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5701 (DR_ENABLE_SIZE): Likewise.
5702 (DR_LOCAL_SLOWDOWN): Likewise.
5703 (DR_GLOBAL_SLOWDOWN): Likewise.
5704 (DR_CONTROL_RESERVED): Likewise.
5705 (I386_DR_CONTROL_MASK): Likewise.
5706 (I386_DR_VACANT): Likewise.
5707 (I386_DR_LOCAL_ENABLE): Likewise.
5708 (I386_DR_GLOBAL_ENABLE): Likewise.
5709 (I386_DR_DISABLE): Likewise.
5710 (I386_DR_SET_RW_LEN): Likewise.
5711 (I386_DR_GET_RW_LEN): Likewise.
5712 (I386_DR_WATCH_HIT): Likewise.
5713 (i386_wp_op_t): Likewise.
5714 (i386_show_dr): Likewise.
5715 (i386_length_and_rw_bits): Likewise.
5716 (i386_insert_aligned_watchpoint): Likewise.
5717 (i386_remove_aligned_watchpoint): Likewise.
5718 (i386_handle_nonaligned_watchpoint): Likewise.
5719 i386_update_inferior_debug_regs(): Likewise.
5720 (i386_dr_insert_watchpoint): Likewise.
5721 (i386_dr_remove_watchpoint): Likewise.
5722 (i386_dr_region_ok_for_watchpoint): Likewise.
5723 (i386_dr_stopped_data_address): Likewise.
5724 (i386_dr_stopped_by_watchpoint): Likewise.
5725
8f26655c
GB
57262014-06-19 Gary Benson <gbenson@redhat.com>
5727
5728 * i386-low.c (i386_dr_show): Renamed to
5729 i386_show_dr and made static. All uses updated.
5730 (i386_dr_length_and_rw_bits): Renamed to
5731 i386_length_and_rw_bits and made static.
5732 All uses updated.
5733 (i386_dr_insert_aligned_watchpoint): Renamed to
5734 i386_insert_aligned_watchpoint and made static.
5735 All uses updated.
5736 (i386_dr_remove_aligned_watchpoint): Renamed to
5737 i386_remove_aligned_watchpoint and made static.
5738 All uses updated.
5739 (i386_dr_update_inferior_debug_regs): Renamed to
5740 i386_update_inferior_debug_regs and made static.
5741 All uses updated.
5742
b9228891
GB
57432014-06-18 Gary Benson <gbenson@redhat.com>
5744
5171def3
GB
5745 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5746 (i386_dr_low_can_set_control): Likewise.
5747 (i386_get_debug_register_length): Likewise.
5748 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5749 (i386_dr_low_can_set_control): Likewise.
5750 (i386_get_debug_register_length): Likewise.
5751
57522014-06-17 Gary Benson <gbenson@redhat.com>
5753
b9228891
GB
5754 * i386-low.h (i386-dregs.h): New include.
5755 (DR_FIRSTADDR): Now in i386-dregs.h.
5756 (DR_LASTADDR): Likewise.
5757 (DR_NADDR): Likewise.
5758 (DR_STATUS): Likewise.
5759 (DR_CONTROL): Likewise.
5760 (i386_debug_reg_state): Likewise.
5761 (i386_dr_insert_watchpoint): Likewise.
5762 (i386_dr_remove_watchpoint): Likewise.
5763 (i386_dr_region_ok_for_watchpoint): Likewise.
5764 (i386_dr_stopped_data_address): Likewise.
5765 (i386_dr_stopped_by_watchpoint): Likewise.
5766 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5767
4be83cc2
GB
57682014-06-18 Gary Benson <gbenson@redhat.com>
5769
5770 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5771 i386_dr_insert_watchpoint.
5772 (i386_low_remove_watchpoint): Renamed to
5773 i386_dr_remove_watchpoint.
5774 (i386_low_region_ok_for_watchpoint): Renamed to
5775 i386_dr_region_ok_for_watchpoint.
5776 (i386_low_stopped_data_address): Renamed to
5777 i386_dr_stopped_data_address.
5778 (i386_low_stopped_by_watchpoint): Renamed to
5779 i386_dr_stopped_by_watchpoint.
5780 * i386-low.c (i386_show_dr): Renamed to
5781 i386_dr_show and made nonstatic. All uses updated.
5782 (i386_length_and_rw_bits): Renamed to
5783 i386_dr_length_and_rw_bits and made nonstatic.
5784 All uses updated.
5785 (i386_insert_aligned_watchpoint): Renamed to
5786 i386_dr_insert_aligned_watchpoint and made nonstatic.
5787 All uses updated.
5788 (i386_remove_aligned_watchpoint): Renamed to
5789 i386_dr_remove_aligned_watchpoint and made nonstatic.
5790 All uses updated.
5791 (i386_update_inferior_debug_regs): Renamed to
5792 i386_dr_update_inferior_debug_regs and made nonstatic.
5793 All uses updated.
5794 (i386_low_insert_watchpoint): Renamed to
5795 i386_dr_insert_watchpoint. All uses updated.
5796 (i386_low_remove_watchpoint): Renamed to
5797 i386_dr_remove_watchpoint. All uses updated.
5798 (i386_low_region_ok_for_watchpoint): Renamed to
5799 i386_dr_region_ok_for_watchpoint. All uses updated.
5800 (i386_low_stopped_data_address): Renamed to
5801 i386_dr_stopped_data_address. All uses updated.
5802 (i386_low_stopped_by_watchpoint): Renamed to
5803 i386_dr_stopped_by_watchpoint. All uses updated.
5804
131aa0d4
GB
58052014-06-18 Gary Benson <gbenson@redhat.com>
5806
5807 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5808 (i386_dr_low_can_set_control): Likewise.
5809 (i386_insert_aligned_watchpoint): New check.
5810
d9305f7f
GB
58112014-06-18 Gary Benson <gbenson@redhat.com>
5812
5813 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5814 Renamed to state.
5815
e927c9fc
GB
58162014-06-18 Gary Benson <gbenson@redhat.com>
5817
5818 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5819 instead of fatal and error.
5820 (i386_handle_nonaligned_watchpoint): Likewise.
5821
1b6d4134
GB
58222014-06-18 Gary Benson <gbenson@redhat.com>
5823
5824 * i386-low.c (i386_get_debug_register_length): New macro.
5825 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5826 (i386_show_dr): Use debug_printf instead of fprintf. Use
5827 phex to format values.
5828
6e62758f
GB
58292014-06-18 Gary Benson <gbenson@redhat.com>
5830
5831 * i386-low.h: Comment changes.
5832 * i386-low.c: Likewise.
5833
fc6e2f03
GB
58342014-06-18 Gary Benson <gbenson@redhat.com>
5835
5836 * i386-low.c: Whitespace changes.
5837
f9d1eeed
TT
58382014-06-12 Tom Tromey <tromey@redhat.com>
5839
5840 * utils.c (freeargv): Remove.
5841
0b04e523
TT
58422014-06-12 Tom Tromey <tromey@redhat.com>
5843
5844 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5845 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5846 (parse_debug_format_options): Likewise.
5847 (gdbserver_usage): Likewise.
5848 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5849 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5850 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5851 against libiberty.
5852 ($(LIBGNU)): Depend on libiberty.
5853 (all-lib): Recurse into all subdirs.
5854 (install-only): Invoke "install" target in subdirs.
5855 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5856 targets.
5857 * configure: Rebuild.
5858 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5859 for vasprintf, vsnprintf, or gettimeofday.
5860 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5861 srv_tgtobj.
5862
270c9937
JB
58632014-06-05 Joel Brobecker <brobecker@adacore.com>
5864
5865 * development.sh: Delete.
5866 * Makefile.in (config.status): Adjust dependency on development.sh.
5867 * configure.ac: Adjust development.sh source call.
5868 * configure: Regenerate.
5869
0a261ed8
PA
58702014-06-02 Pedro Alves <palves@redhat.com>
5871
5872 * ax.c (gdb_free_agent_expr): New function.
5873 * ax.h (gdb_free_agent_expr): New declaration.
5874 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5875 list.
5876 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5877 static.
5878 (clear_breakpoint_conditions_and_commands): New function.
5879 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5880 (clear_breakpoint_conditions_and_commands): New declaration.
5881
e9dae05e
RR
58822014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5883
5884 * linux-aarch64-low.c (asm/ptrace.h): Include.
5885
5876f503
JK
58862014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5887
5888 Fix TLS access for -static -pthread.
5889 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5890 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5891 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5892
802e8e6d
PA
58932014-05-20 Pedro Alves <palves@redhat.com>
5894
5895 * linux-aarch64-low.c (aarch64_insert_point)
5896 (aarch64_remove_point): No longer check whether the type is
5897 supported here. Adjust to new interface.
5898 (the_low_target): Install aarch64_supports_z_point_type as
5899 supports_z_point_type method.
5900 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5901 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5902 instead of a Z packet char. Adjust.
5903 (arm_supports_z_point_type): New function.
5904 (arm_insert_point, arm_remove_point): Adjust to new interface.
5905 (the_low_target): Install arm_supports_z_point_type.
5906 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5907 (cris_insert_point, cris_remove_point): Adjust to new interface.
5908 Don't check whether the type is supported here.
5909 (the_low_target): Install cris_supports_z_point_type.
5910 * linux-low.c (linux_supports_z_point_type): New function.
5911 (linux_insert_point, linux_remove_point): Adjust to new interface.
5912 * linux-low.h (struct linux_target_ops) <insert_point,
5913 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5914 raw_breakpoint pointer parameter.
5915 <supports_z_point_type>: New method.
5916 * linux-mips-low.c (mips_supports_z_point_type): New function.
5917 (mips_insert_point, mips_remove_point): Adjust to new interface.
5918 Use mips_supports_z_point_type.
5919 (the_low_target): Install mips_supports_z_point_type.
5920 * linux-ppc-low.c (the_low_target): Install NULL as
5921 supports_z_point_type method.
5922 * linux-s390-low.c (the_low_target): Install NULL as
5923 supports_z_point_type method.
5924 * linux-sparc-low.c (the_low_target): Install NULL as
5925 supports_z_point_type method.
5926 * linux-x86-low.c (x86_supports_z_point_type): New function.
5927 (x86_insert_point): Adjust to new insert_point interface. Use
5928 insert_memory_breakpoint. Adjust to new
5929 i386_low_insert_watchpoint interface.
5930 (x86_remove_point): Adjust to remove_point interface. Use
5931 remove_memory_breakpoint. Adjust to new
5932 i386_low_remove_watchpoint interface.
5933 (the_low_target): Install x86_supports_z_point_type.
5934 * lynx-low.c (lynx_target_ops): Install NULL as
5935 supports_z_point_type callback.
5936 * nto-low.c (nto_supports_z_point_type): New.
5937 (nto_insert_point, nto_remove_point): Adjust to new interface.
5938 (nto_target_ops): Install nto_supports_z_point_type.
5939 * mem-break.c: Adjust intro comment.
5940 (struct raw_breakpoint) <raw_type, size>: New fields.
5941 <inserted>: Update comment.
5942 <shlib_disabled>: Delete field.
5943 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5944 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5945 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5946 (raw_bkpt_type_to_target_hw_bp_type): New function.
5947 (find_enabled_raw_code_breakpoint_at): New function.
5948 (find_raw_breakpoint_at): New type and size parameters. Use them.
5949 (insert_memory_breakpoint): New function, based off
5950 set_raw_breakpoint_at.
5951 (remove_memory_breakpoint): New function.
5952 (set_raw_breakpoint_at): Reimplement.
5953 (set_breakpoint): New, based on set_breakpoint_at.
5954 (set_breakpoint_at): Reimplement.
5955 (delete_raw_breakpoint): Go through the_target->remove_point
5956 instead of assuming memory breakpoints.
5957 (find_gdb_breakpoint_at): Delete.
5958 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5959 (find_gdb_breakpoint): New function.
5960 (set_gdb_breakpoint_at): Delete.
5961 (z_type_supported): New function.
5962 (set_gdb_breakpoint_1): New function, loosely based off
5963 set_gdb_breakpoint_at.
5964 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5965 (delete_gdb_breakpoint_at): Delete.
5966 (delete_gdb_breakpoint_1): New function, loosely based off
5967 delete_gdb_breakpoint_at.
5968 (delete_gdb_breakpoint): New function.
5969 (clear_gdb_breakpoint_conditions): Rename to ...
5970 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5971 breakpoint.
5972 (add_condition_to_breakpoint): Make static.
5973 (add_breakpoint_condition): Take a struct breakpoint pointer
5974 instead of an address. Adjust.
5975 (gdb_condition_true_at_breakpoint): Rename to ...
5976 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5977 z_type parameter.
5978 (gdb_condition_true_at_breakpoint): Reimplement.
5979 (add_breakpoint_commands): Take a struct breakpoint pointer
5980 instead of an address. Adjust.
5981 (gdb_no_commands_at_breakpoint): Rename to ...
5982 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5983 parameter. Return true if no breakpoint was found. Change debug
5984 output.
5985 (gdb_no_commands_at_breakpoint): Reimplement.
5986 (run_breakpoint_commands): Rename to ...
5987 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5988 and change return type to boolean.
5989 (run_breakpoint_commands): New function.
5990 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5991 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5992 breakpoint. Go through the_target->remove_point instead of
5993 assuming memory breakpoint.
5994 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5995 software and hardware breakpoints.
5996 (reinsert_raw_breakpoint): Go through the_target->insert_point
5997 instead of assuming memory breakpoint.
5998 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5999 software and hardware breakpoints.
6000 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6001 Check both software and hardware breakpoints.
6002 (validate_inserted_breakpoint): Assert the breakpoint is a
6003 software breakpoint. Set the inserted flag to -1 instead of
6004 setting shlib_disabled.
6005 (delete_disabled_breakpoints): Adjust.
6006 (validate_breakpoints): Only validate software breakpoints.
6007 Adjust to inserted flag change.
6008 (check_mem_read, check_mem_write): Skip breakpoint types other
6009 than software breakpoints. Adjust to inserted flag change.
6010 * mem-break.h (enum raw_bkpt_type): New enum.
6011 (raw_breakpoint, struct process_info): Forward declare.
6012 (Z_packet_to_target_hw_bp_type): Delete declaration.
6013 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6014 (set_gdb_breakpoint, delete_gdb_breakpoint)
6015 (clear_breakpoint_conditions): New declarations.
6016 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6017 (breakpoint_inserted_here): Update comment.
6018 (add_breakpoint_condition, add_breakpoint_commands): Replace
6019 address parameter with a breakpoint pointer parameter.
6020 (gdb_breakpoint_here): Update comment.
6021 (delete_gdb_breakpoint_at): Delete.
6022 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6023 * server.c (process_point_options): Take a struct breakpoint
6024 pointer instead of an address. Adjust.
6025 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6026 delete_gdb_breakpoint.
6027 * spu-low.c (spu_target_ops): Install NULL as
6028 supports_z_point_type method.
6029 * target.h: Include mem-break.h.
6030 (struct target_ops) <prepare_to_access_memory>: Update comment.
6031 <supports_z_point_type>: New field.
6032 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6033 instead of a char. Also take a raw breakpoint pointer.
6034 * win32-arm-low.c (the_low_target): Install NULL as
6035 supports_z_point_type.
6036 * win32-i386-low.c (i386_supports_z_point_type): New function.
6037 (i386_insert_point, i386_remove_point): Adjust to new interface.
6038 (the_low_target): Install i386_supports_z_point_type.
6039 * win32-low.c (win32_supports_z_point_type): New function.
6040 (win32_insert_point, win32_remove_point): Adjust to new interface.
6041 (win32_target_ops): Install win32_supports_z_point_type.
6042 * win32-low.h (struct win32_target_ops):
6043 <supports_z_point_type>: New method.
6044 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6045 instead of a char. Also take a raw breakpoint pointer.
6046
932539e3
PA
60472014-05-20 Pedro Alves <palves@redhat.com>
6048
6049 * mem-break.h: Include break-common.h.
6050 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6051 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6052 (Z_packet_to_target_hw_bp_type): New declaration.
6053 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6054 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6055 (Z_PACKET_ACCESS_WP): Delete macros.
6056 (Z_packet_to_hw_type): Delete function.
6057 * i386-low.h: Don't include break-common.h here.
6058 (Z_packet_to_hw_type): Delete declaration.
6059 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6060 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6061 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6062 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6063 * linux-aarch64-low.c: Don't include break-common.h here.
6064 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6065 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6066 (Z_packet_to_target_hw_bp_type): Delete function.
6067 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6068 function.
6069 (mips_insert_point, mips_remove_point): Use
6070 Z_packet_to_target_hw_bp_type.
6071
4ff0d3d8
PA
60722014-05-20 Pedro Alves <palves@redhat.com>
6073
6074 * linux-aarch64-low.c: Include break-common.h.
6075 (enum target_point_type): Delete.
6076 (Z_packet_to_point_type): Rename to ...
6077 (Z_packet_to_target_hw_bp_type): ... this, and return a
6078 target_hw_bp_type instead.
6079 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6080 instead of an enum target_point_type.
6081 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6082 breakpoint type.
6083 (aarch64_dr_state_insert_one_point)
6084 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6085 (aarch64_handle_aligned_watchpoint)
6086 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6087 Take an enum target_hw_bp_type instead of an enum
6088 target_point_type.
6089 (aarch64_supports_z_point_type): New function.
6090 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6091 use Z_packet_to_target_hw_bp_type.
6092
786dc519
JB
60932014-05-20 Joel Brobecker <brobecker@adacore.com>
6094
6095 * configure.ac: Only use -Werror by default when DEVELOPMENT
6096 is true.
6097 * configure: Regenerate.
6098
9e0aa64f
JK
60992014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6100
6101 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6102 * linux-x86-low.c (X86_64_USER_REGS): New.
6103 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6104
2b577b92
YQ
61052014-04-28 Yao Qi <yao@codesourcery.com>
6106
6107 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6108 name.
6109
94611da2
PA
61102014-04-25 Pedro Alves <palves@redhat.com>
6111
6112 PR server/16255
6113 * linux-low.c (linux_attach_fail_reason_string): New function.
6114 (linux_attach_lwp): Delete.
6115 (linux_attach_lwp_1): Rename to ...
6116 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6117 argument. Remove "initial" parameter. Return int instead of
6118 void. Don't error or warn here.
6119 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6120 failure to attach to the tgid. Call warning when failing to
6121 attach to an lwp.
6122 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6123 argument. Remove "initial" parameter. Return int instead of
6124 void. Don't error or warn here.
6125 (linux_attach_fail_reason_string): New declaration.
6126 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6127 interface change. Use linux_attach_fail_reason_string.
6128
01f9f808
MS
61292014-04-24 Michael Sturm <michael.sturm@mintel.com>
6130 Walfred Tedeschi <walfred.tedeschi@intel.com>
6131
6132 * Makefile.in: Added rules to handle new files
6133 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6134 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6135 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6136 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6137 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6138 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6139 x32-avx512-linux.o.
6140 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6141 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6142 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6143 i386/x32-avx512.xml.
6144 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6145 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6146 i386/x32-avx512-linux.xml.
6147 * i387-fp.c (num_avx512_k_registers): New constant for number
6148 of K registers.
6149 (num_avx512_zmmh_low_registers): New constant for number of
6150 lower ZMM registers (0-15).
6151 (num_avx512_zmmh_high_registers): New constant for number of
6152 higher ZMM registers (16-31).
6153 (num_avx512_ymmh_registers): New contant for number of higher
6154 YMM registers (ymm16-31 added by avx521 on x86_64).
6155 (num_avx512_xmm_registers): New constant for number of higher
6156 XMM registers (xmm16-31 added by AVX512 on x86_64).
6157 (struct i387_xsave): Add space for AVX512 registers.
6158 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6159 Add code to handle AVX512 registers.
6160 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6161 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6162 prototypei from generated file.
6163 (tdesc_amd64_avx512_linux): Likewise.
6164 (init_registers_x32_avx512_linux): Likewise.
6165 (tdesc_x32_avx512_linux): Likewise.
6166 (init_registers_i386_avx512_linux): Likewise.
6167 (tdesc_i386_avx512_linux): Likewise.
6168 (x86_64_regmap): Add AVX512 registers.
6169 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6170 mask.
6171 (initialize_low_arch): Add code to initialize AVX512 registers.
6172
51aa91f9
PA
61732014-04-23 Pedro Alves <palves@redhat.com>
6174
6175 * mem-break.c (find_gdb_breakpoint_at): Make static.
6176 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6177
a4165e94
PA
61782014-04-23 Pedro Alves <palves@redhat.com>
6179
6180 * i386-low.c: Don't include break-common.h here.
6181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6182 prototype to take target_hw_bp_type as argument instead of a Z
6183 packet char.
6184 * i386-low.h: Include break-common.h here.
6185 (Z_packet_to_hw_type): Declare.
6186 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6187 prototypes.
6188 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6189 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6190 (x86_remove_point): Convert the packet number to a
6191 target_hw_bp_type before calling i386_low_remove_watchpoint.
6192 * win32-i386-low.c (i386_insert_point): Convert the packet number
6193 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6194 (i386_remove_point): Convert the packet number to a
6195 target_hw_bp_type before calling i386_low_remove_watchpoint.
6196
b8acf843
PA
61972014-04-23 Pedro Alves <palves@redhat.com>
6198
6199 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6200
d708bcd1
PA
62012014-04-10 Pedro Alves <palves@redhat.com>
6202
6203 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6204 Check if the condition or command is NULL before checking if the
6205 breakpoint is known. On success, return true.
6206 * mem-break.h (add_breakpoint_condition): Document return.
6207 (add_breakpoint_commands): Add describing comment.
6208 * server.c (skip_to_semicolon): New function.
6209 (process_point_options): Use it.
6210
2eec7d5b
PA
62112014-04-09 Pedro Alves <palves@redhat.com>
6212
6213 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6214 to lwpid_of.
6215
fa96cb38
PA
62162014-02-27 Pedro Alves <palves@redhat.com>
6217
6218 PR 12702
6219 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6220 macros.
6221 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6222 output.
6223 (last_thread_of_process_p): Take a PID argument instead of a
6224 thread pointer.
6225 (linux_wait_for_lwp): Delete.
6226 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6227 functions.
6228 (linux_low_filter_event): New function, party factored out from
6229 linux_wait_for_event.
6230 (linux_wait_for_event): Rename to ...
6231 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6232 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6233 sigsuspend. Check for zombie leaders.
6234 (linux_wait_for_event): Reimplement as wrapper around
6235 linux_wait_for_event_filtered.
6236 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6237 a normal or signal exit is seen, it's the whole process exiting.
6238 (wait_for_sigstop): No longer a for_each_inferior callback.
6239 Rewrite on top of linux_wait_for_event_filtered.
6240 (stop_all_lwps): Call wait_for_sigstop directly.
6241 * server.c (resume, handle_target_event): Handle
6242 TARGET_WAITKIND_NO_RESUMED.
6243
d763de10
JB
62442014-02-26 Joel Brobecker <brobecker@adacore.com>
6245
6246 * win32-low.c (psapi_get_dll_name,
6247 * win32_CreateToolhelp32Snapshot): Delete.
6248 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6249 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6250 Delete.
6251 (handle_load_dll): Add function description.
6252 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6253
850a0f76
JB
62542014-02-26 Joel Brobecker <brobecker@adacore.com>
6255
6256 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6257 Add comment.
6258 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6259 base address when calling win32_add_one_solib.
6260 (handle_load_dll): Delete local variable load_addr.
6261 Remove 0x1000 offset applied to DLL base address when calling
6262 win32_add_one_solib.
6263 (handle_unload_dll): Add comment.
6264
f25b3fc3
JB
62652014-02-26 Joel Brobecker <brobecker@adacore.com>
6266
6267 * win32-low.c (win32_add_all_dlls): Renames
6268 win32_ensure_ntdll_loaded. Rewrite function documentation.
6269 Adjust implementation to always load all DLLs.
6270 Add 0x1000 offset to DLL base address when calling
6271 win32_add_one_solib.
6272 (child_initialization_done): New static global.
6273 (do_initial_child_stuff): Set child_initialization_done to
6274 zero during child initialization, and 1 after. Replace call
6275 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6276 Add comment.
6277 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6278 (handle_unload_dll): Add function documentation.
6279 (get_child_debug_event): Ignore load and unload DLL events
6280 during child initialization.
6281
d86d4aaf
DE
62822014-02-20 Doug Evans <dje@google.com>
6283
3bc32da3 6284 Remove global all_lwps.
d86d4aaf
DE
6285 * inferiors.h (ptid_of): Move here from linux-low.h.
6286 (pid_of, lwpid_of): Ditto.
6287 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6288 parameter is a struct thread_info * now.
6289 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6290 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6291 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6292 directly.
6293 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6294 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6295 * linux-arm-low.c (update_registers_callback): Update, "entry"
6296 parameter is a struct thread_info * now.
6297 Fetch lwpid from current_inferior directly.
6298 (arm_insert_point): Pass &all_threads to find_inferior instead of
6299 &all_lwps.
6300 (arm_remove_point): Ditto.
6301 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6302 (arm_prepare_to_resume): Fetch pid from thread.
6303 (arm_read_description): Fetch lwpid from current_inferior directly.
6304 * linux-low.c (all_lwps): Delete.
6305 (delete_lwp): Delete call to remove_inferior.
6306 (handle_extended_wait): Fetch lwpid from thread.
6307 (add_lwp): Don't set lwp->entry.id. Remove call to
6308 add_inferior_to_list.
6309 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6310 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6311 (kill_one_lwp_callback): Ditto.
6312 (linux_kill): Don't dereference NULL pointer.
6313 Fetch ptid,lwpid from thread.
6314 (get_detach_signal): Fetch ptid from thread.
6315 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6316 Simplify call to regcache_invalidate_thread.
6317 (delete_lwp_callback): Update, "entry" parameter is a
6318 struct thread_info * now. Fetch pid from thread.
6319 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6320 (status_pending_p_callback): Update, "entry" parameter is a
6321 struct thread_info * now. Fetch ptid from thread.
6322 (find_lwp_pid): Update, "entry" parameter is a
6323 struct thread_info * now.
6324 (linux_wait_for_lwp): Fetch pid from thread.
6325 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6326 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6327 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6328 (dequeue_one_deferred_signal): Ditto.
6329 (cancel_breakpoint): Fetch ptid from current_inferior.
6330 (linux_wait_for_event): Pass &all_threads to find_inferior,
6331 not &all_lwps. Fetch ptid, lwpid from thread.
6332 (count_events_callback): Update, "entry" parameter is a
6333 struct thread_info * now.
6334 (select_singlestep_lwp_callback): Ditto.
6335 (select_event_lwp_callback): Ditto.
6336 (cancel_breakpoints_callback): Ditto.
6337 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6338 not &all_lwps.
6339 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6340 (unsuspend_one_lwp): Update, "entry" parameter is a
6341 struct thread_info * now.
6342 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6343 not &all_lwps.
6344 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6345 Fetch lwpid from thread, not lwp.
6346 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6347 Pass &all_threads to find_inferior, not &all_lwps.
6348 (send_sigstop): Fetch lwpid from thread, not lwp.
6349 (send_sigstop_callback): Update, "entry" parameter is a
6350 struct thread_info * now.
6351 (suspend_and_send_sigstop_callback): Ditto.
6352 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6353 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6354 struct thread_info * now.
6355 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6356 from thread, lwp.
6357 (lwp_running): Update, "entry" parameter is a
6358 struct thread_info * now.
6359 (stop_all_lwps): Fetch ptid from thread.
6360 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6361 (linux_resume_one_lwp): Fetch lwpid from thread.
6362 (linux_set_resume_request): Update, "entry" parameter is a
6363 struct thread_info * now. Fetch pid, lwpid from thread.
6364 (resume_status_pending_p): Update, "entry" parameter is a
6365 struct thread_info * now.
6366 (need_step_over_p): Ditto. Fetch lwpid from thread.
6367 (start_step_over): Fetch lwpid from thread.
6368 (linux_resume_one_thread): Update, "entry" parameter is a
6369 struct thread_info * now. Fetch lwpid from thread.
6370 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6371 (proceed_one_lwp): Update, "entry" parameter is a
6372 struct thread_info * now. Fetch lwpid from thread.
6373 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6374 struct thread_info * now.
6375 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6376 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6377 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6378 directly.
6379 (regsets_store_inferior_registers): Ditto.
6380 (fetch_register, store_register): Ditto.
6381 (linux_read_memory, linux_write_memory): Ditto.
6382 (linux_request_interrupt): Ditto.
6383 (linux_read_auxv): Ditto.
6384 (linux_xfer_siginfo): Ditto.
6385 (linux_qxfer_spu): Ditto.
6386 (linux_qxfer_libraries_svr4): Ditto.
6387 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6388 moved to inferiors.h.
6389 (get_lwp): Delete.
6390 (get_thread_lwp): Update.
6391 (struct lwp_info): Delete member "entry". Simplify comment for
6392 member "thread".
6393 (all_lwps): Delete.
6394 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6395 current_inferior directly.
6396 (update_watch_registers_callback): Update, "entry" parameter is a
6397 struct thread_info * now. Fetch pid from thread.
6398 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6399 (mips_insert_point): Fetch lwpid from current_inferior.
6400 Pass &all_threads to find_inferior, not &all_lwps.
6401 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6402 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6403 directly.
6404 (mips_stopped_data_address): Ditto.
6405 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6406 directly.
6407 * linux-tile-low.c (tile_arch_setup): Ditto.
6408 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6409 (update_debug_registers_callback): Update, "entry" parameter is a
6410 struct thread_info * now. Fetch pid from thread.
6411 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6412 Pass &all_threads to find_inferior, not &all_lwps.
6413 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6414 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6415 Pass &all_threads to find_inferior, not &all_lwps.
6416 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6417 (i386_dr_low_get_status): Ditto.
6418 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6419 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6420 (x86_linux_read_description): Ditto.
6421 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6422
3b8361aa
DE
64232014-02-20 Doug Evans <dje@google.com>
6424
6425 * inferiors.c (get_first_inferior): Fix buglet.
6426
f7667f0d
DE
64272014-02-19 Doug Evans <dje@google.com>
6428
6429 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6430 * inferiors.c (add_thread): Change result type to struct thread_info *.
6431 All callers updated.
6432 (add_lwp): Call add_thread here instead of in callers.
6433 All callers updated.
6434 * linux-low.h (get_lwp_thread): Rewrite.
6435 (struct lwp_info): New member "thread".
6436
b3312d80
DE
64372014-02-19 Doug Evans <dje@google.com>
6438
6439 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6440 All callers updated.
6441
ecc6f45c
DE
64422014-02-19 Doug Evans <dje@google.com>
6443
6444 * inferiors.c (add_thread): Fix whitespace.
6445
649ebbca
DE
64462014-02-19 Doug Evans <dje@google.com>
6447
6448 * dll.c (clear_dlls): Replace accessing list implemention details
6449 with API function.
6450 * gdbthread.h (get_first_thread): Declare.
6451 * inferiors.c (for_each_inferior_with_data): New function.
6452 (get_first_thread): New function.
6453 (find_thread_ptid): Simplify.
6454 (get_first_inferior): New function.
6455 (clear_list): Delete.
6456 (one_inferior_p): New function.
6457 (clear_inferior_list): New function.
6458 (clear_inferiors): Update.
6459 * inferiors.h (for_each_inferior_with_data): Declare.
6460 (clear_inferior_list): Declare.
6461 (one_inferior_p): Declare.
6462 (get_first_inferior): Declare.
6463 * linux-low.c (linux_wait_for_event): Replace accessing list
6464 implemention details with API function.
6465 * server.c (target_running): Ditto.
6466 (accumulate_file_name_length): New function.
6467 (emit_dll_description): New function.
6468 (handle_qxfer_libraries): Replace accessing list implemention
6469 details with API function.
6470 (handle_qxfer_threads_worker): New function.
6471 (handle_qxfer_threads_proper): Replace accessing list implemention
6472 details with API function.
6473 (handle_query): Ditto.
6474 (visit_actioned_threads_callback_ftype): New typedef.
6475 (visit_actioned_threads_data): New struct.
6476 (visit_actioned_threads): Rewrite to be find_inferior callback.
6477 (resume): Call find_inferior.
6478 (handle_status): Replace accessing list implemention
6479 details with API function.
6480 (process_serial_event): Replace accessing list implemention details
6481 with API function.
6482 * target.c (set_desired_inferior): Replace accessing list implemention
6483 details with API function.
6484 * tracepoint.c (same_process_p): New function.
6485 (gdb_agent_about_to_close): Replace accessing list implemention
6486 details with API function.
6487 * win32-low.c (child_delete_thread): Replace accessing list
6488 implemention details with API function.
6489 (match_dll_by_basename): New function.
6490 (dll_is_loaded_by_basename): New function.
6491 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6492 details call to dll_is_loaded_by_basename.
6493
80894984
DE
64942014-02-19 Doug Evans <dje@google.com>
6495
6496 * dll.h (struct dll_info): Add comment.
6497 * gdbthread.h (struct thread_info): Add comment.
6498 (current_ptid): Simplify.
6499 * inferiors.c (add_process): Update.
6500 (remove_process): Update.
6501 * inferiors.h (struct process_info): Rename member "head" to "entry".
6502 * linux-low.c (delete_lwp): Update.
6503 (add_lwp): Update.
6504 (last_thread_of_process_p): Update.
6505 (kill_one_lwp_callback, linux_kill): Update.
6506 (status_pending_p_callback): Update.
6507 (wait_for_sigstop): Update. Simplify read of ptid.
6508 (start_step_over): Update.
6509 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6510 (get_lwp_thread): Update.
6511 (struct lwp_info): Rename member "head" to "entry".
6512 * regcache.h (inferior_list_entry): Delete.
6513 * server.c (kill_inferior_callback): Update.
6514 (detach_or_kill_inferior_callback): Update.
6515 (print_started_pid): Update.
6516 (print_attached_pid): Update.
6517 (process_serial_event): Simplify read of ptid.
6518 * thread-db.c (thread_db_create_event): Update.
6519 (thread_db_get_tls_address): Update.
6520 * win32-low.c (current_inferior_ptid): Simplify.
6521
46917d26
TT
65222014-02-19 Tom Tromey <tromey@redhat.com>
6523
6524 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6525 argument.
6526 (target_supports_btrace): Update.
6527
0759a81e
YQ
65282014-02-14 Yao Qi <yao@codesourcery.com>
6529
6530 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6531 (rsp-low-ipa.o): New target.
6532
a7191e8b
TT
65332014-02-12 Tom Tromey <tromey@redhat.com>
6534
6535 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6536 convert_ascii_to_int.
6537 * regcache.c (registers_to_string): Likewise.
6538 * remote-utils.c (decode_M_packet): Likewise.
6539 * server.c (process_serial_event): Likewise.
6540
ff0e980e
TT
65412014-02-12 Tom Tromey <tromey@redhat.com>
6542
6543 * server.c (handle_query, handle_v_run): Use hex2bin, not
6544 unhexify.
6545 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6546
e9371aff
TT
65472014-02-12 Tom Tromey <tromey@redhat.com>
6548
6549 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6550 convert_int_to_ascii.
6551 * regcache.c (registers_to_string, collect_register_as_string):
6552 Likewise.
6553 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6554 Likewise.
6555 * server.c (process_serial_event): Likewise.
6556 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6557 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6558
971dc0b8
TT
65592014-02-12 Tom Tromey <tromey@redhat.com>
6560
6561 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6562 bin2hex, not hexify.
6563 * tracepoint.c (cmd_qtstatus): Likewise.
6564
0a822afb
TT
65652014-02-12 Tom Tromey <tromey@redhat.com>
6566
6567 * remote-utils.c (monitor_output): Pass explicit length to
6568 hexify.
6569
9c3d6531
TT
65702014-02-12 Tom Tromey <tromey@redhat.com>
6571
6572 * tracepoint.c: Include rsp-low.h.
6573 * server.c: Include rsp-low.h.
6574 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6575 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6576 declare.
6577 * remote-utils.c: Include rsp-low.h.
6578 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6579 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6580 (convert_int_to_ascii, convert_ascii_to_int): Move to
6581 common/rsp-low.c.
6582 * regcache.c: Include rsp-low.h.
6583 * ax.c: Include rsp-low.h.
6584 * Makefile.in (SFILES): Add common/rsp-low.c.
6585 (OBS): Add rsp-low.o.
6586 (rsp-low.o): New target.
6587
01fd3ea5
TT
65882014-02-12 Tom Tromey <tromey@redhat.com>
6589
6590 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6591 Include print-utils.h.
6592 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6593 (plongest, thirty_two, phex_nz): Remove.
6594 * Makefile.in (SFILES): Add common/print-utils.c.
6595 (OBS): Add print-utils.o.
6596 (print-utils-ipa.o): New target.
6597 (print-utils.o): New target.
6598 (IPA_OBJS): Add print-utils-ipa.o.
6599
e99dc820
TT
66002014-02-06 Tom Tromey <tromey@redhat.com>
6601
6602 * Makefile.in (SFILES): Fix indentation.
6603
ee1e2d4f
DE
66042014-02-05 Doug Evans <dje@google.com>
6605
6606 * linux-low.c (linux_wait_for_event): Improve comment.
6607 (linux_wait_1): Keep current_inferior in sync with event_child.
6608
f5a02773
DE
66092014-01-22 Doug Evans <dje@google.com>
6610
6611 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6612
87ce2a04
DE
66132014-01-22 Doug Evans <dje@google.com>
6614
6615 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6616 * configure: Regenerate.
6617 * config.in: Regenerate.
6618 * Makefile.in (SFILES): Add debug.c.
6619 (OBS): Add debug.o.
6620 * debug.c: New file.
6621 * debug.h: New file.
6622 * linux-aarch64-low.c (*): Update all debugging printfs to use
6623 debug_printf instead of fprintf.
6624 * linux-arm-low.c (*): Ditto.
6625 * linux-cris-low.c (*): Ditto.
6626 * linux-crisv32-low.c (*): Ditto.
6627 * linux-m32r-low.c (*): Ditto.
6628 * linux-sparc-low.c (*): Ditto.
6629 * linux-x86.c (*): Ditto.
6630 * linux-low.c (*): Ditto.
6631 (linux_wait_1): Add calls to debug_enter, debug_exit.
6632 (linux_wait): Remove redundant debugging printf.
6633 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6634 (linux_resume, unstop_all_lwps): Ditto.
6635 * mem-break.c (*): Update all debugging printfs to use
6636 debug_printf instead of fprintf.
6637 * remote-utils.c (*): Ditto.
6638 * thread-db.c (*): Ditto.
6639 * server.c #include <ctype.h>, "gdb_vecs.h".
6640 (debug_threads): Moved to debug.c.
6641 (*): Update all debugging printfs to use debug_printf instead of
6642 fprintf.
6643 (start_inferior): Replace call to fflush with call to debug_flush.
6644 (monitor_show_help): Mention set debug-format.
6645 (parse_debug_format_options): New function.
6646 (handle_monitor_command): Handle "monitor set debug-format".
6647 (gdbserver_usage): Mention --debug-format.
6648 (main): Parse --debug-format.
6649 * server.h (debug_threads): Declaration moved to debug.h.
6650 #include "debug.h".
6651 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6652 trace_debug_1 that uses debug_printf.
6653 (tracepoint_look_up_symbols): Update all debugging printfs to use
6654 debug_printf instead of fprintf.
6655
e671835b
BS
66562014-01-20 Baruch Siach <baruch@tkos.co.il>
6657
6658 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6659 sys/ptrace.h.
6660
b5737fa9
PA
66612014-01-17 Pedro Alves <palves@redhat.com>
6662
ea38d2a9 6663 PR build/16445
c7faa97a
PA
6664 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6665 defined after including gdb_proc_service.h.
b5737fa9 6666
40ed484e
DE
66672014-01-16 Doug Evans <dje@google.com>
6668
6669 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6670 (match_dll): Use it.
6671
969c39fb
MM
66722014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6673
6674 * target.h (target_ops) <read_btrace>: Change parameters and
6675 return type to allow error reporting.
6676 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6677 trace reading errors on.
6678 * linux-low.c (linux_low_read_btrace): Pass trace reading
6679 errors on.
6680 (linux_low_disable_btrace): New.
6681
ab7f45ba
DE
66822014-01-15 Doug Evans <dje@google.com>
6683
6684 * inferiors.c (thread_id_to_gdb_id): Delete.
6685 * inferiors.h (thread_id_to_gdb_id): Delete.
6686
66af0f44
EZ
66872014-01-13 Eli Zaretskii <eliz@gnu.org>
6688
6689 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6690 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6691 versions.
6692
9939e131
PA
66932014-01-08 Pedro Alves <palves@redhat.com>
6694
6695 * server.c (handle_status): Don't discard previous queued stop
6696 replies or thread's pending status here.
6697 (main) <disconnection>: Do it here instead.
6698
b7ea362b
PA
66992014-01-08 Pedro Alves <palves@redhat.com>
6700
6701 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6702 * server.c (visit_actioned_threads, handle_pending_status): New
6703 function.
6704 (handle_v_cont): Factor out parts to ...
6705 (resume): ... this new function. If in all-stop, and a thread
6706 being resumed has a pending status, report it without actually
6707 resuming.
6708 (myresume): Adjust to use the new 'resume' function.
6709 (clear_pending_status_callback, set_pending_status_callback)
6710 (find_status_pending_thread_callback): New functions.
6711 (handle_status): Handle the case of multiple threads having
6712 interesting statuses to report. Report threads' real last signal
6713 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6714 with an interesting thread to report the status for, instead of
6715 always reporting the status of the first thread.
6716
28498c42
JB
67172014-01-01 Joel Brobecker <brobecker@adacore.com>
6718
6719 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6720 * gdbreplay.c (gdbreplay_version): Likewise.
6721
f45c82da
YZ
67222013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6723
6724 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6725 iov.iov_len with the real length in use.
6726
379a5e2d
JB
67272013-12-13 Joel Brobecker <brobecker@adacore.com>
6728
6729 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6730 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6731 for all targets that use win32-low.c.
6732 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6733 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6734
4210d83e
PA
67352013-12-13 Pedro Alves <palves@redhat.com>
6736
6737 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6738 if equal to TARGET_WAITKIND_LOADED.
6739 * win32-low.c (cached_status): New static global.
6740 (win32_wait): Add declaration.
6741 (do_initial_child_stuff): Flush all initial pending debug events
6742 up to the initial breakpoint.
6743 (win32_wait): If CACHED_STATUS was set, return that instead
6744 of doing a real wait. Remove the code resuming the execution
6745 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6746 during the initial phase. Also remove the code changing
6747 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6748 TARGET_WAITKIND_STOPPED.
6749
e7f0d979
YQ
67502013-12-11 Yao Qi <yao@codesourcery.com>
6751
6752 * notif.c (handle_notif_ack): Return 0 if no notification
6753 matches.
6754
ebcf782c
DE
67552013-11-20 Doug Evans <dje@google.com>
6756
6757 * linux-low.c (linux_set_resume_request): Fix comment.
6758
20ad9378
DE
67592013-11-20 Doug Evans <dje@google.com>
6760
6761 * linux-low.c (resume_status_pending_p): Tweak comment.
6762
a196ebeb
WT
67632013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6764
6765 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6766 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6767 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6768 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6769 (srv_amd64_regobj): Add amd64-mpx.o.
6770 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6771 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6772 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6773 * i387-fp.c (num_pl_bnd_register) Added constant.
6774 (num_pl_bnd_cfg_registers) Added constant.
6775 (struct i387_xsave) Added reserved area and MPX fields.
6776 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6777 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6778 function.
6779 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6780 (init_registers_amd64_mpx_linux): Declare new function.
6781 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6782 (x86_64_regmap): Add MPX registers.
6783 (x86_linux_read_description): Add MPX case.
6784 (initialize_low_arch): Initialize MPX targets.
6785
0080a2f6
TT
67862013-11-18 Tom Tromey <tromey@redhat.com>
6787
6788 * configure: Rebuild.
6789 * configure.ac: Don't check for stdlib.h.
6790 * gdbreplay.c: Unconditionally include stdlib.h.
6791
2978b111
TT
67922013-11-18 Tom Tromey <tromey@redhat.com>
6793
6794 * config.in: Rebuild.
6795 * configure: Rebuild.
6796 * configure.ac: Don't use AC_HEADER_DIRENT.
6797
a3d08894
TT
67982013-11-18 Tom Tromey <tromey@redhat.com>
6799
6800 * server.h: Don't check HAVE_STRING_H.
6801 * gdbreplay.c: Don't check HAVE_STRING_H.
6802 * configure: Rebuild.
6803
0a5dd17d
TT
68042013-11-18 Tom Tromey <tromey@redhat.com>
6805
6806 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6807 LIBGNU.
6808
1bd2f0ba
TT
68092013-11-08 Tom Tromey <tromey@redhat.com>
6810
6811 * configure, config.in: Rebuild.
6812 * configure.ac: Remove unused configury.
6813
3266f10b
TT
68142013-11-08 Tom Tromey <tromey@redhat.com>
6815
6816 * acinclude.m4: Include common.m4, codeset.m4.
6817 * configure, config.in: Rebuild.
6818 * configure.ac: Use GDB_AC_COMMON.
6819
6682d959
AA
68202013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6821
6822 * linux-s390-low.c (HWCAP_S390_TE): New define.
6823 (s390_arch_setup): Consider the TE field in the HWCAP for
6824 determining 'have_regset_tdb'.
6825
fd0a4d76
SDJ
68262013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6827
6828 PR gdb/16014
6829 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6830 call to sizeof.
6831
1a3d890b
PA
68322013-10-02 Pedro Alves <palves@redhat.com>
6833
6834 * server.c (process_serial_event): Don't output "GDBserver
6835 exiting" if GDB is connected through stdio.
6836 * target.c (mywait): Likewise, be silent if GDB is connected
6837 through stdio.
6838
97ad4581
JB
68392013-10-01 Joel Brobecker <brobecker@adacore.com>
6840
6841 * lynx-low.c (lynx_add_threads_after_attach): New function.
6842 (lynx_attach): Remove call to add_thread. Add call to
6843 lynx_add_threads_after_attach instead.
6844
5b4e221c
MF
68452013-09-28 Mike Frysinger <vapier@gentoo.org>
6846
6847 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6848 * config.in, configure: Regenerated.
6849
ee47b2f8
YQ
68502013-09-18 Yao Qi <yao@codesourcery.com>
6851
6852 PR server/15959
6853 * server.c (start_inferior): Clear 'resume_info'.
6854
d6707650 68552013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6856
d6707650
JW
6857 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6858 for each register.
6859
9243dd0e 68602013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6861
9243dd0e
JW
6862 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6863 linux-tile-low.o to srv_tgtobj.
6864
c623a6ef
WN
68652013-09-16 Will Newton <will.newton@linaro.org>
6866
6867 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6868 out regs.
6869
fb71d39e
PA
68702013-09-06 Pedro Alves <palves@redhat.com>
6871
6872 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6873 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6874 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6875 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6876 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6877 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6878
8e7e9910
PA
68792013-09-06 Pedro Alves <palves@redhat.com>
6880
6881 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6882 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6883
7c3a12ca
PA
68842013-09-06 Pedro Alves <palves@redhat.com>
6885
6886 * linux-amd64-ipa.c: Include tracepoint.h.
6887 * linux-i386-ipa.c: Include tracepoint.h.
6888
8eb3d7b6
RW
68892013-09-06 Ricard Wanderlof <ricardw@axis.com>
6890
6891 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6892 (ps_get_thread_area): New function.
6893
eddddb9d
RW
68942013-09-06 Ricard Wanderlof <ricardw@axis.com>
6895
6896 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6897 (initialize_low_arch): Call init_registers_crisv32 rather than
6898 init_register_crisv32.
6899
533b0600
PA
69002013-09-05 Pedro Alves <palves@redhat.com>
6901
6902 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6903 to ...
6904 * hostio.h: ... this new file.
6905 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6906 win32-low.c: Include hostio.h.
6907
0ce3d3b5
PA
69082013-09-05 Pedro Alves <palves@redhat.com>
6909
6910 * server.h (gdb_client_data, handler_func, callback_handler_func)
6911 (delete_file_handler, add_file_handler, append_callback_event)
6912 (delete_callback_event, start_event_loop, initialize_event_loop):
6913 Move to event-loop.h and include it.
6914 * event-loop.h: New file.
6915
799cdc37
PA
69162013-09-05 Pedro Alves <palves@redhat.com>
6917
6918 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6919 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6920 (loaded_dll, unloaded_dll): Move to ...
6921 * dll.h: ... this new file.
6922 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6923
6a6bbd9d
PA
69242013-09-05 Pedro Alves <palves@redhat.com>
6925
6926 * server.h (current_process, get_thread_process, all_processes)
6927 (add_inferior_to_list, for_each_inferior, current_inferior)
6928 (remove_inferior, add_process, remove_process, find_process_pid)
6929 (have_started_inferiors_p, have_attached_inferiors_p)
6930 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6931 (clear_inferiors, find_inferior, find_inferior_id)
6932 (inferior_target_data, set_inferior_target_data)
6933 (inferior_regcache_data, set_inferior_regcache_data): Move to
6934 inferiors.h, and include it.
6935 * inferiors.h: New file.
6936
f699aaba
PA
69372013-09-05 Pedro Alves <palves@redhat.com>
6938
6939 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6940 Move ...
72f4393d 6941 * ax.h: ... here.
f699aaba 6942
c144c7a0
PA
69432013-09-05 Pedro Alves <palves@redhat.com>
6944
6945 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6946 tracepoint.h.
6947 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6948 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6949 (handle_tracepoint_general_set, handle_tracepoint_query)
6950 (tracepoint_finished_step, tracepoint_was_hit)
6951 (release_while_stepping_state_list, current_traceframe)
6952 (in_readonly_region, traceframe_read_mem)
6953 (fetch_traceframe_registers, traceframe_read_sdata)
6954 (traceframe_read_info, struct fast_tpoint_collect_status)
6955 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6956 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6957 (supply_fast_tracepoint_registers)
6958 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6959 (ipa_tdesc, claim_trampoline_space)
6960 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6961 (agent_mem_read, agent_get_trace_state_variable_value)
6962 (agent_set_trace_state_variable_value, agent_tsv_read)
6963 (agent_mem_read_string, get_raw_reg_func_addr)
6964 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6965 * tracepoint.h: ... this new file.
6966
ff42e6ab
PA
69672013-09-05 Pedro Alves <palves@redhat.com>
6968
6969 * server.h (perror_with_name, error, fatal, warning, paddress)
6970 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6971 include it.
6972 * utils.h: New file.
6973
541af0f4
PA
69742013-09-05 Pedro Alves <palves@redhat.com>
6975
6976 * server.h (remote_debug, noack_mode, transport_is_reliable)
6977 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6978 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6979 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6980 (write_enn, initialize_async_io, enable_async_io)
6981 (disable_async_io, check_remote_input_interrupt_request)
6982 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6983 (dead_thread_notify, prepare_resume_reply)
6984 (decode_address_to_semicolon, decode_address, decode_m_packet)
6985 (decode_M_packet, decode_X_packet, decode_xfer_write)
6986 (decode_search_memory_packet, unhexify, hexify)
6987 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6988 (look_up_one_symbol, relocate_instruction)
6989 (monitor_output): Move to remote-utils.h, and include it.
6990 * remote-utils.h: New file.
6991
eebdf26b
PA
69922013-09-05 Pedro Alves <palves@redhat.com>
6993
6994 * server.h (_): Delete.
6995
3aafd2ff
PA
69962013-09-02 Pedro Alves <palves@redhat.com>
6997
6998 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6999 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7000 allocated.
7001 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7002
cee83bcb
PM
70032013-09-02 Pierre Muller <muller@sourceware.org>
7004
7005 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7006 or WriteProcessMemory complete successfully and handle
7007 ERROR_PARTIAL_COPY error.
7008
9a13b2fa
PA
70092013-09-02 Pedro Alves <palves@redhat.com>
7010
7011 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7012 error instead of EIO.
7013
602e3198
JK
70142013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7015
7016 PR server/15604
7017 * linux-low.c: Include filestuff.h.
7018 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7019 * lynx-low.c: Include filestuff.h.
7020 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7021 * server.c: Include filestuff.h.
7022 (main): Call notice_open_fds.
7023 * spu-low.c: Include filestuff.h.
7024 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7025
96d7229d
LM
70262013-08-22 Luis Machado <lgustavo@codesourcery.com>
7027
7028 * Makefile.in: Explain why ../target and ../nat are not
7029 listed as include file search paths.
7030 (linux-waitpid.o): New object file rule.
7031 * configure.srv (srv_native_linux_obj): New variable.
7032 Replace all occurrences of linux native object files with
7033 $srv_native_linux_obj.
7034 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7035 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7036 (linux_enable_event_reporting): Remove declaration.
7037 (my_waitpid): Moved to common/linux-waitpid.c.
7038 (linux_wait_for_event): Pass ptid when calling
7039 linux_enable_event_reporting.
7040 (linux_supports_tracefork_flag): Remove.
7041 (linux_enable_event_reporting): Likewise.
7042 (linux_tracefork_grandchild): Remove.
7043 (STACK_SIZE): Moved to common/linux-ptrace.c.
7044 (linux_tracefork_child): Remove.
7045 (linux_test_for_tracefork): Remove.
7046 (linux_look_up_symbols): Call linux_supports_traceclone.
7047 (initialize_low): Remove call to linux_test_for_tracefork.
7048 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7049 common/linux-ptrace.h.
7050 (PTRACE_TYPE_ARG4): Likewise.
7051 Include linux-ptrace.h.
7052
32940073
PA
70532013-08-21 Pedro Alves <palves@redhat.com>
7054
7055 * config.in: Renegerate.
7056
33b60d58 70572013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7058
33b60d58
LM
7059 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7060 (SFILES): Remove $(srcdir)/common/target-common.c and
7061 add $(srcdir)/target/waitstatus.c.
7062 (OBS): Remove target-common.o and add waitstatus.o.
7063 (server_h): Remove $(srcdir)/../common/target-common.h and
7064 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7065 and $(srcdir)/../target/waitstatus.h.
7066 (target-common.o): Remove.
7067 (waitstatus.o): New target object file.
7068 * target.h: Do not include target-common.h and
7069 include target/resume.h, target/wait.h and
7070 target/waitstatus.h.
7071
b8e1b30e
LM
70722013-08-13 Luis Machado <lgustavo@codesourcery.com>
7073
7074 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7075 to PTRACE_TYPE_ARG3.
7076 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7077 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7078 PTRACE_TYPE_ARG4.
7079 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7080 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7081
7a60ad40
YQ
70822013-07-27 Jie Zhang <jie@codesourcery.com>
7083 Daniel Jacobowitz <dan@codesourcery.com>
7084 Yao Qi <yao@codesourcery.com>
7085
7086 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7087 (mips-linux-watch.o): New rule.
7088 (mips_linux_watch_h): New variable.
7089 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7090 srv_tgtobj.
7091 * linux-mips-low.c: Include mips-linux-watch.h.
7092 (struct arch_process_info, struct arch_lwp_info): New.
7093 (update_watch_registers_callback): New function.
7094 (mips_linux_new_process, mips_linux_new_thread) New functions.
7095 (mips_linux_prepare_to_resume, mips_insert_point): New
7096 functions.
7097 (mips_remove_point, mips_stopped_by_watchpoint): New
7098 functions.
7099 (rsp_bp_type_to_target_hw_bp_type): New function.
7100 (mips_stopped_data_address): New function.
7101 (the_low_target): Add watchpoint support functions.
7102
de6f69ad
YQ
71032013-07-27 Yao Qi <yao@codesourcery.com>
7104
7105 * i386-low.c: Include break-common.h.
7106 (enum target_hw_bp_type): Remove.
7107
3360c0bf
LM
71082013-07-24 Luis Machado <lgustavo@codesourcery.com>
7109
7110 * Makefile.in (SFILES): /common/target-common.c.
7111 (OBS): Add target-common.o.
7112 (server_h): Add $(srcdir)/../common/target-common.h.
7113 (target-common.o): New target.
7114 * server.c (queue_stop_reply_callback): Free
7115 status string after use.
7116 * target.c (target_waitstatus_to_string): Remove.
7117 * target.h: Include target-common.h.
7118 (resume_kind): Likewise.
7119 (target_waitkind): Likewise.
7120 (target_waitstatus): Likewise.
7121 (TARGET_WNOHANG): Likewise.
7122
bd885420
YQ
71232013-07-04 Yao Qi <yao@codesourcery.com>
7124
7125 * Makefile.in (host_alias): Use @host_noncanonical@.
7126 (target_alias): Use @target_noncanonical@.
7127 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7128 ACX_NONCANONICAL_HOST.
7129 * configure: Regenerated.
7130
7131 Revert:
7132 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7133
7134 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7135 * configure: Rebuild.
7136 * Makefile.in (version_host, version_target): Get from configure.
7137 (version.c): Use $(version_host) and $(version_target).
7138
17ef446e
PA
71392013-07-03 Pedro Alves <palves@redhat.com>
7140
7141 * Makefile.in (config.status): Depend on development.sh.
7142 * acinclude.m4: Include libmcheck.m4.
7143 * configure: Regenerate.
7144
7a9a7487
MG
71452013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7146
7147 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7148 attribute inside the parentheses.
7149 (winapi_DebugSetProcessKillOnExit): Ditto.
7150 (winapi_DebugBreakProcess): Ditto.
7151 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7152
49b64de6
MG
71532013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7154
7155 * notif.h (notif_event): Add a dummy member to avoid compiler
7156 errors.
7157
d5749ee7
PA
71582013-07-01 Pedro Alves <palves@redhat.com>
7159
7160 * hostio.c (HOSTIO_PATH_MAX): Define.
7161 (require_filename, handle_open, handle_unlink, handle_readlink):
7162 Use it.
7163
d8d2a3ee
PA
71642013-07-01 Pedro Alves <palves@redhat.com>
7165
7166 * server.h: Include "pathmax.h".
7167 * linux-low.c: Don't include sys/param.h.
7168 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7169 MAXPATHLEN.
7170 * win32-low.c: Don't include sys/param.h.
7171 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7172
bc7dea8d
PA
71732013-07-01 Pedro Alves <palves@redhat.com>
7174
7175 * event-loop.c: Don't check HAVE_UNISTD_H before including
7176 <unistd.h>.
7177 * gdbreplay.c: Likewise.
7178 * remote-utils.c: Likewise.
7179 * server.c: Likewise.
7180 * configure.ac: Don't check for unistd.h.
7181 * configure: Regenerate.
7182
d6c2da54
TT
71832013-06-28 Tom Tromey <tromey@redhat.com>
7184
7185 * Makefile.in (version.c): Use version.in, not
7186 common/version.in.
7187
257b6bec
MG
71882013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7189
7190 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7191 * configure: Rebuild.
7192 * Makefile.in (version_host, version_target): Get from configure.
7193 (version.c): Use $(version_host) and $(version_target).
7194
86ebe149
DK
71952013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7196
7197 Fix trace-status to output user name without trailing colon.
7198 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7199
f30aa5af
DK
72002013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7201
7202 Fix trace-status to output proper start-time and stop-time.
7203 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7204 output start time and stop time in hex as gdb expects.
7205
28a93511
YQ
72062013-06-26 Pedro Alves <pedro@codesourcery.com>
7207
7208 * tracepoint.c (build_traceframe_info_xml): Output trace state
7209 variables present in the trace buffer.
7210
01208463
TT
72112013-06-24 Tom Tromey <tromey@redhat.com>
7212
7213 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7214 create-version.sh.
7215 (version.o): Remove.
7216 * gdbreplay.c: Include version.h.
7217 (version, host_name): Don't declare.
7218 * server.h: Include version.h.
7219 (version, host_name): Don't declare.
7220
760256f9
PA
72212013-06-12 Pedro Alves <palves@redhat.com>
7222
7223 * linux-x86-low.c (linux_is_elf64): Delete global.
7224 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7225 with local linux_pid_exe_is_elf_64_file use.
7226
030031ee
PA
72272013-06-11 Pedro Alves <palves@redhat.com>
7228
7229 * linux-low.c (regset_disabled, disable_regset): New functions.
7230 (regsets_fetch_inferior_registers)
7231 (regsets_store_inferior_registers): Use them.
7232 (initialize_regsets_info); Don't allocate the disabled_regsets
7233 array here.
7234 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7235 comment.
7236
5da6eb0a
PA
72372013-06-11 Pedro Alves <palves@redhat.com>
7238
7239 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7240 xmalloc.
7241
7e5aaa09
PA
72422013-06-11 Pedro Alves <palves@redhat.com>
7243
7244 * linux-x86-low.c (initialize_low_arch): Call
7245 init_registers_x32_avx_linux.
7246
d878444c
JK
72472013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7248
7249 Fix compatibility with Android Bionic.
7250 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7251 it is not empty.
7252
3aee8918
PA
72532013-06-07 Pedro Alves <palves@redhat.com>
7254
5f2b57b5 7255 PR server/14823
3aee8918
PA
7256 * Makefile.in (OBS): Add tdesc.o.
7257 (IPA_OBJS): Add tdesc-ipa.o.
7258 (tdesc-ipa.o): New rule.
7259 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7260 interface.
7261 * linux-low.c (new_inferior): Delete.
7262 (disabled_regsets, num_regsets): Delete.
7263 (linux_add_process): Adjust to set the new per-process
7264 new_inferior flag.
7265 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7266 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7267 was a stop. When calling arch_setup, switch the current inferior
7268 to the thread that got an event.
7269 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7270 (regsets_fetch_inferior_registers)
7271 (regsets_store_inferior_registers): New regsets_info parameter.
7272 Adjust to use it.
7273 (linux_register_in_regsets): New regs_info parameter. Adjust to
7274 use it.
7275 (register_addr, fetch_register, store_register): New usrregs_info
7276 parameter. Adjust to use it.
7277 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7278 parameter regs_info. Adjust to use it.
7279 (linux_fetch_registers): Get the current inferior's regs_info, and
7280 adjust to use it.
7281 (linux_store_registers): Ditto.
7282 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7283 (initialize_low): Don't initialize the target_regsets here. Call
7284 initialize_low_arch.
7285 * linux-low.h (target_regsets): Delete declaration.
7286 (struct regsets_info): New.
7287 (struct usrregs_info): New.
7288 (struct regs_info): New.
7289 (struct process_info_private) <new_inferior>: New field.
7290 (struct linux_target_ops): Delete the num_regs, regmap, and
7291 regset_bitmap fields. New field regs_info.
7292 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7293 * i387-fp.c (num_xmm_registers): Delete.
7294 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7295 calls to new interface.
7296 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7297 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7298 Infer the number of xmm registers from the regcache's target
7299 description.
7300 * i387-fp.h (num_xmm_registers): Delete.
7301 * inferiors.c (add_thread): Don't install the thread's regcache
7302 here.
7303 * proc-service.c (gregset_info): Fetch the current inferior's
7304 regs_info. Adjust to use it.
7305 * regcache.c: Include tdesc.h.
7306 (register_bytes, reg_defs, num_registers)
7307 (gdbserver_expedite_regs): Delete.
7308 (get_thread_regcache): If the thread doesn't have a regcache yet,
7309 create one, instead of aborting gdbserver.
7310 (regcache_invalidate_one): Rename to ...
7311 (regcache_invalidate_thread): ... this.
7312 (regcache_invalidate_one): New.
7313 (regcache_invalidate): Only invalidate registers of the current
7314 process.
7315 (init_register_cache): Add target_desc parameter, and use it.
7316 (new_register_cache): Ditto. Assert the target description has a
7317 non zero registers_size.
7318 (regcache_cpy): Add assertions. Adjust.
7319 (realloc_register_cache, set_register_cache): Delete.
7320 (registers_to_string, registers_from_string): Adjust.
7321 (find_register_by_name, find_regno, find_register_by_number)
7322 (register_cache_size): Add target_desc parameter, and use it.
7323 (free_register_cache_thread, free_register_cache_thread_one)
7324 (regcache_release, register_cache_size): New.
7325 (register_size): Add target_desc parameter, and use it.
7326 (register_data, supply_register, supply_register_zeroed)
7327 (supply_regblock, supply_register_by_name, collect_register)
7328 (collect_register_as_string, collect_register_by_name): Adjust.
7329 * regcache.h (struct target_desc): Forward declare.
7330 (struct regcache) <tdesc>: New field.
7331 (init_register_cache, new_register_cache): Add target_desc
7332 parameter.
7333 (regcache_invalidate_thread): Declare.
7334 (regcache_invalidate_one): Delete declaration.
7335 (regcache_release): Declare.
7336 (find_register_by_number, register_cache_size, register_size)
7337 (find_regno): Add target_desc parameter.
7338 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7339 declarations.
7340 * remote-utils.c: Include tdesc.h.
7341 (outreg, prepare_resume_reply): Adjust.
7342 * server.c: Include tdesc.h.
7343 (gdbserver_xmltarget): Delete declaration.
7344 (get_features_xml, process_serial_event): Adjust.
7345 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7346 declare.
7347 (struct process_info) <tdesc>: New field.
7348 (ipa_tdesc): Declare.
7349 * tdesc.c: New file.
7350 * tdesc.h: New file.
7351 * tracepoint.c: Include tdesc.h.
7352 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7353 (get_context_regcache): Adjust to pass ipa_tdesc down.
7354 (do_action_at_tracepoint): Adjust to get the register cache size
7355 from the context regcache's description.
7356 (traceframe_walk_blocks): Adjust to get the register cache size
7357 from the current trace frame's description.
7358 (traceframe_get_pc): Adjust to get current trace frame's
7359 description and pass it down.
7360 (gdb_collect): Adjust to get the register cache size from the
7361 IPA's description.
7362 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7363 (gdbserver_xmltarget): Delete.
7364 (initialize_low_tracepoint): Set the ipa's target description.
7365 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7366 (initialize_low_tracepoint): Set the ipa's target description.
7367 * linux-x86-low.c: Include tdesc.h.
7368 [__x86_64__] (is_64bit_tdesc): New.
7369 (ps_get_thread_area, x86_get_thread_area): Use it.
7370 (i386_cannot_store_register): Rename to ...
7371 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7372 (i386_cannot_fetch_register): Rename to ...
7373 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7374 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7375 to new interface.
7376 (target_regsets): Rename to ...
7377 (x86_regsets): ... this.
7378 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7379 interface.
7380 (x86_siginfo_fixup): Use is_64bit_tdesc.
7381 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7382 (tdesc_x32_avx_linux, tdesc_x32_linux)
7383 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7384 Declare.
7385 (x86_linux_update_xmltarget): Delete.
7386 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7387 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7388 (AMD64_LINUX_USER64_CS): New.
7389 (x86_linux_read_description): New, based on
7390 x86_linux_update_xmltarget.
7391 (same_process_callback): New.
7392 (x86_arch_setup_process_callback): New.
7393 (x86_linux_update_xmltarget): New.
7394 (x86_regsets_info): New.
7395 (amd64_linux_regs_info): New.
7396 (i386_linux_usrregs_info): New.
7397 (i386_linux_regs_info): New.
7398 (x86_linux_regs_info): New.
7399 (x86_arch_setup): Reimplement.
7400 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7401 (x86_emit_ops): Ditto.
7402 (the_low_target): Adjust. Install x86_linux_regs_info,
7403 x86_cannot_fetch_register, and x86_cannot_store_register.
7404 (initialize_low_arch): New.
7405 * linux-ia64-low.c (tdesc_ia64): Declare.
7406 (ia64_fetch_register): Adjust.
7407 (ia64_usrregs_info, regs_info): New globals.
7408 (ia64_regs_info): New function.
7409 (the_low_target): Adjust.
7410 (initialize_low_arch): New function.
7411 * linux-sparc-low.c (tdesc_sparc64): Declare.
7412 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7413 Adjust.
7414 (sparc_arch_setup): New function.
7415 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7416 (the_low_target): Adjust.
7417 (initialize_low_arch): New function.
7418 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7419 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7420 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7421 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7422 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7423 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7424 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7425 (tdesc_powerpc_isa205_vsx64l): Declare.
7426 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7427 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7428 (ppc_set_pc, ppc_get_hwcap): Adjust.
7429 (ppc_usrregs_info): Forward declare.
7430 (!__powerpc64__) ppc_regmap_adjusted: New global.
7431 (ppc_arch_setup): Adjust to the current process'es target
7432 description.
7433 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7434 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7435 (ppc_store_evrregset): Adjust.
7436 (target_regsets): Rename to ...
7437 (ppc_regsets): ... this, and make static.
7438 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7439 (ppc_regs_info): New function.
7440 (the_low_target): Adjust.
7441 (initialize_low_arch): New function.
7442 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7443 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7444 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7445 (tdesc_s390x_linux64v2): Declare.
7446 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7447 (s390_fill_gregset, s390_store_last_break): Adjust.
7448 (target_regsets): Rename to ...
7449 (s390_regsets): ... this, and make static.
7450 (s390_get_pc, s390_set_pc): Adjust.
7451 (s390_get_hwcap): New target_desc parameter, and use it.
7452 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7453 (s390_arch_setup): Adjust to set the current process'es target
7454 description. Don't adjust the regmap.
7455 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7456 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7457 (regs_info_3264): New globals.
7458 (s390_regs_info): New function.
7459 (the_low_target): Adjust.
7460 (initialize_low_arch): New function.
7461 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7462 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7463 [__mips64] (init_registers_mips_linux)
7464 (init_registers_mips_dsp_linux): Delete defines.
7465 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7466 (have_dsp): New global.
7467 (mips_read_description): New, based on mips_arch_setup.
7468 (mips_arch_setup): Reimplement.
7469 (get_usrregs_info): New function.
7470 (mips_cannot_fetch_register, mips_cannot_store_register)
7471 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7472 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7473 (target_regsets): Rename to ...
7474 (mips_regsets): ... this, and make static.
7475 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7476 (dsp_regs_info, regs_info): New globals.
7477 (mips_regs_info): New function.
7478 (the_low_target): Adjust.
7479 (initialize_low_arch): New function.
7480 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7481 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7482 Declare.
7483 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7484 (arm_read_description): New, with bits factored from
7485 arm_arch_setup.
7486 (arm_arch_setup): Reimplement.
7487 (target_regsets): Rename to ...
7488 (arm_regsets): ... this, and make static.
7489 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7490 (arm_regs_info): New function.
7491 (the_low_target): Adjust.
7492 (initialize_low_arch): New function.
7493 * linux-m68k-low.c (tdesc_m68k): Declare.
7494 (target_regsets): Rename to ...
7495 (m68k_regsets): ... this, and make static.
7496 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7497 (m68k_regs_info): New function.
7498 (m68k_arch_setup): New function.
7499 (the_low_target): Adjust.
7500 (initialize_low_arch): New function.
7501 * linux-sh-low.c (tdesc_sharch): Declare.
7502 (target_regsets): Rename to ...
7503 (sh_regsets): ... this, and make static.
7504 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7505 (sh_regs_info, sh_arch_setup): New functions.
7506 (the_low_target): Adjust.
7507 (initialize_low_arch): New function.
7508 * linux-bfin-low.c (tdesc_bfin): Declare.
7509 (bfin_arch_setup): New function.
7510 (bfin_usrregs_info, regs_info): New globals.
7511 (bfin_regs_info): New function.
7512 (the_low_target): Adjust.
7513 (initialize_low_arch): New function.
7514 * linux-cris-low.c (tdesc_cris): Declare.
7515 (cris_arch_setup): New function.
7516 (cris_usrregs_info, regs_info): New globals.
7517 (cris_regs_info): New function.
7518 (the_low_target): Adjust.
7519 (initialize_low_arch): New function.
7520 * linux-cris-low.c (tdesc_crisv32): Declare.
7521 (cris_arch_setup): New function.
7522 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7523 (cris_regs_info): New function.
7524 (the_low_target): Adjust.
7525 (initialize_low_arch): New function.
7526 * linux-m32r-low.c (tdesc_m32r): Declare.
7527 (m32r_arch_setup): New function.
7528 (m32r_usrregs_info, regs_info): New globals.
7529 (m32r_regs_info): Adjust.
7530 (initialize_low_arch): New function.
7531 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7532 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7533 (tic6x_usrregs_info): Forward declare.
7534 (tic6x_read_description): New function, based on ...
7535 (tic6x_arch_setup): ... this. Reimplement.
7536 (target_regsets): Rename to ...
7537 (tic6x_regsets): ... this, and make static.
7538 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7539 (tic6x_regs_info): New function.
7540 (the_low_target): Adjust.
7541 (initialize_low_arch): New function.
7542 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7543 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7544 (target_regsets): Rename to ...
7545 (xtensa_regsets): ... this, and make static.
7546 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7547 globals.
7548 (xtensa_arch_setup, xtensa_regs_info): New functions.
7549 (the_low_target): Adjust.
7550 (initialize_low_arch): New function.
7551 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7552 (nios2_arch_setup): Set the current process'es tdesc.
7553 (target_regsets): Rename to ...
7554 (nios2_regsets): ... this.
7555 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7556 (nios2_regs_info): New function.
7557 (the_low_target): Adjust.
7558 (initialize_low_arch): New function.
a261b8f5
PA
7559 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7560 (aarch64_arch_setup): Set the current process'es tdesc.
7561 (target_regsets): Rename to ...
7562 (aarch64_regsets): ... this.
7563 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7564 (aarch64_regs_info): New function.
7565 (the_low_target): Adjust.
7566 (initialize_low_arch): New function.
3aee8918
PA
7567 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7568 globals.
7569 (target_regsets): Rename to ...
7570 (tile_regsets): ... this.
7571 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7572 (tile_regs_info): New function.
7573 (tile_arch_setup): Set the current process'es tdesc.
7574 (the_low_target): Adjust.
7575 (initialize_low_arch): New function.
7576 * spu-low.c (tdesc_spu): Declare.
7577 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7578 * win32-arm-low.c (tdesc_arm): Declare.
7579 (arm_arch_setup): New function.
7580 (the_low_target): Install arm_arch_setup instead of
7581 init_registers_arm.
7582 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7583 (init_windows_x86): Rename to ...
7584 (i386_arch_setup): ... this. Set `win32_tdesc'.
7585 (the_low_target): Adjust.
7586 * win32-low.c (win32_tdesc): New global.
7587 (child_add_thread): Don't create the thread cache here.
7588 (do_initial_child_stuff): Set the new process'es tdesc.
7589 * win32-low.h (struct target_desc): Forward declare.
7590 (win32_tdesc): Declare.
7591 * lynx-i386-low.c (tdesc_i386): Declare global.
7592 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7593 * lynx-low.c (lynx_tdesc): New global.
7594 (lynx_add_process): Set the new process'es tdesc.
7595 * lynx-low.h (struct target_desc): Forward declare.
7596 (lynx_tdesc): Declare global.
7597 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7598 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7599 * nto-low.c (nto_tdesc): New global.
7600 (do_attach): Set the new process'es tdesc.
7601 * nto-low.h (struct target_desc): Forward declare.
7602 (nto_tdesc): Declare.
7603 * nto-x86-low.c (tdesc_i386): Declare.
7604 (nto_x86_arch_setup): Set `nto_tdesc'.
7605
b1fbec62
GB
76062013-06-04 Gary Benson <gbenson@redhat.com>
7607
7608 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7609 to qSupported response when appropriate.
7610 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7611 with nonzero-length annex.
7612 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7613 arguments supplied in annex.
7614
d1ec4ce7
DE
76152013-05-31 Doug Evans <dje@google.com>
7616
ac44adcb 7617 PR server/15594
d1ec4ce7
DE
7618 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7619 64 bits in 64-cross-32 environment.
7620
9b25f2d3
PA
76212013-05-28 Pedro Alves <palves@redhat.com>
7622
7623 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7624 (aarch64-without-fpu.c): Delete rule.
7625 * configure.srv (aarch64*-*-linux*): Remove references to
7626 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7627 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7628 declaration.
7629
6740dc9c
PA
76302013-05-24 Pedro Alves <palves@redhat.com>
7631
7632 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7633 instead of strchr/decode_address. Error if the range isn't split
7634 with a ','. Don't assume there's be a ':' in the action.
7635
c2d6af84
PA
76362013-05-23 Yao Qi <yao@codesourcery.com>
7637 Pedro Alves <palves@redhat.com>
7638
7639 * linux-low.c (lwp_in_step_range): New function.
7640 (linux_wait_1): If the thread was range stepping and stopped
7641 outside the stepping range, report the stop to GDB. Otherwise,
7642 continue stepping. Add range stepping debug output.
7643 (linux_set_resume_request): Copy the step range from the resume
7644 request to the lwp.
7645 (linux_supports_range_stepping): New.
7646 (linux_target_ops) <supports_range_stepping>: Set to
7647 linux_supports_range_stepping.
7648 * linux-low.h (struct linux_target_ops)
7649 <supports_range_stepping>: New field.
7650 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7651 * linux-x86-low.c (x86_supports_range_stepping): New.
7652 (the_low_target) <supports_range_stepping>: Set to
7653 x86_supports_range_stepping.
7654 * server.c (handle_v_cont): Handle 'r' action.
7655 (handle_v_requests): Append ";r" if the target supports range
7656 stepping.
7657 * target.h (struct thread_resume) <step_range_start,
7658 step_range_end>: New fields.
7659 (struct target_ops) <supports_range_stepping>:
7660 New field.
7661 (target_supports_range_stepping): New macro.
7662
58794e1a
JB
76632013-05-17 Joel Brobecker <brobecker@adacore.com>
7664
7665 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7666 confusion in comment.
7667
d631c5a7
JB
76682013-05-17 Joel Brobecker <brobecker@adacore.com>
7669
7670 * lynx-low.c (struct process_info_private): New type.
7671 (lynx_add_process): New function.
7672 (lynx_create_inferior, lynx_attach): Replace calls to
7673 add_process by calls to lynx_add_process.
7674 (lynx_resume): If PTID is null, then try using
7675 current_process()->private->last_wait_event_ptid.
7676 Add comments.
7677 (lynx_clear_inferiors): Delete. The contents of that function
7678 has been inlined in lynx_mourn;
7679 (lynx_wait_1): Save the ptid in the process's private data.
7680 (lynx_mourn): Free the process' private data. Replace call
7681 to lynx_clear_inferiors by call to clear_inferiors.
7682
96f7a20f
YQ
76832013-05-17 Yao Qi <yao@codesourcery.com>
7684
7685 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7686 the right place.
7687
db0dfaa0
LM
76882013-05-16 Luis Machado <lgustavo@codesourcery.com>
7689
7690 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7691 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7692 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7693 PT_TEXT_END_ADDR guards. Update comments.
7694 (linux_target_op) <read_offsets>: Conditionally define to
7695 linux_read_offsets if the target is UCLIBC and if it defines
7696 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7697
68f5f838
SL
76982013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7699 Andrew Jenner <andrew@codesourcery.com>
7700
7701 * Makefile.in (SFILES): Add linux-nios2-low.c.
7702 (clean): Add action to delete nios2-linux.c.
7703 (nios2-linux.c): New rule.
7704 * configure.srv: Add nios2*-*-linux*.
7705 * linux-nios2-low.c: New.
7706
1ebff1fd
HAQ
77072013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7708
7709 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7710
f6150862
HZ
77112013-04-25 Hui Zhu <hui@codesourcery.com>
7712
7713 PR gdb/15186
f6150862
HZ
7714 * ax.c (ax_printf): Add fflush.
7715
614c279d
TT
77162013-04-22 Tom Tromey <tromey@redhat.com>
7717
7718 * Makefile.in (SFILES): Add filestuff.c.
7719 (OBS): Add filestuff.o.
7720 (filestuff.o): New target.
7721 * config.in, configure: Rebuild.
7722 * configure.ac: Check for fdwalk, pipe2.
7723
7d4e5717
PA
77242013-04-17 Pedro Alves <palves@redhat.com>
7725
7726 * configure.ac (USE_THREAD_DB): Delete variable.
7727 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7728 Don't AC_SUBST USE_THREAD_DB.
7729 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7730 * config.in, configure: Regenerate.
7731
d5c93e41
PA
77322013-04-16 Pedro Alves <palves@redhat.com>
7733
7734 * linux-low.h (struct lwp_info) <thread_known>: Move under
7735 the USE_THREAD_DB #ifdef.
7736
04f5fe89
PA
77372013-04-16 Pedro Alves <palves@redhat.com>
7738
7739 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7740 (linux-low.o): Delete rule.
7741 * linux-low.h: Always include "gdb_thread_db.h" instead of
7742 conditionally including thread_db.h.
7743 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7744 HAVE_THREAD_DB_H.
7745
480b27bf
JK
77462013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7747
7748 * Makefile.in (install-only): Fix make install regression.
7749
43662968
JK
77502013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7751
7752 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7753 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7754 installation.
7755 * gdbserver.1: Remove.
7756
3e74e146
PA
77572013-03-22 Pedro Alves <palves@redhat.com>
7758
7759 * linux-low.c (handle_extended_wait): Don't call
7760 linux_enable_event_reporting.
7761
a8347a2a
TT
77622013-03-15 Tony Theodore <tonyt@logyst.com>
7763
7764 PR build/9098:
7765 * Makefile.in (SHELL): Use @SHELL@.
7766
eeb56fa7
SDJ
77672013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7768
7769 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7770 compiler warning.
7771
4fa7e2ff
JB
77722013-03-13 Joel Brobecker <brobecker@adacore.com>
7773
7774 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7775 Remove extraneous NULL element.
7776
8ddb1965
YQ
77772013-03-13 Yao Qi <yao@codesourcery.com>
7778
7779 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7780 'V' block in trace frame.
7781
9accd112
MM
77822013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7783
7784 * target.h (struct target_ops): Add btrace ops.
7785 (target_supports_btrace): New macro.
7786 (target_enable_btrace): New macro.
7787 (target_disable_btrace): New macro.
7788 (target_read_btrace): New macro.
7789 * gdbthread.h (struct thread_info): Add btrace field.
7790 * server.c: Include btrace-common.h.
7791 (handle_btrace_general_set): New function.
7792 (handle_btrace_enable): New function.
7793 (handle_btrace_disable): New function.
7794 (handle_general_set): Call handle_btrace_general_set.
7795 (handle_qxfer_btrace): New function.
7796 (struct qxfer qxfer_packets[]): Add btrace entry.
7797 * inferiors.c (remove_thread): Disable btrace.
7798 * linux-low: Include linux-btrace.h.
7799 (linux_low_enable_btrace): New function.
7800 (linux_low_read_btrace): New function.
7801 (linux_target_ops): Add btrace ops.
7802 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7803 Add srv_linux_btrace=yes.
7804 (x86_64-*-linux*): Add linux-btrace.o.
7805 Add srv_linux_btrace=yes.
7806 * configure.ac: Define HAVE_LINUX_BTRACE.
7807 * config.in: Regenerated.
7808 * configure: Regenerated.
7809
5cc22e4c
MM
78102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7811
7812 * server.c (handle_qxfer): Preserve error message if -3 is
7813 returned.
7814 (qxfer): Document the -3 return value.
7815
7c97f91e
MM
78162013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7817
7818 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7819 (linux_btrace_h): New variable.
7820 (linux-btrace.o): New rule.
7821
be9a119c 78222013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7823 Hafiz Abid Qadeer <abidh@codesourcery.com>
7824
7825 * tracepoint.c (trace_buffer_size): New global.
7826 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7827 (init_trace_buffer): Change to one-argument function. Allocate
7828 trace buffer memory.
7829 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7830 handle QTBuffer:size packet.
7831 (cmd_bigqtbuffer_size): New function.
7832 (initialize_tracepoint): Call init_trace_buffer with
7833 DEFAULT_TRACE_BUFFER_SIZE.
7834 * server.c (handle_query): Add QTBuffer:size in the
7835 supported packets.
7836
e64f7499
YQ
78372013-03-07 Yao Qi <yao@codesourcery.com>
7838
7839 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7840 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7841 of -1.
7842 (cmd_qtsp): Adjust condition. Do post increment.
7843 Set cur_action and cur_step_action back to 0.
7844
f0ae6fc3
PA
78452013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7846
7847 PR server/15236
7848 * linux-low.c (linux_write_memory): Return early success if LEN is
7849 zero.
7850
b5b0b0af
CV
78512013-03-05 Corinna Vinschen <vinschen@redhat.de>
7852
334ad4a8 7853 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7854
589bc927
TT
78552013-02-28 Tom Tromey <tromey@redhat.com>
7856
7857 * configure.ac: Invoke AC_SYS_LARGEFILE.
7858 * configure, config.in: Rebuild.
7859
dfe07582
CV
78602013-02-28 Corinna Vinschen <vinschen@redhat.com>
7861
7862 * win32-low.c: Throughout, fix format strings and casts of
7863 printf-like functions to avoid type related warnings on all
7864 platforms.
7865 (get_child_debug_event): Print dwDebugEventCode as hex since
7866 that's how it's usually documented.
7867
736cd585
YQ
78682013-02-28 Yao Qi <yao@codesourcery.com>
7869
7870 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7871 pulongest.
7872
e1f58301
JW
78732013-02-27 Jiong Wang <jiwang@tilera.com>
7874
7875 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7876 (reg-tilegx32.c): New rule.
7877 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7878 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7879 different register info initializer according to elf class.
7880 (init_registers_tilgx32): New function. The tilegx32 register info
7881 initializer.
7882 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7883 (tile_store_gregset): Likewise.
7884
d171ca78
YQ
78852013-02-27 Yao Qi <yao@codesourcery.com>
7886
7887 * server.c (process_point_options): Print debug message when
7888 debug_threads is true.
7889
282bbdf3
YQ
78902013-02-26 Yao Qi <yao@codesourcery.com>
7891
7892 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7893
aca22551
PA
78942013-02-19 Pedro Alves <palves@redhat.com>
7895 Kai Tietz <ktietz@redhat.com>
7896
7897 PR gdb/15161
7898
7899 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7900 instead of strtoul to extract address from packet.
7901 (process_serial_event) <'z'>: Likewise.
7902
4f3cee1c
YQ
79032013-02-18 Yao Qi <yao@codesourcery.com>
7904
7905 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7906
8e1d55a3
PA
79072013-02-14 Pedro Alves <palves@redhat.com>
7908
7909 Plug memory leak.
7910
7911 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7912 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7913
458820da
PA
79142013-02-14 Pedro Alves <palves@redhat.com>
7915
7916 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7917
baea0dae
PA
79182013-02-14 Pedro Alves <palves@redhat.com>
7919
7920 * tracepoint.c (save_string): Delete.
7921 (add_tracepoint_action): Use savestring instead of save_string.
7922
0b1afbb3
PA
79232013-02-12 Pedro Alves <palves@redhat.com>
7924
7925 * linux-xtensa-low.c: Ditto.
7926 * xtensa-xtregs.c: Ditto.
7927
8a4ac37e
PA
79282013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7929
7930 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7931 thread_db.
7932
148de6bb
MS
79332013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7934
7935 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7936 aarch64_num_wp_regs and aarch64_num_bp_regs to
7937 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7938
55fac6e0
MS
79392013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7940
7941 * linux-aarch64-low.c (ps_get_thread_area): Replace
7942 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7943
176eb98c
MS
79442013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7945 Marcus Shawcroft <marcus.shawcroft@arm.com>
7946 Nigel Stephens <nigel.stephens@arm.com>
7947 Yufeng Zhang <yufeng.zhang@arm.com>
7948
7949 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7950 (aarch64.c, aarch64-without-fpu.c): New targets.
7951 * configure.srv (aarch64*-*-linux*): New.
7952 * linux-aarch64-low.c: New file.
7953
56f7af9c
MS
79542013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7955
43aaf8b6 7956 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7957 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7958 (dequeue_one_deferred_signal, linux_resume_one_thread)
7959 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7960 (linux_tracefork_grandchild, linux_test_for_tracefork)
7961 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7962 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7963 where the argument is 0.
7964
60f662b0
YQ
79652013-01-25 Yao Qi <yao@codesourcery.com>
7966
7967 * event-loop.c: Include "queue.h".
7968 (gdb_event_p): New typedef.
7969 (struct gdb_event) <next_event>: Remove.
7970 (event_queue): Change to QUEUE(gdb_event_p).
7971 (async_queue_event): Remove.
7972 (gdb_event_xfree): New.
7973 (initialize_event_loop): New.
7974 (process_event): Use API from QUEUE.
7975 (wait_for_event): Likewise.
7976 * server.c (main): Call initialize_event_loop.
7977 * server.h (initialize_event_loop): Declare.
7978
5ae4861a
YQ
79792013-01-18 Yao Qi <yao@codesourcery.com>
7980
7981 * ax.h (struct eval_agent_expr_context): New.
7982 (gdb_eval_agent_expr): Update declaration.
7983 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7984 TFRAME. Add new argument CTX.
7985 * server.h (struct eval_agent_expr_context): Declare.
7986 (agent_mem_read, agent_tsv_read): Update declaration.
7987 (agent_mem_read_string): Likewise.
7988 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7989 (add_traceframe_block): Add new argument TPOINT.
7990 Increase TPOINT->traceframe_usage.
7991 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7992 eval_tracepoint_agent_expr.
7993 (condition_true_at_tracepoint): Likewise.
7994 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7995 (agent_mem_read_string, agent_tsv_read): Likewise.
7996
85e00e85
YQ
79972013-01-16 Yao Qi <yao@codesourcery.com>
7998
7999 * linux-low.c (linux_resume_one_lwp): Don't check
8000 'lwp->bp_reinsert != 0'.
8001
4039cf45
JB
80022013-01-07 Joel Brobecker <brobecker@adacore.com>
8003 Pedro Alves <palves@redhat.com>
8004
8005 * lynx-low.c (ptrace_request_to_str): Define a temporary
8006 macro and use it to simplify this function's implementation.
8007
9044dee2
JB
80082013-01-07 Joel Brobecker <brobecker@adacore.com>
8009
8010 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8011 sets errno.
8012
e6352c8f
JB
80132013-01-07 Joel Brobecker <brobecker@adacore.com>
8014
8015 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8016
50681a27
JB
80172013-01-07 Joel Brobecker <brobecker@adacore.com>
8018
8019 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8020
3f6e77ef
JB
80212013-01-07 Joel Brobecker <brobecker@adacore.com>
8022
8023 * lynx-low.c (lynx_resume): Use the resume_info parameter
8024 to determine the ptid for the lynx_ptrace call, unless
8025 it is equal to minus_one_ptid, in which case we use the
8026 ptid of the current_inferior.
8027 (lynx_wait_1): After having received a thread create/exit
8028 event, resume the inferior's execution using the signaling
8029 thread's ptid, rather than the old ptid.
8030
7fda33ae
JB
80312013-01-07 Joel Brobecker <brobecker@adacore.com>
8032
8033 * lynx-low.c (lynx_resume): Delete variable ret.
8034
b9786c74
JB
80352013-01-01 Joel Brobecker <brobecker@adacore.com>
8036
8037 * gdbreplay.c (gdbreplay_version): Update copyright year.
8038 * server.c (gdbserver_version): Likewise.
8039
8b93d60f
JB
80402012-12-17 Joel Brobecker <brobecker@adacore.com>
8041
8042 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8043 new thread.
8044
037335a7
JB
80452012-12-17 Joel Brobecker <brobecker@adacore.com>
8046
8047 * lynx-low.c (ptrace_request_to_str): Add handling for
8048 PTRACE_GETTRACESIG.
8049
52d4cbd8
JB
80502012-12-17 Joel Brobecker <brobecker@adacore.com>
8051
8052 * lynx-low.c (lynx_attach): Delete variable new_process.
8053
ab8f6ca9
JB
80542012-12-17 Joel Brobecker <brobecker@adacore.com>
8055
8056 * lynx-low.c (lynx_create_inferior): Delete variable
8057 new_process.
8058
78cbc024
JB
80592012-12-17 Joel Brobecker <brobecker@adacore.com>
8060
8061 * lynx-low.c (ptrace_request_to_str): Do not handle
8062 PTRACE_GETTHREADLIST if this macro does not exist.
8063
14a00470
YQ
80642012-12-15 Yao Qi <yao@codesourcery.com>
8065
8066 * Makefile.in (OBS): Add notif.o.
8067 * notif.c, notif.h: New.
8068 * server.c: Include "notif.h".
8069 (struct vstop_notif) <next>: Remove.
8070 <base>: New field.
8071 (queue_stop_reply): Update.
8072 (push_event, send_next_stop_reply): Remove.
8073 (discard_queued_stop_replies): Update.
8074 (notif_stop): New variable.
8075 (handle_v_stopped): Remove.
8076 (handle_v_requests): Don't call handle_v_stopped. Call
8077 handle_ack_notif instead.
8078 (queue_stop_reply_callback): Call notif_event_enque instead
8079 of queue_stop_reply.
8080 (handle_status): Don't call send_next_stop_reply, call
8081 notif_write_event instead.
8082 (kill_inferior_callback): Likewise.
8083 (detach_or_kill_inferior_callback): Likewise.
8084 (main): Call initialize_notif.
8085 (process_serial_event): Call QUEUE_is_empty.
8086 (handle_target_event): Call notif_push instead of push event.
8087 * server.h (push_event): Remove declaration.
8088
61c125b9
TT
80892012-12-10 Tom Tromey <tromey@redhat.com>
8090
8091 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8092 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8093 macros.
8094 (.c.o): Rewrite.
8095 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8096 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8097 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8098 (amd64-linux-ipa.o, ax.o): Rewrite.
8099 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8100 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8101 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8102 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8103 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8104 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8105 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8106 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8107 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8108 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8109 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8110 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8111 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8112 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8113 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8114 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8115 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8116 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8117 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8118 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8119 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8120 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8121 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8122 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8123 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8124 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8125 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8126 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8127 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8128 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8129 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8130 (reg-tilegx.o): Remove.
8131 (all_object_files): New macro.
8132 Include .deps files.
8133 * aclocal.m4, configure: Rebuild.
8134 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8135 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8136 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8137
e90e9ad9
TT
81382012-12-05 Tom Tromey <tromey@redhat.com>
8139
8140 PR gdb/14917:
8141 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8142
02d403bf 81432012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8144
8145 * configure.ac: Check for linux/perf_event.h.
8146 * config.in: Regenerated.
8147 * configure: Regenerated.
8148
0270a750
PA
81492012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8150
8151 * hostio.c (handle_readlink): Decrease buffer size
8152 parameter passed to readlink by one byte.
8153
8c29b58e
YQ
81542012-11-26 Yao Qi <yao@codesourcery.com>
8155
8156 * configure.ac (build_warnings): Append '-Wempty-body'.
8157 * configure: Regenerated.
8158 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8159 body.
8160
8bdce1ff
PM
81612012-11-15 Pierre Muller <muller@sourceware.org>
8162
8163 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8164 * config.in: Regenerate.
8165 * configure: Regenerate.
8166 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8167 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8168 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8169 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8170 header.
8171 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8172 instead of <sys/wait.h> header.
8173 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8174
02d403bf 81752012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8176
8177 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8178 (various make rules): Remove -DGDBSERVER
8179
fbd5db48
YQ
81802012-11-09 Yao Qi <yao@codesourcery.com>
8181
8182 * spu-low.c (current_ptid): Move it to ..
8183 * gdbthread.h: ... here. New.
8184 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8185 * server.c (myresume, process_serial_event): Likewise.
8186 * thread-db.c (thread_db_find_new_threads): Likewise.
8187 * tracepoint.c (run_inferior_command): Likewise.
8188
b3dc46ff
AB
81892012-10-01 Andrew Burgess <aburgess@broadcom.com>
8190
8191 * server.c (handle_search_memory_1): Include access length in
8192 warning message.
8193
07c04788
HPN
81942012-09-05 Michael Brandt <michael.brandt@axis.com>
8195
8196 * linux-crisv32-low.c: Fix compile errors.
8197
918d227b
YQ
81982012-09-04 Yao Qi <yao@codesourcery.com>
8199
8200 * tracepoint.c (cmd_qtsv): Adjust debug message.
8201 Don't check CUR_TPOINT.
8202
18c1b81a
YQ
82032012-08-28 Yao Qi <yao@codesourcery.com>
8204
8205 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8206 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8207 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8208 Remove declarations of xmalloc, xreallloc, xstrdup and
8209 freeargv.
8210 * Makefile.in (libiberty_h): New.
8211 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8212 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8213
dc82f37b
YQ
82142012-08-23 Yao Qi <yao@codesourcery.com>
8215
8216 * server.h: Remove declaration of 'xsnprintf'.
8217
406b1477
KS
82182012-08-22 Keith Seitz <keiths@redhat.com>
8219
8220 * server.h: Include build-gnulib-gbserver/config.h.
8221 * gdbreplay.c: Likewise.
8222
e6712ff1
DE
82232012-08-08 Doug Evans <dje@google.com>
8224
8225 * Makefile.in (SFILES): Add gdb_vecs.c.
8226 (OBS): Add gdb_vecs.o.
8227 (gdb_vecs_h, host_defs_h): New variables.
8228 (thread-db.o): Add $(gdb_vecs_h) dependency.
8229 (gdb_vecs.o): New rule.
8230 * thread-db.c: #include "gdb_vecs.h".
8231 (thread_db_load_search): Use a vector to iterate over path elements.
8232 Handle text appearing after "$pdir".
8233
8234 * configure.ac: Add check for strstr.
8235 * config.in: Regenerate.
8236 * configure: Regenerate.
8237
7c3270ae
UW
82382012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8239
8240 * hostio.c (handle_pread): If pread fails, fall back to attempting
8241 lseek/read.
8242 (handle_pwrite): Likewise for pwrite.
8243
b62e2b27
UW
82442012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8245
8246 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8247 between unsupported TYPE and unimplementable ADDR/LEN combination.
8248 (arm_insert_point): Act on new return value.
8249
78a99e91
PA
82502012-07-31 Pedro Alves <palves@redhat.com>
8251
8252 * server.c (process_point_options): Only skip tokens if we find
8253 one that is unrecognized. Don't treat 'X' specially while
8254 skipping unrecognized tokens.
8255
fcf303ab
UW
82562012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8257
8258 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8259 to 4-byte-align HW breakpoint addresses for Thumb.
8260
7255706c
YQ
82612012-07-27 Yao Qi <yao@codesourcery.com>
8262
8263 PR remote/14161.
8264
8265 * server.h: Declare gdb_agent_about_to_close.
8266 * target.c (kill_inferior): Include "agent.h".
8267 New. Send command 'kill'.
8268 * target.h (kill_inferior): Removed macro.
8269 * tracepoint.c (gdb_agent_about_to_close): New.
8270 (gdb_agent_helper_thread): Handle command 'close'.
8271 Wait endlessly until the inferior stops.
8272 Install gdb_agent_remove_socket to atexit hook.
8273 (agent_socket_name): New static variable.
8274 (gdb_agent_socket_init): Replace local variable 'name' with
8275 'agent_socket_name'.
8276 (gdb_agent_remove_socket): New.
8277
5a3f286f
YQ
82782012-07-27 Yao Qi <yao@codesourcery.com>
8279
8280 * server.c (process_point_options): Stop at 'X' when parsing.
8281
961bd387
ME
82822012-07-19 Michael Eager <eager@eagercon.com>
8283
a261b8f5 8284 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8285 to hw_execute.
8286 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8287 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8288 hardware breakpoint.
8289
aa7c7447
JK
82902012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8291
8292 * gdbserver/linux-low.c (initialize_low): Call
8293 linux_ptrace_init_warnings.
8294
7f216e7c
DE
82952012-07-02 Doug Evans <dje@google.com>
8296
8297 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8298 pointer to int.
8299
d3ce09f5
SS
83002012-07-02 Stan Shebs <stan@codesourcery.com>
8301
8302 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8303 (ax.o): Add it to build rule.
8304 (ax-ipa.o): Ditto.
8305 (OBS): Add format.o.
8306 (IPA_OBS): Add format.o.
8307 * server.c (handle_query): Claim support for breakpoint commands.
8308 (process_point_options): Add command case.
8309 (process_serial_event): Leave running if there are printfs in
8310 effect.
8311 * mem-break.h (any_persistent_commands): Declare.
8312 (add_breakpoint_commands): Declare.
8313 (gdb_no_commands_at_breakpoint): Declare.
8314 (run_breakpoint_commands): Declare.
8315 * mem-break.c (struct point_command_list): New struct.
8316 (struct breakpoint): New field command_list.
8317 (any_persistent_commands): New function.
8318 (add_commands_to_breakpoint): New function.
8319 (add_breakpoint_commands): New function.
8320 (gdb_no_commands_at_breakpoint): New function.
8321 (run_breakpoint_commands): New function.
8322 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8323 locally.
8324 * ax.c: Include format.h.
8325 (ax_printf): New function.
8326 (gdb_eval_agent_expr): Add printf opcode.
8327
2f8f6aed
YQ
83282012-06-13 Yao Qi <yao@codesourcery.com>
8329
8330 * server.c (start_inferior): Remove duplicated writes to fields
8331 'last_resume_kind' and 'last_status' of 'current_inferior'.
8332
0c9070b3
YQ
83332012-06-12 Yao Qi <yao@codesourcery.com>
8334 Pedro Alves <palves@redhat.com>
8335
8336 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8337 comment.
8338 * server.c (handle_v_cont): Extend comment.
8339
c52daf70
YQ
83402012-06-11 Yao Qi <yao@codesourcery.com>
8341
8342 * linux-low.c (linux_attach): Add 'static'.
8343
d38bbb0a
YQ
83442012-06-06 Yao Qi <yao@codesourcery.com>
8345
8346 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8347
89dc0afd
JK
83482012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8349
8350 Fix gcc -flto compilation warning.
8351 * server.c (main): Make variable multi_mode and attach volatile.
8352
75f62ce7
TJB
83532012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8354
8355 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8356 if the platform doesn't know about it.
8357
65f479b6
PA
83582012-05-30 Jeff Kenton <jkenton@tilera.com>
8359
8360 * Makefile.in (SFILES): Add linux-tile-low.c.
8361 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8362 * configure.srv: Handle tilegx-*-linux*.
8363 * linux-tile-low.c: New file.
8364
0c5bf5a9
JK
83652012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8366
8367 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8368
a493e3e2
PA
83692012-05-24 Pedro Alves <palves@redhat.com>
8370
8371 PR gdb/7205
8372
43aaf8b6 8373 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8374
2ea28649
PA
83752012-05-24 Pedro Alves <palves@redhat.com>
8376
8377 PR gdb/7205
8378
8379 Replace target_signal with gdb_signal throughout.
8380
8d409d16
MR
83812012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8382
8383 * linux-low.c (linux_store_registers): Avoid the copying sequence
8384 when no data has been retrieved by ptrace.
8385
23512c01
MGD
83862012-05-22 Will Deacon <will.deacon@arm.com>
8387
8388 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8389 Include asm/ptrace.h.
8390 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8391 already defined.
8392
4934b29e
MR
83932012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8394
8395 * linux-low.c (linux_store_registers): Don't re-retrieve data
8396 with ptrace that has already been obtained from /proc. Always
8397 copy any data retrieved with ptrace to the buffer supplied.
8398
bde24c0a
PA
83992012-05-11 Yao Qi <yao@codesourcery.com>
8400 Pedro Alves <palves@redhat.com>
8401
8402 * linux-low.c (enum stopping_threads_kind): New.
8403 (stopping_threads): Change type to `enum stopping_threads_kind'.
8404 (handle_extended_wait): If stopping and suspending threads, leave
8405 the new_lwp suspended too.
8406 (linux_wait_for_event): Adjust.
8407 (stop_all_lwps): Set `stopping_threads' to
8408 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8409 whether we're suspending threads or just stopping them. Assert no
8410 recursion happens.
8411
623b6bdf
YQ
84122012-04-29 Yao Qi <yao@codesourcery.com>
8413
8414 * server.h: Move some code to ...
8415 * gdbthread.h: ... here. New.
8416 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8417 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8418 (nto-low.o, win32-low.o): Likewise.
8419 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8420 * regcache.c, remote-utils.c, server.c: Likewise.
8421 * target.c, tracepoint.c, win32-low.c: Likewise.
8422
f15f9948
TJB
84232012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8424
8425 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8426 (PTRACE_ARG4_TYPE): Likewise.
8427 (PTRACE_XFER_TYPE): Likewise.
8428 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8429 ptrace to PTRACE_ARG3_TYPE.
8430 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8431 (PTRACE_ARG4_TYPE): Likewise.
8432 (PTRACE_XFER_TYPE): Likewise.
8433 (linux_detach_one_lwp): Cast fourth argument of
8434 ptrace to long then PTRACE_ARG4_TYPE.
8435 (regsets_fetch_inferior_registers): Cast third argument of
8436 ptrace to long then PTRACE_ARG3_TYPE.
8437 (regsets_store_inferior_registers): Likewise.
8438
38ea300a
PA
84392012-04-20 Pedro Alves <palves@redhat.com>
8440
8441 * configure: Regenerate.
8442
c971b7fa
PA
84432012-04-19 Pedro Alves <palves@redhat.com>
8444
43aaf8b6 8445 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8446 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8447 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8448 (all, install-only, uninstall, clean-info, all-lib, clean): No
8449 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8450 (maintainer-clean realclean distclean): Use subdir_do.
8451 (subdir_do): New.
8452 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8453 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8454 * acinclude.m4: Include acx_configure_dir.m4.
8455 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8456 calls. Call AC_PROG_RANLIB. Configure gnulib using
8457 ACX_CONFIGURE_DIR.
8458 (GNULIB): New.
8459 (GNULIB_STDINT_H): Adjust.
8460 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8461 * gdbreplay.c: Include build-gnulib/config.h.
8462 * server.h: Likewise.
8463 * aclocal.m4: Regenerate.
8464 * config.in: Regenerate.
8465 * configure: Regenerate.
c971b7fa 8466
809277f8
PA
84672012-04-19 Pedro Alves <palves@redhat.com>
8468
8469 * Makefile.in (LIBGNU, INCGNU): Adjust.
8470 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8471 (all, install-only, uninstall, clean-info, all-lib, clean)
8472 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8473 * configure.ac: Adjust AC_OUTPUT output.
8474 * aclocal.m4: Regenerate.
8475 * configure: Regenerate.
8476
fd9bb8b8
PA
84772012-04-19 Pedro Alves <palves@redhat.com>
8478
8479 * Makefile.in (generated_files): New.
8480 (server_h): Remove the explicit dependency on config.h, and depend
8481 on $generated_files.
8482
1c298c66
PA
84832012-04-19 Pedro Alves <palves@redhat.com>
8484
8485 * Makefile.in (INCGNU): Add -Ignulib.
8486
57c4b50b
PA
84872012-04-19 Pedro Alves <palves@redhat.com>
8488
8489 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8490 (INCGNU): ... this, and spell out -I here.
8491 (GNULIB_LIB): Rename to ...
8492 (LIBGNU): ... this.
8493 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8494
1030e047
PA
84952012-04-19 Pedro Alves <palves@redhat.com>
8496
8497 * config.in: Regenerate.
8498
447d4319
PA
84992012-04-19 Pedro Alves <palves@redhat.com>
8500
8501 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8502 * server.h (memmem): Remove declaration.
8503 * config.in: Regenerate.
8504 * configure: Regenerate.
8505
aad9eab9
YQ
85062012-04-19 Yao Qi <yao@codesourcery.com>
8507
8508 * Makefile.in (SFILES): Add common/vec.c.
8509 (OBS): Add vec.o.
8510 (vec.o): New rule.
8511
3e10640f
YQ
85122012-04-19 Yao Qi <yao@codesourcery.com>
8513
8514 * remote-utils.c (prepare_resume_reply): Replace with macro
8515 target_core_of_thread.
8516 * server.c (handle_qxfer_threads_proper): Likewise.
8517 * target.h (traget_core_of_thread): New macro.
8518
71622373
PA
85192012-04-18 Pedro Alves <palves@redhat.com>
8520
8521 * aclocal.m4: Regenerate.
8522 * configure: Regenerate.
8523
80d26939
YQ
85242012-04-16 Yao Qi <yao@codesourcery.com>
8525
8526 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8527 duplicated on address.
8528
42476b70
YQ
85292012-04-16 Yao Qi <yao@codesourcery.com>
8530
8531 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8532 (struct tracepoint_action_ops) <send>: New field.
8533 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8534 (agent_expr_send, x_tracepoint_action_send): New.
8535 (l_tracepoint_action_send): New.
8536 (cmd_qtdp): Download and install tracepoint
8537 according to `use_agent'.
8538 (run_inferior_command): Add one more parameter `len'.
8539 Update callers.
8540 (tracepoint_send_agent): New.
8541 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8542
7bc83639
YQ
85432012-04-16 Yao Qi <yao@codesourcery.com>
8544
8545 * tracepoint.c (download_tracepoints): Moved to ...
8546 (cmd_qtstart): ... here.
8547
5f18041e
YQ
85482012-04-14 Yao Qi <yao@codesourcery.com>
8549
8550 * tracepoint.c: Include inttypes.h.
8551 (struct collect_memory_action): Use sized types.
8552 (struct tracepoint): Likewise.
8553 (cmd_qtdp, stop_tracing): Update print specifiers.
8554 (cmd_qtp, response_tracepoint): Likewise.
8555 (collect_data_at_tracepoint): Likewise.
8556 (collect_data_at_step): Likewise.
8557
55a8c076
YQ
85582012-04-14 Yao Qi <yao@codesourcery.com>
8559
8560 Import gnulib module inttypes.
8561 * aclocal.m4, config.in, configure: Regenerated.
8562
dc750257
YQ
85632012-04-14 Yao Qi <yao@codesourcery.com>
8564
8565 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8566 Makefile and config.status at last.
8567
0ab5faf9
YQ
85682012-04-13 Yao Qi <yao@codesourcery.com>
8569
8570 * tracepoint.c: Include stdint.h unconditionally.
8571
18f5fd81
TJB
85722012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8573
8574 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8575 on BFD_HAVE_SYS_PROCFS_TYPE.
8576 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8577 * configure: Regenerate.
8578 * config.in: Likewise.
8579
4d47af5c
L
85802012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8581
8582 * Makefile.in (clean): Also remove x32.c x32-linux.c
8583 x32-avx.c x32-avx-linux.c.
8584 (x32.o): New target.
8585 (x32.c): Likewise.
8586 (x32-linux.o): Likewise.
8587 (x32-linux.c): Likewise.
8588 (x32-avx.o): Likewise.
8589 (x32-avx.c): Likewise.
8590 (x32-avx-linux.o): Likewise.
8591 (x32-avx-linux.c): Likewise.
8592
8593 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8594 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8595 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8596 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8597 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8598 i386/x32-avx-linux.xml.
8599
8600 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8601 (init_registers_x32_avx_linux): Likwise.
8602 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8603 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8604
ecedbe58
PA
86052012-04-13 Pedro Alves <palves@redhat.com>
8606
8607 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8608 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8609 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8610 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8611 the sub-make.
8612
c92b5177
L
86132012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8614
8615 * linux-x86-low.c (compat_x32_clock_t): New.
8616 (compat_x32_siginfo_t): Likewise.
8617 (compat_x32_siginfo_from_siginfo): Likewise.
8618 (siginfo_from_compat_x32_siginfo): Likewise.
8619 (linux_is_elf64): Likewise.
8620 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8621 and siginfo_from_compat_x32_siginfo for x32.
8622 (x86_arch_setup): Set linux_is_elf64.
8623
214d508e
L
86242012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8625
8626 PR gdb/13969
8627 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8628 e_machine field.
8629 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8630 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8631 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8632 compatible with process.
8633
c9a1864a
YQ
86342012-04-12 Yao Qi <yao@codesourcery.com>
8635
8636 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8637 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8638 (install-only, install-info, clean): Handle sub dir gnulib.
8639 (all-lib, am--refresh): New targets.
8640 (memmem.o): Remove target.
8641 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8642 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8643 (AC_REPLACE_FUNCS): Remove memmem.
8644 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8645 (AC_OUTPUT): Generate Makefile in gnulib/.
8646 * aclocal.m4, config.in, configure: Regenerated.
8647
367ba2c2
MR
86482012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8649
8650 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8651
9d236627
PA
86522012-04-05 Pedro Alves <palves@redhat.com>
8653
8654 -Werror=strict-aliasing
8655
8656 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8657 pointer.
8658
111217b3
PA
86592012-04-04 Pedro Alves <palves@redhat.com>
8660
8661 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8662 (sparc_store_gregset_from_stack, sparc_store_gregset)
8663 (sparc_breakpoint_at): Fix formatting.
8664
8365dcf5
TJB
86652012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8666
8667 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8668 are available.
8669 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8670 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8671 * config.in: Regenerate.
8672 * configure: Likewise.
8673
689cc2ae
PA
86742012-03-29 Pedro Alves <palves@redhat.com>
8675
8676 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8677 Correct ptrace arguments.
8678
c14dfd32
PA
86792012-03-28 Pedro Alves <palves@redhat.com>
8680
8681 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8682 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8683 (IA64_FR1_REGNUM): New defines.
8684 (ia64_fetch_register): New.
8685 (the_low_target): Install it.
8686 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8687 field.
8688 * linux-low.c (linux_fetch_registers): Try the
8689 the_low_target.fetch_register hook first.
8690
8691 * linux-arm-low.c (the_low_target): Adjust.
8692 * linux-bfin-low.c (the_low_target): Adjust.
8693 * linux-cris-low.c (the_low_target): Adjust.
8694 * linux-crisv32-low.c (the_low_target): Adjust.
8695 * linux-m32r-low.c (the_low_target): Adjust.
8696 * linux-m68k-low.c (the_low_target): Adjust.
8697 * linux-mips-low.c (the_low_target): Adjust.
8698 * linux-ppc-low.c (the_low_target): Adjust.
8699 * linux-s390-low.c (the_low_target): Adjust.
8700 * linux-sh-low.c (the_low_target): Adjust.
8701 * linux-sparc-low.c (the_low_target): Adjust.
8702 * linux-tic6x-low.c (the_low_target): Adjust.
8703 * linux-x86-low.c (the_low_target): Adjust.
8704 * linux-xtensa-low.c (the_low_target): Adjust.
8705
63c88e13
PA
87062012-03-26 Pedro Alves <palves@redhat.com>
8707
8708 * server.c (handle_qxfer_libraries): Don't bail early if
8709 the_target->qxfer_libraries_svr4 is not NULL.
8710
fb723180
PA
87112012-03-26 Pedro Alves <palves@redhat.com>
8712
8713 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8714
0afae3cf
PA
87152012-03-23 Pedro Alves <palves@redhat.com>
8716
8717 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8718 "library-list-svr4" element's start tag when the the DSO list is
8719 empty.
8720
485f1ee4
PA
87212012-03-23 Pedro Alves <palves@redhat.com>
8722
8723 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8724 a variable whose type size is the same as the inferior's pointer
8725 size.
8726
a5362b9a
TS
87272012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8728
8729 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8730 struct siginfo.
8731 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8732 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8733 * linux-low.h: Include <signal.h>.
8734 (struct siginfo): Remove forward declaration.
8735 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8736 struct siginfo.
8737
d226c142
MF
87382012-03-21 Mike Frysinger <vapier@gentoo.org>
8739
8740 * .gitignore: Ignore more files.
8741
122f36ef
PA
87422012-03-19 Pedro Alves <palves@redhat.com>
8743 Jan Kratochvil <jan.kratochvil@redhat.com>
8744
8745 * server.c (cont_thread, general_thread): Add describing comments.
8746 (start_inferior): Clear `cont_thread'.
8747 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8748 of a process.
8749
fc3e5175
YQ
87502012-03-15 Yao Qi <yao@codesourcery.com>
8751
8752 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8753 handling to ...
8754 (cmd_qtdp): ... here.
8755
8d0d92cd
YQ
87562012-03-15 Yao Qi <yao@codesourcery.com>
8757
8758 * tracepoint.c (struct tracepoint_action_ops): New.
8759 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8760 (m_tracepoint_action_download): New.
8761 (r_tracepoint_action_download): New.
8762 (x_tracepoint_action_download): New.
8763 (l_tracepoint_action_download): New.
8764 (add_tracepoint_action): Install `action->ops' according type.
8765 (download_tracepoint_1): Move code `download' function pointer
8766 of various tracepoint_action_ops.
8767
87b0bb13
JK
87682012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8769
8770 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8771 linux_ptrace_attach_warnings.
8772
5f572dec
JK
87732012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8774
8775 * Makefile.in (linux-ptrace.o): New.
8776 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8777 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8778 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8779 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8780 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8781 of these targets.
8782 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8783
f4647387
YQ
87842012-03-08 Yao Qi <yao@codesourcery.com>
8785 Pedro Alves <palves@redhat.com>
8786
8787 Fix PR server/13392.
8788 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8789 offset of JMP insn.
8790 * tracepoint.c (remove_tracepoint): New.
8791 (cmd_qtdp): Call remove_tracepoint when failed to install.
8792
9b224c5e
PA
87932012-03-07 Pedro Alves <palves@redhat.com>
8794
8795 * linux-low.c (get_detach_signal): New.
8796 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8797 Pass on pending signals to PTRACE_DETACH. Check the result of the
8798 ptrace call.
8799 * server.c (program_signals, program_signals_p): New.
8800 (handle_general_set): Handle QProgramSignals.
8801 * server.h (program_signals, program_signals_p): Declare.
8802
e237a7e2
JK
88032012-03-05 Pedro Alves <palves@redhat.com>
8804 Jan Kratochvil <jan.kratochvil@redhat.com>
8805
8806 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8807 New comment why.
8808
5808517f
YQ
88092012-03-03 Yao Qi <yao@codesourcery.com>
8810
8811 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8812 agent_look_up_symbols.
8813
58b4daa5
YQ
88142012-03-03 Yao Qi <yao@codesourcery.com>
8815
8816 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8817 (linux-x86-low.o): Likewise.
8818 * server.h: Remove in_process_agent_loaded.
8819 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8820 common/agent.c.
8821 Update callers.
8822
8ffcbaaf
YQ
88232012-03-03 Yao Qi <yao@codesourcery.com>
8824
8825 * tracepoint.c (gdb_agent_capability): New global.
8826 (in_process_agent_loaded_ust): Renamed to
8827 `in_process_agent_supports_ust'.
8828 Update callers.
8829 (in_process_agent_supports_ust): Call agent_capability_check.
8830 (clear_installed_tracepoints): Assert that agent supports
8831 agent.
8832
d1feda86
YQ
88332012-03-03 Yao Qi <yao@codesourcery.com>
8834
8835 * linux-low.c (linux_supports_agent): New.
8836 (linux_target_ops): Initialize field `supports_agent' with
8837 linux_supports_agent.
8838 * target.h (struct target_ops) <supports_agent>: New.
8839 (target_supports_agent): New macro.
8840 * server.c (handle_general_set): Handle packet 'QAgent'.
8841 (handle_query): Send `QAgent+'.
8842 * Makefile.in (server.o): Depends on agent.h.
8843
2fa291ac
YQ
88442012-03-03 Yao Qi <yao@codesourcery.com>
8845
8846 * Makefile.in (OBS): Add agent.o.
8847 Add new rule for agent.o.
8848 Track dependence of tracepoint.c on agent.h.
8849 * tracepoint.c (run_inferior_command_1):
8850 (run_inferior_command): Call agent_run_command.
8851 (gdb_ust_connect_sync_socket): Deleted. Move it to
8852 common/agent.c.
8853 (resume_thread, stop_thread): Likewise.
8854 (gdb_ust_socket_init): Renamed to ...
8855 (gdb_agent_socket_init): ... New.
8856 (gdb_ust_thread): Renamed to ...
8857 (gdb_agent_helper_thread): ... New.
8858 (gdb_ust_init): Move some code to ...
8859 (gdb_agent_init): ... here. New.
8860 [HAVE_UST]: Call gdb_ust_init.
8861 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8862 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8863 * config.in, configure: Regenerated.
8864
05044653
PA
88652012-03-02 Pedro Alves <palves@redhat.com>
8866
8867 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8868 * linux-low.c (struct simple_pid_list): New.
8869 (stopped_pids): New a struct simple_pid_list pointer.
8870 (add_to_pid_list, pull_pid_from_list): New.
8871 (handle_extended_wait): Don't assume the first signal new children
8872 report is SIGSTOP. Adjust call to pull_pid_from_list.
8873 (linux_wait_for_lwp): Adjust.
8874
8d00225b
YQ
88752012-03-02 Yao Qi <yao@codesourcery.com>
8876
8877 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8878 debug log.
8879
19560ba5
YQ
88802012-03-02 Yao Qi <yao@codesourcery.com>
8881
8882 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8883 `stop_pc' and `tpoint'. Update caller.
8884
1faeff08
MR
88852012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8886
8887 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8888 * linux-low.c (use_linux_regsets): New macro.
8889 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8890 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8891 (linux_register_in_regsets): New function.
8892 (usr_fetch_inferior_registers): Skip registers covered by
8893 regsets.
8894 (usr_store_inferior_registers): Likewise.
8895 (usr_fetch_inferior_registers): New macro.
8896 (usr_store_inferior_registers): Likewise.
8897 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8898 (linux_store_registers): Likewise.
8899 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8900 prototype.
8901 (init_registers_mips64_dsp_linux): Likewise.
8902 (init_registers_mips_linux): New macro.
8903 (init_registers_mips_dsp_linux): Likewise.
8904 (mips_dsp_num_regs): Likewise.
8905 (DSP_BASE, DSP_CONTROL): New fallback macros.
8906 (mips_base_regs): New macro.
8907 (mips_regmap): Use it. Fix the size.
8908 (mips_dsp_regmap): New variable.
8909 (mips_dsp_regset_bitmap): Likewise.
8910 (mips_arch_setup): New function.
8911 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8912 than mips_regmap.
8913 (mips_cannot_store_register): Likewise.
8914 (the_low_target): Update .arch_setup, .num_regs and .regmap
8915 initializers. Add .regset_bitmap initializer.
8916 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8917 initializer.
8918 * linux-bfin-low.c (the_low_target): Likewise.
8919 * linux-cris-low.c (the_low_target): Likewise.
8920 * linux-crisv32-low.c (the_low_target): Likewise.
8921 * linux-ia64-low.c (the_low_target): Likewise.
8922 * linux-m32r-low.c (the_low_target): Likewise.
8923 * linux-m68k-low.c (the_low_target): Likewise.
8924 * linux-ppc-low.c (the_low_target): Likewise.
8925 * linux-s390-low.c (the_low_target): Likewise.
8926 * linux-sh-low.c (the_low_target): Likewise.
8927 * linux-sparc-low.c (the_low_target): Likewise.
8928 * linux-tic6x-low.c (the_low_target): Likewise.
8929 * linux-x86-low.c (the_low_target): Likewise.
8930 * linux-xtensa-low.c (the_low_target): Likewise.
8931 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8932 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8933 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8934 srv_xmlfiles.
8935 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8936 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8937
c03e6ccc
YQ
89382012-02-29 Yao Qi <yao@codesourcery.com>
8939 Pedro Alves <palves@redhat.com>
8940
8941 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8942 `step_over_finished' is true.
8943
644cebc9
PA
89442012-02-27 Pedro Alves <palves@redhat.com>
8945
8946 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8947 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8948
c14d7ab2
PA
89492012-02-27 Pedro Alves <palves@redhat.com>
8950
8951 PR server/9684
8952 * linux-low.c (pid_is_stopped): New.
8953 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8954
412c89dd
LM
89552012-02-25 Luis Machado <lgustavo@codesourcery.com>
8956
8957 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8958 of conditions.
8959
b745defe
MR
89602012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8961
8962 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8963
9f3a5c85
LM
89642012-02-24 Luis Machado <lgustavo@codesourcery>
8965
8966 * server.c (handle_query): Advertise support for target-side
8967 breakpoint condition evaluation.
8968 (process_point_options): New function.
8969 (process_serial_event): When inserting a breakpoint, check for
8970 a target-side condition that should be evaluated.
8971
8972 * mem-break.c: Include regcache.h and ax.h.
8973 (point_cond_list_t): New data structure.
8974 (breakpoint) <cond_list>: New field.
8975 (find_gdb_breakpoint_at): Make non-static.
8976 (delete_gdb_breakpoint_at): Clear any target-side
8977 conditions.
8978 (clear_gdb_breakpoint_conditions): New function.
8979 (add_condition_to_breakpoint): Likewise.
8980 (add_breakpoint_condition): Likewise.
8981 (gdb_condition_true_at_breakpoint): Likewise.
8982 (gdb_breakpoint_here): Return result directly instead
8983 of going through a local variable.
8984
8985 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8986 (clear_gdb_breakpoint_conditions): Likewise.
8987 (add_breakpoint_condition): Likewise.
8988 (gdb_condition_true_at_breakpoint): Likewise.
8989
8990 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8991 (need_step_over_p): Take target-side breakpoint condition into
8992 consideration.
8993
5e1dc496
LM
89942012-02-24 Luis Machado <lgustavo@codesourcery>
8995
8996 * server.h: Include tracepoint.h.
8997 (agent_mem_read, agent_get_trace_state_variable_value,
8998 agent_set_trace_state_variable_value,
8999 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9000 get_set_tsv_func_addr): New prototypes.
9001
9002 * ax.h: New include file.
9003 * ax.c: New source file.
9004
9005 * tracepoint.c: Include ax.h.
9006 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9007 agent_expr, eval_result_type): Move to ax.h.
9008 (parse_agent_expr): Rename to ...
9009 (gdb_parse_agent_expr): ... this, make it non-static and move
9010 to ax.h.
9011 (unparse_agent_expr) Rename to ...
9012 (gdb_unparse_agent_expr): ... this, make it non-static and move
9013 to ax.h.
9014 (eval_agent_expr): Rename to ...
9015 (eval_tracepoint_agent_expr): ... this.
9016 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9017 forward declarations.
9018 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9019 (agent_get_trace_state_variable_value): New function.
9020 (agent_set_trace_state_variable_value): New function.
9021 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9022 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9023 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9024 (condition_true_at_tracepoint): Likewise.
9025 (parse_agent_expr): Rename to ...
9026 (gdb_parse_agent_expr): ... this and move to ax.c.
9027 (unparse_agent_expr): Rename to ...
9028 (gdb_unparse_agent_expr): ... this and move to ax.c.
9029 (gdb_agent_op_name): Move to ax.c.
9030 (eval_agent_expr): Rename to ...
9031 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9032 and move to ax.c.
9033 (eval_tracepoint_agent_expr): New function.
9034 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9035 non-static.
5e1dc496
LM
9036 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9037 ax.c.
9038 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9039 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9040 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9041 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9042 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9043 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9044 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9045 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9046 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9047 (compile_bytecodes): Remove forward declaration.
9048 (is_goto_target): Move to ax.c.
9049 (compile_bytecodes): Move to ax.c and call
9050 agent_get_trace_state_variable_value (...) and
9051 agent_set_trace_state_variable_value (...).
9052
9053 * Makefile.in: Update ax.c and IPA dependencies.
9054
277e4e52
PA
90552012-02-24 Pedro Alves <palves@redhat.com>
9056
9057 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9058 (cmd_bigqtbuffer_circular): ... this. Only handle
9059 'QTBuffer:circular:'.
9060 (handle_tracepoint_general_set): Adjust.
9061
bf4c19f7
YQ
90622012-02-16 Yao Qi <yao@codesourcery.com>
9063
9064 * inferiors.c: Move code to ...
9065 * dll.c: .... here. New.
9066 * server.h: Declare clear_dlls.
9067 * Makefile.in (SFILES): Add dll.c.
9068 (OBS): Add dll.o
9069 (dll.o): New rule.
9070
d73f2619
YQ
90712012-02-11 Yao Qi <yao@codesourcery.com>
9072
9073 * server.c: (handle_monitor_command): Add a new parameter
9074 `own_buf'.
9075 (handle_query): Update caller.
9076
f8255c2a
JB
90772012-02-09 Joel Brobecker <brobecker@adacore.com>
9078
9079 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9080 * configure, config.in: Regenerate.
9081 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9082 is not defined.
9083
da84f473
PA
90842012-02-02 Pedro Alves <palves@redhat.com>
9085
9086 Try SIGKILL first, then PTRACE_KILL.
9087 * linux-low.c (linux_kill_one_lwp): New.
9088 (linux_kill_one_lwp): Rename to ...
9089 (kill_one_lwp_callback): ... this. Use the new
9090 linux_kill_one_lwp.
9091
e886a173
PA
90922012-02-02 Pedro Alves <palves@redhat.com>
9093
9094 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9095 inferior.
9096
be07f1a2
PA
90972012-01-27 Pedro Alves <palves@redhat.com>
9098
9099 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9100 (elf_64_file_p): Make static.
9101 (linux_pid_exe_is_elf_64_file): New.
9102 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9103 Delete declarations.
9104 (linux_pid_exe_is_elf_64_file): Declare.
9105 * linux-x86-low.c (x86_arch_setup): Use
9106 linux_pid_exe_is_elf_64_file.
9107
d8301ad1
JK
91082012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9109
9110 * linux-low.c (linux_wait_for_event_1): Rename to ...
9111 (linux_wait_for_event): ... here and merge it with former
9112 linux_wait_for_event - new variable wait_ptid, use it.
9113 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9114
01b17894
PA
91152012-01-23 Pedro Alves <palves@redhat.com>
9116
9117 * server.c (main): Avoid yet another case of infinite loop while
9118 detaching/killing after a longjmp.
9119
e825046f
JK
91202012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9121
9122 Code cleanup.
9123 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9124
b9e7b9c3
UW
91252012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9126
9127 * hostio.c (handle_readlink): New function.
9128 (handle_vFile): Call it to handle "vFile:readlink" packets.
9129
901f9912
UW
91302012-01-20 Pedro Alves <palves@redhat.com>
9131 Ulrich Weigand <ulrich.weigand@linaro.org>
9132
9133 * server.c (handle_v_requests): Only support vAttach and vRun to
9134 start multiple processes when in extended protocol mode.
9135
fc1ab1a0
PA
91362012-01-17 Pedro Alves <palves@redhat.com>
9137
9138 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9139 memalign plus mprotect to allocate the scratch buffer.
9140
7d5d4e98
PA
91412012-01-13 Pedro Alves <palves@redhat.com>
9142
9143 * server.c (attach_inferior): Clear `cont_thread'.
9144
f128d5e9
PA
91452012-01-13 Pedro Alves <palves@redhat.com>
9146
9147 * server.c (main): Avoid infinite loop while detaching/killing
9148 after a longjmp.
9149
06db92f0
DE
91502012-01-09 Doug Evans <dje@google.com>
9151
9152 * server.c (start_inferior): Set last_ptid in --wrapper case.
9153
32d92999
YQ
91542012-01-06 Yao Qi <yao@codesourcery.com>
9155
9156 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9157 defined.
9158 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9159
5e0a92a9
YQ
91602012-01-04 Yao Qi <yao@codesourcery.com>
9161
9162 * tracepoint.c (cmd_qtdp): Print debug message
9163 for static tracepoint.
9164
ae639e8c
YQ
91652012-01-04 Yao Qi <yao@codesourcery.com>
9166
9167 * tracepoint.c (trace_vdebug): Differentiate debug message
9168 between gdbserver and IPA.
9169
f72429c5
YQ
91702012-01-03 Yao Qi <yao@codesourcery.com>
9171
9172 * tracepoint.c (tracepoint_was_hit): Don't collect for
9173 static tracepoint.
9174
12c3e59c
JB
91752012-01-02 Joel Brobecker <brobecker@adacore.com>
9176
9177 * terminal.h: Reformat copyright header.
9178
67827812
JB
91792012-01-02 Joel Brobecker <brobecker@adacore.com>
9180
9181 * server.c (gdbserver_version): Update copyright year.
9182 * gdbreplay.c (gdbreplay_version): Likewise.
9183
3e52c33d
JK
91842011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9185
9186 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9187
9188 Revert:
9189 2011-12-18 Hui Zhu <teawater@gmail.com>
9190 * linux-low.c (linux_create_inferior): Save return value to ret.
9191
66f1260e
HZ
91922011-12-18 Hui Zhu <teawater@gmail.com>
9193
9194 * linux-low.c (linux_create_inferior): Save return value to ret.
9195
e77616d7
DE
91962011-12-16 Doug Evans <dje@google.com>
9197
e7b06c57
DE
9198 * linux-low.c (linux_create_inferior): If stdio connection,
9199 redirect stdin from /dev/null, stdout to stderr.
9200 * remote-utils.c (remote_is_stdio): New static global.
9201 (remote_connection_is_stdio): New function.
9202 (remote_prepare): Handle stdio connection.
9203 (remote_open): Ditto.
9204 (remote_close): Don't close stdin for stdio connections.
9205 (read_prim,write_prim): New functions. Replace all calls to
9206 read/write to these.
9207 * server.c (main): Watch for "-" argument. Move call to
9208 remote_prepare before start_inferior.
9209 * server.h (STDIO_CONNECTION_NAME): New macro.
9210 (remote_connection_is_stdio): Declare.
9211
e77616d7
DE
9212 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9213 in debugging output.
9214
82067193
YQ
92152011-12-15 Yao Qi <yao@codesourcery.com>
9216
9217 * tracepoint.c: Include sys/syscall.h.
9218 (gdb_ust_thread): Remove preprocessor conditional.
9219
82bfbe7e
PA
92202011-12-14 Pedro Alves <pedro@codesourcery.com>
9221
9222 * linux-low.c (linux_detach_one_lwp): Call
9223 the_low_target.prepare_to_resume before detaching.
9224
712c6575
YQ
92252011-12-14 Yao Qi <yao@codesourcery.com>
9226
9227 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9228 of write.
9229
d54d1edf
YQ
92302011-12-14 Yao Qi <yao@codesourcery.com>
9231
9232 * i386-low.c (i386_low_stopped_data_address): Initialize local
9233 variable `control'.
9234
6210a125
PA
92352011-12-13 Pedro Alves <pedro@codesourcery.com>
9236
9237 PR remote/13492
9238
9239 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9240 DR_CONTROL unless necessary. Extend comments.
9241 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9242 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9243
2ece8244
YQ
92442011-12-13 Yao Qi <yao@codesourcery.com>
9245
9246 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9247 macros.
9248 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9249
784867a5
JK
92502011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9251
9252 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9253 Print new debug message for such case.
9254
6bf36717
JK
92552011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9256
9257 Fix overlapping memcpy.
9258 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9259 the read_inferior_memory transfer.
9260 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9261 write_inferior_memory transfer.
9262 (set_fast_tracepoint_jump): New variable buf. Use it for the
9263 read_inferior_memory and write_inferior_memory transfers.
9264 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9265 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9266 Use it for the write_inferior_memory transfer.
9267 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9268 buffers.
9269
50275556
MR
92702011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9271
9272 * linux-low.c (fetch_register, store_register): Make code
9273 consistent, fix formatting.
9274
7325beb4
MR
92752011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9276
9277 * linux-low.c (usr_store_inferior_registers): Factor out code
9278 to handle individual registers into...
9279 (store_register): ... this new function.
9280
c642a434
UW
92812011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9282
9283 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9284 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9285 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9286 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9287 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9288 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9289 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9290 (srv_xmlfiles): Add new XML files.
9291
9292 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9293 and <sys/uio.h>.
9294 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9295 (init_registers_s390_linux32v1): Add prototype.
9296 (init_registers_s390_linux32v2): Likewise.
9297 (init_registers_s390_linux64v1): Likewise.
9298 (init_registers_s390_linux64v2): Likewise.
9299 (init_registers_s390x_linux64v1): Likewise.
9300 (init_registers_s390x_linux64v2): Likewise.
9301 (s390_num_regs): Increment to 52.
9302 (s390_regmap): Add orig_r2 register.
9303 (s390_num_regs_3264): Increment to 68.
9304 (s390_regmap_3264): Add orig_r2 register.
9305 (s390_collect_ptrace_register): Handle orig_r2 register.
9306 (s390_supply_ptrace_register): Likewise.
9307 (s390_fill_last_break): New function.
9308 (s390_store_last_break): Likewise.
9309 (s390_fill_system_call): New function.
9310 (s390_store_system_call): Likewise.
9311 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9312 register sets.
9313 (s390_check_regset): New function.
9314 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9315 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9316 Update target_regsets for available register sets.
9317
2268b414
JK
93182011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9319 Jan Kratochvil <jan.kratochvil@redhat.com>
9320
9321 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9322 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9323 New.
9324 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9325 * linux-low.h (struct process_info_private): New member r_debug.
9326 * server.c (handle_qxfer_libraries): Call
9327 the_target->qxfer_libraries_svr4.
9328 (handle_qxfer_libraries_svr4): New function.
9329 (qxfer_packets): New entry "libraries-svr4".
9330 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9331 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9332 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9333 PACKET_qXfer_libraries_svr4.
9334
d6db1fab
UW
93352011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9336
9337 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9338 PSW address/mask between 8-byte and 16-byte formats.
9339 (s390_supply_ptrace_register): Likewise.
9340 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9341 basic addressing mode bit.
9342
242f5f1c
SS
93432011-11-24 Stan Shebs <stan@codesourcery.com>
9344
9345 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9346
f196051f
SS
93472011-11-17 Stan Shebs <stan@codesourcery.com>
9348
9349 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9350 (tracing_start_time): New global.
9351 (tracing_stop_time): New global.
9352 (tracing_user_name): New global.
9353 (tracing_notes): New global.
9354 (tracing_stop_note): New global.
9355 (cmd_qtstart): Set traceframe_usage, start_time.
9356 (stop_tracing): Set stop_time.
9357 (cmd_qtstatus): Report additional status.
9358 (cmd_qtp): New function.
9359 (handle_tracepoint_query): Call it.
9360 (cmd_qtnotes): New function.
9361 (handle_tracepoint_general_set): Call it.
9362 (get_timestamp): Rename from tsv_get_timestamp.
9363
405f8e94
SS
93642011-11-14 Stan Shebs <stan@codesourcery.com>
9365 Kwok Cheung Yeung <kcy@codesourcery.com>
9366
9367 * linux-x86-low.c (small_jump_insn): New.
9368 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9369 trampoline and error message, build a trampoline and issue a small
9370 jump instruction to it.
9371 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9372 trampoline and error message.
9373 (x86_get_min_fast_tracepoint_insn_len): New.
9374 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9375 * linux-low.h (struct linux_target_ops): Add arguments to
9376 install_fast_tracepoint_jump_pad operation, add new operation.
9377 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9378 arguments.
9379 (linux_get_min_fast_tracepoint_insn_len): New function.
9380 (linux_target_op): Add new operation.
9381 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9382 (gdb_trampoline_buffer_end): Ditto.
9383 (gdb_trampoline_buffer_error): Ditto.
9384 (struct ipa_sym_addresses): Add fields for new IPA variables.
9385 (symbol_list): Add entries for new IPA variables.
9386 (struct tracepoint): Add fields to hold the address range of the
9387 trampoline used by the tracepoint.
9388 (trampoline_buffer_head): New static variable.
9389 (trampoline_buffer_tail): Ditto.
9390 (claim_trampoline_space): New function.
9391 (have_fast_tracepoint_trampoline_buffer): New function.
9392 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9393 structure.
9394 (install_fast_tracepoint): Ditto, also add error buffer argument.
9395 (cmd_qtminftpilen): New function.
9396 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9397 (fast_tracepoint_from_trampoline_address): New function.
9398 (fast_tracepoint_collecting): Handle trampoline as part of jump
9399 pad space.
9400 (set_trampoline_buffer_space): New function.
9401 (initialize_tracepoint): Initialize new IPA variables.
9402 * target.h (struct target_ops): Add arguments to
9403 install_fast_tracepoint_jump_pad operation, add new
9404 get_min_fast_tracepoint_insn_len operation.
9405 (target_get_min_fast_tracepoint_insn_len): New.
9406 (install_fast_tracepoint_jump_pad): Add arguments.
9407 * server.h (IPA_BUFSIZ): Define.
9408 * linux-i386-ipa.c: Include extra header files.
9409 (initialize_fast_tracepoint_trampoline_buffer): New function.
9410 (initialize_low_tracepoint): Call it.
9411 * server.h (set_trampoline_buffer_space): Declare.
9412 (claim_trampoline_space): Ditto.
9413 (have_fast_tracepoint_trampoline_buffer): Ditto.
9414
1e4d1764
YQ
94152011-11-14 Yao Qi <yao@codesourcery.com>
9416
9417 * server.c (handle_query): Handle InstallInTrace for qSupported.
9418 * tracepoint.c (add_tracepoint): Sort list.
9419 (install_tracepoint, download_tracepoint): New.
9420 (cmd_qtdp): Call them to install and download tracepoints.
9421 (sort_tracepoints): Removed.
9422 (cmd_qtstart): Update.
9423
5c73ff4e
YQ
94242011-11-14 Yao Qi <yao@codesourcery.com>
9425
9426 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9427 * mem-break.h: Declare.
9428 * tracepoint.c (cmd_qtstart): Move some code to ...
9429 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9430 New.
9431 (download_tracepoints): Move some code to ...
9432 (download_tracepoint_1): ... here. New.
9433
86a30030
YQ
94342011-11-08 Yao Qi <yao@codesourcery.com>
9435
9436 * remote-utils.c (relocate_instruction): A comment fix.
9437
8d26e50c
JB
94382011-11-07 Joel Brobecker <brobecker@adacore.com>
9439
9440 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9441 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9442 dr_status_mirror and dr_control_mirror from debug_reg_state.
9443 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9444 (i386_initial_stuff): Remove use of deleted globals.
9445 (i386_get_thread_context, i386_set_thread_context,
9446 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9447 from debug_reg_state.
9448
a59306a3
YQ
94492011-11-05 Yao Qi <yao@codesourcery.com>
9450
9451 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9452 address as TPOINT's.
9453
3065dfb6
SS
94542011-11-02 Stan Shebs <stan@codesourcery.com>
9455
9456 * tracepoint.c (agent_mem_read_string): New function.
9457 (eval_agent_expr): Call it for tracenz.
9458 * server.c (handle_query): Report support for tracenz.
9459
fd0d8c7c
YQ
94602011-11-02 Yao Qi <yao@codesourcery.com>
9461
9462 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9463
609086b1
YQ
94642011-11-02 Yao Qi <yao@codesourcery.com>
9465
9466 * target.h: Fix a typo in comment.
9467
b9fd1791
PA
94682011-10-31 Pedro Alves <pedro@codesourcery.com>
9469
9470 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9471 clobber the breakpoints' shadows with fast tracepoint jumps.
9472 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9473 * target.c (write_inferior_memory): Also pass MYADDR down to
9474 check_mem_write.
9475
03583c20
UW
94762011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9477
9478 * configure.ac: Check support for personality routine.
9479 * configure: Regenerate.
9480 * config.in: Likewise.
9481 * linux-low.c: Include <sys/personality.h>.
9482 Define ADDR_NO_RANDOMIZE if necessary.
9483 (linux_create_inferior): Disable address space randomization when
9484 forking inferior, if requested.
9485 (linux_supports_disable_randomization): New function.
9486 (linux_target_ops): Install it.
9487 * server.h (disable_randomization): Declare.
9488 * server.c (disable_randomization): New global variable.
9489 (handle_general_set): Handle QDisableRandomization.
9490 (handle_query): Likewise for qSupported.
9491 (main): Support --disable-randomization and --no-disable-randomization
9492 command line arguments.
9493 * target.h (struct target_ops): Add supports_disable_randomization.
9494 (target_supports_disable_randomization): New macro.
9495
723b724b
MF
94962011-09-29 Mike Frysinger <vapier@gentoo.org>
9497
9498 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9499 ifdef check.
9500 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9501 [!PT_GETDSBT] (target_loadmap): New definition.
9502 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9503 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9504 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9505 and PT_GETDSBT to LINUX_LOADMAP.
9506 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9507 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9508
55329a5c 95092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9510
9511 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9512 (arm_linux_hwbp_cap): New static variable.
9513 (arm_linux_get_hwbp_cap): Replace by ...
9514 (arm_linux_init_hwbp_cap): ... this new function.
9515 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9516 (arm_linux_get_hw_watchpoint_count): Likewise.
9517 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9518 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9519 (arm_prepare_to_resume): Use perror_with_name instead of error.
9520
55329a5c 95212011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9522
9523 * linux-arm-low.c: Include <signal.h>.
9524 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9525 (struct arm_linux_hwbp_cap): New data type.
9526 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9527 (struct arm_linux_hw_breakpoint): New data type.
9528 (MAX_BPTS, MAX_WPTS): Define.
9529 (struct arch_process_info, struct arch_lwp_info): New data types.
9530 (arm_linux_get_hwbp_cap): New function.
9531 (arm_linux_get_hw_breakpoint_count): Likewise.
9532 (arm_linux_get_hw_watchpoint_count): Likewise.
9533 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9534 (arm_hwbp_control_initialize): Likewise.
9535 (arm_hwbp_control_is_enabled): Likewise.
9536 (arm_hwbp_control_is_initialized): Likewise.
9537 (arm_hwbp_control_disable): Likewise.
9538 (arm_linux_hw_breakpoint_equal): Likewise.
9539 (arm_linux_hw_point_initialize): Likewise.
9540 (struct update_registers_data): New data structure.
9541 (update_registers_callback: New function.
9542 (arm_insert_point): Likewise.
9543 (arm_remove_point): Likewise.
9544 (arm_stopped_by_watchpoint): Likewise.
9545 (arm_stopped_data_address): Likewise.
9546 (arm_new_process): Likewise.
9547 (arm_new_thread): Likewise.
9548 (arm_prepare_to_resume): Likewise.
9549 (the_low_target): Register arm_insert_point, arm_remove_point,
9550 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9551 arm_new_thread, and arm_prepare_to_resume.
9552
6b9801d4
SS
95532011-09-15 Stan Shebs <stan@codesourcery.com>
9554
9555 * server.h (struct emit_ops): Add compare-goto fields.
9556 * tracepoint.c (gdb_agent_op_sizes): New table.
9557 (emit_eq_goto): New function.
9558 (emit_ne_goto): New function.
9559 (emit_lt_goto): New function.
9560 (emit_le_goto): New function.
9561 (emit_gt_goto): New function.
9562 (emit_ge_goto): New function.
9563 (is_goto_target): New function.
9564 (compile_bytecodes): Recognize special cases of compare-goto
9565 combinations and call specialized emitters for them.
9566 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9567 (amd64_emit_ne_goto): New function.
9568 (amd64_emit_lt_goto): New function.
9569 (amd64_emit_le_goto): New function.
9570 (amd64_emit_gt_goto): New function.
9571 (amd64_emit_ge_goto): New function.
9572 (amd64_emit_ops): Add the new functions.
9573 (i386_emit_eq_goto): New function.
9574 (i386_emit_ne_goto): New function.
9575 (i386_emit_lt_goto): New function.
9576 (i386_emit_le_goto): New function.
9577 (i386_emit_gt_goto): New function.
9578 (i386_emit_ge_goto): New function.
9579 (i386_emit_ops): Add the new functions.
9580
bf15cbda
SS
95812011-09-08 Stan Shebs <stan@codesourcery.com>
9582
9583 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9584 (i386_emit_epilogue): Restore %ebx.
9585
943ca1dd
JZ
95862011-08-31 Jie Zhang <jzhang918@gmail.com>
9587
9588 * server.c (step_thread): Remove definition.
9589 (process_serial_event): Don't handle Hs.
9590 * server.h (step_thread): Remove declaration.
9591 * target.c (set_desired_inferior): Remove use of step_thread.
9592
e3deef73
LM
95932011-08-24 Luis Machado <lgustavo@codesourcery.com>
9594
9595 * linux-low.c: Include linux-procfs.h.
9596 (linux_attach_lwp_1): Update comments.
9597 (linux_attach): Scan for existing threads when attaching to a
9598 process that is the tgid.
9599 * Makefile.in: Update dependencies.
9600
13da1c97
LM
96012011-08-24 Luis Machado <lgustavo@codesourcery.com>
9602
9603 * configure.srv: Add linux-procfs.o dependencies.
9604
881127c9
YQ
96052011-08-14 Yao Qi <yao@codesourcery.com>
9606
9607 * target.h (struct target_ops): Fix indent.
9608 * win32-low.c (win32_target_ops): Fix comment.
9609
58dbd541
YQ
96102011-08-14 Andrew Jenner <andrew@codesourcery.com>
9611 Yao Qi <yao@codesourcery.com>
9612
9613 * Makefile.in (clean): Remove tic6x-*.c files.
9614 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9615 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9616 (tic6x-c64xp-linux.c): Likewise.
9617 * configure.srv: Add support for tic6x-*-uclinux.
9618 * linux-tic6x-low.c: New.
9619 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9620
78d85199
YQ
96212011-08-14 Andrew Stubbs <ams@codesourcery.com>
9622 Yao Qi <yao@codesourcery.com>
9623
9624 * target.h (struct target_ops): Add read_loadmap.
9625 * linux-low.c (struct target_loadseg): New type.
9626 (struct target_loadmap): New type.
9627 (linux_read_loadmap): New function.
9628 (linux_target_ops): Add linux_read_loadmap.
9629 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9630 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9631 to NULL.
78d85199 9632
a959a88d
EZ
96332011-08-05 Eli Zaretskii <eliz@gnu.org>
9634
9635 * win32-low.c: Include <stdint.h>.
9636
1ced966e
PA
96372011-07-22 Pedro Alves <pedro@codesourcery.com>
9638
9639 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9640 to the inferior here.
9641 (i386_remove_aligned_watchpoint): Ditto.
9642 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9643 fit part of the watchpoint in the debug registers.
9644 (i386_update_inferior_debug_regs): New.
9645 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9646 registers, and only update the inferior on success.
9647 (i386_low_remove_watchpoint): Ditto.
9648
d26e3629
KY
96492011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9650
9651 * linux-low.c (compare_ints, unique, list_threads, show_process,
9652 linux_core_of_thread): Delete.
9653 (linux_target_ops): Change linux_core_of_thread to
9654 linux_common_core_of_thread.
9655 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9656 * utils.c (malloc_failure): Change type of argument.
9657 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9658 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9659 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9660 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9661 (IPA_OBJS): Add common-utils-ipa.o.
9662 (ptid_h, linux_osdata_h): New macros.
9663 (server_h): Add common/common-utils.h, common/xml-utils.h,
9664 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9665 common/ptid.h.
9666 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9667 ptid.o, buffer.o): New rules.
9668 (linux-low.o): Add common/linux-osdata.h as a dependency.
9669 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9670 * configure.ac: Add AC_HEADER_DIRENT check.
9671 * config.in: Regenerate.
9672 * configure: Regenerate.
9673 * remote-utils.c (xml_escape_text): Delete.
9674 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9675 buffer_xml_printf): Move to common/buffer.c.
9676 * server.c (main): Remove call to initialize_inferiors.
9677 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9678 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9679 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9680 internal_error, gdb_assert, gdb_assert_fail): Delete.
9681 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9682 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9683 common/buffer.h.
9684 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9685 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9686 initialize_inferiors): Delete.
9687
2275a1a7
PA
96882011-07-20 Pedro Alves <pedro@codesourcery.com>
9689
9690 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9691 symbol error.
9692
0a5b1e09
PA
96932011-05-31 Pedro Alves <pedro@codesourcery.com>
9694
9695 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9696 assertion.
9697 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9698
6938fd34
YQ
96992011-05-26 Yao Qi <yao@codesourcery.com>
9700
9701 * Makefile.in (thread-db.o): Track dependence to
9702 common/gdb_thread_db.h.
9703 * thread-db.c: include gdb_thread_db.h from right place.
9704
b481f9e0
TT
97052011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9706
9707 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9708 __FILE__ and __LINE__ to internal_error.
9709
98a5dd13
DE
97102011-05-13 Doug Evans <dje@google.com>
9711
9712 * thread-db.c (try_thread_db_load_from_sdir): New function.
9713 (try_thread_db_load_from_dir): New function.
9714 (thread_db_load_search): Handle $sdir, ignore $pdir.
9715 Remove trying of system directories if search of
9716 libthread-db-search-path fails, that is now done via $sdir.
9717
d248b706
KY
97182011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9719
9720 * server.c (handle_query): Add EnableDisableTracepoints to the list
9721 of supported features.
43aaf8b6 9722 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9723 tracepoints.
43aaf8b6
PA
9724 (cmd_qtenable_disable): New.
9725 (cmd_qtstart): Install tracepoints even if disabled.
9726 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9727 receiving a QTEnable or QTDisable packet.
9728 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9729 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9730 tracepoints.
9731 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9732
84e578fb
DE
97332011-05-10 Doug Evans <dje@google.com>
9734
9735 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9736
71f55dd8
DE
97372011-05-04 Doug Evans <dje@google.com>
9738
9739 * linux-low.c (linux_join): Skip process lookup.
9740 * spu-low.c (spu_join): Ditto.
9741 * server.c (join_inferiors_callback): Delete.
9742 (process_serial_event): For 'D' packet (detach) call join_inferior
9743 directly.
9744
4d393d60
JM
97452011-05-04 Joseph Myers <joseph@codesourcery.com>
9746
9747 * README: Don't mention xscale*-*-linux*.
9748 * configure.srv (xscale*-*-linux*): Don't handle target.
9749
b00ad6ff
NF
97502011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9751
9752 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9753 casting pointers.
9754 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9755 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9756 (i386_emit_void_call_2): Likewise.
9757
af96c192
YQ
97582011-04-26 Yao Qi <yao@codesourcery.com>
9759
43aaf8b6
PA
9760 * linux-low.c: Move common macros to linux-ptrace.h.
9761 Include linux-ptrace.h.
af96c192
YQ
9762 * Makefile.in (linux_ptrace_h): New.
9763 (linux-low.o): Depends on linux-ptrace.h.
9764
03f2bd59
JK
97652011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9766
9767 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9768 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9769 (remote_prepare): New function with most of the TCP code from ...
9770 (remote_open): ... here. Detect PORT here unconditionally. Move also
9771 setting transport_is_reliable.
9772 * server.c (run_once): New variable.
9773 (gdbserver_usage): Document it.
9774 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9775 the first run if RUN_ONCE.
9776 * server.h (run_once, remote_prepare): New declarations.
9777
7a9dd1b2
TT
97782011-04-19 Tom Tromey <tromey@redhat.com>
9779
9780 * win32-low.c (handle_load_dll): Remove duplicate "the".
9781
81239425
PM
97822011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9783
9784 Remove support for old Cygwin 1.5 versions.
9785 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9786 function to avoid warning.
9787 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9788 warning.
9789
9e0627f1
PM
97902011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9791
9792 * gdbserver/server.h (Macro _): Define it if not available.
9793
588eebee
MS
97942011-03-14 Michael Snyder <msnyder@vmware.com>
9795
348af9f7 9796 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9797
43f70d4c
JB
97982011-03-10 Joel Brobecker <brobecker@adacore.com>
9799
9800 * Makefile.in (maintainer-clean realclean distclean): Remove
9801 "make ... subdir_do" command.
9802
348af9f7
MS
98032011-03-10 Michael Snyder <msnyder@vmware.com>
9804
9805 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9806
9807 * server.c (handle_v_run): Free alloced buffer on early return.
9808
e637a4f5
YQ
98092011-03-09 Yao Qi <yao@codesourcery.com>
9810
9811 Revert:
9812 2011-03-04 Yao Qi <yao@codesourcery.com>
9813
9814 * Makefile.in: Remove GNU make feature --directory.
9815
9816 2011-03-05 Yao Qi <yao@codesourcery.com>
9817
9818 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9819 (subdir_do): New make target. Copied from gdb/Makefile.
9820 (maintainer-clean, realclean, distclean, clean): Call corresponding
9821 make targets in common/Makefile.
9822
9823 2011-02-11 Yao Qi <yao@codesourcery.com>
9824
9825 * configure.ac: Call AC_PROG_RANLIB.
9826 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9827 * configure: Regenerate.
9828
e6edda56
JK
98292011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9830
9831 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9832
e5141119
JB
98332011-03-06 Yao Qi <yao@codesourcery.com>
9834
9835 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9836
64794aa4
JB
98372011-03-05 Yao Qi <yao@codesourcery.com>
9838
9839 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9840 (subdir_do): New make target. Copied from gdb/Makefile.
9841 (maintainer-clean, realclean, distclean, clean): Call corresponding
9842 make targets in common/Makefile.
9843
7a762829
YQ
98442011-03-04 Yao Qi <yao@codesourcery.com>
9845
9846 * Makefile.in: Remove GNU make feature --directory.
9847
348af9f7
MS
98482011-03-04 Michael Snyder <msnyder@vmware.com>
9849
9850 * server.c (queue_stop_reply): Call xmalloc not malloc.
9851
98522011-03-02 Michael Snyder <msnyder@vmware.com>
9853
9854 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9855
9f72fee2
MS
98562011-02-28 Michael Snyder <msnyder@vmware.com>
9857
588eebee
MS
9858 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9859 (cmd_qtframe): Ditto.
9860 (cmd_qtbuffer): Ditto.
9861 (cmd_bigqtbuffer): Ditto.
9862
9f72fee2
MS
9863 * utils.c (decimal2str): Initialize 'width' to nine, then
9864 don't mess with it.
9865
8040bd49
UW
98662011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9867
9868 * hostio.c (require_data): Free *data, not data.
9869
7e52cbd0
JK
98702011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9871
9872 * hostio.c (require_data): Use free, not xfree.
9873
9130f83e
MS
98742011-02-27 Michael Snyder <msnyder@vmware.com>
9875
4b812f4e
MS
9876 * server.c (handle_query): Discard unused value.
9877
9130f83e
MS
9878 * hostio.c (require_data): Free malloc memory before returning
9879 error.
9880
69d37113
MS
98812011-02-26 Michael Snyder <msnyder@vmware.com>
9882
9883 * linux-low.c (list_threads): Call closedir for dirent.
9884
35f5825a
MS
98852011-02-27 Michael Snyder <msnyder@vmware.com>
9886
2a589cef
MS
9887 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9888 a case statement falls through.
9889
0adea5f7
MS
9890 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9891
35f5825a
MS
9892 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9893 in comparison.
9894
238f1c74
MS
98952011-02-26 Michael Snyder <msnyder@vmware.com>
9896
9897 * utils.c (decimal2str): Eliminate dead code and dead param.
9898 (pulongest): Drop dead param from call to decimal2str.
9899 (plongest): Ditto.
9900
633ff500
JB
99012011-02-24 Joel Brobecker <brobecker@adacore.com>
9902
9903 Revert the following patch (not approved yet):
9904 2011-02-21 Hui Zhu <teawater@gmail.com>
9905 * tracepoint.c (tp_printf): New function.
9906 (eval_agent_expr): Handle gdb_agent_op_printf.
9907
f9c6ff72
HZ
99082011-02-21 Hui Zhu <teawater@gmail.com>
9909
9910 * tracepoint.c (tp_printf): New function.
9911 (eval_agent_expr): Handle gdb_agent_op_printf.
9912
94d5e490
TT
99132011-02-18 Tom Tromey <tromey@redhat.com>
9914
9915 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9916 (tracepoint.o): Likewise.
9917 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9918 (gdb_agent_op_names): Likewise.
9919
c7f96d2b
TT
99202011-02-18 Tom Tromey <tromey@redhat.com>
9921
9922 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9923 gdb_agent_op_rot>: New constants.
9924 (gdb_agent_op_names): Add pick and roll.
9925 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9926 cases.
9927
0feedb2c
JK
99282011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9929
9930 * aclocal.m4: Regenerated with aclocal-1.11.1.
9931
b3b9301e
PA
99322011-02-14 Pedro Alves <pedro@codesourcery.com>
9933
9934 * server.c (handle_qxfer_traceframe_info): New.
9935 (qxfer_packets): Register "traceframe-info".
9936 (handle_query): Report support for qXfer:traceframe-info:read+.
9937 * tracepoint.c (match_blocktype): New.
9938 (traceframe_find_block_type): Rename to ...
9939 (traceframe_walk_blocks): ... this. Add callback filter argument,
9940 and use it.
9941 (traceframe_find_block_type): New, reimplemented on top of
9942 traceframe_walk_blocks.
9943 (build_traceframe_info_xml): New.
9944 (traceframe_read_info): New.
9945 * server.h (traceframe_read_info): Declare.
9946
4f3e6fb7
YQ
99472011-02-11 Yao Qi <yao@codesourcery.com>
9948
9949 * configure.ac: Call AC_PROG_RANLIB.
9950 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9951 * configure: Regenerate.
9952
764880b7
PA
99532011-02-07 Pedro Alves <pedro@codesourcery.com>
9954
9955 * server.c (gdb_read_memory): Change return semantics to allow
9956 partial transfers.
9957 (handle_search_memory_1): Adjust.
9958 (process_serial_event) <'m' packet>: Handle partial transfers.
9959 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9960
1c79eb8a
PA
99612011-01-28 Pedro Alves <pedro@codesourcery.com>
9962
9963 * regcache.c (init_register_cache): Initialize
9964 regcache->register_status.
9965 (free_register_cache): Release regcache->register_status.
9966 (regcache_cpy): Copy register_status.
9967 (registers_to_string): Print 'x's for unavailable registers.
9968 (supply_register): Mark the register's status valid or
9969 unavailable, depending on whether a buffer was passed in or not.
9970 (supply_register_zeroed): New.
9971 (supply_regblock): Mark the registers' status valid or
9972 unavailable, depending on whether a buffer was passed in or not.
9973 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9974 (struct regcache): New `register_status' field.
9975 (supply_register_zeroed): Declare.
9976 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9977 supply_register_zeroed, rather than passing a NULL buffer to
9978 supply_register.
9979 * tracepoint.c (fetch_traceframe_registers): Update comment.
9980
85724a0e
PA
99812011-01-28 Pedro Alves <pedro@codesourcery.com>
9982
9983 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9984 buffer explicit.
9985
d08aafef
PA
99862011-01-25 Pedro Alves <pedro@codesourcery.com>
9987
9988 * server.h (decode_xfer_write): Change prototype.
9989 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9990 and don't extract the annex here.
9991 * server.c (decode_xfer_read): Remove `annex' parameter,
9992 and don't extract the annex here.
9993 (decode_xfer): New.
9994 (struct qxfer): New.
9995 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9996 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9997 (handle_qxfer_statictrace): New functions, abstracted out from
9998 handle_query, and made to use the struct qxfer interface.
9999 (handle_threads_qxfer_proper): Rename to ...
10000 (handle_qxfer_threads_proper): ... this.
10001 (handle_threads_qxfer): Rename to ...
10002 (handle_qxfer_threads): ... this. Adjust.
10003 (qxfer_packets): New array.
10004 (handle_qxfer): New function.
10005 (handle_query): Use handle_qxfer.
10006
493e2a69
MS
100072011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10008
10009 * gdbreplay.c: Shorten lines of >= 80 columns.
10010 * linux-low.c: Ditto.
10011 * linux-ppc-low.c: Ditto.
10012 * linux-s390-low.c: Ditto.
10013 * linux-sparc-low.c: Ditto.
10014 * linux-x86-low.c: Ditto.
10015 * linux-xtensa-low.c: Ditto.
10016 * mem-break.c: Ditto.
10017 * nto-low.c: Ditto.
10018 * regcache.h: Ditto.
10019 * remote-utils.c: Ditto.
10020 * server.c: Ditto.
10021 * server.h: Ditto.
10022 * thread-db.c: Ditto.
10023 * tracepoint.c: Ditto.
10024 * utils.c: Ditto.
10025 * win32-low.h: Ditto.
10026
44944448
JB
100272011-01-05 Joel Brobecker <brobecker@adacore.com>
10028
10029 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10030 update.
10031
71ce852c
JB
100322011-01-01 Joel Brobecker <brobecker@adacore.com>
10033
10034 * server.c (gdbserver_version): Update copyright year in version
10035 output.
10036 * gdbreplay.c (gdbreplay_version): Ditto.
10037
eb826dc6
MF
100382010-12-29 Jie Zhang <jie.zhang@analog.com>
10039
10040 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10041 * linux-bfin-low.c: New file.
10042 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10043 PT_DATA_ADDR for BFIN targets.
10044 * Makefile.in (SFILES): Add linux-bfin-low.c.
10045 (clean): Remove reg-bfin.c.
10046 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10047 * README: Mention supported Blackfin targets.
10048
39ab222a
MF
100492010-12-23 Mike Frysinger <vapier@gentoo.org>
10050
10051 * .gitignore: New file.
10052
a1f2ce7d
MF
100532010-11-16 Mike Frysinger <vapier@gentoo.org>
10054
10055 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10056
f474844c
JZ
100572010-10-22 Jie Zhang <jie@codesourcery.com>
10058
10059 * Makefile.in: Add FLAGS_TO_PASS variable.
10060 (install): Remove dependency of install-only and recursively
10061 invoke make for install-only.
10062
f1048712
DE
100632010-10-04 Doug Evans <dje@google.com>
10064
10065 * Makefile.in (uninstall): Use $(DESTDIR).
10066
b53a1623
PA
100672010-09-24 Pedro Alves <pedro@codesourcery.com>
10068
e6ee044d
PA
10069 PR gdb/11842
10070
b53a1623
PA
10071 * linux-x86-low.c (compat_siginfo_from_siginfo)
10072 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10073 si_code is < 0. Check for si_code == SI_TIMER before checking for
10074 si_code < 0.
10075
fa1bd1e4
JB
100762010-09-13 Joel Brobecker <brobecker@adacore.com>
10077
10078 * lynx-i386-low.c: New file.
10079 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10080
47fac8f8
JB
100812010-09-13 Joel Brobecker <brobecker@adacore.com>
10082
10083 * lynx-low.c (ptrace_request_to_str): Remove handling for
10084 request values that have been removed in LynxOS 5.x.
10085
1adfc54d
JB
100862010-09-13 Joel Brobecker <brobecker@adacore.com>
10087
10088 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10089 <ptrace.h>
10090
c2a66c29
NS
100912010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10092
10093 * configure.ac: Add --enable-inprocess-agent option.
10094 * configure: Rebuilt.
10095
32fcada3
YQ
100962010-09-06 Yao Qi <yao@codesourcery.com>
10097
10098 * linux-low.c (linux_kill): Remove unused variable.
10099 (linux_stabilize_threads): Likewise.
10100 * server.c (start_inferior): Likewise.
10101 (queue_stop_reply_callback): Likewise.
10102 * tracepoint.c (do_action_at_tracepoint): Likewise.
10103
0cccb683
YQ
101042010-09-06 Yao Qi <yao@codesourcery.com>
10105
10106 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10107 on return.
10108
423ec54c
JK
101092010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10110
10111 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10112
12ac6819
PA
101132010-09-06 Pedro Alves <pedro@codesourcery.com>
10114
10115 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10116 "$(IPA_DEPFILES)".
10117
8ed54b31
JB
101182010-09-01 Joel Brobecker <brobecker@adacore.com>
10119
10120 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10121 gdbserver/lynx-ppc-low.c: New files.
10122 * Makefile.in (lynx_low_h): New variable.
10123 (lynx-low.o, lynx-ppc-low.o): New rules.
10124 * configure.ac: On LynxOS, link with -lnetinet.
10125 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10126 * configure: regenerate.
10127
bb0116a4
JB
101282010-09-01 Joel Brobecker <brobecker@adacore.com>
10129
10130 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10131 * configure.ac: Add check for vasprintf and vsnprintf.
10132 * configure, config.in: Regenerate.
10133 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10134
a778ab81 101352010-09-01 Joel Brobecker <brobecker@adacore.com>
10136
10137 * gdbreplay.c: Move include of alloca.h up, next to include of
10138 malloc.h.
10139 * server.h: Add include of malloc.h.
10140 * mem-break.c: Remove include of malloc.h.
10141 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10142
8b034a19 101432010-09-01 Joel Brobecker <brobecker@adacore.com>
10144
10145 * Makefile.in (memmem.o): Build with -Wno-error.
10146
101472010-09-01 Joel Brobecker <brobecker@adacore.com>
10148
10149 * utils.c (xsnprintf): Make non-static.
10150 * server.h: Add xsnprintf declaration.
10151 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10152 replace calls to snprintf by calls to xsnprintf throughout.
10153
101542010-09-01 Joel Brobecker <brobecker@adacore.com>
10155
10156 * configure.ac: Add configure check for alloca.
10157 * configure, config.in: Regenerate.
10158 * server.h: Include alloca.h if it exists.
10159 * gdbreplay.c: Include alloca.h if it exists.
10160
1a981360
PA
101612010-08-28 Pedro Alves <pedro@codesourcery.com>
10162
10163 * linux-low.c (__SIGRTMIN): Define if not already defined.
10164 (linux_create_inferior): Check for __ANDROID__ rather than
10165 __SIGRTMIN.
10166 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10167 are already deferred.
10168 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10169 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10170 stopped and already has a pending signal to report.
10171 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10172 a pending signal to report or is moving out of a jump pad.
10173 (linux_init_signals): Check for __ANDROID__ rather than
10174 __SIGRTMIN.
10175
b4d51a55
PA
101762010-08-28 Pedro Alves <pedro@codesourcery.com>
10177
10178 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10179 debug_threads check. Avoid a linear search when not doing debug
10180 output.
10181
ec48365d
PA
101822010-08-27 Pedro Alves <pedro@codesourcery.com>
10183
10184 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10185 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10186 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10187 (process_event): Change local fd's type to gdb_fildes_t.
10188 (create_file_handler): Adjust prototype.
10189 (delete_file_handler): Adjust prototype.
10190 (handle_file_event): Adjust prototype. Use pfildes.
10191 (create_file_event): Adjsut prototype.
10192 * remote-utils.c (remote_desc, listen_desc): Change type to
10193 gdb_fildes_t.
10194 * server.h: New gdb_fildes_t typedef.
10195 [USE_WIN32API]: Include winsock2.h.
10196 (delete_file_handler, add_file_handler): Adjust prototypes.
10197 (pfildes): Declare.
10198 * utils.c (pfildes): New.
10199
854d88f0
PA
102002010-08-27 Pedro Alves <pedro@codesourcery.com>
10201
10202 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10203 * configure: Regenerate.
10204
0146f85b
PA
102052010-08-27 Pedro Alves <pedro@codesourcery.com>
10206
10207 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10208 (linux_done_accessing_memory): ... this.
10209 (linux_target_ops): Adjust.
10210 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10211 * nto-low.c (nto_target_ops): Adjust comment.
10212 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10213 * spu-low.c (spu_target_ops): Adjust comment.
10214 * target.h (target_ops): Rename unprepare_to_access_memory field
10215 to done_accessing_memory.
10216 (unprepare_to_access_memory): Rename to ...
10217 (done_accessing_memory): ... this.
10218
90d74c30
PA
102192010-08-26 Pedro Alves <pedro@codesourcery.com>
10220
10221 * linux-low.c (linux_prepare_to_access_memory): New.
10222 (linux_unprepare_to_access_memory): New.
10223 (linux_target_ops): Install them.
10224 * server.c (read_memory): Rename to ...
10225 (gdb_read_memory): ... this. Use
10226 prepare_to_access_memory/prepare_to_access_memory.
10227 (write_memory): Rename to ...
10228 (gdb_write_memory): ... this. Use
10229 prepare_to_access_memory/prepare_to_access_memory.
10230 (handle_search_memory_1): Adjust.
10231 (process_serial_event): Adjust.
10232 * target.h (struct target_ops): New fields
10233 prepare_to_access_memory and unprepare_to_access_memory.
10234 (prepare_to_access_memory, unprepare_to_access_memory): New.
10235 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10236 prepare_to_access_memory/prepare_to_access_memory.
10237 * nto-low.c (nto_target_ops): Adjust.
10238 * spu-low.c (spu_target_ops): Adjust.
10239 * win32-low.c (win32_target_ops): Adjust.
10240
fd467969
PA
102412010-08-26 Pedro Alves <pedro@codesourcery.com>
10242
10243 * Makefile.in (WARN_CFLAGS): Get it from configure.
10244 (WERROR_CFLAGS): New.
10245 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10246 * configure.ac: Introduce --enable-werror, which adds -Werror to
10247 the compiler command line. Enabled by default. Disable with
10248 --disable-werror. Add -Wdeclaration-after-statement
10249 Wpointer-arith and -Wformat-nonliteral to warning flags.
10250 * configure: Regenerate.
10251
331e2f5f
PA
102522010-08-26 Pedro Alves <pedro@codesourcery.com>
10253
10254 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10255
e581f2b4
PA
102562010-08-26 Pedro Alves <pedro@codesourcery.com>
10257
10258 * gdbreplay.c (remote_error): New.
10259 (gdbchar): New.
10260 (expect): Use gdbchar. Check for error reading from GDB.
10261 Clarify sync error output.
10262 (play): Check for errors writing to GDB.
10263 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10264 * remote-utils.c (getpkt): Check for errors writing to the remote
10265 descriptor.
10266
3c11dd79
PA
102672010-08-25 Pedro Alves <pedro@codesourcery.com>
10268
10269 * linux-low.c (linux_wait_1): Move non-debugging code out of
10270 `debug_threads' control.
10271
d20a8ad9
PA
102722010-08-25 Pedro Alves <pedro@codesourcery.com>
10273
10274 * linux-low.c (linux_wait_1): Don't set last_status here.
10275 * server.c (push_event, queue_stop_reply_callback): Assert we're
10276 not pushing a TARGET_WAITKIND_IGNORE event.
10277 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10278 (myresume, handle_target_event): Set the thread's last_resume_kind
10279 and last_status from the target returned status.
10280
964e4306
PA
102812010-08-25 Pedro Alves <pedro@codesourcery.com>
10282
10283 PR threads/10729
10284
10285 * linux-x86-low.c (update_debug_registers_callback): New.
10286 (i386_dr_low_set_addr): Use it.
10287 (i386_dr_low_get_addr): New.
10288 (i386_dr_low_set_control): Use update_debug_registers_callback.
10289 (i386_dr_low_get_control): New.
10290 (i386_dr_low_get_status): Adjust.
10291 * linux-low.c (linux_stop_lwp): New.
10292 * linux-low.h (linux_stop_lwp): Declare.
10293
10294 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10295 argument instead of a i386_debug_reg_state.
10296 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10297 a i386_debug_reg_state.
10298 (i386_insert_aligned_watchpoint): Adjust.
10299 (i386_remove_aligned_watchpoint): Adjust.
10300 (i386_low_stopped_data_address): Read the debug registers from the
10301 inferior instead of from the mirrors.
10302 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10303 (i386_dr_low_get_addr): Declare.
10304 (i386_dr_low_get_control): Declare.
10305 (i386_dr_low_get_status): Change prototype.
10306
10307 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10308 (i386_dr_low_get_addr): New.
10309 (i386_dr_low_get_control): New.
10310 (i386_dr_low_get_status): Adjust prototype. Return
10311 dr_status_mirror.
10312 (i386_initial_stuff): Clear dr_status_mirror and
10313 dr_control_mirror.
10314 (i386_get_thread_context): Adjust.
10315 (i386_set_thread_context): Adjust.
10316 (i386_thread_added): Adjust.
10317
5f21a75b
PA
103182010-08-24 Pedro Alves <pedro@codesourcery.com>
10319
10320 * linux-low.h (linux_thread_area): Delete declaration.
10321
3e4c1235
TS
103222010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10323
10324 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10325 after its termination.
10326
1971b033
PA
103272010-08-09 Pedro Alves <pedro@codesourcery.com>
10328
10329 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10330 (gdb_wants_all_stopped): Delete.
10331 (linux_wait_1): Don't call them.
10332 * server.c (handle_v_cont): Tag all threads as want-stopped.
10333 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10334 stopped as "client-wants-stopped".
10335
310444ac
PA
103362010-07-31 Pedro Alves <pedro@codesourcery.com>
10337
10338 * Makefile.in (signals_h): New.
10339 (server_h): Depend on it.
10340 (server.o): Don't depend on $(signals_def).
10341 (signals.o): Depend on $(signals_def).
10342
a19cae16
JK
103432010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10344
10345 * Makefile.in (signals_def): New.
10346 (server_h): Append include/gdb/signals.h and signals_def.
10347 (server.o): Append signals_def.
10348
30d50328
JK
103492010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10350
10351 * server.c (handle_target_event): Use target_signal_to_host for
10352 resume_info.sig initialization.
10353 * target.h (struct thread_resume) <sig>: New comment.
10354
5c3216e2
OS
103552010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10356
c6f46ca0
OS
10357 * server.c (handle_query): strcpy() the returned string from paddress()
10358 instead of sprintf().
5c3216e2
OS
10359 * utils.c (paddress): Return phex_nz().
10360
6bd31874
JB
103612010-07-07 Joel Brobecker <brobecker@adacore.com>
10362
10363 * server.c (handle_v_cont): Call mourn_inferior if process
10364 just exited.
10365 (myresume): Likewise.
10366
0fb4aa4b
PA
103672010-07-01 Pedro Alves <pedro@codesourcery.com>
10368
10369 Static tracepoints, and integration with UST.
10370
10371 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10372 * mem-break.c (uninsert_all_breakpoints)
10373 (reinsert_all_breakpoints): New.
10374 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10375 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10376 (gdb_agent_ust_loaded, helper_thread_id)
10377 (gdb_agent_helper_thread_id): New macros.
10378 (struct ipa_sym_addresses): Add addr_ust_loaded,
10379 addr_helper_thread_id, addr_cmd_buf.
10380 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10381 (in_process_agent_loaded_ust): New.
10382 (write_e_ust_not_loaded): New.
10383 (maybe_write_ipa_ust_not_loaded): New.
10384 (struct collect_static_trace_data_action): New.
10385 (enum tracepoint_type) <static_tracepoint>: New.
10386 (struct tracepoint) <handle>: Mention static tracepoints.
10387 (struct static_tracepoint_ctx): New.
10388 (CMD_BUF_SIZE): New.
10389 (add_tracepoint_action): Handle static tracepoint actions.
10390 (unprobe_marker_at): New.
10391 (clear_installed_tracepoints): Handle static tracepoints.
10392 (cmd_qtdp): Handle static tracepoints.
10393 (probe_marker_at): New.
10394 (cmd_qtstart): Handle static tracepoints.
10395 (response_tracepoint): Handle static tracepoints.
10396 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10397 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10398 (get_context_regcache): Handle static tracepoints.
10399 (do_action_at_tracepoint): Handle static tracepoint actions.
10400 (traceframe_find_block_type): Handle static trace data blocks.
10401 (traceframe_read_sdata): New.
10402 (download_tracepoints): Download static tracepoint actions.
10403 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10404 (GDB_PROBE_NAME): New.
10405 (ust_ops): New.
10406 (GET_UST_SYM): New.
10407 (USTF): New.
10408 (dlsym_ust): New.
10409 (ust_marker_to_static_tracepoint): New.
10410 (gdb_probe): New.
10411 (collect_ust_data_at_tracepoint): New.
10412 (gdb_ust_probe): New.
10413 (UNIX_PATH_MAX, SOCK_DIR): New.
10414 (gdb_ust_connect_sync_socket): New.
10415 (resume_thread, stop_thread): New.
10416 (run_inferior_command): New.
10417 (init_named_socket): New.
10418 (gdb_ust_socket_init): New.
10419 (cstr_to_hexstr): New.
10420 (next_st): New.
10421 (first_marker, next_marker): New.
10422 (response_ust_marker): New.
10423 (cmd_qtfstm, cmd_qtsstm): New.
10424 (unprobe_marker_at, probe_marker_at): New.
10425 (cmd_qtstmat, gdb_ust_thread): New.
10426 (gdb_ust_init): New.
10427 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10428 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10429 (ST_REGENTRY): New.
10430 (x86_64_st_collect_regmap): New.
10431 (X86_64_NUM_ST_COLLECT_GREGS): New.
10432 (AMD64_RIP_REGNUM): New.
10433 (supply_static_tracepoint_registers): New.
10434 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10435 (ST_REGENTRY): New.
10436 (i386_st_collect_regmap): New.
10437 (i386_NUM_ST_COLLECT_GREGS): New.
10438 (supply_static_tracepoint_registers): New.
10439 * server.c (handle_query): Handle qXfer:statictrace:read.
10440 <qSupported>: Report support for StaticTracepoints, and
10441 qXfer:statictrace:read features.
10442 * server.h (traceframe_read_sdata)
10443 (supply_static_tracepoint_registers): Declare.
10444 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10445 (unpack_varlen_hex): Include in IPA build.
10446 * Makefile.in (ustlibs, ustinc): New.
10447 (IPA_OBJS): Add remote-utils-ipa.o.
10448 ($(IPA_LIB)): Link -ldl and -lpthread.
10449 (UST_CFLAGS): New.
10450 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10451 * config.in, configure: Regenerate.
10452
9e4344e5
PA
104532010-06-20 Ian Lance Taylor <iant@google.com>
10454 Pedro Alves <pedro@codesourcery.com>
10455
10456 * linux-x86-low.c (always_true): Delete.
10457 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10458 trying to fool the compiler with always_true.
10459
c6beb2cb
PA
104602010-06-20 Pedro Alves <pedro@codesourcery.com>
10461
10462 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10463 conditions in gdbserver.
10464
d2ed6730
UW
104652010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10466
10467 * spu-low.c (spu_read_memory): Wrap around local store limit.
10468 (spu_write_memory): Likewise.
10469
4e29fb54
PA
104702010-06-15 Pedro Alves <pedro@codesourcery.com>
10471
10472 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10473 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10474 LONGEST uses.
10475 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10476 uses.
10477 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10478 uses with LONGEST uses.
10479
6a271cae
PA
104802010-06-14 Stan Shebs <stan@codesourcery.com>
10481 Pedro Alves <pedro@codesourcery.com>
10482
10483 Bytecode compiler.
10484
10485 * linux-x86-low.c: Include limits.h.
10486 (add_insns): New.
10487 (always_true): New.
10488 (EMIT_ASM): New.
10489 (EMIT_ASM32): New.
10490 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10491 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10492 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10493 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10494 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10495 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10496 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10497 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10498 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10499 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10500 (amd64_emit_void_call_2): New.
10501 (amd64_emit_ops): New.
10502 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10503 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10504 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10505 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10506 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10507 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10508 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10509 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10510 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10511 (i386_emit_stack_adjust, i386_emit_int_call_1)
10512 (i386_emit_void_call_2): New.
10513 (i386_emit_ops): New.
10514 (x86_emit_ops): New.
10515 (the_low_target): Install x86_emit_ops.
10516 * server.h (struct emit_ops): New.
10517 (get_raw_reg_func_addr): Declare.
10518 (current_insn_ptr, emit_error): Declare.
10519 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10520 (set_trace_state_variable_value): New defines.
10521 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10522 addr_get_trace_state_variable_value and
10523 addr_set_trace_state_variable_value.
10524 (symbol_list): New fields for get_raw_reg,
10525 get_trace_state_variable_value and set_trace_state_variable_value.
10526 (condfn): New typedef.
10527 (struct tracepoint): New field `compiled_cond'.
10528 (do_action_at_tracepoint): Clear compiled_cond.
10529 (get_trace_state_variable_value, set_trace_state_variable_value):
10530 Export in the IPA.
10531 (condition_true_at_tracepoint): If there's a compiled condition,
10532 run that.
10533 (current_insn_ptr, emit_error): New globals.
10534 (struct bytecode_address): New.
10535 (get_raw_reg_func_addr): New.
10536 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10537 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10538 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10539 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10540 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10541 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10542 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10543 (compile_tracepoint_condition, compile_bytecodes): New.
10544 * target.h (emit_ops): Forward declare.
10545 (struct target_ops): New field emit_ops.
10546 (target_emit_ops): New.
10547 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10548 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10549 * linux-low.c (linux_emit_ops): New.
10550 (linux_target_ops): Install it.
10551 * linux-low.h (struct linux_target_ops): New field emit_ops.
10552
92b72907
UW
105532010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10554
10555 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10556 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10557
fa593d66
PA
105582010-06-01 Pedro Alves <pedro@codesourcery.com>
10559 Stan Shebs <stan@codesourcery.com>
10560
10561 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10562 (all): Depend on $(extra_libraries).
10563 (install-only): Install the IPA.
10564 (IPA_OBJS, IPA_LIB): New.
10565 (clean): Remove the IPA lib.
10566 (IPAGENT_CFLAGS): New.
10567 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10568 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10569 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10570 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10571 * configure.ac: Check for atomic builtins support in the compiler.
10572 (IPA_DEPFILES, extra_libraries): Define.
10573 * configure.srv (ipa_obj): Add description.
10574 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10575 (i[34567]86-*-linux*): Set ipa_obj.
10576 (x86_64-*-linux*): Set ipa_obj.
10577 * linux-low.c (stabilizing_threads): New.
10578 (supports_fast_tracepoints): New.
10579 (linux_detach): Stabilize threads before detaching.
10580 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10581 the lwp is either not stabilizing, or is moving out of a jump pad.
10582 (linux_fast_tracepoint_collecting): New.
10583 (maybe_move_out_of_jump_pad): New.
10584 (enqueue_one_deferred_signal): New.
10585 (dequeue_one_deferred_signal): New.
10586 (linux_wait_for_event_1): If moving out of a jump pad, defer
10587 pending signals to later.
10588 (linux_stabilize_threads): New.
10589 (linux_wait_1): Check if threads need moving out of jump pads, and
10590 do it if so.
10591 (stuck_in_jump_pad_callback): New.
10592 (move_out_of_jump_pad_callback): New.
10593 (lwp_running): New.
10594 (linux_resume_one_lwp): Handle moving out of jump pads.
10595 (linux_set_resume_request): Dequeue deferred signals.
10596 (need_step_over_p): Also step over fast tracepoint jumps.
10597 (start_step_over): Also uninsert fast tracepoint jumps.
10598 (finish_step_over): Also reinsert fast tracepoint jumps.
10599 (linux_install_fast_tracepoint_jump): New.
10600 (linux_target_ops): Install linux_stabilize_threads and
10601 linux_install_fast_tracepoint_jump_pad.
10602 * linux-low.h (linux_target_ops) <get_thread_area,
10603 install_fast_tracepoint_jump_pad>: New fields.
10604 (struct lwp_info) <collecting_fast_tracepoint,
10605 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10606 (linux_get_thread_area): Declare.
10607 * linux-x86-low.c (jump_insn): New.
10608 (x86_get_thread_area): New.
10609 (append_insns): New.
10610 (push_opcode): New.
10611 (amd64_install_fast_tracepoint_jump_pad): New.
10612 (i386_install_fast_tracepoint_jump_pad): New.
10613 (x86_install_fast_tracepoint_jump_pad): New.
10614 (the_low_target): Install x86_get_thread_area and
10615 x86_install_fast_tracepoint_jump_pad.
10616 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10617 (struct fast_tracepoint_jump): New.
10618 (fast_tracepoint_jump_insn): New.
10619 (fast_tracepoint_jump_shadow): New.
10620 (find_fast_tracepoint_jump_at): New.
10621 (fast_tracepoint_jump_here): New.
10622 (delete_fast_tracepoint_jump): New.
10623 (set_fast_tracepoint_jump): New.
10624 (uninsert_fast_tracepoint_jumps_at): New.
10625 (reinsert_fast_tracepoint_jumps_at): New.
10626 (set_breakpoint_at): Use write_inferior_memory.
10627 (uninsert_raw_breakpoint): Use write_inferior_memory.
10628 (check_mem_read): Mask out fast tracepoint jumps.
10629 (check_mem_write): Mask out fast tracepoint jumps.
10630 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10631 (set_fast_tracepoint_jump): Declare.
10632 (delete_fast_tracepoint_jump)
10633 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10634 (reinsert_fast_tracepoint_jumps_at): Declare.
10635 * regcache.c: Don't compile many functions when building the
10636 in-process agent library.
10637 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10638 the register buffer in the heap.
10639 (free_register_cache): If the register buffer isn't owned by the
10640 regcache, don't free it.
10641 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10642 pre-existing register caches.
10643 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10644 type.
10645 (convert_ascii_to_int): : Constify `from' parameter type.
10646 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10647 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10648 the needed buffer in-place.
10649 (relocate_instruction): New.
10650 * server.c (handle_query) <qSymbols>: If the target supports
10651 tracepoints, give it a chance of looking up symbols. Report
10652 support for fast tracepoints.
10653 (handle_status): Stabilize threads.
10654 (process_serial_event): Adjust.
10655 * server.h (struct fast_tracepoint_jump): Forward declare.
10656 (struct process_info) <fast_tracepoint_jumps>: New field.
10657 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10658 (decode_X_packet, decode_M_packet): Adjust.
10659 (relocate_instruction): Declare.
10660 (in_process_agent_loaded): Declare.
10661 (tracepoint_look_up_symbols): Declare.
10662 (struct fast_tpoint_collect_status): Declare.
10663 (fast_tracepoint_collecting): Declare.
10664 (force_unlock_trace_buffer): Declare.
10665 (handle_tracepoint_bkpts): Declare.
10666 (initialize_low_tracepoint)
10667 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10668 * target.h (struct target_ops) <stabilize_threads,
10669 install_fast_tracepoint_jump_pad>: New fields.
10670 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10671 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10672 [HAVE_STDINT_H]: Include stdint.h.
10673 (trace_debug_1): Rename to ...
10674 (trace_vdebug): ... this.
10675 (trace_debug): Rename to ...
10676 (trace_debug_1): ... this. Add `level' parameter.
10677 (trace_debug): New.
10678 (ATTR_USED, ATTR_NOINLINE): New.
10679 (IP_AGENT_EXPORT): New.
10680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10681 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10682 (about_to_request_buffer_space, trace_buffer_is_full)
10683 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10684 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10685 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10686 (traceframe_write_count, traceframes_created)
10687 (trace_state_variables)
10688 New renaming defines.
10689 (struct ipa_sym_addresses): New.
10690 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10691 (symbol_list): New.
10692 (ipa_sym_addrs): New.
10693 (all_tracepoint_symbols_looked_up): New.
10694 (in_process_agent_loaded): New.
10695 (write_e_ipa_not_loaded): New.
10696 (maybe_write_ipa_not_loaded): New.
10697 (tracepoint_look_up_symbols): New.
10698 (debug_threads) [IN_PROCESS_AGENT]: New.
10699 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10700 (UNKNOWN_SIDE_EFFECTS): New.
10701 (stop_tracing): New.
10702 (flush_trace_buffer): New.
10703 (stop_tracing_bkpt): New.
10704 (flush_trace_buffer_bkpt): New.
10705 (read_inferior_integer): New.
10706 (read_inferior_uinteger): New.
10707 (read_inferior_data_pointer): New.
10708 (write_inferior_data_pointer): New.
10709 (write_inferior_integer): New.
10710 (write_inferior_uinteger): New.
10711 (struct collect_static_trace_data_action): Delete.
10712 (enum tracepoint_type): New.
10713 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10714 <actions_str, step_actions, step_actions_str>: Only include in
10715 GDBserver.
fa593d66
PA
10716 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10717 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10718 (tracepoints): Use IP_AGENT_EXPORT.
10719 (last_tracepoint): Don't include in the IPA.
10720 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10721 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10722 (alloced_trace_state_variables): New.
10723 (trace_state_variables): Use IP_AGENT_EXPORT.
10724 (traceframe_t): Delete unused variable.
10725 (circular_trace_buffer): Don't include in the IPA.
10726 (trace_buffer_start): Delete.
10727 (struct trace_buffer_control): New.
10728 (trace_buffer_free): Delete.
10729 (struct ipa_trace_buffer_control): New.
10730 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10731 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10732 New.
10733 (trace_buffer_ctrl): New.
10734 (TRACE_BUFFER_CTRL_CURR): New.
10735 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10736 Reimplement as macros.
10737 (trace_buffer_wrap): Delete.
10738 (traceframe_write_count, traceframe_read_count)
10739 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10740 (struct tracepoint_hit_ctx) <type>: New field.
10741 (struct fast_tracepoint_ctx): New.
10742 (memory_barrier): New.
10743 (cmpxchg): New.
10744 (record_tracepoint_error): Update atomically in the IPA.
10745 (clear_inferior_trace_buffer): New.
10746 (about_to_request_buffer_space): New.
10747 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10748 updating the same buffer.
10749 (add_tracepoint): Default the tracepoint's type to trap
10750 tracepoint, and orig_size to -1.
10751 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10752 internal variables.
10753 (create_trace_state_variable): New parameter `gdb'. Handle it.
10754 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10755 (cmd_qtdp): Handle fast tracepoints.
10756 (cmd_qtdv): Adjust.
10757 (max_jump_pad_size): New.
10758 (gdb_jump_pad_head): New.
10759 (get_jump_space_head): New.
10760 (claim_jump_space): New.
10761 (sort_tracepoints): New.
10762 (MAX_JUMP_SIZE): New.
10763 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10764 IPA.
10765 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10766 support. Upload fast traceframes, and delete internal IPA
10767 breakpoints.
10768 (stop_tracing_handler): New.
10769 (flush_trace_buffer_handler): New.
10770 (cmd_qtstop): Upload fast tracepoints.
10771 (response_tracepoint): Handle fast tracepoints.
10772 (tracepoint_finished_step): Upload fast traceframes. Set the
10773 tracepoint hit context's tracepoint type.
10774 (handle_tracepoint_bkpts): New.
10775 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10776 type. Add comment about fast tracepoints.
10777 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10778 non-existing action_str field.
10779 (get_context_regcache): Handle fast tracepoints.
10780 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10781 to the regcache.
10782 (fast_tracepoint_from_jump_pad_address): New.
10783 (fast_tracepoint_from_ipa_tpoint_address): New.
10784 (collecting_t): New.
10785 (force_unlock_trace_buffer): New.
10786 (fast_tracepoint_collecting): New.
10787 (collecting): New.
10788 (gdb_collect): New.
10789 (write_inferior_data_ptr): New.
10790 (target_tp_heap): New.
10791 (target_malloc): New.
10792 (download_agent_expr): New.
10793 (UALIGN): New.
10794 (download_tracepoints): New.
10795 (download_trace_state_variables): New.
10796 (upload_fast_traceframes): New.
10797 (IPA_FIRST_TRACEFRAME): New.
10798 (IPA_NEXT_TRACEFRAME_1): New.
10799 (IPA_NEXT_TRACEFRAME): New.
10800 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10801 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10802 (gdb_jump_pad_buffer_end): New.
10803 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10804 (initialize_tracepoint): Adjust.
10805 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10806 buffer. Initialize the low module.
10807 * utils.c (PREFIX, TOOLNAME): New.
10808 (malloc_failure): Use PREFIX.
10809 (error): In the IPA, an error causes an exit.
10810 (fatal, warning): Use PREFIX.
10811 (internal_error): Use TOOLNAME.
10812 (NUMCELLS): Increase to 10.
10813 * configure, config.in: Regenerate.
10814
d149dd1d
PA
108152010-06-01 Pedro Alves <pedro@codesourcery.com>
10816
10817 * server.c (handle_query) <qSupported>: Do two passes over the
10818 qSupported string to avoid nesting strtok.
10819
f6528abd
JK
108202010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10821
10822 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10823 (CDEPS): New.
10824 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10825 -Wl,--dynamic-list.
10826 * configure: Regenerate.
10827 * proc-service.list: New.
10828
ca2a87a0
JK
108292010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10830
10831 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10832 New comment.
10833
363a6e9f
OS
108342010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10835
10836 * gdbreplay.c (remote_open): Check error return from socket() call by
10837 its equality to -1 not by it being negative.
10838 * remote-utils.c (remote_open): Likewise.
10839
d23b6cb1
PA
108402010-05-23 Pedro Alves <pedro@codesourcery.com>
10841
10842 * config.h: Regenerate.
10843
28d3cf85
MK
108442010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10845
10846 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10847 doesn't provide PTRACE_GET_THREAD_AREA.
10848
fea36a59
MK
108492010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10850
10851 * linux-m68k-low.c: Include <asm/ptrace.h>
10852 (ps_get_thread_area): Implement.
10853
24b066ba
DE
108542010-05-03 Doug Evans <dje@google.com>
10855
10856 * event-loop.c (struct callback_event): New struct.
10857 (callback_list): New global.
10858 (append_callback_event, delete_callback_event): New functions.
10859 (process_callback): New function.
10860 (start_event_loop): Call it.
10861 * remote-utils.c (NOT_SCHEDULED): Define.
10862 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10863 moved out of readchar.
10864 (readchar): Rewrite. Call reschedule before returning.
10865 (reset_readchar): New function.
10866 (remote_close): Call it.
10867 (process_remaining, reschedule): New functions.
10868 * server.h (callback_handler_func): New typedef.
10869 (append_callback_event, delete_callback_event): Declare.
10870
9836d6ea
PA
108712010-05-03 Pedro Alves <pedro@codesourcery.com>
10872
10873 * proc-service.c (ps_pglobal_lookup): Use
10874 thread_db_look_up_one_symbol.
10875 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10876 parameter. Use it instead of all_symbols_looked_up.
10877 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10878 field.
10879 (all_symbols_looked_up): Don't declare.
10880 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10881 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10882 field.
10883 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10884 Set all_symbols_looked_up here.
10885 (thread_db_look_up_one_symbol): New.
10886 (thread_db_get_tls_address): Adjust.
10887 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10888 thread_db object on the heap, and tentatively set it in the
10889 process structure.
10890 (thread_db_init): Don't set all_symbols_looked_up here.
10891 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10892
7984d532
PA
108932010-05-03 Pedro Alves <pedro@codesourcery.com>
10894
10895 * linux-low.c (linux_kill, linux_detach): Adjust.
10896 (status_pending_p_callback): Remove redundant statement. Check
10897 for !TARGET_WAITIKIND_IGNORE, instead of
10898 TARGET_WAITKIND_STOPPED.
10899 (handle_tracepoints): Make sure LWP is locked. Adjust.
10900 (linux_wait_for_event_1): Adjust.
10901 (linux_cancel_breakpoints): New.
10902 (unsuspend_one_lwp): New.
10903 (unsuspend_all_lwps): New.
10904 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10905 (send_sigstop_callback): Change return type to int, add new
10906 `except' parameter and handle it.
10907 (suspend_and_send_sigstop_callback): New.
10908 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10909 pass them down. If SUSPEND, also increment the lwp's suspend
10910 count.
10911 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10912 (need_step_over_p): Don't consider suspended LWPs.
10913 (start_step_over): Adjust.
10914 (proceed_one_lwp): Change return type to int, add new `except'
10915 parameter and handle it.
10916 (unsuspend_and_proceed_one_lwp): New.
10917 (proceed_all_lwps): Use find_inferior instead of
10918 for_each_inferior.
10919 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10920 also decrement the suspend count of LWPs. Pass `except' down,
10921 instead of hacking its suspend count.
10922 (linux_pause_all): Add `freeze' parameter. Adjust.
10923 (linux_unpause_all): New.
10924 (linux_target_ops): Install linux_unpause_all.
10925 * server.c (handle_status): Adjust.
10926 * target.h (struct target_ops): New fields `unpause_all' and
10927 `cancel_breakpoints'. Add new parameter to `pause_all'.
10928 (pause_all): Add new `freeze' parameter.
10929 (unpause_all): New.
10930 (cancel_breakpoints): New.
10931 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10932 cancel breakpoints.
10933 (cmd_qtstart): Pause threads.
10934 (stop_tracing): Pause threads, and cancel breakpoints.
10935 * win32-low.c (win32_target_ops): Adjust.
10936
e471f25b
PA
109372010-05-03 Pedro Alves <pedro@codesourcery.com>
10938
10939 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10940 the inferior right away from here...
10941 (linux_wait_1): ... to here, and adjust to check the thread's
10942 last_resume_kind instead of the lwp's step or stop_expected flags.
10943
1915ef4f
PA
109442010-05-02 Pedro Alves <pedro@codesourcery.com>
10945
10946 * README: Use consistent `GDB' and `GDBserver' spellings.
10947
f9e39928
PA
109482010-05-02 Pedro Alves <pedro@codesourcery.com>
10949
10950 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10951 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10952 (linux_detach_one_lwp): Assume the lwp is stopped.
10953 (any_thread_of): Delete.
10954 (linux_detach): Stop all lwps here. Don't blindly delete all
10955 breakpoints.
10956 (delete_lwp_callback): New.
10957 (linux_mourn): Delete all lwps of the process that is gone.
10958 (linux_wait_1): Don't delete the last lwp of the process here.
10959 * mem-break.h (mark_breakpoints_out): Declare.
10960 * mem-break.c (mark_breakpoints_out): New.
10961 (free_all_breakpoints): Use it.
10962 * server.c (handle_target_event): If the process is gone, mark
10963 breakpoints out.
10964 * thread-db.c (struct thread_db) <create_bp>: New field.
10965 (thread_db_enable_reporting): Fix prototype. Store a thread event
10966 breakpoint reference in the thread_db struct.
10967 (thread_db_load_search): Clear the thread_db object.
10968 (try_thread_db_load_1): Ditto.
10969 (switch_to_process): New.
10970 (disable_thread_event_reporting): Use it.
10971 (remove_thread_event_breakpoints): New.
10972 (thread_db_detach, thread_db_mourn): Use it.
10973
1e7fc18c
PA
109742010-05-01 Pedro Alves <pedro@codesourcery.com>
10975
10976 * linux-low.c (linux_enable_event_reporting): New.
10977 (linux_wait_for_event_1, handle_extended_wait): Use it.
10978
02fc4de7
PA
109792010-04-30 Pedro Alves <pedro@codesourcery.com>
10980
10981 * linux-low.c (linux_kill_one_lwp, linux_kill)
10982 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10983 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10984 SIGSTOP even if the LWP is stopped.
10985 (send_sigstop_callback): New.
10986 (stop_all_lwps): Use send_sigstop_callback instead.
10987 (linux_resume_one_thread): Adjust.
10988 (proceed_one_lwp): Still proceed an LWP that the client has
10989 requested to stop, if we haven't reported it as stopped yet. Make
10990 sure that LWPs the client want stopped, have a pending SIGSTOP.
10991
bc3b5632
DE
109922010-04-26 Doug Evans <dje@google.com>
10993
ae1ada35
DE
10994 * server.c (handle_general_set): Make static.
10995
bc3b5632
DE
10996 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10997 Print received char after testing for error/eof instead of before.
10998 (input_interrupt): Tweak comment.
10999
65730243
DE
110002010-04-23 Doug Evans <dje@google.com>
11001
11002 * server.c (start_inferior): Print inferior argv if --debug.
11003
a8ae7dc0
AR
110042010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11005
11006 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11007 * nto-x86-low.c: Include server.h
11008
1c07cc19
PM
110092010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11010
11011 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11012 be consistent with other sources of this directory.
11013 (init_registers_amd64): Correct name of source file of this function
11014 in the comment.
11015
e0a61e09
PM
110162010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11017
11018 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11019 64-bit executables.
11020
54709339
PM
110212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11022
11023 * win32-i386-low.c: Add 64-bit support.
11024 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11025 (init_registers_amd64): Declare.
11026 (mappings): Add 64-bit version of array.
11027 (init_windows_x86): New function.
11028 (the_low_target): Change init_arch field to init_windows_x86.
11029
e8f0053d
PM
110302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11031
11032 * win32-low.c: Adapt to support also 64-bit architecture.
11033 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11034 (get_image_name): Use SIZE_T type for local variable `done'.
11035 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11036 (toolhelp_get_dll_name): Idem.
11037 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11038 Use uintptr_t typecast to avoid warning.
11039 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11040 (handle_exception): Use phex_nz to avoid warning.
11041 (win32_wait): Remove unused local variable `process'.
11042
c481e77e
PM
110432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11044
11045 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11046 `amd64-avx.o'.
11047
12ea4b69
PM
110482010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11049
11050 * configure.ac: Use `ws2_32' library for srv_mingw.
11051 * configure: Regenerate.
11052 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11053 * remote-utils.c: Likewise.
11054
f6d1620c
L
110552010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11056
11057 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11058 if __x86_64__ is defined.
11059
8e642873
PM
110602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11061
11062 * configure: Regenerate.
11063
711e434b
PM
110642010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11065
11066 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11067 * target.h (target_ops): New get_tib_address field.
11068 * win32-low.h (win32_thread_info): Add thread_local_base field.
11069 * win32-low.c (child_add_thread): Add tlb argument.
11070 Set thread_local_base field to TLB.
11071 (get_child_debug_event): Adapt to child_add_thread change.
11072 (win32_get_tib_address): New function.
11073 (win32_target_ops): Set get_tib_address field to
11074 win32_get_tib_address.
11075 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11076
505106cd
PA
110772010-04-12 Pedro Alves <pedro@codesourcery.com>
11078
505106cd
PA
11079 * linux-low.c (linux_mourn): Also remove the process.
11080 * server.c (handle_target_event): Don't remove the process here.
11081 * nto-low.c (nto_mourn): New.
11082 (nto_target_ops): Install it.
11083 * spu-low.c (spu_mourn): New.
11084 (spu_target_ops): Install it.
11085 * win32-low.c (win32_mourn): New.
11086 (win32_target_ops): Install it.
11087
e8470a06
PA
110882010-04-12 Pedro Alves <pedro@codesourcery.com>
11089
11090 * server.h (buffer_xml_printf): Remove redundant `;'.
11091
45ba0d02
PA
110922010-04-12 Pedro Alves <pedro@codesourcery.com>
11093
11094 * regcache.c (set_register_cache): Invalidate regcaches before
11095 changing the register cache layout.
11096 (regcache_invalidate_one): Allow a NULL regcache.
11097 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11098 regcaches before changing the register cache layout or the target
11099 regsets.
11100
59e04013
L
111012010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11102
11103 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11104 variable warning on Linux/x86-64.
11105
8336d594
PA
111062010-04-11 Pedro Alves <pedro@codesourcery.com>
11107
11108 GDBserver disconnected tracing support.
11109
11110 * linux-low.c (linux_remove_process): Delete.
11111 (add_lwp): Don't set last_resume_kind here.
11112 (linux_kill): Use `mourn'.
11113 (linux_detach): Use `thread_db_detach', and `mourn'.
11114 (linux_mourn): New.
11115 (linux_attach_lwp_1): Adjust comment.
11116 (linux_attach): last_resume_kind moved the thread_info; adjust.
11117 (status_pending_p_callback): Adjust.
11118 (linux_wait_for_event_1): Adjust.
11119 (count_events_callback, select_singlestep_lwp_callback)
11120 (select_event_lwp_callback, cancel_breakpoints_callback)
11121 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11122 (proceed_one_lwp): Adjust.
11123 (linux_async): Add debug output.
11124 (linux_thread_stopped): New.
11125 (linux_pause_all): New.
11126 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11127 linux_pause_all.
11128 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11129 (thread_db_free): Delete declaration.
11130 (thread_db_detach, thread_db_mourn): Declare.
11131 * thread-db.c (thread_db_init): Use thread_db_mourn.
11132 (thread_db_free): Delete, split in two.
11133 (disable_thread_event_reporting): New.
11134 (thread_db_detach): New.
11135 (thread_db_mourn): New.
11136
11137 * server.h (struct thread_info) <last_resume_kind>: New field.
11138 <attached>: Add comment.
11139 <gdb_detached>: New field.
11140 (handler_func): Change return type to int.
11141 (handle_serial_event, handle_target_event): Ditto.
11142 (gdb_connected): Declare.
11143 (tracing): Delete.
11144 (disconnected_tracing): Declare.
11145 (stop_tracing): Declare.
11146
11147 * server.c (handle_query) <qSupported>: Report support for
11148 disconnected tracing.
11149 (queue_stop_reply_callback): Account for running threads.
11150 (gdb_wants_thread_stopped): New.
11151 (gdb_wants_all_threads_stopped): New.
11152 (gdb_reattached_process): New.
11153 (handle_status): Clear the `gdb_detached' flag of all processes.
11154 In all-stop, stop all threads.
11155 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11156 (process_serial_event): If the remote connection breaks, or if an
11157 exit was forced with "monitor exit", force an event loop exit.
11158 Handle disconnected tracing on detach.
11159 (handle_serial_event): Adjust.
11160 (handle_target_event): If GDB isn't connected, forward events back
11161 to the inferior, unless the last process exited, in which case,
11162 exit gdbserver. Adjust interface.
11163
11164 * remote-utils.c (remote_open): Don't block in accept. Instead
11165 register an event loop source on the listen socket file
11166 descriptor. Refactor bits into ...
11167 (listen_desc): ... this new global.
11168 (gdb_connected): ... this new function.
11169 (enable_async_notification): ... this new function.
11170 (handle_accept_event): ... this new function.
11171 (remote_close): Clear remote_desc.
11172
11173 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11174
11175 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11176 New fields.
11177 (mourn_inferior): Define.
11178 (target_process_qsupported): Avoid the dangling else problem.
11179 (thread_stopped): Define.
11180 (pause_all): Define.
11181 (target_waitstatus_to_string): Declare.
11182 * target.c (target_waitstatus_to_string): New.
11183
11184 * tracepoint.c (tracing): Make extern.
11185 (disconnected_tracing): New.
11186 (stop_tracing): Make extern. Handle tracing stops due to GDB
11187 disconnecting.
11188 (cmd_qtdisconnected): New.
11189 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11190 (handle_tracepoint_general_set): Handle QTDisconnected.
11191
11192 * event-loop.c (event_handler_func): Change return type to int.
11193 (process_event): Bail out if the event handler wants the event
11194 loop to stop.
11195 (handle_file_event): Ditto.
11196 (start_event_loop): Bail out if the event handler wants the event
11197 loop to stop.
11198
11199 * nto-low.c (nto_target_ops): Adjust.
11200 * spu-low.c (spu_wait): Don't remove the process here.
11201 (spu_target_ops): Adjust.
11202 * win32-low.c (win32_wait): Don't remove the process here.
11203 (win32_target_ops): Adjust.
11204
5d267c4c
PA
112052010-04-11 Pedro Alves <pedro@codesourcery.com>
11206
11207 * regcache.c (realloc_register_cache): Invalidate inferior's
11208 regcache before recreating it.
11209
623ccd72
PA
112102010-04-09 Pedro Alves <pedro@codesourcery.com>
11211
11212 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11213
219f2f23
PA
112142010-04-09 Stan Shebs <stan@codesourcery.com>
11215 Pedro Alves <pedro@codesourcery.com>
11216
11217 * server.h (LONGEST): New.
11218 (struct thread_info) <while_stepping>: New field.
11219 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11220 Declare.
11221 (initialize_tracepoint, handle_tracepoint_general_set)
11222 (handle_tracepoint_query, tracepoint_finished_step)
11223 (tracepoint_was_hit, release_while_stepping_state_list):
11224 (current_traceframe): Declare.
11225 * server.c (handle_general_set): Handle tracepoint packets.
11226 (read_memory): New.
11227 (write_memory): New.
11228 (handle_search_memory_1): Use read_memory.
11229 (handle_query): Report support for conditional tracepoints, trace
11230 state variables, and tracepoint sources. Handle tracepoint
11231 queries.
11232 (main): Initialize the tracepoints module.
11233 (process_serial_event): Handle traceframe reads/writes.
11234
11235 * linux-low.c (handle_tracepoints): New.
11236 (linux_wait_1): Call it.
11237 (linux_resume_one_lwp): Handle while-stepping.
11238 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11239 (linux_target_ops): Install them.
11240 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11241 New field.
11242 * linux-x86-low.c (x86_supports_tracepoints): New.
11243 (the_low_target). Install it.
11244
11245 * mem-break.h (delete_breakpoint): Declare.
11246 * mem-break.c (delete_breakpoint): Make external.
11247
11248 * target.h (struct target_ops): Add `supports_tracepoints',
11249 `read_pc', and `write_pc' fields.
11250 (target_supports_tracepoints): Define.
11251 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11252 (phex_nz): New.
11253
11254 * regcache.h (struct regcache) <registers_owned>: New field.
11255 (init_register_cache, regcache_cpy): Declare.
11256 (regcache_read_pc, regcache_write_pc): Declare.
11257 (register_cache_size): Declare.
11258 (supply_regblock): Declare.
11259 * regcache.c (init_register_cache): New.
11260 (new_register_cache): Use it.
11261 (regcache_cpy): New.
11262 (register_cache_size): New.
11263 (supply_regblock): New.
11264 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11265
219f2f23
PA
11266 * tracepoint.c: New.
11267
11268 * Makefile.in (OBS): Add tracepoint.o.
11269 (tracepoint.o): New rule.
11270
3a13a53b
L
112712010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11272
11273 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11274 (i386-mmx.o): New.
11275 (i386-mmx.c): Likewise.
11276 (i386-mmx-linux.o): Likewise.
11277 (i386-mmx-linux.c): Likewise.
11278
11279 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11280 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11281 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11282 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11283
11284 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11285 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11286 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11287
1570b33e
L
112882010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11289
11290 * Makefile.in (clean): Updated.
11291 (i386-avx.o): New.
11292 (i386-avx.c): Likewise.
11293 (i386-avx-linux.o): Likewise.
11294 (i386-avx-linux.c): Likewise.
11295 (amd64-avx.o): Likewise.
11296 (amd64-avx.c): Likewise.
11297 (amd64-avx-linux.o): Likewise.
11298 (amd64-avx-linux.c): Likewise.
11299
11300 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11301 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11302 (srv_amd64_regobj): Add amd64-avx.o.
11303 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11304 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11305 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11306 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11307 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11308 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11309 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11310
11311 * i387-fp.c: Include "i386-xstate.h".
11312 (i387_xsave): New.
11313 (i387_cache_to_xsave): Likewise.
11314 (i387_xsave_to_cache): Likewise.
11315 (x86_xcr0): Likewise.
11316
11317 * i387-fp.h (i387_cache_to_xsave): Likewise.
11318 (i387_xsave_to_cache): Likewise.
11319 (x86_xcr0): Likewise.
11320
11321 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11322 * linux-crisv32-low.c (target_regsets): Likewise.
11323 * linux-m68k-low.c (target_regsets): Likewise.
11324 * linux-mips-low.c (target_regsets): Likewise.
11325 * linux-ppc-low.c (target_regsets): Likewise.
11326 * linux-s390-low.c (target_regsets): Likewise.
11327 * linux-sh-low.c (target_regsets): Likewise.
11328 * linux-sparc-low.c (target_regsets): Likewise.
11329 * linux-xtensa-low.c (target_regsets): Likewise.
11330
11331 * linux-low.c: Include <sys/uio.h>.
11332 (regsets_fetch_inferior_registers): Support nt_type.
11333 (regsets_store_inferior_registers): Likewise.
11334 (linux_process_qsupported): New.
11335 (linux_target_ops): Add linux_process_qsupported.
11336
11337 * linux-low.h (regset_info): Add nt_type.
11338 (linux_target_ops): Add process_qsupported.
11339
11340 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11341 and <sys/uio.h>.
11342 (init_registers_i386_avx_linux): New.
11343 (init_registers_amd64_avx_linux): Likewise.
11344 (xmltarget_i386_linux_no_xml): Likewise.
11345 (xmltarget_amd64_linux_no_xml): Likewise.
11346 (PTRACE_GETREGSET): Likewise.
11347 (PTRACE_SETREGSET): Likewise.
11348 (x86_fill_xstateregset): Likewise.
11349 (x86_store_xstateregset): Likewise.
11350 (use_xml): Likewise.
11351 (x86_linux_update_xmltarget): Likewise.
11352 (x86_linux_process_qsupported): Likewise.
11353 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11354 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11355 init_registers_i386_linux here. Call
11356 x86_linux_update_xmltarget.
11357 (the_low_target): Add x86_linux_process_qsupported.
11358
11359 * server.c (handle_query): Call target_process_qsupported.
11360
11361 * target.h (target_ops): Add process_qsupported.
11362 (target_process_qsupported): New.
11363
fc7238bb
PA
113642010-04-03 Pedro Alves <pedro@codesourcery.com>
11365
11366 * inferiors.c (add_thread): Set last_status kind to
11367 TARGET_WAITKIND_IGNORE.
11368 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11369 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11370 (linux_wait_1): Move `thread' local definition to block that uses
11371 it. Don't NULL initialize `event_child'.
11372 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11373 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11374 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11375
bdabb078
PA
113762010-04-01 Pedro Alves <pedro@codesourcery.com>
11377
11378 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11379 an extended waitstatus, or by a watchpoint.
11380 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11381 thread was stepping or has been stopped by a watchpoint.
11382
d3bbe7a0
PA
113832010-04-01 Pedro Alves <pedro@codesourcery.com>
11384
11385 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11386 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11387 of another, then delete the previous, and validate all
11388 breakpoints.
11389 (validate_inserted_breakpoint): New.
11390 (delete_disabled_breakpoints): New.
11391 (validate_breakpoints): New.
11392 (check_mem_read): Validate breakpoints before trusting their
11393 shadow. Delete disabled breakpoints.
11394 (check_mem_write): Validate breakpoints before trusting they
11395 should be inserted. Delete disabled breakpoints.
11396 * mem-break.h (validate_breakpoints):
11397 * server.c (handle_query): Validate breakpoints when we see a
11398 qSymbol query.
11399
8b07ae33
PA
114002010-04-01 Pedro Alves <pedro@codesourcery.com>
11401
11402 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11403 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11404 if we could tell there's a GDB breakpoint at stop_pc.
11405 (need_step_over_p): Don't do a step over if we find a GDB
11406 breakpoint at the resume PC.
11407
11408 * mem-break.c (struct raw_breakpoint): New.
11409 (enum bkpt_type): New type `gdb_breakpoint'.
11410 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11411 fields. New field `raw'.
11412 (find_raw_breakpoint_at): New.
11413 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11414 breakpoint instead.
11415 (set_breakpoint_at): Adjust.
11416 (delete_raw_breakpoint): New.
11417 (release_breakpoint): New.
11418 (delete_breakpoint): Rename to...
11419 (delete_breakpoint_1): ... this. Add proc parameter. Use
11420 release_breakpoint. Return ENOENT.
11421 (delete_breakpoint): Reimplement.
11422 (find_breakpoint_at): Delete.
11423 (find_gdb_breakpoint_at): New.
11424 (delete_breakpoint_at): Delete.
11425 (set_gdb_breakpoint_at): New.
11426 (delete_gdb_breakpoint_at): New.
11427 (gdb_breakpoint_here): New.
11428 (set_reinsert_breakpoint): Use release_breakpoint.
11429 (uninsert_breakpoint): Rename to ...
11430 (uninsert_raw_breakpoint): ... this.
11431 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11432 (reinsert_raw_breakpoint): Change parameter type to
11433 raw_breakpoint.
11434 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11435 instead.
11436 (check_breakpoints): Adjust. Use release_breakpoint.
11437 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11438 (breakpoint_inserted_here): Ditto.
11439 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11440 Don't trust the breakpoint's shadow if it is not inserted.
11441 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11442 (delete_all_breakpoints): Adjust.
11443 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11444 use delete_breakpoint_1.
11445
11446 * mem-break.h (breakpoints_supported): Delete declaration.
11447 (set_gdb_breakpoint_at): Declare.
11448 (gdb_breakpoint_here): Declare.
11449 (delete_breakpoint_at): Delete.
11450 (delete_gdb_breakpoint_at): Declare.
11451
11452 * server.h (struct raw_breakpoint): Forward declare.
11453 (struct process_info): New field `raw_breakpoints'.
11454
11455 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11456 breakpoints.
11457
6bf5e0ba
PA
114582010-03-24 Pedro Alves <pedro@codesourcery.com>
11459
11460 * linux-low.c (status_pending_p_callback): Fix comment.
11461 (linux_wait_for_event_1): Move most of the internal breakpoint
11462 handling from here...
11463 (linux_wait_1): ... to here.
11464 (count_events_callback): New.
11465 (select_singlestep_lwp_callback): New.
11466 (select_event_lwp_callback): New.
11467 (cancel_breakpoints_callback): New.
11468 (select_event_lwp): New.
11469 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11470 priority to all LWPs that have had events that should be reported
11471 to the client. Cancel breakpoints when about to reporting the
11472 event to the client, not while stopping lwps. No longer cancel
11473 finished single-steps here.
11474 (cancel_finished_single_step): Delete.
11475 (cancel_finished_single_steps): Delete.
11476
414a389f
PA
114772010-03-24 Pedro Alves <pedro@codesourcery.com>
11478
11479 * mem-break.c (enum bkpt_type): New.
11480 (struct breakpoint): New field `type'.
11481 (set_breakpoint_at): Change return type to struct breakpoint
11482 pointer. Set type to `other_breakpoint' by default.
11483 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11484 in the breakpoint list.
11485 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11486 (reinsert_breakpoint): Rename to ...
11487 (reinsert_raw_breakpoint): ... this.
11488 (reinsert_breakpoints_at): Adjust.
11489 * mem-break.h (struct breakpoint): Declare.
11490 (set_breakpoint_at): Change return type to struct breakpoint
11491 pointer.
11492
2280c721
PA
114932010-03-24 Pedro Alves <pedro@codesourcery.com>
11494
11495 * server.c (handle_query): Assign, not compare.
11496
d50171e4
PA
114972010-03-24 Pedro Alves <pedro@codesourcery.com>
11498
11499 Teach linux gdbserver to step-over-breakpoints.
11500
11501 * linux-low.c (can_hardware_single_step): New.
11502 (supports_breakpoints): New.
11503 (handle_extended_wait): If stopping threads, read the stop pc of
11504 the new cloned LWP.
11505 (get_pc): New.
11506 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11507 low target doesn't support retrieving the PC.
11508 (add_lwp): Set last_resume_kind to resume_continue.
11509 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11510 (linux_attach): Don't clear stop_expected. Set the lwp's
11511 last_resume_kind to resume_stop.
11512 (linux_detach_one_lwp): Don't check for removed breakpoints.
11513 (check_removed_breakpoint): Delete.
11514 (status_pending_p): Rename to ...
11515 (status_pending_p_callback): ... this. Don't check for removed
11516 breakpoints. Don't consider threads that are stopped from GDB's
11517 perspective.
11518 (linux_wait_for_lwp): Always read the stop_pc here.
11519 (cancel_breakpoint): New.
11520 (step_over_bkpt): New global.
11521 (linux_wait_for_event_1): Implement stepping over breakpoints.
11522 (gdb_wants_lwp_stopped): New.
11523 (gdb_wants_all_stopped): New.
11524 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11525 single-step traps here. Store the thread's last reported target
11526 wait status.
11527 (send_sigstop): Don't clear stop_expected. Always set it,
11528 instead.
11529 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11530 (cancel_finished_single_step): New.
11531 (cancel_finished_single_steps): New.
11532 (wait_for_sigstop): Don't cancel finished single-step traps here.
11533 (linux_resume_one_lwp): Don't check for removed breakpoints.
11534 Don't set `step' on non-hardware step archs.
11535 (linux_set_resume_request): Ignore resume_stop requests if already
11536 stopping or stopped. Set the lwp's last_resume_kind.
11537 (resume_status_pending_p): Don't check for removed breakpoints.
11538 (need_step_over_p): New.
11539 (start_step_over): New.
11540 (finish_step_over): New.
11541 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11542 requests. Clear the thread's last reported target waitstatus.
11543 Don't use the `suspended' flag. Don't consider pending breakpoints.
11544 (linux_resume): Start a step-over if necessary.
11545 (proceed_one_lwp): New.
11546 (proceed_all_lwps): New.
11547 (unstop_all_lwps): New.
11548 * linux-low.h (struct lwp_info): Rewrite comment for the
11549 `suspended' flag. Add the `stop_pc' field. Delete the
11550 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11551 Add `'last_resume_kind' and `need_step_over' fields.
11552 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11553 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11554 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11555 (set_raw_breakpoint_at): New.
11556 (set_breakpoint_at): Rewrite to use it.
11557 (reinsert_breakpoint_handler): Delete.
11558 (set_reinsert_breakpoint): New.
11559 (reinsert_breakpoint_by_bp): Delete.
11560 (delete_reinsert_breakpoints): New.
11561 (uninsert_breakpoint): Rewrite.
11562 (uninsert_breakpoints_at): New.
11563 (reinsert_breakpoint): Rewrite.
11564 (reinsert_breakpoints_at): New.
11565 (check_breakpoints): Rewrite.
11566 (breakpoint_here): New.
11567 (breakpoint_inserted_here): New.
11568 (check_mem_read): Adjust.
11569 * mem-break.h (breakpoints_supported, breakpoint_here)
11570 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11571 (reinsert_breakpoint_by_bp): Delete declaration.
11572 (delete_reinsert_breakpoints): Declare.
11573 (reinsert_breakpoint): Delete declaration.
11574 (reinsert_breakpoints_at): Declare.
11575 (uninsert_breakpoint): Delete declaration.
11576 (uninsert_breakpoints_at): Declare.
11577 (check_breakpoints): Adjust prototype.
11578 * server.h: Adjust include order.
11579 (struct thread_info): Declare here. Add a `last_status' field.
11580
30ba68cb
MS
115812010-03-23 Michael Snyder <msnyder@vmware.com>
11582
11583 * server.c (crc32): New function.
11584 (handle_query): Add handling for 'qCRC:' request.
11585
b9a881c2
PA
115862010-03-23 Pedro Alves <pedro@codesourcery.com>
11587
11588 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11589 lwp had been stopped by a watchpoint.
11590
e92d13d5
PA
115912010-03-16 Pedro Alves <pedro@codesourcery.com>
11592
11593 * server.h (internal_error): Declare.
11594 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11595 * utils.c (internal_error): New function.
11596
64daa791
AS
115972010-03-15 Andreas Schwab <schwab@redhat.com>
11598
11599 * configure.srv: Fix typo setting srv_regobj.
11600
f52cd8cd
PA
116012010-03-15 Pedro Alves <pedro@codesourcery.com>
11602
11603 * linux-low.c (fetch_register): Avoid passing a non string literal
11604 format to `error'.
11605 (usr_store_inferior_registers): Ditto.
11606
93ae6fdc
PA
116072010-03-14 Pedro Alves <pedro@codesourcery.com>
11608
11609 * linux-low.c (linux_write_memory): Bail out early if peeking
11610 memory failed.
11611
c3adc08c
PA
116122010-03-14 Pedro Alves <pedro@codesourcery.com>
11613
11614 * linux-low.h (struct lwp_info): New fields
11615 `stopped_by_watchpoint' and `stopped_data_address'.
11616 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11617 here, and cache them in the lwp object.
11618 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11619 directly.
11620 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11621 field.
11622 (linux_stopped_by_watchpoint): Rewrite.
11623 (linux_stopped_data_address): Rewrite.
11624
bce522a2
PA
116252010-03-06 Simo Melenius <simo.melenius@iki.fi>
11626
11627 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11628 switching the current inferior, not before.
11629
90884b2b
L
116302010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11631
11632 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11633 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11634 i386-linux.c and amd64-linux.c.
11635 (reg-i386.o): Removed.
11636 (reg-i386.c): Likewise.
11637 (reg-i386-linux.o): Likewise.
11638 (reg-i386-linux.c): Likewise.
11639 (reg-x86-64.o): Likewise.
11640 (reg-x86-64.c): Likewise.
11641 (reg-x86-64-linux.o): Likewise.
11642 (reg-x86-64-linux.c): Likewise.
11643 (i386.o): New.
11644 (i386.c): Likewise.
11645 (i386-linux.o): Likewise.
11646 (i386-linux.c): Likewise.
11647 (amd64.o): Likewise.
11648 (amd64.c): Likewise.
11649 (amd64-linux.o): Likewise.
11650 (amd64-linux.c): Likewise.
11651
11652 * configure.srv (srv_i386_regobj): New.
11653 (srv_i386_linux_regobj): Likewise.
11654 (srv_amd64_regobj): Likewise.
11655 (srv_amd64_linux_regobj): Likewise.
11656 (srv_i386_32bit_xmlfiles): Likewise.
11657 (srv_i386_64bit_xmlfiles): Likewise.
11658 (srv_i386_xmlfiles): Likewise.
11659 (srv_amd64_xmlfiles): Likewise.
11660 (srv_i386_linux_xmlfiles): Likewise.
11661 (srv_amd64_linux_xmlfiles): Likewise.
11662 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11663 srv_xmlfiles to $srv_i386_xmlfiles.
11664 (i[34567]86-*-mingw32ce*): Likewise.
11665 (i[34567]86-*-mingw*): Likewise.
11666 (i[34567]86-*-nto*): Likewise.
11667 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11668 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11669 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11670 (x86_64-*-linux*): Likewise.
11671
11672 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11673 (init_registers_amd64_linux): New.
11674 (x86_arch_setup): Replace init_registers_x86_64_linux with
11675 init_registers_amd64_linux.
11676
193f13e6
MK
116772010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11678
11679 * configure.ac: Check for libdl. If it is not available link against
11680 static libthread_db.
11681 * configure: Regenerate.
11682
85d721b8
PA
116832010-02-22 Pedro Alves <pedro@codesourcery.com>
11684
11685 PR9605
11686
11687 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11688 handing a read watchpoint.
11689 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11690
6076632b
DE
116912010-02-12 Doug Evans <dje@google.com>
11692
11693 * linux-low.c (linux_supports_tracefork_flag): Document.
11694 (linux_look_up_symbols): Add comment.
11695
3327ccf7
L
116962010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11697
11698 * regcache.c (supply_register): Clear regcache if buf is NULL.
11699
0718675c 117002010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11701 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11702
11703 * inferiors.c (find_inferior): Add function documentation.
11704 (unloaded_dll): Handle the case where the unloaded dll has not
11705 been previously registered in the dll list.
11706
177321bd
DJ
117072010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11708
11709 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11710 (thumb2_breakpoint): New.
11711 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11712
2b009048
DJ
117132010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11714
11715 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11716 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11717 breakpoints.
11718
3be029c7
PA
117192010-01-21 Pedro Alves <pedro@codesourcery.com>
11720
11721 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11722
18f5de3b
JK
117232010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11724
11725 * linux-s390-low.c (s390_collect_ptrace_register)
11726 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11727
3743bb4f
DE
117282010-01-21 Doug Evans <dje@google.com>
11729
14ce3065
DE
11730 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11731 (PTRACE_ARG4_TYPE): New macro.
11732 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11733 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11734 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11735 (usr_store_inferior_registers): Ditto.
11736 (linux_read_memory, linux_write_memory): Ditto.
11737 (linux_test_for_tracefork): Ditto.
11738
3743bb4f
DE
11739 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11740 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11741
8b315be5
PA
117422010-01-21 Pedro Alves <pedro@codesourcery.com>
11743
11744 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11745 target.
11746
85492558
PA
117472010-01-21 Pedro Alves <pedro@codesourcery.com>
11748
11749 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11750 prototype to take a regcache. Adjust.
11751
442ea881
PA
117522010-01-20 Pedro Alves <pedro@codesourcery.com>
11753
11754 * regcache.h (struct thread_info): Forward declare.
11755 (struct regcache): New.
11756 (new_register_cache): Adjust prototype.
11757 (get_thread_regcache): Declare.
11758 (free_register_cache): Adjust prototype.
11759 (registers_to_string, registers_from_string): Ditto.
11760 (supply_register, supply_register_by_name, collect_register)
11761 (collect_register_as_string, collect_register_by_name): Ditto.
11762 * regcache.c (struct inferior_regcache_data): Delete.
11763 (get_regcache): Rename to ...
11764 (get_thread_regcache): ... this. Adjust. Switch inferior before
11765 fetching registers.
11766 (regcache_invalidate_one): Adjust.
11767 (regcache_invalidate): Fix prototype.
11768 (new_register_cache): Return the new register cache.
11769 (free_register_cache): Change prototype.
11770 (realloc_register_cache): Adjust.
11771 (registers_to_string): Change prototype to take a regcache. Adjust.
11772 (registers_from_string): Ditto.
11773 (register_data): Ditto.
11774 (supply_register): Ditto.
11775 (supply_register_by_name): Ditto.
11776 (collect_register): Ditto.
11777 (collect_register_as_string): Ditto.
11778 (collect_register_by_name): Ditto.
11779 * server.c (process_serial_event): Adjust.
11780 * linux-low.h (regset_fill_func, regset_store_func): Change
11781 prototype.
11782 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11783 Change prototype.
11784 * linux-low.c (get_stop_pc): Adjust.
11785 (check_removed_breakpoint): Adjust.
11786 (linux_wait_for_event): Adjust.
11787 (linux_resume_one_lwp): Adjust.
11788 (fetch_register): Add regcache parameter. Adjust.
11789 (usr_store_inferior_registers): Ditto.
11790 (regsets_fetch_inferior_registers): Ditto.
11791 (regsets_store_inferior_registers): Ditto.
11792 (linux_fetch_registers, linux_store_registers): Ditto.
11793 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11794 regcache. Adjust.
43aaf8b6
PA
11795 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11796 Ditto.
442ea881
PA
11797 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11798 prototype to take a regcache.
11799 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11800 * remote-utils.c (convert_ascii_to_int, outreg)
11801 (prepare_resume_reply): Change prototype to take a regcache.
11802 Adjust.
11803 * target.h (struct target_ops) <fetch_registers, store_registers>:
11804 Change prototype to take a regcache.
11805 (fetch_inferior_registers, store_inferior_registers): Change
11806 prototype to take a regcache. Adjust.
11807 * proc-service.c (ps_lgetregs): Adjust.
11808 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11809 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11810 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11811 take a regcache. Adjust.
11812 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11813 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11814 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11815 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11816 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11817 (cris_cannot_fetch_register):
11818 (cris_breakpoint_at): Change prototype to take a regcache.
11819 Adjust.
11820 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11821 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11822 to take a regcache. Adjust.
11823 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11824 Adjust.
11825 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11826 take a regcache. Adjust.
11827 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11828 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11829 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11830 * linux-mips-low.c (mips_get_pc):
11831 (mips_set_pc): Change prototype to take a regcache. Adjust.
11832 (mips_reinsert_addr): Adjust.
11833 (mips_collect_register): Change prototype to take a regcache.
11834 Adjust.
11835 (mips_supply_register):
11836 (mips_collect_register_32bit, mips_supply_register_32bit)
11837 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11838 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11839 * linux-ppc-low.c (ppc_supply_ptrace_register)
11840 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11841 (parse_spufs_run): Adjust.
11842 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11843 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11844 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11845 take a regcache. Adjust.
11846 * linux-s390-low.c (s390_collect_ptrace_register)
11847 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11848 (s390_set_pc): Change prototype to take a regcache. Adjust.
11849 (s390_arch_setup): Adjust.
11850 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11851 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11852 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11853 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11854 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11855 regcache. Adjust.
11856 (sparc_breakpoint_at): Adjust.
11857 * linux-xtensa-low.c (xtensa_fill_gregset):
11858 (xtensa_store_gregset):
11859 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11860 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11861 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11862 prototype to take a regcache. Adjust.
11863 * win32-arm-low.c (arm_fetch_inferior_register)
11864 (arm_store_inferior_register): Change prototype to take a
11865 regcache. Adjust.
11866 * win32-i386-low.c (i386_fetch_inferior_register)
11867 (i386_store_inferior_register): Change prototype to take a
11868 regcache. Adjust.
11869 * win32-low.c (child_fetch_inferior_registers)
11870 (child_store_inferior_registers): Change prototype to take a
11871 regcache. Adjust.
11872 (win32_wait): Adjust.
11873 (win32_fetch_inferior_registers): Change prototype to take a
11874 regcache. Adjust.
11875 (win32_store_inferior_registers): Adjust.
11876 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11877 store_inferior_register>: Change prototype to take a regcache.
11878
60c3d7b0
DE
118792010-01-20 Doug Evans <dje@google.com>
11880
11881 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11882 #ifdef.
11883 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11884 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11885
dc146f7c
VP
118862010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11887
11888 * linux-low.c (linux_core_of_thread): New.
11889 (compare_ints, show_process, list_threads): New.
11890 (linux_qxfer_osdata): Report threads and cores.
11891 (linux_target_op): Register linux_core_of_thread.
11892 * remote-utils.c (prepare_resume_reply): Report the core.
11893 (buffer_xml_printf): Support %d specifier.
11894 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11895 New.
11896 (handle_query): Handle qXfer:threads. Announce availability
11897 thereof.
11898 * target.h (struct target_ops): New field core_of_thread.
11899
7803799a
UW
119002010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11901
11902 * Makefile.in (clean): Remove new generated files.
11903 (reg-s390.o, reg-s390.c): Remove rules.
11904 (reg-s390x.o, reg-s390x.c): Likewise.
11905 (s390-linux32.o, s390-linux32.c): Add rules.
11906 (s390-linux64.o, s390-linux64.c): Likewise.
11907 (s390x-linux64.o, s390x-linux64.c): Likewise.
11908 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11909 * linux-s390-low.c: Include <elf.h>.
11910 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11911 (init_registers_s390): Remove prototype.
11912 (init_registers_s390x): Likewise.
11913 (init_registers_s390_linux32): Add prototype.
11914 (init_registers_s390_linux64): Likewise.
11915 (init_registers_s390x_linux64): Likewise.
11916 (s390_num_regs_3264): New define.
11917 (s390_regmap_3264): New global variable.
11918 (s390_cannot_fetch_register): Remove obsolete check.
11919 (s390_cannot_store_register): Likewise.
11920 (s390_collect_ptrace_register): Handle upper/lower register halves.
11921 (s390_supply_ptrace_register): Likewise.
11922 (s390_fill_gregset): Update to register number changes.
11923 (s390_get_hwcap): New routine.
11924 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11925 Install appropriate regmap and register set.
11926
6e7ffa39
JB
119272010-01-01 Joel Brobecker <brobecker@adacore.com>
11928
11929 * server.c (gdbserver_version): Update copyright year to 2010.
11930 * gdbreplay.c (gdbreplay_version): Likewise.
11931
957f3f49
DE
119322009-12-28 Doug Evans <dje@google.com>
11933
11934 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11935 elf/external.h. Include <elf.h> instead but only if necessary.
11936
ca5c370d
PA
119372009-12-28 Pedro Alves <pedro@codesourcery.com>
11938
11939 * linux-low.c (linux_remove_process): Remove `detaching'
11940 parameter. Don't release/detach from thread_db here.
11941 (linux_kill): Release/detach from thread_db here, ...
11942 (linux_detach): ... and here, before actually detaching.
11943 (linux_wait_1): ... and here, when a process exits.
11944 * thread-db.c (any_thread_of): New.
11945 (thread_db_free): Switch the current inferior to a thread of the
11946 passed in process.
11947
4ee62156
DE
119482009-12-21 Doug Evans <dje@google.com>
11949
d90e6a88
DE
11950 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11951
c5f62d5f
DE
11952 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11953 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11954 warning ifndef __NR_tkill. Move setting of errno there too.
11955 Delete unnecessary resetting of errno after syscall.
11956 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11957
10e86dd7
DE
11958 * configure.ac: Check for dladdr.
11959 * config.in: Regenerate.
11960 * configure: Regenerate.
11961 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11962 (try_thread_db_load): Update.
11963
4ee62156
DE
11964 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11965
00f515da
DE
119662009-12-18 Doug Evans <dje@google.com>
11967
e9464885
DE
11968 * event-loop.c: Include unistd.h if it exists.
11969
07d4f67e
DE
11970 * linux-low.c (my_waitpid): Move definition away from being in
11971 between linux_tracefork_child/linux_test_for_tracefork.
11972
00f515da
DE
11973 * gdb_proc_service.h (psaddr_t): Fix type.
11974 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11975 signature to match glibc.
11976
1de1badb
DE
119772009-12-16 Doug Evans <dje@google.com>
11978
11979 * linux-low.c (linux_read_memory): Fix argument to read.
11980
aeeb81d1
PA
119812009-11-26 Pedro Alves <pedro@codesourcery.com>
11982
11983 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11984 events, don't leave current_inferior pointing at null.
11985
10357975
PA
119862009-11-26 Pedro Alves <pedro@codesourcery.com>
11987
11988 * win32-low.c (LOG): Delete.
11989 (OUTMSG): Output to stderr.
11990 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11991 on compile time LOG macro.
11992 (win32_wait): Fix debug output.
11993
cf6e3471
PA
119942009-11-26 Pedro Alves <pedro@codesourcery.com>
11995
11996 * win32-low.c (win32_add_one_solib): If the dll name is
11997 "ntdll.dll", prepend the system directory to the dll path.
11998
0c85e18e
MK
119992009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12000
12001 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12002
9ac544ce 120032009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12004 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12005
12006 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12007 * configure.ac: Check for __mcoldfire__ and set
12008 gdb_cv_m68k_is_coldfire.
12009 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12010 reg-cf.o and reg-m68k.o.
12011 * configure: Regenerated.
12012
fd7dd3e6
PA
120132009-11-16 Pedro Alves <pedro@codesourcery.com>
12014
12015 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12016 Pass it to thread_db_free.
12017 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12018 proper `detaching' argument to linux_remove_process.
12019 * linux-low.h (thread_db_free): Add `detaching' parameter.
12020 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12021 to thread_db_free.
12022 (thread_db_free): Add `detaching' parameter. Only
12023 call td_ta_clear_event if detaching from process.
12024
75aa492e
MK
120252009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12026
12027 * thread-db.c (thread_db_free): Fix typo.
12028
21e1bee4
PP
120292009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12030
12031 PR gdb/10838
12032 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12033
8838b45e
NS
120342009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12035
12036 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12037 with an i686 compiler.
12038 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12039 needed.
12040 * configure: Rebuilt.
12041
8a35fb51
SL
120422009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12043
12044 PR gdb/10783
12045
12046 * server.c (handle_search_memory_1): Correct read_addr initialization
12047 in loop for searching subsequent chunks.
12048
96f15937
PP
120492009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12050
12051 * configure.ac: New --with-libthread-db option.
12052 * thread-db.c: Allow direct dependence on libthread_db.
12053 (thread_db_free): Adjust.
12054 * config.in: Regenerate.
12055 * configure: Likewise.
889bf7c5 12056
5f7d1694
PP
120572009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12058
12059 PR gdb/10757
12060 * thread-db.c (attach_thread): New function.
12061 (maybe_attach_thread): Return success/failure.
12062 (find_new_threads_callback): Adjust.
889bf7c5
PA
12063 (thread_db_find_new_threads): Loop until no new threads.
12064
88e3b899
PA
120652009-10-13 Pedro Alves <pedro@codesourcery.com>
12066
12067 * proc-service.c (ps_lgetregs): Formatting.
12068
cdbfd419
PP
120692009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12070
12071 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12072 * configure.ac: Adjust.
12073 * linux-low.h (struct process_info_private): Move members to struct
12074 thread_db.
12075 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12076 * linux-low.c (linux_remove_process): Adjust.
12077 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12078 * server.c (handle_query): Move code ...
12079 (handle_monitor_command): ... here. New function.
12080 * target.h (struct target_ops): New member.
12081 * thread-db.c (struct thread_db): New.
12082 (libthread_db_search_path): New variable.
12083 (thread_db_create_event, thread_db_enable_reporting)
12084 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12085 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12086 (try_thread_db_load_1, dladdr_to_soname): New functions.
12087 (try_thread_db_load, thread_db_load_search): New functions.
12088 (thread_db_init): Search for libthread_db.
12089 (thread_db_free): New function.
12090 (thread_db_handle_monitor_command): Likewise.
12091 * config.in: Regenerate.
12092 * configure: Regenerate.
889bf7c5 12093
4168d2d6
UW
120942009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12095
12096 * spu-low.c (spu_kill): Wait for inferior to terminate.
12097 Call clear_inferiors.
12098 (spu_detach): Call clear_inferiors.
12099
81ecdfbb
RW
121002009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12101
12102 * aclocal.m4: Regenerate.
12103 * config.in: Likewise.
12104 * configure: Likewise.
12105
0b9ff2c0
UW
121062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12107
12108 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12109 (parse_spufs_run): New function.
12110 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12111 (ppc_breakpoint_at): Handle SPU breakpoints.
12112
efcbbd14
UW
121132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12114
12115 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12116 (SPUFS_MAGIC): Define.
12117 (spu_enumerate_spu_ids): New function.
12118 (linux_qxfer_spu): New function.
12119 (linux_target_ops): Install linux_qxfer_spu.
12120
f4d9bade
UW
121212009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12122
12123 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12124 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12125 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12126 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12127 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12128 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12129 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12130 (init_registers_powerpc_cell32l): Add prototype.
12131 (init_registers_powerpc_cell64l): Likewise.
12132 (ppc_arch_setup): Detect Cell/B.E. architecture.
12133
96e946ca
RW
121342009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12135
12136 * Makefile.in (datarootdir): New variable.
12137
58d6951d
DJ
121382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12139
12140 * linux-low.c (linux_write_memory): Update debugging output.
12141 * Makefile.in (clean): Add new descriptions.
12142 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12143 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12144 * configure.srv: Add new files for arm*-*-linux*.
12145 * linux-arm-low.c: Add new declarations.
12146 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12147 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12148 (HWCAP_VFPv3D16): New.
12149 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12150 instead of __IWMMXT__.
12151 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12152 (arm_arch_setup): New.
12153 (target_regsets): Remove #ifdef. Add VFP regset.
12154 (the_low_target): Use arm_arch_setup.
12155
12b42a12
DJ
121562009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12159 the main thread again.
12160
ac8c974e
AR
121612009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12162
12163 Adding Neutrino gdbserver.
12164 * configure: Regenerated.
12165 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12166 * configure.srv (i[34567]86-*-nto*): New target.
12167 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12168 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12169 (nto_comctrl) [__QNX__]: New function.
12170 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12171
4424e0c3 121722009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12173
12174 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12175 srv_tgtobj.
12176
912cf4ba
PA
121772009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12178 Pedro Alves <pedro@codesourcery.com>
12179
12180 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12181 don't support CONTEXT_EXTENDED_REGISTERS.
12182 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12183 (the_low_target): Install them.
12184 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12185 failing with ERROR_PIPE_NOT_CONNECTED.
12186
aa5ca48f
DE
121872009-06-30 Doug Evans <dje@google.com>
12188 Pierre Muller <muller@ics.u-strasbg.fr>
12189
12190 Add h/w watchpoint support to x86-linux, win32-i386.
12191 * Makefile.in (SFILES): Add i386-low.c
12192 (i386_low_h): Define.
12193 (i386-low.o): Add dependencies.
12194 (linux-x86-low.o): Add i386-low.h dependency.
12195 (win32-i386-low.o): Ditto.
12196 * i386-low.c: New file.
12197 * i386-low.h: New file.
12198 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12199 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12200 * linux-low.c (linux_add_process): Initialize arch_private.
12201 (linux_remove_process): Free arch_private.
12202 (add_lwp): Initialize arch_private.
12203 (delete_lwp): Free arch_private.
12204 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12205 provided.
12206 * linux-low.h (process_info_private): New member arch_private.
12207 (lwp_info): New member arch_private.
12208 (linux_target_ops): New members new_process, new_thread,
12209 prepare_to_resume.
12210 (ptid_of): New macro.
12211 * linux-x86-low.c: Include stddef.h, i386-low.h.
12212 (arch_process_info): New struct.
12213 (arch_lwp_info): New struct.
12214 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12215 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12216 (i386_dr_low_get_status): New function.
12217 (x86_insert_point, x86_remove_point): New functions.
12218 (x86_stopped_by_watchpoint): New function.
12219 (x86_stopped_data_address): New function.
12220 (x86_linux_new_process, x86_linux_new_thread): New functions.
12221 (x86_linux_prepare_to_resume): New function.
12222 (the_low_target): Add entries for insert_point, remove_point,
12223 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12224 prepare_to_resume.
12225 * server.c (debug_hw_points): New global.
12226 (monitor_show_help): Document set debug-hw-points.
12227 (handle_query): Process "set debug-hw-points".
12228 * server.h (debug_hw_points): Declare.
12229 (paddress): Declare.
12230 * utils.c (NUMCELLS, CELLSIZE): New macros.
12231 (get_sell, xsnprintf, paddress): New functions.
12232 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12233 remove_point, stopped_by_watchpoint, stopped_data_address.
12234 * win32-i386-low.c: Include i386-low.h.
12235 (debug_reg_state): Replaces dr.
12236 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12237 (i386_dr_low_get_status): New function.
12238 (i386_insert_point, i386_remove_point): New functions.
12239 (i386_stopped_by_watchpoint): New function.
12240 (i386_stopped_data_address): New function.
12241 (i386_initial_stuff): Update.
12242 (get_thread_context,set_thread_context,i386_thread_added): Update.
12243 (the_low_target): Add entries for insert_point,
12244 remove_point, stopped_by_watchpoint, stopped_data_address.
12245 * win32-low.c (win32_insert_watchpoint): New function.
12246 (win32_remove_watchpoint): New function.
12247 (win32_stopped_by_watchpoint): New function.
12248 (win32_stopped_data_address): New function.
12249 (win32_target_ops): Add entries for insert_watchpoint,
12250 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12251 * win32-low.h (win32_target_ops): New members insert_point,
12252 remove_point, stopped_by_watchpoint, stopped_data_address.
12253
d993e290
PA
122542009-06-25 Pedro Alves <pedro@codesourcery.com>
12255
12256 * server.c (process_serial_event): Re-return unsupported, not
12257 error, if the type isn't recognized. Re-allow supporting only
12258 insert or remove packets. Also call require_running for
12259 breakpoints. Add missing break statement to default case. Tidy.
12260 * target.h (struct target_ops): Rename insert_watchpoint to
12261 insert_point, and remove_watchpoint to remove_point.
12262
12263 * linux-low.h (struct linux_target_ops): Likewise.
12264 * linux-low.c (linux_insert_watchpoint): Rename to ...
12265 (linux_insert_point): ... this. Adjust.
12266 (linux_remove_watchpoint): Rename to ...
12267 (linux_remove_point): ... this. Adjust.
12268 (linux_target_ops): Adjust.
12269 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12270 (cris_insert_point): ... this.
12271 (cris_remove_watchpoint): Rename to ...
12272 (cris_remove_point): ... this.
12273 (the_low_target): Adjust.
12274
0f54c268
PM
122752009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12276
12277 * server.c (handle_v_kill): Pass signal_pid to
12278 kill_inferior if multi_process is zero.
12279
c6314022
AR
122802009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12281
12282 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12283 * target.h (target_ops): Comment for *_watchpoint to make it clear
12284 the functions can get types '0' and '1'.
12285
4463ce24
AR
122862009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12287
12288 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12289 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12290 * regcache.c (get_regcache): Likewise.
12291 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12292 * win32-low.c (child_fetch_inferior_registers): Remove check for
12293 regno 0.
12294
cf8fd78b
PA
122952009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12296 Pedro Alves <pedro@codesourcery.com>
12297
12298 * target.h (struct target_ops) <supports_multi_process>: New
12299 callback.
12300 (target_supports_multi_process): New.
12301 * server.c (handle_query): Even if GDB reports support, only
12302 enable multi-process if the target also supports it. Report
12303 multi-process support only if the target backend supports it.
12304 * linux-low.c (linux_supports_multi_process): New function.
12305 (linux_target_ops): Install it as target_supports_multi_process
12306 callback.
12307
47c0c975
DE
123082009-05-24 Doug Evans <dje@google.com>
12309
e09875d4
DE
12310 Global renaming of find_thread_pid to find_thread_ptid.
12311 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12312 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12313 All callers updated.
12314
e27d73f6
DE
12315 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12316 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12317 directly.
12318
47c0c975
DE
12319 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12320 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12321 (linux_resume_one_lwp): Ditto.
12322
2acc282a
DE
123232009-05-23 Doug Evans <dje@google.com>
12324
12325 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12326 from struct inferior_list_entry * to struct lwp_info *.
12327 All callers updated.
12328
9f1036c1
DE
123292009-05-13 Doug Evans <dje@google.com>
12330
12331 * linux-x86-low.c: Don't include assert.h.
12332 (x86_siginfo_fixup): Use fatal, not assert.
12333 (x86_arch_setup): Fix comment.
12334
d0722149
DE
123352009-05-12 Doug Evans <dje@google.com>
12336
12337 Biarch support for i386/amd64 gdbserver.
12338 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12339 Add linux-x86-low.c.
12340 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12341 (linux-x86-low.o): Add.
12342 * linux-x86-64-low.c: Delete.
12343 * linux-i386-low.c: Delete.
12344 * linux-x86-low.c: New file.
12345 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12346 linux-x86-low.o.
12347 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12348 linux-x86-low.o.
12349 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12350 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12351 (linux_child_pid_to_exec_file): New function.
12352 (elf_64_header_p, elf_64_file_p): New functions.
12353 (siginfo_fixup): New function.
12354 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12355 give target a chance to convert layout.
12356 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12357 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12358
fdeb2a12
DE
123592009-05-07 Doug Evans <dje@google.com>
12360
12361 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12362 (regsets_store_inferior_registers): Ditto.
12363
a6dbe5df
PA
123642009-05-06 Pedro Alves <pedro@codesourcery.com>
12365
12366 PR server/10048
12367
12368 * linux-low.c (must_set_ptrace_flags): Delete.
12369 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12370 of the global.
12371 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12372 `lwp->must_set_ptrace_flags' instead.
ba42693b 12373 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12374 (linux_wait_1): ... not here.
12375
5091eb23
DE
123762009-04-30 Doug Evans <dje@google.com>
12377
9f767825
DE
12378 * inferiors.c (started_inferior_callback): New function.
12379 (attached_inferior_callback): New function.
12380 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12381 * server.c (print_started_pid, print_attached_pid): New functions.
12382 (detach_or_kill_for_exit): New function.
12383 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12384 * server.h (have_started_inferiors_p): Declare.
12385 (have_attached_inferiors_p): Declare.
12386
5091eb23
DE
12387 * inferiors.c (remove_process): Fix memory leak, free process.
12388 * linux-low.c (linux_remove_process): New function.
12389 (linux_kill): Call it instead of remove_process.
12390 (linux_detach, linux_wait_1): Ditto.
12391
155c8968
PA
123922009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12393
12394 * configure.srv: Add x86 Windows CE target.
12395
7fe519cb
UW
123962009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12397
12398 * inferiors.c (get_thread_process): Make global.
12399 * server.h (get_thread_process): Add prototype.
12400 * thread-db.c (find_one_thread): Use get_thread_process
12401 instead of current_process.
12402 (thread_db_get_tls_address): Do not crash if called when
12403 thread layer is not yet initialized.
12404
5472f405
UW
124052009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12406
12407 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12408 * spu-low.c (current_tid): Rename to ...
12409 (current_ptid): ... this.
12410 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12411 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12412 ptid_get_lwp (current_ptid) instead of current_tid.
12413 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12414 instead of current_tid. Use find_process_pid to verify pid
12415 argument is valid. Pass proper argument to remove_process.
12416 (spu_thread_alive): Compare current_ptid instead of current_tid.
12417 (spu_resume): Likewise.
12418
55ac2b99
PA
124192009-04-02 Pedro Alves <pedro@codesourcery.com>
12420
12421 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12422 variable.
12423
95954743
PA
124242009-04-01 Pedro Alves <pedro@codesourcery.com>
12425
12426 Implement the multiprocess extensions, and add linux multiprocess
12427 support.
12428
12429 * server.h (ULONGEST): Declare.
12430 (struct ptid, ptid_t): New.
12431 (minus_one_ptid, null_ptid): Declare.
12432 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12433 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12434 (struct inferior_list_entry): Change `id' type from unsigned from
12435 to ptid_t.
12436 (struct sym_cache, struct breakpoint, struct
12437 process_info_private): Forward declare.
12438 (struct process_info): Declare.
12439 (current_process): Declare.
12440 (all_processes): Declare.
12441 (initialize_inferiors): Declare.
12442 (add_thread): Adjust to use ptid_t.
12443 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12444 (add_process, remove_process, find_thread_pid): Declare.
12445 (find_inferior_id): Adjust to use ptid_t.
12446 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12447 (multi_process): Declare.
12448 (push_event): Adjust to use ptid_t.
12449 (read_ptid, write_ptid): Declare.
12450 (prepare_resume_reply): Adjust to use ptid_t.
12451 (clear_symbol_cache): Declare.
12452 * inferiors.c (all_processes): New.
12453 (null_ptid, minus_one_ptid): New.
12454 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12455 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12456 (add_thread): Change unsigned long to ptid. Remove gdb_id
12457 parameter. Adjust.
12458 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12459 (gdb_id_to_thread): Rename to ...
12460 (find_thread_pid): ... this. Change unsigned long to ptid.
12461 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12462 (loaded_dll, pull_pid_from_list): Adjust.
12463 (add_process, remove_process, find_process_pid)
12464 (get_thread_process, current_process, initialize_inferiors): New.
12465 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12466 (struct target_waitstatus) <related_pid>: Ditto.
12467 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12468 return type to int.
12469 (struct target_ops) <join>: Add `pid' argument.
12470 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12471 (struct target_ops) <wait>: Add `ptid' field. Change return type
12472 to ptid.
12473 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12474 (mywait): Add `ptid' argument. Change return type to ptid_t.
12475 (target_pid_to_str): Declare.
12476 * target.c (set_desired_inferior): Adjust to use ptids.
12477 (mywait): Add new `ptid' argument. Adjust.
12478 (target_pid_to_str): New.
12479 * mem-break.h (free_all_breakpoints): Declare.
12480 * mem-break.c (breakpoints): Delelete.
12481 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12482 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12483 to use per-process breakpoint list.
12484 (free_all_breakpoints): New.
12485 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12486 (symbol_cache, all_symbols_looked_up): Delete.
12487 (hexchars): New.
12488 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12489 read_ptid): New.
12490 (prepare_resume_reply): Change ptid argument's type from unsigned
12491 long to ptid_t. Adjust. Implement W;process and X;process.
12492 (free_sym_cache, clear_symbol_cache): New.
12493 (look_up_one_symbol): Adjust to per-process symbol cache. *
12494 * server.c (cont_thread, general_thread, step_thread): Change type
12495 to ptid_t.
12496 (attached): Delete.
12497 (multi_process): New.
12498 (last_ptid): Change type to ptid_t.
12499 (struct vstop_notif) <ptid>: Change type to ptid_t.
12500 (queue_stop_reply, push_event): Change `ptid' argument's type to
12501 ptid_t.
12502 (discard_queued_stop_replies): Add `pid' argument.
12503 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12504 changes. Don't reference the `attached' global.
12505 (attach_inferior): Adjust to mywait interface changes.
12506 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12507 features. Handle and report "multiprocess+". Handle
12508 "qAttached:PID".
12509 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12510 changes.
12511 (handle_v_kill): New.
12512 (handle_v_stopped): Adjust to use target_pid_to_str.
12513 (handle_v_requests): Allow multiple attaches and runs when
12514 multiprocess extensions are in effect. Handle "vKill".
12515 (myresume): Adjust to use ptids.
12516 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12517 (handle_status): Adjust to discard_queued_stop_replies interface
12518 change.
12519 (first_thread_of, kill_inferior_callback)
12520 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12521 (main): Call initialize_inferiors. Adjust to use ptids, killing
12522 and detaching from all inferiors. Handle multiprocess packet
12523 variants.
12524 * linux-low.h: Include gdb_proc_service.h.
12525 (struct process_info_private): New.
12526 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12527 <lwpid_of>: Use ptid_get_lwp.
12528 (get_lwp_thread): Adjust.
12529 (struct lwp_info): Add `dead' member.
12530 (find_lwp_pid): Declare.
12531 * linux-low.c (thread_db_active): Delete.
12532 (new_inferior): Adjust comment.
12533 (inferior_pid): Delete.
12534 (linux_add_process): New.
12535 (handle_extended_wait): Adjust.
12536 (add_lwp): Change unsigned long to ptid.
12537 (linux_create_inferior): Add process to processes table. Adjust
12538 to use ptids. Don't set new_inferior here.
12539 (linux_attach_lwp): Rename to ...
12540 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12541 it. Adjust to use ptids.
12542 (linux_attach_lwp): New.
12543 (linux_attach): Add process to processes table. Don't set
12544 new_inferior here.
12545 (struct counter): New.
12546 (second_thread_of_pid_p, last_thread_of_process_p): New.
12547 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12548 multiple processes.
12549 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12550 processes. Remove process from process table.
12551 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12552 to multiple processes.
12553 (any_thread_of): New.
12554 (linux_detach): Add `pid' argument, and handle it. Remove process
12555 from processes table.
12556 (linux_join): Add `pid' argument. Handle it.
12557 (linux_thread_alive): Change unsighed long argument to ptid_t.
12558 Consider dead lwps as not being alive.
12559 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12560 threads we're not interested in.
12561 (same_lwp, find_lwp_pid): New.
12562 (linux_wait_for_lwp): Change `pid' argument's type from int to
12563 ptid_t. Adjust.
12564 (linux_wait_for_event): Rename to ...
12565 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12566 from int to ptid_t. Adjust.
12567 (linux_wait_for_event): New.
12568 (linux_wait_1): Add `ptid' argument. Change return type to
12569 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12570 that exit from the process table.
12571 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12572 Adjust.
12573 (mark_lwp_dead): New.
12574 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12575 stopping all threads, mark its main lwp as dead.
12576 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12577 ptids.
12578 (fetch_register, usr_store_inferior_registers)
12579 (regsets_fetch_inferior_registers)
12580 (regsets_store_inferior_registers, linux_read_memory)
12581 (linux_write_memory): Inline `inferior_pid'.
12582 (linux_look_up_symbols): Adjust to use per-process
12583 `thread_db_active'.
12584 (linux_request_interrupt): Adjust to use ptids.
12585 (linux_read_auxv): Inline `inferior_pid'.
12586 (initialize_low): Don't reference thread_db_active.
12587 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12588 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12589 (ps_getpid): Return the pid of the current inferior.
12590 * thread-db.c (proc_handle, thread_agent): Delete.
12591 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12592 per-process data.
12593 (find_one_thread): Change argument type to ptid_t. Adjust to
12594 per-process data.
12595 (maybe_attach_thread): Adjust to per-process data and ptids.
12596 (thread_db_find_new_threads): Ditto.
12597 (thread_db_init): Ditto.
12598 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12599 processes table. Adjust to use ptids.
12600 (spu_kill, spu_detach): Adjust interface. Remove process from
12601 processes table.
12602 (spu_join, spu_thread_alive): Adjust interface.
12603 (spu_wait): Adjust interface. Remove process from processes
12604 table. Adjust to use ptids.
12605 * win32-low.c (current_inferior_tid): Delete.
12606 (current_inferior_ptid): New.
12607 (debug_event_ptid): New.
12608 (thread_rec): Take a ptid. Adjust.
12609 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12610 (child_delete_thread): Ditto.
12611 (do_initial_child_stuff): Add `attached' argument. Add process to
12612 processes table.
12613 (child_fetch_inferior_registers, child_store_inferior_registers):
12614 Adjust.
12615 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12616 (win32_attach): Pass 1 to do_initial_child_stuff.
12617 (win32_kill): Adjust interface. Remove process from processes
12618 table.
12619 (win32_detach): Ditto.
12620 (win32_join): Adjust interface.
12621 (win32_thread_alive): Take a ptid.
12622 (win32_resume): Adjust to use ptids.
12623 (get_child_debug_event): Ditto.
12624 (win32_wait): Adjust interface. Remove exiting process from
12625 processes table.
12626
bd99dc85
PA
126272009-04-01 Pedro Alves <pedro@codesourcery.com>
12628
12629 Non-stop mode support.
12630
12631 * server.h (non_stop): Declare.
12632 (gdb_client_data, handler_func): Declare.
12633 (delete_file_handler, add_file_handler, start_event_loop):
12634 Declare.
12635 (handle_serial_event, handle_target_event, push_event)
12636 (putpkt_notif): Declare.
12637 * target.h (enum resume_kind): New.
12638 (struct thread_resume): Replace `step' field by `kind' field.
12639 (TARGET_WNOHANG): Define.
12640 (struct target_ops) <wait>: Add `options' argument.
12641 <supports_non_stop, async, start_non_stop>: New fields.
12642 (target_supports_non_stop, target_async): New.
12643 (start_non_stop): Declare.
12644 (mywait): Add `options' argument.
12645 * target.c (mywait): Add `options' argument. Print child exit
12646 notifications here.
12647 (start_non_stop): New.
12648 * server.c (non_stop, own_buf, mem_buf): New globals.
12649 (struct vstop_notif): New.
12650 (notif_queue): New global.
12651 (queue_stop_reply, push_event, discard_queued_stop_replies)
12652 (send_next_stop_reply): New.
12653 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12654 interface changes.
12655 (attach_inferior): In non-stop mode, don't wait for the target
12656 here.
12657 (handle_general_set): Handle QNonStop.
12658 (handle_query): When handling qC, return the current general
12659 thread, instead of the first thread of the list.
12660 (handle_query): If the backend supports non-stop mode, include
12661 QNonStop+ in the qSupported query response.
12662 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12663 and non-stop mode.
12664 (handle_v_attach, handle_v_run): Handle non-stop mode.
12665 (handle_v_stopped): New.
12666 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12667 (myresume): Adjust to use resume_kind. Handle non-stop.
12668 (queue_stop_reply_callback): New.
12669 (handle_status): Handle non-stop mode.
12670 (main): Clear non_stop flag on reconnection. Use the event-loop.
12671 Refactor serial protocol handling from here ...
12672 (process_serial_event): ... to this new function. When GDB
12673 selects any thread, select one here. In non-stop mode, wait until
12674 GDB acks all pending events before exiting.
12675 (handle_serial_event, handle_target_event): New.
12676 * remote-utils.c (remote_open): Install remote_desc in the event
12677 loop.
12678 (remote_close): Remove remote_desc from the event loop.
12679 (putpkt_binary): Rename to...
12680 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12681 (putpkt_binary): New as wrapper around putpkt_binary_1.
12682 (putpkt_notif): New.
12683 (prepare_resume_reply): In non-stop mode, don't change the
12684 general_thread.
12685 * event-loop.c: New.
12686 * Makefile.in (OBJ): Add event-loop.o.
12687 (event-loop.o): New rule.
12688
12689 * linux-low.h (pid_of): Moved here.
12690 (lwpid_of): New.
12691 (get_lwp_thread): Use lwpid_of.
12692 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12693 * linux-low.c (pid_of): Delete.
12694 (inferior_pid): Use lwpid_of.
12695 (linux_event_pipe): New.
12696 (target_is_async_p): New.
12697 (delete_lwp): New.
12698 (handle_extended_wait): Use lwpid_of.
12699 (add_lwp): Don't set lwpid field.
12700 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12701 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12702 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12703 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12704 first. Adjust to linux_wait_for_event interface changes. Use
12705 lwpid_of.
12706 (linux_detach): Don't delete the main lwp here.
12707 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12708 (status_pending_p): Don't consider explicitly suspended lwps.
12709 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12710 pointer. Add OPTIONS argument. Change return type to int. Use
12711 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12712 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12713 pointer. Add status pointer argument. Return a pid instead of a
12714 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12715 changes. In non-stop mode, don't switch to a random thread.
12716 (linux_wait): Rename to...
12717 (linux_wait_1): ... this. Add target_options argument, and handle
12718 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12719 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12720 clean exit and signal exit code. Don't stop all threads in
12721 non-stop mode. In all-stop mode, only stop all threads when
12722 reporting a stop to GDB. Handle explicit thread stop requests.
12723 (async_file_flush, async_file_mark): New.
12724 (linux_wait): New.
12725 (send_sigstop): Use lwpid_of.
12726 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12727 interface changes. In non-stop mode, don't switch to a random
12728 thread.
12729 (linux_resume_one_lwp): Use lwpid_of.
12730 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12731 (linux_resume_one_thread): ... this. Handle resume_stop. In
12732 non-stop mode, don't look for pending flag in all threads.
12733 (resume_status_pending_p): Don't consider explicitly suspended
12734 threads.
12735 (my_waitpid): Reimplement. Emulate __WALL.
12736 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12737 Use lwpid_of.
12738 (sigchld_handler, linux_supports_non_stop, linux_async)
12739 (linux_start_non_stop): New.
12740 (linux_target_ops): Register linux_supports_non_stop, linux_async
12741 and linux_start_non_stop.
12742 (initialize_low): Install SIGCHLD handler.
12743 * thread-db.c (thread_db_create_event, find_one_thread)
12744 (thread_db_get_tls_address): Use lwpid_of.
12745 * win32-low.c (win32_detach): Adjust to use resume_kind.
12746 (win32_wait): Add `options' argument.
12747 * spu-low.c (spu_resume): Adjust to use resume_kind.
12748 (spu_wait): Add `options' argument.
12749
5b1c542e
PA
127502009-04-01 Pedro Alves <pedro@codesourcery.com>
12751
12752 Decouple target code from remote protocol.
12753
12754 * target.h (enum target_waitkind): New.
12755 (struct target_waitstatus): New.
12756 (struct target_ops) <wait>: Return an unsigned long. Take a
12757 target_waitstatus pointer instead of a char pointer.
12758 (mywait): Likewise.
12759 * target.c (mywait): Change prototype to return an unsigned long.
12760 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12761 * server.h (thread_from_wait, old_thread_from_wait): Delete
12762 declarations.
12763 (prepare_resume_reply): Change prototype to take a
12764 target_waitstatus.
12765 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12766 (last_status, last_ptid): New.
12767 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12768 pid instead of a signal.
12769 (attach_inferior): Remove "status" and "signal" parameters.
12770 Adjust.
12771 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12772 not as an address.
12773 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12774 (handle_v_requests, myresume): Remove "status" and "signal"
12775 parameters. Adjust.
12776 (handle_status): New.
12777 (main): Delete local `status'. Adjust.
12778 * remote-utils.c: Include target.h.
12779 (prepare_resume_reply): Change prototype to take a
12780 target_waitstatus. Adjust.
12781
12782 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12783 interface.
12784 * spu-low.c (spu_wait): Adjust.
12785 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12786 Delete.
12787 (win32_wait): Adjust.
12788
2bd7c093
PA
127892009-04-01 Pedro Alves <pedro@codesourcery.com>
12790
12791 * target.h (struct thread_resume): Delete leave_stopped member.
12792 (struct target_ops): Add a `n' argument to the `resume' callback.
12793 * server.c (start_inferior): Adjust.
12794 (handle_v_cont, myresume): Adjust.
12795 * linux-low.c (check_removed_breakpoint): Adjust to resume
12796 interface change, and to removed leave_stopped field.
12797 (resume_ptr): Delete.
12798 (struct thread_resume_array): New.
12799 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12800 resume interface change.
12801 (linux_continue_one_thread, linux_queue_one_thread)
12802 (resume_status_pending_p): Check if the resume field is NULL
12803 instead of checking the leave_stopped member.
12804 (linux_resume): Adjust to the target resume interface change.
12805 * spu-low.c (spu_resume): Adjust to the target resume interface
12806 change.
12807 * win32-low.c (win32_detach, win32_resume): Ditto.
12808
c35fafde
PA
128092009-04-01 Pedro Alves <pedro@codesourcery.com>
12810
12811 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12812 flag.
12813 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12814 pending.
12815 (linux_continue_one_thread): Only preserve the stepping flag if
12816 there's a pending breakpoint.
12817
0a59d50b
PA
128182009-03-31 Pedro Alves <pedro@codesourcery.com>
12819
12820 * server.c (main): After the inferior having exited, call
12821 remote_close before exiting gdbserver.
12822
f04c6d38
TJB
128232009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12824
12825 Fix size of FPSCR in Power 7 processors.
12826 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12827 (PPC_FEATURE_HAS_DFP): New #define.
12828 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12829 size of the FPSCR.
12830
78e5cee6
PA
128312009-03-23 Pedro Alves <pedro@codesourcery.com>
12832
12833 * server.c (handle_query) Whitespace and formatting.
12834
1b3f6016
PA
128352009-03-22 Pedro Alves <pedro@codesourcery.com>
12836
12837 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12838 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12839 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12840 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12841 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12842 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12843 Makefile.in, configure.ac: Fix whitespace throughout.
12844 * configure: Regenerate.
12845
a07b2135
PA
128462009-03-22 Pedro Alves <pedro@codesourcery.com>
12847
12848 * inferiors.c (find_inferior): Make it safe for the callback
12849 function to delete the currently iterated inferior.
12850
67cc2626
PA
128512009-03-22 Pedro Alves <pedro@codesourcery.com>
12852
12853 * Makefile.in (linuw_low_h): Move higher.
12854 (thread-db.o): Depend on $(linux_low_h).
12855
54a0b537
PA
128562009-03-17 Pedro Alves <pedro@codesourcery.com>
12857
12858 Rename "process" to "lwp" throughout.
12859
12860 * linux-low.c (all_processes): Rename to...
12861 (all_lwps): ... this.
12862 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12863 (add_process): Rename to ...
12864 (add_lwp): ... this. Adjust.
12865 (linux_create_inferior): Adjust.
12866 (linux_attach_lwp): Adjust.
12867 (linux_attach): Adjust.
12868 (linux_kill_one_process): Rename to ...
12869 (linux_kill_one_lwp): ... this. Adjust.
12870 (linux_kill): Adjust.
12871 (linux_detach_one_process): Rename to ...
12872 (linux_detach_one_lwp): ... this. Adjust.
12873 (linux_detach): Adjust.
12874 (check_removed_breakpoint): Adjust.
12875 (status_pending_p): Adjust.
12876 (linux_wait_for_process): Rename to ...
12877 (linux_wait_for_lwp): ... this. Adjust.
12878 (linux_wait_for_event): Adjust.
12879 (send_sigstop): Adjust.
12880 (wait_for_sigstop): Adjust.
12881 (stop_all_processes): Rename to ...
12882 (stop_all_lwps): ... this.
12883 (linux_resume_one_process): Rename to ...
12884 (linux_resume_one_lwp): ... this. Adjust.
12885 (linux_set_resume_request, linux_continue_one_thread)
12886 (linux_queue_one_thread, resume_status_pending_p)
12887 (usr_store_inferior_registers, regsets_store_inferior_registers)
12888 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12889 Adjust.
12890 * linux-low.h (get_process): Rename to ...
12891 (get_lwp): ... this. Adjust.
12892 (get_thread_process): Rename to ...
12893 (get_thread_lwp): ... this. Adjust.
12894 (get_process_thread): Rename to ...
12895 (get_lwp_thread): ... this. Adjust.
12896 (struct process_info): Rename to ...
12897 (struct lwp_info): ... this.
12898 (all_processes): Rename to ...
12899 (all_lwps): ... this.
12900 * proc-service.c (ps_lgetregs): Adjust.
12901 * thread-db.c (thread_db_create_event, find_one_thread)
12902 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12903
0b16c5cf
PA
129042009-03-14 Pedro Alves <pedro@codesourcery.com>
12905
12906 * server.c (handle_query): Handle "qAttached".
12907
32de4b9d
NS
129082009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12909
12910 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12911 GPLv3, update license URL.
12912
2aecd87f
DE
129132009-03-01 Doug Evans <dje@google.com>
12914
93efd302 12915 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12916 (server_h): Add gdb_signals.h.
12917 (signals.o): Update.
12918 * server.h (target_signal_from_host,target_signal_to_host_p)
12919 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12920
86b1f9c5
PM
129212009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12922
12923 * remote-utils.c (getpkt): Also generate remote-debug
12924 information if noack_mode is set.
12925
4aa995e1
PA
129262009-02-06 Pedro Alves <pedro@codesourcery.com>
12927
12928 * server.c (handle_query): Report qXfer:siginfo:read and
12929 qXfer:siginfo:write as supported and handle them.
12930 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12931 * linux-low.c (linux_xfer_siginfo): New.
12932 (linux_target_ops): Set it.
12933
62709adf
PA
129342009-01-26 Pedro Alves <pedro@codesourcery.com>
12935
12936 * server.c (gdbserver_usage): Mention --remote-debug.
12937 (main): Accept '--remote-debug' switch.
12938
aef93bd7
DE
129392009-01-18 Doug Evans <dje@google.com>
12940
12941 * regcache.c (new_register_cache): No need to check result of xcalloc.
12942 * server.c (handle_search_memory): Back out calls to xmalloc,
12943 result is checked and error is returned to user upon failure.
12944 (handle_query): Ditto. Add more checks for result of malloc.
12945 (handle_v_cont): Check result of malloc, report error back to
12946 user upon failure.
12947 (handle_v_run): Ditto. Call freeargv.
12948 * server.h (freeargv): Declare.
12949 * utils.c (freeargv): New fn.
12950
54363045
DE
129512009-01-15 Doug Evans <dje@google.com>
12952
f626972c
DE
12953 * gdbreplay.c (perror_with_name): Make arg const char *.
12954 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12955 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12956 * utils.c (perror_with_name): Make arg const char *.
54363045 12957
18aae699
PA
129582009-01-14 Pedro Alves <pedro@codesourcery.com>
12959
12960 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12961 when handling a EXIT_PROCESS_DEBUG_EVENT.
12962
ff703abe
JB
129632009-01-06 Joel Brobecker <brobecker@adacore.com>
12964
12965 * gdbreplay.c (gdbreplay_version): Update copyright year.
12966 * server.c (gdbserver_version): Likewise.
12967
f21cc1a2 129682009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12969
12970 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12971 (handle_extended_wait): Improve comment.
0e21c1ec 12972
bca929d3
DE
129732008-12-13 Doug Evans <dje@google.com>
12974
12975 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12976 * server.h (ATTR_MALLOC): New macro.
12977 (xmalloc,xcalloc,xstrdup): Declare.
12978 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12979 * inferiors.c: Ditto.
12980 * linux-low.c: Ditto.
12981 * mem-break.c: Ditto.
12982 * regcache.c: Ditto.
12983 * remote-utils.c: Ditto.
12984 * server.c: Ditto.
12985 * target.c: Ditto.
12986 * win32-low.c: Ditto.
12987
97438e3f
DE
129882008-12-12 Doug Evans <dje@google.com>
12989
896c7fbb
DE
12990 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12991 in debugging printf.
12992
97438e3f
DE
12993 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12994
e3b886f8
DE
129952008-12-09 Doug Evans <dje@google.com>
12996
12997 * linux-low.h (struct process_info): Delete member tid, unused.
12998 * thread-db.c (find_one_thread): Update.
12999 (maybe_attach_thread): Update.
13000
07e059b5
VP
130012008-12-02 Pedro Alves <pedro@codesourcery.com>
13002
889bf7c5
PA
13003 * target.h (struct target_ops): Add qxfer_osdata member.
13004 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13005 and dirent.h.
13006 (linux_qxfer_osdata): New functions.
13007 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13008 callback.
13009 * server.c (handle_query): Handle "qXfer:osdata:read:".
13010 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13011 (buffer_xml_printf): New functions.
13012 * server.h (struct buffer): New.
13013 (buffer_grow_str, buffer_grow_str0): New macros.
13014 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13015 (buffer_xml_printf): Declare.
07e059b5 13016
4cab47ab
DE
130172008-11-24 Doug Evans <dje@google.com>
13018
13019 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13020
f142445f
DJ
130212008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13022
13023 * server.c (handle_v_run): Always use the supplied argument list.
13024
d0107bb6 130252008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13026
d0107bb6
BW
13027 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13028 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13029
2c4ad781
TJB
130302008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13031
13032 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13033 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13034 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13035 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13036 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13037 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13038 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13039 XML target descriptions.
13040 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13041 when inferior is running on an ISA 2.05 or later processor. Add
13042 special case to return offset for full 64-bit slot of FPSCR when
13043 in 32-bits.
13044
dfb64f85
DJ
130452008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13046
13047 * Makefile.in (SFILES, clean): Added sparc64 files.
13048 (reg-sparc64.o, reg-sparc64.c): New.
13049 * configure.srv (sparc*-*-linux*): New configuration.
13050 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13051 syscall arguments for SPARC.
13052 (regsets_store_inferior_registers): Likewise.
13053 * linux-sparc-low.c: New file.
13054
66b6e1dd
DE
130552008-10-21 Doug Evans <dje@google.com>
13056
13057 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13058 (READLINE_DIR,READLINE_DEP): Delete.
13059 (INTERNAL_CFLAGS): Update.
13060 (LINTFLAGS): Update.
13061
9b710a42
PA
130622008-10-10 Pedro Alves <pedro@codesourcery.com>
13063
13064 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13065 whole argv from the last run, not just argv[0].
13066
5822d809
PA
130672008-09-08 Pedro Alves <pedro@codesourcery.com>
13068
13069 * regcache.c (new_register_cache): Return NULL if the register
13070 cache size isn't known yet.
13071 (free_register_cache): Avoid dereferencing a NULL regcache.
13072
74aac56f
DJ
130732008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13074
13075 * configure.srv: Merge MIPS and MIPS64.
13076
400b20f5
MR
130772008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13078
13079 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13080
677c5bb1
LM
130812008-08-18 Luis Machado <luisgpm@br.ibm.com>
13082
13083 * Makefile.in: Add required vsx dependencies.
13084
13085 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13086 Declare init_registers_powerpc_vsx32l.
13087 Declare init_registers_powerpc_vsx64l.
13088 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13089 (ppc_arch_setup): Check for VSX in hwcap.
13090 (ppc_fill_vsxregset): New function.
13091 (ppc_store_vsxregset): New function.
13092 Add new VSX entry in regset_info target_regsets.
13093
13094 * configure.srv: Add new VSX dependencies.
13095
a6f3e723
SL
130962008-08-12 Pedro Alves <pedro@codesourcery.com>
13097
13098 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13099 (remote_open): Set or clear transport_is_reliable.
13100 (putpkt_binary): Don't expect acks in noack mode.
13101 (getpkt): Don't send ack/nac in noack mode.
13102 * server.c (handle_general_set): Handle QStartNoAckMode.
13103 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13104 qSupported.
13105 (main): Reset noack_mode on every connection.
13106 * server.h (noack_mode): Declare.
13107
a417dc56
RW
131082008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13109
13110 * Makefile.in (GDBREPLAY_OBS): New variable.
13111 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13112
3221518c
UW
131132008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13114 Daniel Jacobowitz <dan@codesourcery.com>
13115
13116 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13117 (usr_store_inferior_registers): Likewise.
13118 (regsets_store_inferior_registers): Likewise.
13119
ec56be1b
PA
131202008-07-31 Rolf Jansen <rj@surtec.com>
13121 Pedro Alves <pedro@codesourcery.com>
13122
13123 * configure.ac: Check for memmem declaration.
13124 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13125 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13126 (disable_packet_qfThreadInfo): Unconditionally compile.
13127 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13128 * configure, config.in: Regenerate.
13129
2fe5e3ff
DE
131302008-07-28 Doug Kwan <dougkwan@google.com>
13131
13132 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13133 (linux_write_memory): Remove declaration of errno.
13134
836acd6d
UW
131352008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13136
13137 * linux-low.c (handle_extended_wait): Do not use "status"
13138 variable uninitialized.
13139
aeba519e
PA
131402008-07-07 Pedro Alves <pedro@codesourcery.com>
13141
13142 * server.c (handle_v_attach): Inhibit reporting dll changes.
13143
db42f210
PA
131442008-06-27 Pedro Alves <pedro@codesourcery.com>
13145
13146 * remote-utils.c (prepare_resume_reply): If requested, don't
13147 output "thread:TID" in the T stop reply.
13148
13149 * server.c (disable_packet_vCont, disable_packet_Tthread)
13150 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13151 (handle_query): If requested, disable support for qC, qfThreadInfo
13152 and qsThreadInfo.
13153 (handle_v_requests): If requested, disable support for vCont.
13154 (gdbserver_show_disableable): New.
13155 (main): Handle --disable-packet and --disable-packet=LIST.
13156
13157 * server.h (disable_packet_vCont, disable_packet_Tthread)
13158 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13159
8e4c5421
CD
131602008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13161
13162 * server.c (gdbserver_usage): Mention --version.
13163
6e23a804
DJ
131642008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * Makefile.in (gdbreplay.o): New rule.
13167
90aa6a40
JM
131682008-06-06 Joseph Myers <joseph@codesourcery.com>
13169
13170 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13171 message, not gdbserver.
13172
c16158bc 131732008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13174 Nathan Sidwell <nathan@codesourcery.com>
13175 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13176
13177 * acinclude.m4: Include ../../config/acx.m4.
13178 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13179 * configure, config.in: Regenerate.
13180 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13181 * server.c (gdbserver_version): Print PKGVERSION.
13182 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13183 (main): Adjust gdbserver_usage calls.
13184 * gdbreplay.c (version, host_name): Add declarations.
13185 (gdbreplay_version, gdbreplay_usage): New.
13186 (main): Accept --version and --help options.
13187
aeb75bf5
DJ
131882008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13189
13190 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13191 (arm_breakpoint_at): Handle Thumb.
13192 (the_low_target): Add comment.
13193
76b233dd
UW
131942008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13195
13196 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13197
08388c79
DE
131982008-05-09 Doug Evans <dje@google.com>
13199
a3c83fae
DE
13200 * server.h (decode_search_memory_packet): Declare.
13201 * remote-utils.c (decode_search_memory_packet): New fn.
13202 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13203 (handle_search_memory): New fn.
13204 (handle_query): Process qSearch:memory packets.
13205
bb9c3d36
UW
132062008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13207
13208 * regcache.c (registers_length): Remove.
13209 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13210 full register packet.
13211 * regcache.h (registers_length): Remove prototype.
13212 * server.h (PBUFSIZ): Define to 16384.
13213
7284e1be
UW
132142008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13215
13216 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13217 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13218 powerpc-64l.o, and powerpc-altivec64l.o.
13219 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13220 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13221 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13222 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13223 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13224 to srv_xmlfiles.
13225
13226 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13227 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13228 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13229 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13230 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13231 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13232 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13233 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13234 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13235 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13236 (clean): Update.
13237
13238 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13239 (init_registers_powerpc_32l): ... this new prototype.
13240 (init_registers_powerpc_32): Remove, replace by ...
13241 (init_registers_powerpc_altivec32l): ... this new prototype.
13242 (init_registers_powerpc_e500): Remove, replace by ...
13243 (init_registers_powerpc_e500l): ... this new prototype.
13244 (init_registers_ppc64): Remove, replace by ...
13245 (init_registers_powerpc_64l): ... this new prototype.
13246 (init_registers_powerpc_64): Remove, replace by ...
13247 (init_registers_powerpc_altivec64l): ... this new prototype.
13248 (ppc_num_regs): Set to 73.
13249 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13250 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13251 (ppc_cannot_store_register): Handle orig_r3 and trap.
13252 (ppc_arch_setup): Update init_registers_... calls.
13253 (ppc_fill_gregset): Handle orig_r3 and trap.
13254
13255 * inferiors.c (clear_inferiors): Reset current_inferior.
13256
fdc59709
PB
132572008-04-23 Paolo Bonzini <bonzini@gnu.org>
13258
889bf7c5
PA
13259 * acinclude.m4: Add override.m4.
13260 * configure: Regenerate.
fdc59709 13261
c9b2f845
UW
132622008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13263
13264 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13265 initial call to init_register_ppc64.
13266
550512b8
UW
132672008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13268
43aaf8b6
PA
13269 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13270 single powerpc*-*-linux* case.
550512b8
UW
13271 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13272
b6430ec3
UW
132732008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13274
13275 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13276 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13277 from reg_xmlfiles.
13278 * linux-ppc-low.c: Include <elf.h>.
13279 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13280 (ppc_hwcap): New global variable.
13281 (ppc_regmap): Remove __SPE__ #ifdef sections.
13282 (ppc_regmap_e500): New global variable.
13283 (ppc_cannot_store_register): Update __SPE__ special case.
13284 (ppc_get_hwcap): New function.
13285 (ppc_arch_setup): Use it to determine whether inferior supports
13286 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13287 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13288 Do not access registers if target does not support AltiVec.
13289 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13290 Do not access registers if target does not support SPE.
13291 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13292
52fa2412
UW
132932008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13294
13295 * linux-low.c (disabled_regsets, num_regsets): New.
13296 (use_regsets_p): Delete.
13297 (linux_wait_for_process): Clear disabled_regsets.
13298 (regsets_fetch_inferior_registers): Check and set it.
13299 (regsets_store_inferior_registers): Likewise.
13300 (linux_fetch_registers, linux_store_registers): Do not use
13301 use_regsets_p.
13302 (initialize_low): Allocate disabled_regsets.
13303
e28b3332
DJ
133042008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13305
13306 * Makefile.in (LIBOBJS): New.
13307 (OBS): Use LIBOBJS.
13308 (memmem.o): New rule.
13309 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13310 * configure: Regenerated.
13311
4536995d
UW
133122008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13313
13314 * server.c (handle_query): Never return "unsupported" for
13315 qXfer:features:read queries.
13316
221c031f
UW
133172008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13318
13319 * server.c (get_features_xml): Fix inverted condition.
13320 (handle_query): Always support qXfer:feature:read.
13321
ccd213ac
DJ
133222008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13323
13324 * server.c (wrapper_argv): New.
13325 (start_inferior): Handle wrapper_argv. If set, expect an extra
13326 trap.
13327 (gdbserver_usage): Document --wrapper.
13328 (main): Parse --wrapper.
13329
6fe305f7
UW
133302008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13331
13332 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13333 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13334 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13335 (ppc_set_pc): Likewise.
13336 (ppc_arch_setup): New function.
13337 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13338 of collect_register.
889bf7c5 13339 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13340
5b0a002e
UW
133412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13342
13343 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13344 instead of linux-ppc64-low.o.
13345 * linux-ppc64-low.c: Remove file.
13346 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13347 (linux-ppc64-low.o): Remove rule.
13348
13349 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13350 (init_registers_powerpc_64): Likewise.
13351 (ppc_regmap): Conditionally define depending on __powerpc64__.
13352 (ppc_cannot_store_register): Do not special-case "fpscr" when
13353 compiled on __powerpc64__.
13354 (ppc_collect_ptrace_register): New function.
13355 (ppc_supply_ptrace_register): New function.
13356 (ppc_breakpoint): Change type to "unsigned int".
13357 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13358 (the_low_target): Conditionally provide initializers for the
889bf7c5 13359 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13360 collect_ptrace_register and supply_ptrace_register members.
13361
9b4b61c8
UW
133622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13363
13364 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13365 * server.c (gdbserver_xmltarget): Define.
13366 (get_features_xml): Use it to replace "target.xml" and arch_string.
13367
13368 * configure.srv: Remove srv_xmltarget. Add XML files that were
13369 mentioned there to srv_xmlfiles instead. Remove conditional tests
13370 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13371 srv_xmlfiles and srv_regobj to include all possible choices.
13372 * configure.ac (srv_xmltarget): Remove.
13373 (srv_xmlfiles): Do not add "target.xml".
13374 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13375 checks for supplementary target information.
13376 * configure: Regenerate.
13377 * Makefile.in (XML_TARGET): Remove.
13378 (target.xml): Remove rule.
13379 (clean): Do not clean up target.xml.
13380 (.PRECIOUS): Do not mention target.xml.
13381
13382 * target.h (struct target_ops): Remove arch_string member.
13383 * linux-low.c (linux_arch_string): Remove.
13384 (linux_target_ops): Remove arch_string initializer.
13385 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13386 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13387 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13388 * spu-low.c (spu_arch_string): Remove.
13389 (spu_target_ops): Remove arch_string initializer.
13390 * win32-low.c (win32_arch_string): Remove.
13391 (win32_target_ops): Remove arch_string initializer.
13392 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13393 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13394 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13395
ee1a7ae4
UW
133962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13397
13398 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13399 by collect_ptrace_register and supply_ptrace_register hooks.
13400 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13401 instead of checking for the_low_target.left_pad_xfer.
13402 (usr_store_inferior_registers): Use collect_ptrace_register callback
13403 instead of checking for the_low_target.left_pad_xfer.
13404
13405 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13406 (s390_supply_ptrace_register): Likewise.
13407 (s390_fill_gregset): Call s390_collect_ptrace_register.
13408 (the_low_target): Update.
13409
13410 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13411 (ppc_supply_ptrace_register): Likewise.
13412 (the_low_target): Update.
13413
13414 * linux-i386-low.c (the_low_target): Update.
13415 * linux-x86-64-low.c (the_low_target): Update.
13416
d61ddec4
UW
134172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13418
13419 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13420 reg-s390.o and reg-s390x.o.
13421
13422 * linux-low.c (new_inferior): New global variable.
13423 (linux_create_inferior, linux_attach): Set it.
13424 (linux_wait_for_process): Call the_low_target.arch_setup after the
13425 target has stopped for the first time.
13426 (initialize_low): Do not call the_low_target.arch_setup.
13427
13428 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13429 (s390_set_pc): Likewise.
13430 (s390_arch_setup): New function.
13431 (the_low_target): Use s390_arch_setup as arch_setup routine.
13432
13433 * regcache.c (realloc_register_cache): New function.
13434 (set_register_cache): Call it for each existing regcache.
13435
d05b4ac3
UW
134362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13437
13438 * server.h (init_registers): Remove prototype.
13439
13440 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13441 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13442 instead of init_registers ().
13443 * linux-arm-low.c (init_registers_arm): Add prototype.
13444 (init_registers_arm_with_iwmmxt): Likewise.
13445 (the_low_target): Add initializer for arch_setup field.
13446 * linux-cris-low.c (init_registers_cris): Add prototype.
13447 (the_low_target): Add initializer for arch_setup field.
13448 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13449 (the_low_target): Add initializer for arch_setup field.
13450 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13451 (the_low_target): Add initializer for arch_setup field.
13452 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13453 (the_low_target): Add initializer for arch_setup field.
13454 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13455 (the_low_target): Add initializer for arch_setup field.
13456 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13457 (the_low_target): Add initializer for arch_setup field.
13458 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13459 (init_registers_mips64_linux): Likewise.
13460 (the_low_target): Add initializer for arch_setup field.
13461 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13462 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13463 (the_low_target): Add initializer for arch_setup field.
13464 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13465 (init_registers_powerpc_64): Likewise.
13466 (the_low_target): Add initializer for arch_setup field.
13467 * linux-s390-low.c (init_registers_s390): Add prototype.
13468 (init_registers_s390x): Likewise.
13469 (the_low_target): Add initializer for arch_setup field.
13470 * linux-sh-low.c (init_registers_sh): Add prototype.
13471 (the_low_target): Add initializer for arch_setup field.
13472 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13473 (the_low_target): Add initializer for arch_setup field.
13474 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13475 (the_low_target): Add initializer for arch_setup field.
13476
13477 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13478 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13479 instead of init_registers ().
13480 * win32-arm-low.c (init_registers_arm): Add prototype.
13481 (the_low_target): Add initializer for arch_setup field.
13482 * win32-i386-low.c (init_registers_i386): Add prototype.
13483 (the_low_target): Add initializer for arch_setup field.
13484
13485 * spu-low.c (init_registers_spu): Add prototype.
13486 (initialize_low): Call initialie_registers_spu () instead of
13487 initialize_registers ().
13488
fd96d250
PA
134892008-02-19 Pedro Alves <pedro@codesourcery.com>
13490
13491 * server.c (handle_v_requests): When handling the vRun and vAttach
13492 packets, if already debugging a process, don't kill it. Return an
13493 error instead.
13494
d41b6bb4
DJ
134952008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13496
13497 * server.c (handle_query): Correct length check.
13498
5ac588cf
PA
134992008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13500
13501 * win32-low.c (do_initial_child_stuff): Add process handle
13502 parameter. Set current_process_handle and current_process_id from the
13503 parameters. Clear globals.
13504 (win32_create_inferior): Don't set current_process_handle and
13505 current_process_id here. Instead pass them on the call to
13506 do_initial_child_stuff.
13507 (win32_attach): Likewise.
13508 (win32_clear_inferiors): New.
13509 (win32_kill): Don't close the current process handle or the
13510 current thread handle here. Instead call win32_clear_inferiors.
13511 (win32_detach): Don't open a new handle to the process. Call
13512 win32_clear_inferiors.
13513 (win32_join): Don't rely on current_process_handle; open a new
13514 handle using the process id.
13515 (win32_wait): Call win32_clear_inferiors when the inferior process
13516 has exited.
13517
ecd7ecbc
DJ
135182008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13519
13520 * server.c (monitor_show_help): Add "exit".
13521
1525d545
MG
135222008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13523
ecd7ecbc 13524 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13525 (clean): Add reg-xtensa.c.
13526 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13527 * configure.srv (xtensa*-*-linux*) New target.
13528 * linux-xtensa-low.c: New.
13529 * xtensa-xtregs.c: New.
1525d545 13530
59a016f0
PA
135312008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13532
13533 * hostio.c: Don't include errno.h.
13534 (errno_to_fileio_errno): Move to hostio-errno.
13535 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13536 error number outputting to the target->hostio_last_error callback.
13537 (hostio_packet_error): Use FILEIO_EINVAL directly.
13538 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13539 calls to hostio_error.
13540 * hostio-errno.c: New.
13541 * server.h (hostio_last_error_from_errno): Declare.
13542 * target.h (target_ops): Add hostio_last_error member.
13543 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13544 as hostio_last_error handler.
889bf7c5 13545 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13546 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13547 (wince_hostio_last_error): New functions.
13548 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13549 as hostio_last_error handler.
13550 (win32_target_ops) [!_WIN32_WCE]: Register
13551 hostio_last_error_from_errno as hostio_last_error handler.
13552 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13553 (hostio-errno.o): New rule.
13554 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13555 * configure.srv (srv_hostio_err_objs): New variable. Default to
13556 hostio-errno.o.
13557 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13558 * configure: Regenerate.
13559
2d717e4f
DJ
135602008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13561
13562 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13563 (linux_kill, linux_detach): Clean up the process list.
13564 * remote-utils.c (remote_open): Improve port number parsing.
13565 (putpkt_binary, input_interrupt): Only send interrupts if the target
13566 is running.
13567 * server.c (extended_protocol): Make static.
13568 (attached): Define earlier.
13569 (exit_requested, response_needed, program_argv): New variables.
13570 (target_running): New.
13571 (start_inferior): Clear attached here.
13572 (attach_inferior): Set attached here.
13573 (require_running): Define.
13574 (handle_query): Use require_running and target_running. Implement
13575 "monitor exit".
13576 (handle_v_attach, handle_v_run): New.
13577 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13578 (gdbserver_usage): Update.
13579 (main): Redo argument parsing. Handle --debug and --multi. Handle
13580 --attach along with other options or after the port. Save
13581 program_argv. Support no initial program. Resynchronize
13582 communication with GDB after an error. Handle "monitor exit".
13583 Use require_running and target_running. Always allow the extended
13584 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13585 restart in extended mode.
13586 * README: Refer to the GDB manual. Update --attach usage.
13587
7407e2de
AS
135882007-12-20 Andreas Schwab <schwab@suse.de>
13589
13590 * linux-low.c (STACK_SIZE): Define.
13591 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13592 (linux_test_for_tracefork): Likewise.
13593
b65d95c5
DJ
135942007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13595
13596 * linux-low.c (linux_wait_for_event): Update messages. Do not
13597 reinsert auto-delete breakpoints.
13598 * mem-break.c (struct breakpoint): Change return type of handler to
13599 int.
13600 (set_breakpoint_at): Update handler type.
13601 (reinsert_breakpoint_handler): Return 1 instead of calling
13602 delete_breakpoint.
13603 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13604 setting a new one.
13605 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13606 * mem-break.h (set_breakpoint_at): Update handler type.
13607 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13608 * win32-low.c (auto_delete_breakpoint): New.
13609 (get_child_debug_event): Use it.
13610
4e799345
DJ
136112007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13612
13613 * configure.ac: Check for pread and pwrite.
13614 * hostio.c (handle_pread): Fall back to lseek and read.
13615 (handle_pwrite): Fall back to lseek and write.
13616 * config.in, configure: Regenerated.
13617
27524b67
DJ
136182007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13619
13620 * server.c (myresume): Add own_buf argument.
13621 (main): Update calls.
13622
a20d5e98
DJ
136232007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13624
13625 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13626 * remote-utils.c (remote_open): Do not call disable_async_io.
13627 (block_async_io): Delete.
13628 (unblock_async_io): Make static.
13629 (initialize_async_io): New.
13630 * server.c (handle_v_cont): Handle async I/O here.
13631 (myresume): Likewise. Move other common resume tasks here...
13632 (main): ... from here. Call initialize_async_io. Disable async
13633 I/O before the main loop.
13634 * server.h (initialize_async_io): Declare.
13635 (block_async_io, unblock_async_io): Delete prototypes.
13636 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13637
b79d787e
DJ
136382007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13639
13640 * remote-utils.c (readchar): Allow binary data in received messages.
13641
d97903b2
PA
136422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13643
13644 * win32-low.c (attaching): New global.
13645 (win32_create_inferior): Clear the `attaching' global.
13646 (win32_attach): Set the `attaching' global.
13647 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13648 attaching. Only set a breakpoint at the entry point if not
13649 attaching.
13650
311de423
PA
136512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13652
13653 * server.c (main): Don't report dll events on the initial
13654 connection on attaches.
13655
6c2d16d2
PA
136562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13657
13658 * server.c (main): Relax numerical bases supported for the pid of
13659 the --attach command line argument.
13660
5ca906e6
PA
136612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13662
13663 * win32-low.c (win32_attach): Call OpenProcess before
13664 DebugActiveProcess, not after. Add last error output to error
13665 call.
13666
9c6c8194
PA
136672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13668
13669 * win32-low.c (win32_get_thread_context)
13670 (win32_set_thread_context): New functions.
13671 (thread_rec): Use win32_get_thread_context.
13672 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13673 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13674 field.
13675
4d5d1aaa
PA
136762007-12-03 Leo Zayas
13677 Pedro Alves <pedro_alves@portugalmail.pt>
13678
13679 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13680 global variables.
13681 (child_add_thread): Minor cleanup.
13682 (child_continue): Resume artificially suspended threads before
13683 calling ContinueDebugEvent.
13684 (suspend_one_thread): New.
13685 (fake_breakpoint_event): New.
13686 (get_child_debug_event): Change return type to int. Check here if
13687 gdb sent an interrupt request. If a soft interrupt was requested,
13688 fake a breakpoint event. Return 0 if there is no event to handle,
13689 and 1 otherwise.
13690 (win32_wait): Don't check here if gdb sent an interrupt request.
13691 Ensure there is a valid event to handle.
13692 (win32_request_interrupt): Add soft interruption method as last
13693 resort.
13694
c436e841
PA
136952007-12-03 Leo Zayas
13696 Pedro Alves <pedro_alves@portugalmail.pt>
13697
13698 * win32-low.h (win32_thread_info): Add descriptions to the
13699 structure members. Replace `suspend_count' counter by a
13700 `suspended' flag.
13701 * win32-low.c (thread_rec): Update condition of when to get the
13702 context from the inferior. Rely on ContextFlags being set if it
13703 has already been retrieved. Only suspend the inferior thread if
13704 we haven't already. Warn if that fails.
13705 (continue_one_thread): s/suspend_count/suspended/. Only call
13706 ResumeThread once. Warn if that fails.
13707
e7b5fa67
PA
137082007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13709
13710 * win32-low.c (win32_wait): Don't read from the inferior when it
13711 has already exited.
13712
a385171d
PA
137132007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13714
13715 * Makefile.in (win32_low_h): New variable.
13716 (win32-low.o): Add dependency on $(win32_low_h).
13717 (win32-arm-low.o, win32-i386-low.o): New rules.
13718
f80c84b3
DJ
137192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13720
13721 * hostio.c: Correct copyright year.
13722
a6b151f1
DJ
137232007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * Makefile.in (OBS): Add hostio.o.
13726 (hostio.o): New rule.
13727 * server.h (handle_vFile): Declare.
13728 * hostio.c: New file.
13729 * server.c (handle_v_requests): Take packet_len and new_packet_len
13730 for binary packets. Call handle_vFile.
13731 (main): Update call to handle_v_requests.
13732
f9387fc3
DJ
137332007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13734
13735 * linux-low.c: Include <sched.h>.
13736
51c2684e
DJ
137372007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13738
13739 * linux-low.c (linux_tracefork_grandchild): New.
13740 (linux_tracefork_child): Use clone.
13741 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13742
75f83163
JB
137432007-10-31 Joel Brobecker <brobecker@adacore.com>
13744
13745 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13746
da5898ce
DJ
137472007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13750
24a09b5f
DJ
137512007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * inferiors.c (change_inferior_id): Delete.
13754 (add_pid_to_list, pull_pid_from_list): New.
13755 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13756 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13757 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13758 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13759 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13760 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13761 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13762 (using_threads): Always set to 1.
13763 (handle_extended_wait): New.
13764 (add_process): Do not set TID.
13765 (linux_create_inferior): Set must_set_ptrace_flags.
13766 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13767 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13768 (linux_thread_alive): Rename TID argument to LWPID.
13769 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13770 (linux_wait_for_event): Do not use TID or check using_threads. Update
13771 call to dead_thread_notify. Call handle_extended_wait.
13772 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13773 (send_sigstop): Delete sigstop_sent.
13774 (wait_for_sigstop): Avoid TID.
13775 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13776 (linux_test_for_tracefork): New.
13777 (linux_lookup_signals): Use thread_db_active and
13778 linux_supports_tracefork_flag.
13779 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13780 * linux-low.h (get_process_thread): Avoid TID.
13781 (struct process_ifo): Move thread_known and tid to the end. Remove
13782 sigstop_sent.
13783 (linux_attach_lwp, thread_db_init): Update prototypes.
13784 * server.h (change_inferior_id): Delete prototype.
13785 (add_pid_to_list, pull_pid_from_list): New prototypes.
13786 * thread-db.c (thread_db_use_events): New.
13787 (find_first_thread): Rename to...
13788 (find_one_thread): ...this. Update callers and messages. Do not
13789 call fatal. Check thread_db_use_events. Do not call
13790 change_inferior_id or new_thread_notify.
13791 (maybe_attach_thread): Update. Do not call new_thread_notify.
13792 (thread_db_init): Set thread_db_use_events. Check use_events.
13793 * utils.c (fatal, warning): Correct message prefix.
13794
30ed0a8f
DJ
137952007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13796
13797 * Makefile.in (clean): Remove new files.
13798 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13799 (powerpc-64.o, powerpc-64.c): New rules.
13800 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13801 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13802 with SPE.
13803 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13804 SPE targets.
13805 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13806 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13807 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13808 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13809 (target_regsets): Add AltiVec and SPE register sets.
13810 * configure.ac: Check for AltiVec and SPE.
13811 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13812 (ppc_fill_vrregset, ppc_store_vrregset): New.
13813 (target_regsets): Add AltiVec register set.
13814 * configure: Regenerated.
13815
fd462a61
DJ
138162007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13817
13818 * linux-low.c (O_LARGEFILE): Define.
13819 (linux_read_memory): Use /proc/PID/mem.
13820 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13821 * configure, config.in: Regenerated.
13822
69f223ed
DJ
138232007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * linux-low.c (linux_wait_for_event): Do not pass signals while
13826 single-stepping.
13827
aec18585
PA
138282007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13829
13830 * win32-low.c (create_process): New.
13831 (win32_create_inferior): Use create_process instead of
13832 CreateProcess. If create_process failed retry appending an ".exe"
13833 suffix. Store the GetLastError result immediatelly after
13834 create_process calls and use it on the call to error.
13835
34d86ddd
PA
138362007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13837
13838 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13839
5a0e3bd0
JB
138402007-08-23 Joel Brobecker <brobecker@adacore.com>
13841
13842 * configure.ac: Switch license to GPLv3.
13843
f88c79e6
MS
138442007-08-01 Michael Snyder <msnyder@access-company.com>
13845
13846 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13847
6b3d9b83
PA
138482007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13849
13850 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13851 typedef.
13852 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13853 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13854 CloseToolhelp32Snapshot.
13855 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13856 CloseToolhelp32Snapshot.
13857
c588c53c
MS
138582007-07-27 Michael Snyder <michael.snyder@access-company.com>
13859
13860 * server.c (main): Check for inferior exit before main loop.
13861
aa0403d9
PA
138622007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13863
13864 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13865 instead of on tmp_desc.
13866
255e7678
DJ
138672007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13868 Daniel Jacobowitz <dan@codesourcery.com>
13869
13870 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13871 (add_thread): Minor cleanups.
13872 (clear_inferiors): Move lower in the file. Clear the DLL
13873 list.
13874 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13875 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13876 (xml_escape_text): New.
13877 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13878 for qSupported.
13879 (handle_v_cont): Report errors.
13880 (gdbserver_version): Update.
13881 (main): Correct size of own_buf. Do not report initial DLL events.
13882 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13883 (unloaded_dll, xml_escape_text): New.
13884 * win32-low.c (enum target_waitkind): Update comments.
13885 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13886 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13887 (win32_EnumProcessModules, win32_GetModuleInformation)
13888 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13889 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13890 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13891 (win32_Module32First, win32_Module32Next, load_toolhelp)
13892 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13893 (get_child_debug_event): Handle DLL events.
13894 (win32_wait): Likewise.
13895
0d37add9
DJ
138962007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13897
13898 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13899 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13900
45e2715e
PA
139012007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13902
13903 * win32-low.c (handle_output_debug_string): Ignore event if not
13904 waiting.
13905
c5674cf1
PA
139062007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13907
13908 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13909
2bbe3cc1
DJ
139102007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13911
13912 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13913
ae13219e
DJ
139142007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13915
13916 * inferiors.c (change_inferior_id): Add comment.
13917 * linux-low.c (check_removed_breakpoint): Add an early
13918 prototype. Improve debug output.
13919 (linux_attach): Doc update.
13920 (linux_detach_one_process, linux_detach): Clean up before releasing
13921 each process.
13922 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13923 * linux-low.h (struct process_info): Doc improvement.
13924 * mem-break.c (delete_all_breakpoints): New.
13925 * mem-break.h (delete_all_breakpoints): New prototype.
13926 * thread-db.c (find_first_thread): New.
13927 (thread_db_create_event): Call it instead of
13928 thread_db_find_new_threads. Clean up unused variables.
13929 (maybe_attach_thread): Remove first thread handling.
13930 (thread_db_find_new_threads): Use find_first_thread.
13931 (thread_db_get_tls_address): Likewise.
13932
4105de34
DJ
139332007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13934
13935 * thread-db.c (thread_db_find_new_threads): Add prototype.
13936 (thread_db_create_event): Check for the main thread before adding
13937 a new thread.
13938 (maybe_attach_thread): Only enable event reporting if TID == 0.
13939 (thread_db_get_tls_address): Check for new threads.
13940
2b876972
DJ
139412007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13942
13943 * linux-low.c (linux_create_inferior): Try execv before execvp.
13944 * spu-low.c (spu_create_inferior): Likewise.
13945
7a245884
DJ
139462007-06-13 Mike Frysinger <vapier@gentoo.org>
13947
13948 * linux-low.c (linux_create_inferior): Change execv to execvp.
13949 * spu-low.c (spu_create_inferior): Likewies.
13950
117ce543
DJ
139512007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13952
13953 * Makefile.in (clean): Clean new files instead of deleted ones.
13954 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13955 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13956 rules.
13957 * configure.srv: Specify XML files and new regformats for MIPS and
13958 MIPS64 GNU/Linux.
13959 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13960 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13961 an entry for the restart register.
13962 (mips_cannot_fetch_register, mips_cannot_store_register)
13963 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13964 register names to match the XML descriptions.
13965 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13966 restart register instead of $0.
13967
0e7f50da
UW
139682007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13969 Markus Deuling <deuling@de.ibm.com>
13970
13971 * remote-utils.c (decode_xfer_write): New function.
13972 * server.h (decode_xfer_write): Add prototype.
13973 * server.c (handle_query): Add PACKET_LEN argument. Support
13974 qXfer:spu:read and qXfer:spu:write packets.
13975 (main): Pass packet_len to handle_query.
13976 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13977 * target.h (target_ops): Add qxfer_spu.
13978
374c1d38
UW
139792007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13980
13981 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13982 accessing non-seekable spufs files.
13983
bb63802a
UW
139842007-05-16 Markus Deuling <deuling@de.ibm.com>
13985
889bf7c5 13986 * server.c (handle_query): Add reply for qC packet.
bb63802a 13987
7390519e
PA
139882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13989 Leo Zayas <lerele@champenstudios@com>
13990
13991 * server.h (check_remote_input_interrupt_request): New function.
13992 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13993 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13994 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13995 (check_remote_input_interrupt_request): New function.
13996 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13997 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13998 winapi_GenerateConsoleCtrlEvent): New typedefs.
13999 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14000 to 250 ms.
14001 (win32_wait): Check for remote interrupt request
14002 with check_remote_input_interrupt_request.
14003 (win32_request_interrupt): New function.
14004 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14005
34b34921
PA
140062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14007
14008 * win32-low.c (debug_registers_changed,
14009 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14010 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14011 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14012 (thread_rec): Get context using the low target.
14013 (child_add_thread): Call thread_added on the low target,
14014 which does the same thing.
14015 (regptr): Delete.
14016 (do_initial_child_stuff): Remove debug registers references.
14017 Set context using the low target. Resume threads after
14018 setting the contexts.
14019 (child_continue): Remove dead variable. Remove debug
14020 registers references.
14021 (child_fetch_inferior_registers): Go through the low target.
14022 (do_child_store_inferior_registers): Remove.
14023 (child_store_inferior_registers): Go through the low target.
14024 (win32_resume): Remove debug registers references.
14025 Set context using the low target.
14026 (handle_exception): Change return type to void. Don't record
14027 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14028 first chance exception.
889bf7c5 14029 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14030 goto loop. Always return after waiting for debug event.
14031 (win32_wait): Convert to switch statement. Handle spurious
14032 events.
14033
14034 * win32-i386-low.c (debug_registers_changed,
14035 debug_registers_used): New.
14036 (initial_stuff): Rename to ...
14037 (i386_initial_stuff): ... this. Clear debug registers
14038 state variables.
14039 (store_debug_registers): Delete.
14040 (i386_get_thread_context): New.
14041 (load_debug_registers): Delete.
14042 (i386_set_thread_context): New.
14043 (i386_thread_added): New.
14044 (single_step): Rename to ...
14045 (i386_single_step): ... this.
14046 (do_fetch_inferior_registers): Rename to ...
14047 (i386_fetch_inferior_register): ... this.
14048 (i386_store_inferior_register): New.
14049 (the_low_target): Adapt to new interface.
14050
14051 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14052 (arm_get_thread_context): New.
14053 (arm_set_thread_context): New.
14054 (regptr): New.
14055 (do_fetch_inferior_registers): Rename to ...
14056 (arm_fetch_inferior_register): ... this.
14057 (arm_store_inferior_register): New.
14058 (arm_wince_breakpoint): Reimplement as unsigned long.
14059 (arm_wince_breakpoint_len): Define.
14060 (the_low_target): Adapt to new interface.
14061
14062 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14063 load_debug_registers. Add get_thread_context, set_thread_context,
14064 thread_added and store_inferior_register. Rename
14065 fetch_inferior_registers to fetch_inferior_register.
14066 (regptr): Remove declaration.
14067
dd6953e1
PA
140682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14069
14070 * linux-low.c (linux_detach): Change return type to int. Return 0.
14071 * spu-low.c (spu_detach): Likewise.
14072
444d6139
PA
140732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14074
14075 * target.h (target_ops): Change return type of detach to int.
14076 Add join.
14077 (join_inferior): New.
14078 * server.c (main): Don't skip detach support on mingw32.
14079 If the inferior doesn't support detaching return error.
14080 Call join_inferior instead of using waitpid.
14081 * linux-low.c (linux_join): New.
14082 (linux_target_op): Add linux_join.
14083 * spu-low.c (spu_join): New.
14084 (spu_target_ops): Add spu_join.
14085 * win32-low.c (win32_detach): Adapt to new interface.
14086 Reopen current_process_handle before detaching. Issue a child
14087 resume before detaching.
14088 (win32_join): New.
14089 (win32_target_op): Add win32_join.
14090
1d5315fe
PA
140912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14092
14093 * win32-low.c (win32-attach): Fix return value.
14094 * target.h (target_ops): Describe ATTACH return values.
14095
bf914831
PA
140962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14097
14098 * win32-low.c (GETPROCADDRESS): Define.
14099 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14100 (winapi_DebugSetProcessKillOnExit): Likewise.
14101 (win32_create_inferior): Force usage of ansi CreateProcessA.
14102 (win32_attach): Use GETPROCADDRESS.
14103 (win32_detach): Likewise.
14104
f72f3e60
PA
141052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14106
14107 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14108
ed50f18f
PA
141092007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14110
14111 * win32-low.c: Commit leftover changes from 2007-03-29.
14112
0c2ead7e
DJ
141132007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14116 fields short instead of int. Add explicit padding.
14117 (i387_cache_to_fsave): Remove unnecessary casts.
14118 (i387_fsave_to_cache): Doc fix.
14119 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14120
73725ff3
DJ
141212007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14122
14123 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14124 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14125
d99f33d8
PA
141262007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14127
14128 * configure.srv (arm*-*-mingw32ce*): Move near the other
14129 arm targets.
14130
68070c10
PA
141312007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14132
2482afc6 14133 * configure.ac: Add errno checking.
68070c10
PA
14134 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14135 sys/file.h and malloc.h.
14136 (AC_CHECK_DECLS): Add perror.
14137 (srv_mingwce): Handle.
2482afc6 14138 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14139 win32-i386-low.o to srv_tgtobj.
14140 (i[34567]86-*-mingw*): Likewise.
14141 (arm*-*-mingw32ce*): Add case.
14142 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14143 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14144 [__MINGW32CE__] (strerror): New function.
14145 [__MINGW32CE__] (errno): Define to GetLastError.
14146 [__MINGW32CE__] (COUNTOF): New macro.
14147 (remote_open): Remove extra close call.
14148 * mem-break.c (delete_breakpoint_at): New function.
14149 * mem-break.h (delete_breakpoint_at): Declare.
14150 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14151 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14152 [USE_WIN32API] (read, write): Add char* casts.
14153 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14154 * server.h: Include wincecompat.h on Windows CE.
14155 [HAVE_ERRNO_H]: Check.
14156 (perror): Declare if not declared.
14157 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14158 (perror_with_name): Remove errno declaration.
14159 * wincecompat.h: New.
14160 * wincecompat.c: New.
14161 * win32-low.h: New.
14162 * win32-arm-low.c: New.
14163 * win32-i386-low.c: New.
14164 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14165 (OUTMSG2): Make it safe.
14166 (_T): New macro.
14167 (COUNTOF): New macro.
14168 (NUM_REGS): Get it from the low target.
14169 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14170 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14171 (thread_rec): Let low target handle debug registers.
14172 (child_add_thread): Likewise.
14173 (child_init_thread_list): Likewise.
14174 (continue_one_thread): Likewise.
14175 (regptr): New.
14176 (do_child_fetch_inferior_registers): Move to ...
14177 * win32-i386-low.c: ... here, and rename to ...
14178 (do_fetch_inferior_registers): ... this.
889bf7c5 14179 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14180 Go through the low target.
14181 (do_child_store_inferior_registers): Use regptr.
14182 (strwinerror): New function.
14183 (win32_create_inferior): Handle Windows CE.
14184 Use strwinerror instead of strerror on Windows error
14185 codes. Add program to the error output.
14186 Don't close the main thread handle on Windows CE.
14187 (win32_attach): Use coredll.dll on Windows CE.
14188 (win32_kill): Close current process and current
14189 thread handles.
14190 (win32_detach): Use coredll.dll on Windows CE.
14191 (win32_resume): Let low target handle debug registers, and
14192 step request.
14193 (handle_exception): Add/Remove initial breakpoint. Avoid
14194 non-existant WSTOPSIG on Windows CE.
14195 (win32_read_inferior_memory): Cast to remove warning.
14196 (win32_arch_string): Go through the low target.
14197 (initialize_low): Call set_breakpoint_data with the low
14198 target's breakpoint.
14199 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14200 FOP_REGNUM, mappings): Move to ...
14201 * win32-i386-low.c: ... here.
14202 * win32-low.c (win32_thread_info): Move to ...
14203 * win32-low.h: ... here.
14204 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14205 win32-arm-low.c and wincecompat.c.
14206 (all:): Add $EXEEXT.
14207 (install-only:): Likewise.
14208 (gdbserver:): Likewise.
14209 (gdbreplay:): Likewise.
14210 * config.in: Regenerate.
14211 * configure: Regenerate.
14212
41093d81
PA
142132007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14214
14215 * win32-low.c: Rename typedef thread_info to
14216 win32_thread_info throughout.
14217
544afa54
PA
142182007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14219
14220 * win32-i386-low.c: Rename to ...
14221 * win32-low.c: ... this.
14222 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14223 * Makefile.in: Likewise.
14224
bce7165d
PA
142252007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14226
14227 * remote-utils.c (monitor_output): Constify msg parameter.
14228 * server.h (monitor_output): Likewise.
14229 * win32-i386-low.c (handle_output_debug_string): New.
14230 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14231 handle_output_debug_string.
14232 (get_child_debug_event): Likewise.
14233
506c7aa0
DJ
142342007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14235
14236 * server.c (main): Correct strtoul check.
14237
42c81e2a
DJ
142382007-03-27 Jon Ringle <jon@ringle.org>
14239
14240 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14241
9453113a
DJ
142422007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14243
14244 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14245
64a69107
DJ
142462007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * terminal.h: Check HAVE_SGTTY_H.
14249
142502007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14251
14252 * remote-utils.c (remote_open): Print out the assigned port number.
14253
c74d0ad8
DJ
142542007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14255
14256 * remote-utils.c (monitor_output): New function.
14257 * server.c (debug_threads): Define here.
14258 (monitor_show_help): New function.
14259 (handle_query): Handle qRcmd.
14260 (main): Do not handle 'd' packet.
14261 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14262 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14263 of debug_threads.
14264
de7c3b4a
PA
142652007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14266
14267 * Makefile.in (EXEEXT): New.
14268 (clean): Use $(EXEEXT).
14269
ef57601b
PA
142702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14271
14272 * target.h (target_ops): Rename send_signal to request_interrupt,
14273 and remove enum target_signal parameter.
14274 * linux-low.c (linux_request_interrupt): Rename from
14275 linux_send_signal, and always send SIGINT.
14276 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14277 and always send SIGINT.
14278 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14279 of send_signal.
14280 (input_interrupt): Likewise.
14281
820f2bda
PA
142822007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14283
14284 * server.c (get_features_xml): Check if target implemented
14285 arch_string.
14286 * win32-i386-low.c (win32_arch_string): New.
14287 (win32_target_ops): Add win32_arch_string as arch_string member.
14288
ab39bf24
UW
142892007-02-22 Markus Deuling <deuling@de.ibm.com>
14290
14291 * spu-low.c (spu_arch_string): New.
14292 (spu_target_ops): Add spu_arch_string.
14293
61ff6e04
DJ
142942007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14295
14296 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14297 * configure.ac: Do not check for terminal.h.
14298 * configure, config.in: Regenerated.
14299
fb1e4ffc
DJ
143002007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14301
14302 * Makefile.in (OBS): Add $(XML_BUILTIN).
14303 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14304 (clean): Update.
14305 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14306 (arm-with-iwmmxt.c): New.
14307 * config.in, configure: Regenerate.
14308 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14309 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14310 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14311 (arm*-*-linux*): Add iWMMXt and regset support.
14312 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14313 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14314 (arm_store_wmmxregset, target_regsets): New.
14315 * server.c (get_features_xml): Take annex argument. Check builtin
14316 XML documents.
14317 (handle_query): Handle multiple annexes.
14318
0f48aa01
DJ
143192007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14320
14321 * remote-utils.c [USE_WIN32API] (read, write): Define.
14322 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14323 write.
14324
23181151
DJ
143252007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14326
14327 * linux-i386-low.c (the_low_target): Set arch_string.
14328 * linux-x86-64-low.c (the_low_target): Likewise.
14329 * linux-low.c (linux_arch_string): New.
14330 (linux_target_ops): Add it.
14331 * linux-low.h (struct linux_target_ops): Add arch_string.
14332 * server.c (write_qxfer_response): Use const void * for DATA.
14333 (get_features_xml): New.
14334 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14335 * target.h (struct target_ops): Add arch_string method.
14336
9d606399
DJ
143372007-01-03 Denis Pilat <denis.pilat@st.com>
14338 Daniel Jacobowitz <dan@codesourcery.com>
14339
14340 * linux-low.c (linux_kill): Handle being called with no threads.
14341 * win32-i386-low.c (win32_kill): Likewise.
14342 (get_child_debug_event): Clear current_process_handle.
14343
143442006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14345 Daniel Jacobowitz <dan@codesourcery.com>
14346
14347 * remote-utils.c (remote_open): Check the type of specified
14348 serial port devices before opening them.
14349 * server.c (main): Kill the inferior if an error occurs during
14350 the first remote_open.
14351
a5e13d24
DJ
143522006-12-05 Markus Deuling <deuling@de.ibm.com>
14353
14354 * README: Update supported targets.
14355
186947f7
DJ
143562006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14357
14358 * Makefile.in (clean): Remove reg-mips64.c.
14359 (reg-mips64.c, reg-mips64.o): New rules.
14360 * configure.srv: Handle mips64. Include regset support for mips.
14361 * linux-mips-low.c (union mips_register): New.
14362 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14363 (mips_breakpoint, mips_breakpoint_at): Use int.
14364 (mips_collect_register, mips_supply_register)
14365 (mips_collect_register_32bit, mips_supply_register_32bit)
14366 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14367 (mips_store_fpregset, target_regsets): New.
14368 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14369
a13e2c95
UW
143702006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14371
14372 * configure.srv: Add target "spu*-*-*".
14373 * Makefile.in (clean): Remove reg-spu.c.
14374 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14375 * spu-low.c: New file.
14376
cb7283db
DJ
143772006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14378
14379 * configure.ac: Correct td_thr_tls_get_addr test.
14380 * configure: Regenerated.
14381
89be2091
DJ
143822006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14383
14384 * linux-low.c (linux_wait_for_event): Reformat. Use the
14385 pass_signals array.
14386 * remote-utils.c (decode_address_to_semicolon): New.
14387 * server.c (pass_signals, handle_general_set): New.
14388 (handle_query): Mention QPassSignals for qSupported.
14389 (main): Call handle_general_set.
14390 * server.h (pass_signals, decode_address_to_semicolon): New.
14391
000ef4f0
DJ
143922006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14393
14394 * server.c (handle_query): Correct error handling for read_auxv.
14395
b7149293
UW
143962005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14397
14398 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14399 and srv_linux_thread_db to yes.
14400 * linux-s390-low.c (s390_fill_gregset): New function.
14401 (target_regsets): Define data structure.
14402
dae5f5cf
DJ
144032006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14404
14405 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14406 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14407 * config.in, configure: Regenerated.
14408 * inferiors.c (gdb_id_to_thread): New function.
14409 (gdb_id_to_thread_id): Use it.
14410 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14411 * linux-low.h (struct process_info): Add th member.
14412 (thread_db_get_tls_address): New prototype.
14413 * remote-utils.c (decode_address): Make non-static.
14414 * server.c (handle_query): Handle qGetTLSAddr.
14415 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14416 * target.h (struct target_ops): Add get_tls_address.
14417 * thread-db.c (maybe_attach_thread): Save the thread handle.
14418 (thread_db_get_tls_address): New.
14419
32ca6d61
DJ
144202006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14421
14422 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14423 (linux_resume_one_process): Take a siginfo_t *. Update all
14424 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14425 (struct pending_signals): Add a siginfo_t.
14426 (linux_wait_for_process): Always set last_status.
14427 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14428 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14429 * linux-low.h (struct process_info): Add last_status.
14430
5ffff7c1
DJ
144312006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14432
14433 * remote-utils.c (try_rle): New function.
14434 (putpkt_binary): Use it.
14435
8695c747
DJ
144362006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14437
14438 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14439 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14440 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14441 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14442 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14443 point registers.
14444
290fadea
RS
144452006-08-08 Richard Sandiford <richard@codesourcery.com>
14446
14447 * server.c (terminal_fd): New variable.
14448 (old_foreground_pgrp): Likewise.
14449 (restore_old_foreground_pgrp): New function.
14450 (start_inferior): Record the terminal file descriptor in terminal_fd
14451 and its original foreground group in old_foreground_pgrp. Register
14452 restore_old_foreground_pgrp with atexit().
14453
9f2e1e63
DJ
144542006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14455
14456 * server.c (handle_query): Correct qPart to qXfer.
14457
b80864fb
DJ
144582006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14459
14460 * configure.ac: Check for more headers which are missing on
14461 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14462 * configure.srv: Add Cygwin and mingw32.
14463 * remote-utils.c: Don't include headers unconditionally which
14464 are missing on mingw32. Include <winsock.h> for mingw32.
14465 (remote_open): Adjust for mingw32 support. Flush
14466 standard error after writing to it.
14467 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14468 (unblock_async_io, enable_async_io, disable_async_io)
14469 (readchar, getpkt): Update for Winsock support.
14470 (prepare_resume_reply): Expect a protocol signal number.
14471 * server.c: Disable <sys/wait.h> on mingw32.
14472 (start_inferior): Adjust for mingw32 support. Flush
14473 standard error after writing to it.
14474 (attach_inferior): Likewise. Use protocol signal
14475 numbers.
14476 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14477 and names.
14478 * win32-i386-low.c: New file.
14479 * Makefile.in (XM_CLIBS): Set.
14480 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14481 (win32-i386-low.o): New dependency rule.
14482 * linux-low.c (linux_wait): Use target signal numbers.
14483 * target.h (struct target_ops): Doc fix.
14484 * server.h (target_signal_to_name): New prototype.
14485 * gdbreplay.c: Don't include headers unconditionally which
14486 are missing on mingw32. Include <winsock.h> for mingw32.
14487 (remote_close, remote_open): Adjust for Winsock support.
14488 * configure, config.in: Regenerated.
14489
0876f84a
DJ
144902006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14491
14492 * server.c (decode_xfer_read, write_qxfer_response): New.
14493 (handle_query): Take a packet length argument. Handle
14494 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14495 the qSupported response.
14496 (main): Update call to handle_query.
14497
01f9e8fa
DJ
144982006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14499
14500 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14501 (putpkt_binary): Renamed from putpkt and adjusted for binary
14502 data.
14503 (putpkt): New wrapper for putpkt_binary.
14504 (readchar): Don't mask off the high bit.
14505 (decode_X_packet): New function.
14506 * server.c (main): Call putpkt_binary if a handler sets the packet
14507 length. Save the length of the incoming packet. Handle 'X'.
14508 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14509
be2a5f71
DJ
145102006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14511
14512 * server.c (handle_query): Handle qSupported.
14513
ea025f5f
DJ
145142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * remote-utils.c (all_symbols_looked_up): New variable.
14517 (look_up_one_symbol): Check it.
14518 * server.h (look_up_one_symbol): New declaration.
14519 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14520
9308fc88
DJ
145212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14522
14523 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14524 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14525 (PTRACE_GET_THREAD_AREA): Define.
14526 (ps_get_thread_area): New function.
14527
52fb6437
NS
145282006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14529
14530 * configure.srv (m68k*-*-uclinux*): New target.
14531 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14532 (linux_resume_one_process): Remove extraneous cast.
14533 (linux_read_offsets): New.
14534 (linux_target_op): Add linux_read_offsets on mmuless systems.
14535 * server.c (handle_query): Add qOffsets logic.
14536 * target.h (struct target_ops): Add read_offsets.
14537
21b0f40c
DJ
145382006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14541 (PTRACE_GET_THREAD_AREA): Define.
14542 (ps_get_thread_area): New function.
14543 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14544 (linux-x86-64-low.o): Update.
14545
0050a760
DJ
145462006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14547
14548 * configure.ac: Remove checks for prfpregset_t.
14549 * gdb_proc_service.h: New file.
14550 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14551 new "gdb_proc_service.h".
14552 * proc-service.c: Likewise.
14553 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14554 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14555 * Makefile.in (gdb_proc_service_h): Updated.
14556 * configure, config.in: Regenerated.
14557
b92a518e
DJ
145582006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14559
14560 * remote-utils.c (prepare_resume_reply): Move declaration
14561 of gdb_id_from_wait to the top of the block.
14562
545587ee
DJ
145632006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14564
14565 * linux-low.c (regsets_store_inferior_registers): Read the regset
14566 from the target before filling it.
14567
9db87ebd
DJ
145682006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14569
14570 * server.c (attach_inferior): Return SIGTRAP for a successful
14571 attach.
14572
dd24457d
DJ
145732006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14574
14575 * Makefile.in (OBS): Add version.o.
14576 (STAGESTUFF): Delete.
14577 (version.o): Add dependencies.
14578 (version.c): Replace rule.
14579 (clean): Remove version.c.
14580 * server.c (gdbserver_version): New.
14581 (gdbserver_usage): Use printf.
14582 (main): Handle --version and --help.
14583 * server.h (version, host_name): Add declarations.
14584
6f0f660e
EZ
145852005-12-23 Eli Zaretskii <eliz@gnu.org>
14586
889bf7c5
PA
14587 * linux-arm-low.c:
14588 * linux-arm-low.c:
14589 * inferiors.c:
14590 * i387-fp.h:
14591 * i387-fp.c:
14592 * gdbreplay.c:
14593 * regcache.c:
14594 * proc-service.c:
14595 * mem-break.h:
14596 * mem-break.c:
14597 * linux-x86-64-low.c:
14598 * linux-sh-low.c:
14599 * linux-s390-low.c:
14600 * linux-ppc64-low.c:
14601 * linux-ppc-low.c:
14602 * linux-mips-low.c:
14603 * linux-m68k-low.c:
14604 * linux-m32r-low.c:
14605 * linux-low.h:
14606 * linux-low.c:
14607 * linux-ia64-low.c:
14608 * linux-i386-low.c:
14609 * linux-crisv32-low.c:
14610 * thread-db.c:
14611 * terminal.h:
14612 * target.h:
14613 * target.c:
14614 * server.h:
14615 * server.c:
14616 * remote-utils.c:
14617 * regcache.h:
14618 * utils.c:
14619 * Makefile.in:
14620 * configure.ac:
6f0f660e
EZ
14621 * gdbserver.1: Add (C) after Copyright. Update the FSF
14622 address.
14623
9d1fb177
DJ
146242005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14625
14626 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14627 (arm_breakpoint_at): Recognize both breakpoints.
14628 (the_low_target): Use the correct breakpoint instruction.
14629
011a70c2
DJ
146302005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14631
14632 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14633 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14634 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14635 (the_low_target): Update.
14636
7fb85e41
AS
146372005-10-25 Andreas Schwab <schwab@suse.de>
14638
14639 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14640
14641 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14642 (ia64_num_regs): Reduce to 462.
14643
3db0444b
DJ
146442005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * acinclude.m4: Correct quoting.
14647 * aclocal.m4: Regenerated.
14648
14649 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14650 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14651 (thread_db_init): Call thread_db_err_str.
14652 * configure.ac: Check for TD_VERSION.
14653 * config.in, configure: Regenerated.
14654
bee0189a
DJ
146552005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14656
14657 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14658
e9d25b98
DJ
146592005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14660
14661 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14662 is not available. Define HAVE_PTRACE_GETREGS if it is.
14663 * config.in, configure: Regenerated.
14664 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14665 * linux-i386-low.c, linux-m68k-low.c: Update to use
14666 HAVE_PTRACE_GETREGS.
14667 * linux-low.c (regsets_fetch_inferior_registers)
14668 (regsets_store_inferior_registers): Only return 0 if we processed
14669 GENERAL_REGS.
14670 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14671 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14672
a06660f7
DJ
146732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14674
14675 * inferiors.c (struct thread_info): Add gdb_id.
14676 (add_thread): Add gdb_id argument.
14677 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14678 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14679 calls to add_thread.
14680 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14681 * server.c (handle_query): Use thread_to_gdb_id.
14682 (handle_v_cont, main): Use gdb_id_to_thread_id.
14683 * server.h (add_thread): Update prototype.
14684 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14685 prototypes.
14686
5a1f5858
DJ
146872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14690 left-padded registers.
14691 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14692 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14693
e122f1f5
SE
146942005-07-01 Steve Ellcey <sje@cup.hp.com>
14695
14696 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14697 * configure: Regenerate.
14698 * config.in: Regenerate.
14699 * server.h (NEED_DECLARATION_STRERROR):
14700 Replace with !HAVE_DECL_STRERROR.
14701
d592fa2f
DJ
147022005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * linux-low.c (linux_wait, linux_send_signal): Don't test
14705 an unsigned long variable for > 0 if it could be MAX_ULONG.
14706 * server.c (myresume): Likewise.
14707 * target.c (set_desired_inferior): Likewise.
14708
ccbd4912
MK
147092005-06-13 Mark Kettenis <kettenis@gnu.org>
14710
14711 * configure.ac: Simplify and improve check for socklen_t.
14712 * configure, config.in: Regenerate.
14713
f450004a
DJ
147142005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14715
14716 * acconfig.h: Remove.
14717 * configure.ac: Add a test for socklen_t. Use three-argument
14718 AC_DEFINE throughout.
14719 * config.in: Regenerated using autoheader 2.59.
14720 * configure: Regenerated.
14721
14722 * gdbreplay.c (socklen_t): Provide a default.
14723 (remote_open): Use socklen_t.
14724 * remote-utils.c (socklen_t): Provide a default.
14725 (remote_open): Use socklen_t.
14726 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14727 unsigned char.
14728
14729 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14730 char for buffers.
14731 * linux-low.c (linux_read_memory, linux_write_memory)
14732 (linux_read_auxv): Likewise.
14733 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14734 (check_mem_write): Likewise.
14735 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14736 Likewise.
14737 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14738 (registers_from_string, register_data): Likewise.
14739 * server.c (handle_query, main): Likewise.
14740 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14741 (decode_M_packet): Likewise.
14742 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14743 * target.h (struct target_ops): Update read_memory, write_memory,
14744 and read_auxv.
14745 (read_inferior_memory, write_inferior_memory): Update.
14746 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14747 to unsigned char *.
14748 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14749 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14750 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14751 linux-s390-low.c, linux-sh-low.c: Update for changes in
14752 read_inferior_memory and the_low_target->breakpoint.
14753
eee84df1
DJ
147542005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14755
14756 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14757 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14758 * configure.srv: Add powerpc64-*-linux*.
14759 * linux-ppc64-low.c: New file.
14760
45b134e5
OF
147612005-05-23 Orjan Friberg <orjanf@axis.com>
14762
14763 * linux-cris-low.c: New file with support for CRIS.
14764 * linux-crisv32-low.c: Ditto for CRISv32.
14765 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14766 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14767 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14768 reg-crisv32.o, and reg-crisv32.c to make rules.
14769 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14770 recognized targets.
14771
48d93c75
UW
147722005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14773
14774 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14775 of sizeof (PTRACE_XFER_TYPE).
14776 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14777
e013ee27
OF
147782005-05-12 Orjan Friberg <orjanf@axis.com>
14779
889bf7c5 14780 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14781 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14782 pointers for hardware watchpoint support.
14783 * linux-low.h (struct linux_target_ops): Ditto.
14784 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14785 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14786 to linux_target_ops.
14787 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14788 reply packet.
14789 * server.c (main): Recognize 'Z' and 'z' packets.
14790
b0ded00b
UW
147912005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14792
14793 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14794 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14795 (the_low_target): Add new members.
14796
8643e2ad
DJ
147972005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14798
14799 * proc-service.c (ps_lgetregs): Search all_processes instead of
14800 all_threads.
14801
fc620387
DJ
148022005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * server.c (start_inferior): Change return type to int.
14805 (attach_inferior): Change sigptr to int *.
14806 (handle_v_cont, handle_v_requests): Change signal to int *.
14807 (main): Change signal to int.
14808
148092005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14810
14811 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14812 * configure.srv: Add m32r*-*-linux*.
14813 * linux-m32r-low.c: New file.
14814
e0e76420
DJ
148152005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14818
a1928bad
DJ
148192005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14820
14821 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14822 Take unsigned long arguments for PIDs.
14823 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14824 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14825 (wait_for_sigstop, linux_resume_one_process)
14826 (regsets_fetch_inferior_registers, linux_send_signal)
14827 (linux_read_auxv): Likewise. Update the types of variables holding
14828 PIDs. Update format string specifiers.
14829 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14830 * remote-utils.c (prepare_resume_reply): Likewise.
14831 * server.c (cont_thread, general_thread, step_thread)
14832 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14833 unsigned long.
14834 (handle_query): Update format specifiers.
14835 (handle_v_cont, main): Use strtoul for thread IDs.
14836 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14837 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14838 (general_thread, step_thread, thread_from_wait)
14839 (old_thread_from_wait): Update.
14840 * target.h (struct thread_resume): Use unsigned long for THREAD.
14841 (struct target_ops): Use unsigned long for arguments to attach and
14842 thread_alive.
14843
dcdb98d2
DJ
148442005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * acinclude.m4: Include bfd/bfd.m4 directly.
14847 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14848 <agriffis@toolchain.org>.
14849 * aclocal.m4, configure: Regenerated.
14850
bec39cab
AC
148512005-01-07 Andrew Cagney <cagney@gnu.org>
14852
14853 * configure.ac: Rename configure.in, require autoconf 2.59.
14854 * configure: Re-generate.
14855
434c4c77
DJ
148562004-12-08 Daniel Jacobowitz <dan@debian.org>
14857
14858 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14859 LIBS when finished.
14860 * aclocal.m4: Regenerated.
14861 * configure: Regenerated.
14862
db1d3e1b
AS
148632004-11-21 Andreas Schwab <schwab@suse.de>
14864
14865 * linux-m68k-low.c (m68k_num_gregs): Define.
14866 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14867 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14868 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14869 (m68k_breakpoint_at): New. Add to the_low_target.
14870
14871 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14872 srv_linux_thread_db to yes.
14873
43360365
JB
148742004-10-20 Joel Brobecker <brobecker@gnat.com>
14875
14876 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14877 (ARCH_SET_FS): Likewise.
14878 (ARCH_GET_FS): Likewise.
14879 (ARCH_GET_GS): Likewise.
14880
fd500816
DJ
148812004-10-16 Daniel Jacobowitz <dan@debian.org>
14882
14883 * linux-i386-low.c (ps_get_thread_area): New.
14884 * linux-x86-64-low.c (ps_get_thread_area): New.
14885 * linux-low.c: Include <sys/syscall.h>.
14886 (linux_kill_one_process): Don't kill the first thread here.
14887 (linux_kill): Kill the first thread here.
14888 (kill_lwp): New function.
14889 (send_sigstop, linux_send_signal): Use it.
14890 * proc-service.c: Clean up #ifdefs.
14891 (fpregset_info): Delete.
14892 (ps_lgetregs): Update and enable implementation.
14893 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14894 implementations.
14895 * remote-utils.c (struct sym_cache, symbol_cache): New.
14896 (input_interrupt): Print a clearer message.
14897 (async_io_enabled): New variable.
14898 (enable_async_io, disable_async_io): Use it. Update comments.
14899 (look_up_one_symbol): Use the symbol cache.
14900 * thread-db.c (thread_db_look_up_symbols): New function.
14901 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14902
f6de3c42
DJ
149032004-10-16 Daniel Jacobowitz <dan@debian.org>
14904
14905 * configure.in: Test for -rdynamic.
14906 * configure: Regenerated.
14907 * Makefile (INTERNAL_LDFLAGS): New.
14908 (gdbserver, gdbreplay): Use it.
14909
2c0fc042
AC
149102004-09-02 Andrew Cagney <cagney@gnu.org>
14911
14912 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14913
075b3282
DJ
149142004-03-23 Daniel Jacobowitz <drow@mvista.com>
14915
14916 * linux-low.c (linux_wait): Clear all_processes list also.
14917
fa6a77dc
DJ
149182004-03-12 Daniel Jacobowitz <drow@mvista.com>
14919
14920 * linux-low.c: Include <errno.h>. Remove extern declaration of
14921 errno.
14922
6d782a97
DJ
149232004-03-12 Daniel Jacobowitz <drow@mvista.com>
14924
14925 * gdbreplay.c, server.h, utils.c: Update copyright years.
14926
3a7fb99b
DJ
149272004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14928
14929 * server.c (main): Print child status or termination signal from
14930 variable 'signal', not 'sig'.
14931
c3e735a6
DJ
149322004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14933
14934 * linux-low.c (linux_read_memory): Change return type to
14935 int. Check for and return error from ptrace().
14936 * target.c (read_inferior_memory): Change return type to int. Pass
14937 back return status from the_target->read_memory().
14938 * target.h (struct target_ops): Adapt *read_memory() prototype.
14939 Update comment.
14940 (read_inferior_memory): Adapt prototype.
14941 * server.c (main): Return an error packet if
14942 read_inferior_memory() returns an error.
14943
a59d1c82
DJ
149442004-03-04 Daniel Jacobowitz <drow@mvista.com>
14945
14946 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14947 Unify with other clean targets.
14948
dc3f8883
DJ
149492004-02-29 Daniel Jacobowitz <drow@mvista.com>
14950
14951 * server.c (handle_v_cont): Call set_desired_inferior.
14952
89a208da
DJ
149532004-02-29 Daniel Jacobowitz <drow@mvista.com>
14954
14955 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14956
62ea82f5
DJ
149572004-02-29 Daniel Jacobowitz <drow@mvista.com>
14958
14959 * linux-low.c (linux_wait): Unblock async I/O.
14960 (linux_resume): Block and enable async I/O.
14961 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14962 * server.h (block_async_io, unblock_async_io): Add prototypes.
14963
6910d122
DJ
149642004-02-29 Daniel Jacobowitz <drow@mvista.com>
14965
14966 * remote-utils.c (remote_open): Print a status notice after
14967 opening a TCP port.
14968 * server.c (attach_inferior): Print a status notice after
14969 attaching.
14970
149712004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14972
14973 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14974
c89dc5d4
DJ
149752004-02-26 Daniel Jacobowitz <drow@mvista.com>
14976
14977 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14978 error packet.
14979 * server.c, target.h: Update copyright years.
14980
4b8dad4a
RM
149812004-02-25 Roland McGrath <roland@redhat.com>
14982
14983 * target.h (struct target_ops): New member `read_auxv'.
14984 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14985 * linux-low.c (linux_read_auxv): New function.
14986 (linux_target_ops): Initialize `read_auxv' member to that.
14987
d7446758
JB
149882004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14989
14990 Committed by Jim Blandy <jimb@redhat.com>.
14991
14992 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14993 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14994 instead of GPR_SIZE to distiguish s390 and s390x targets.
14995
5544ad89
DJ
149962004-01-31 Daniel Jacobowitz <drow@mvista.com>
14997
14998 * linux-low.c: Update copyright year.
14999 (check_removed_breakpoint): Clear pending_is_breakpoint.
15000 (linux_set_resume_request, linux_queue_one_thread)
15001 (resume_status_pending_p): New functions.
15002 (linux_continue_one_thread): Use process->resume.
15003 (linux_resume): Only resume threads if there are no pending events.
15004 * linux-low.h (struct process_info): Add resume request
15005 pointer.
15006
2a68b70e
DJ
150072004-01-30 Daniel Jacobowitz <drow@mvista.com>
15008
15009 * regcache.c (new_register_cache): Clear the allocated register
15010 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15011
64386c31
DJ
150122003-10-13 Daniel Jacobowitz <drow@mvista.com>
15013
15014 * linux-low.c (linux_resume): Take a struct thread_resume *
15015 argument.
15016 (linux_wait): Update call.
15017 (resume_ptr): New static variable.
15018 (linux_continue_one_thread): Renamed from
15019 linux_continue_one_process. Use resume_ptr.
15020 (linux_resume): Use linux_continue_one_thread.
15021 * server.c (handle_v_cont, handle_v_requests): New functions.
15022 (myresume): New function.
15023 (main): Handle 'v' case.
15024 * target.h (struct thread_resume): New type.
15025 (struct target_ops): Change argument of "resume" to struct
15026 thread_resume *.
15027 (myresume): Delete macro.
15028
c938e9b0
L
150292003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15030
15031 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15032 (uninstall): Support DESTDIR.
15033
7f313d07
BC
15034Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15035
15036 * configure.srv: Add xscale*linux copy of arm*linux entry.
15037
3b2fc2ea
DJ
150382003-07-24 Daniel Jacobowitz <drow@mvista.com>
15039
15040 * linux-arm-low.c (arm_reinsert_addr): New function.
15041 (the_low_target): Add arm_reinsert_addr.
15042
1c0a559e
MK
150432003-07-08 Mark Kettenis <kettenis@gnu.org>
15044
15045 * mem-break.c: Remove whitespace at end of file.
15046
43d5792c
DJ
150472003-06-28 Daniel Jacobowitz <drow@mvista.com>
15048
15049 * configure.in: Check whether we need to prototype strerror.
15050 * server.h: Optionally prototype strerror.
15051 * gdbreplay.c (perror_with_name): Use strerror.
15052 * linux-low.c (linux_attach_lwp): Use strerror.
15053 * utils.c (perror_with_name): Use strerror.
15054 * config.in, configure: Regenerated.
15055
c8a86edf
DJ
150562003-06-28 Daniel Jacobowitz <drow@mvista.com>
15057
15058 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15059 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15060
73d37363
DJ
150612003-06-20 Daniel Jacobowitz <drow@mvista.com>
15062
15063 * Makefile.in (SFILES): Update.
15064 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15065 low-sun3.c: Remove files.
15066
6ad8ae5c
DJ
150672003-06-17 Daniel Jacobowitz <drow@mvista.com>
15068
15069 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15070 (linux_detach_one_process, linux_detach): New functions.
15071 (linux_target_ops): Add linux_detach.
15072 * server.c (main): Handle 'D' packet.
15073 * target.h (struct target_ops): Add "detach" member.
15074 (detach_inferior): Define.
15075
1581182a
MK
150762003-06-13 Mark Kettenis <kettenis@gnu.org>
15077
15078 From Kelley Cook <kelleycook@wideopenwest.com>:
15079 * configure.srv: Accept i[34567]86 variants.
15080
e5379b03
DJ
150812003-06-05 Daniel Jacobowitz <drow@mvista.com>
15082
15083 * linux-low.c (linux_wait_for_event): Correct comment typos.
15084 (linux_resume_one_process): Call check_removed_breakpoint.
15085 (linux_send_signal): New function.
15086 (linux_target_ops): Add linux_send_signal.
15087 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15088 of kill.
15089 * target.h (struct target_ops): Add send_signal.
15090
2ff29de4
JB
150912003-05-29 Jim Blandy <jimb@redhat.com>
15092
15093 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15094 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15095 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15096 away part of the register's value.
15097
254787d4
DJ
150982003-03-26 Daniel Jacobowitz <drow@mvista.com>
15099
15100 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15101 (linux_wait_for_event, linux_init_signals): Likewise.
15102
94e10508
DJ
151032003-03-17 Daniel Jacobowitz <drow@mvista.com>
15104
15105 * configure.in: Check for stdlib.h.
15106 * configure: Regenerated.
15107 * config.in: Regenerated.
15108
4c0711e0
DJ
151092003-01-04 Andreas Schwab <schwab@suse.de>
15110
15111 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15112
ef66e766
AC
151132003-01-02 Andrew Cagney <ac131313@redhat.com>
15114
15115 * Makefile.in: Remove obsolete code.
15116
a1358604
DJ
151172002-11-20 Daniel Jacobowitz <drow@mvista.com>
15118
15119 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15120 defined(PT_FPR0_HI).
15121
23ce3b1c
DJ
151222002-11-17 Stuart Hughes <seh@zee2.com>
15123
15124 * linux-arm-low.c (arm_num_regs): Increase.
15125 (arm_regmap): Include status register.
15126
151272002-11-17 Daniel Jacobowitz <drow@mvista.com>
15128
15129 * linux-low.c (register_addr): Remove incorrect -1 check.
15130
a9fa9f7d
DJ
151312002-08-29 Daniel Jacobowitz <drow@mvista.com>
15132
15133 * linux-low.c (linux_create_inferior): Call setpgid. Return
15134 the new PID.
15135 (unstopped_p, linux_signal_pid): Remove.
15136 (linux_target_ops): Remove linux_signal_pid.
15137 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15138 global instead of target method.
15139 * target.h (struct target_ops): Remove signal_pid. Update comment
15140 for create_inferior.
15141 * server.c (signal_pid): New variable.
15142 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15143 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15144 (attach_inferior): Set signal_pid.
15145
17574093
DJ
151462002-08-23 Daniel Jacobowitz <drow@mvista.com>
15147
15148 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15149
151502002-08-20 Jim Blandy <jimb@redhat.com>
15151
15152 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15153 default for this.
15154
151552002-08-01 Andrew Cagney <cagney@redhat.com>
15156
15157 * Makefile.in: Make chill references obsolete.
15158
151592002-07-24 Kevin Buettner <kevinb@redhat.com>
15160
15161 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15162 * configure: Regenerate.
15163 * config.in: Regenerate.
15164
151652002-07-09 David O'Brien <obrien@FreeBSD.org>
15166
15167 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15168 (perror_with_name, remote_close, remote_open, expect, play): Static.
15169
151702002-07-04 Michal Ludvig <mludvig@suse.cz>
15171
4b8dad4a 15172 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15173 byte offsets instead of an array of indexes.
15174 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15175
151762002-06-13 Daniel Jacobowitz <drow@mvista.com>
15177
15178 * regcache.c: Add comment.
15179
151802002-06-11 Daniel Jacobowitz <drow@mvista.com>
15181
15182 * thread-db.c: New file.
15183 * proc-service.c: New file.
15184 * acinclude.m4: New file.
15185 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15186 proc-service.o, and thread-db.o.
15187 (linux-low.o): Add USE_THREAD_DB.
15188 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15189 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15190 * aclocal.m4: Regenerated.
15191 * config.in: Regenerated.
15192 * configure: Regenerated.
15193 * configure.in: Check for proc_service.h, sys/procfs.h,
15194 thread_db.h, and linux/elf.h headrs.
15195 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15196 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15197 Check for -lthread_db and thread support.
15198 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15199 PowerPC, and SuperH.
15200 * i387-fp.c: Constify arguments.
15201 * i387-fp.h: Likewise.
15202 * inferiors.c: (struct thread_info): Renamed from
15203 `struct inferior_info'. Remove PID member. Use generic inferior
15204 list header. All uses updated.
15205 (inferiors, signal_pid): Removed.
15206 (all_threads): New variable.
15207 (get_thread): Define.
15208 (add_inferior_to_list): New function.
15209 (for_each_inferior): New function.
15210 (change_inferior_id): New function.
15211 (add_inferior): Removed.
15212 (remove_inferior): New function.
15213 (add_thread): New function.
15214 (free_one_thread): New function.
15215 (remove_thread): New function.
15216 (clear_inferiors): Use for_each_inferior and free_one_thread.
15217 (find_inferior): New function.
15218 (find_inferior_id): New function.
15219 (inferior_target_data): Update argument type.
15220 (set_inferior_target_data): Likewise.
15221 (inferior_regcache_data): Likewise.
15222 (set_inferior_regcache_data): Likewise.
15223 * linux-low.c (linux_bp_reinsert): Remove.
15224 (all_processes, stopping_threads, using_thrads)
15225 (struct pending_signals, debug_threads, pid_of): New.
15226 (inferior_pid): Replace with macro.
15227 (struct inferior_linux_data): Remove.
15228 (get_stop_pc, add_process): New functions.
15229 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15230 Use add_process and add_thread.
15231 (linux_attach_lwp): New function, based on old linux_attach. Use
15232 add_process and add_thread. Set stop_expected for new threads.
15233 (linux_attach): New function.
15234 (linux_kill_one_process): New function.
15235 (linux_kill): Kill all LWPs.
15236 (linux_thread_alive): Use find_inferior_id.
15237 (check_removed_breakpoints, status_pending_p): New functions.
15238 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15239 Update. Use WNOHANG. Wait for cloned processes also. Update process
15240 struct for the found process.
15241 (linux_wait_for_event): New function.
15242 (linux_wait): Use it. Support LWPs.
15243 (send_sigstop, wait_for_sigstop, stop_all_processes)
15244 (linux_resume_one_process, linux_continue_one_process): New functions.
15245 (linux_resume): Support LWPs.
15246 (REGISTER_RAW_SIZE): Remove.
15247 (fetch_register): Use register_size instead. Call supply_register.
15248 (usr_store_inferior_registers): Likewise. Call collect_register.
15249 Fix recursive case.
15250 (regsets_fetch_inferior_registers): Improve error message.
15251 (regsets_store_inferior_registers): Add debugging.
15252 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15253 (unstopped_p, linux_signal_pid): New functions.
15254 (linux_target_ops): Add linux_signal_pid.
15255 (linux_init_signals): New function.
15256 (initialize_low): Call it. Initialize using_threads.
15257 * regcache.c (inferior_regcache_data): Add valid
15258 flag.
15259 (get_regcache): Fetch registers lazily. Add fetch argument
15260 and update all callers.
15261 (regcache_invalidate_one, regcache_invalidate): New
15262 functions.
15263 (new_register_cache): Renamed from create_register_cache.
15264 Return the new regcache.
15265 (free_register_cache): Change argument to a void *.
15266 (registers_to_string, registers_from_string): Call get_regcache
15267 with fetch flag set.
15268 (register_data): Make static. Pass fetch flag to get_regcache.
15269 (supply_register): Call get_regcache with fetch flag clear.
15270 (collect_register): Call get_regcache with fetch flag set.
15271 (collect_register_as_string): New function.
15272 * regcache.h: Update.
15273 * remote-utils.c (putpkt): Flush after debug output and use
15274 stderr.
15275 Handle input interrupts while waiting for an ACK.
15276 (input_interrupt): Use signal_pid method.
15277 (getpkt): Flush after debug output and use stderr.
15278 (outreg): Use collect_register_as_string.
15279 (new_thread_notify, dead_thread_notify): New functions.
15280 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15281 and general_thread.
15282 (look_up_one_symbol): Flush after debug output.
15283 * server.c (step_thread, server_waiting): New variables.
15284 (start_inferior): Don't use signal_pid. Update call to mywait.
15285 (attach_inferior): Update call to mywait.
15286 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15287 (main): Don't fetch/store registers explicitly. Use
15288 set_desired_inferior. Support proposed ``Hs'' packet. Update
15289 calls to mywait.
15290 * server.h: Update.
15291 (struct inferior_list, struct_inferior_list_entry): New.
15292 * target.c (set_desired_inferior): New.
15293 (write_inferior_memory): Constify.
15294 (mywait): New function.
15295 * target.h: Update.
15296 (struct target_ops): New signal_pid method.
15297 (mywait): Removed macro, added prototype.
15298
15299 * linux-low.h (regset_func): Removed.
15300 (regset_fill_func, regset_store_func): New.
15301 (enum regset_type): New.
15302 (struct regset_info): Add type field. Use new operation types.
15303 (struct linux_target_ops): stop_pc renamed to get_pc.
15304 Add decr_pc_after_break and breakpoint_at.
15305 (get_process, get_thread_proess, get_process_thread)
15306 (strut process_info, all_processes, linux_attach_lwp)
15307 (thread_db_init): New.
15308
15309 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15310 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15311 (the_low_target): Add new members.
15312 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15313 (i386_store_fpxregset): Constify.
15314 (target_regsets): Add new kind identifier.
15315 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15316 (i386_set_pc): Add debugging.
15317 (i386_breakpoint_at): New function.
15318 (the_low_target): Add new members.
15319 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15320 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15321 (mips_breakpoint_at): New.
15322 (the_low_target): Add new members.
15323 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15324 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15325 (the_low_target): Add new members.
15326 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15327 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15328 (the_low_target): Add new members.
15329 * linux-x86-64-low.c (target_regsets): Add new kind
15330 identifier.
15331
153322002-05-15 Daniel Jacobowitz <drow@mvista.com>
15333
15334 From Martin Pool <mbp@samba.org>:
15335 * server.c (gdbserver_usage): New function.
15336 (main): Call it.
15337
153382002-05-14 Daniel Jacobowitz <drow@mvista.com>
15339
15340 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15341 stop_at -> stop_pc.
15342
153432002-05-04 Andrew Cagney <ac131313@redhat.com>
15344
15345 * Makefile.in: Remove obsolete code.
15346
153472002-04-24 Michal Ludvig <mludvig@suse.cz>
15348
15349 * linux-low.c (regsets_fetch_inferior_registers),
15350 (regsets_store_inferior_registers): Removed cast to int from
15351 ptrace() calls.
15352 * regcache.h: Added declaration of struct inferior_info.
15353
153542002-04-20 Daniel Jacobowitz <drow@mvista.com>
15355
15356 * inferiors.c (struct inferior_info): Add regcache_data.
15357 (add_inferior): Call create_register_cache.
15358 (clear_inferiors): Call free_register_cache.
15359 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15360 * regcache.c (struct inferior_regcache_data): New.
15361 (registers): Remove.
15362 (get_regcache): New function.
15363 (create_register_cache, free_register_cache): New functions.
15364 (set_register_cache): Don't initialize the register cache here.
15365 (registers_to_string, registers_from_string, register_data): Call
15366 get_regcache.
15367 * regcache.h: Add prototypes.
15368 * server.h: Likewise.
15369
153702002-04-20 Daniel Jacobowitz <drow@mvista.com>
15371
15372 * mem-break.c: New file.
15373 * mem-break.h: New file.
15374 * Makefile.in: Add mem-break.o rule; update server.h
15375 dependencies.
15376 * inferiors.c (struct inferior_info): Add target_data
15377 member.
15378 (clear_inferiors): Free target_data member if set.
15379 (inferior_target_data, set_inferior_target_data): New functions.
15380 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15381 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15382 * linux-low.c (linux_bp_reinsert): New variable.
15383 (struct inferior_linux_data): New.
15384 (linux_create_inferior): Use set_inferior_target_data.
15385 (linux_attach): Likewise. Call add_inferior.
15386 (linux_wait_for_one_inferior): New function.
15387 (linux_wait): Call it.
15388 (linux_write_memory): Add const.
15389 (initialize_low): Call set_breakpoint_data.
15390 * linux-low.h (struct linux_target_ops): Add breakpoint
15391 handling members.
15392 * server.c (attach_inferior): Remove extra add_inferior
15393 call.
15394 * server.h: Include mem-break.h. Update inferior.c
15395 prototypes.
15396 * target.c (read_inferior_memory)
15397 (write_inferior_memory): New functions.
15398 * target.h (read_inferior_memory)
15399 (write_inferior_memory): Change macros to prototypes.
15400 (struct target_ops): Update comments. Add const to write_memory
15401 definition.
15402
154032002-04-11 Daniel Jacobowitz <drow@mvista.com>
15404
15405 * linux-low.c (usr_store_inferior_registers): Support
15406 registers which are allowed to fail to store.
15407 * linux-low.h (linux_target_ops): Likewise.
15408 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15409 (ppc_cannot_store_register): FPSCR may not be storable.
15410
154112002-04-09 Daniel Jacobowitz <drow@mvista.com>
15412
15413 * server.h: Include <string.h> if HAVE_STRING_H.
15414 * ChangeLog: Correct paths in last ChangeLog entry.
15415
154162002-04-09 Daniel Jacobowitz <drow@mvista.com>
15417
15418 * linux-low.h: Remove obsolete prototypes.
15419 (struct linux_target_ops): New.
15420 (extern the_low_target): New.
15421 * linux-low.c (num_regs, regmap): Remove declarations.
15422 (register_addr): Use the_low_target explicitly.
15423 (fetch_register): Likewise.
15424 (usr_fetch_inferior_registers): Likewise.
15425 (usr_store_inferior_registers): Likewise.
15426 * linux-arm-low.c (num_regs): Remove.
15427 (arm_num_regs): Define.
15428 (arm_regmap): Renamed from regmap, made static.
15429 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15430 made static.
15431 (arm_cannot_store_register): Renamed from cannot_store_register,
15432 made static.
15433 (the_low_target): New.
15434 * linux-i386-low.c (num_regs): Remove.
15435 (i386_num_regs): Define.
15436 (i386_regmap): Renamed from regmap, made static.
15437 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15438 made static.
15439 (i386_cannot_store_register): Renamed from cannot_store_register,
15440 made static.
15441 (the_low_target): New.
15442 * linux-ia64-low.c (num_regs): Remove.
15443 (ia64_num_regs): Define.
15444 (ia64_regmap): Renamed from regmap, made static.
15445 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15446 made static.
15447 (ia64_cannot_store_register): Renamed from cannot_store_register,
15448 made static.
15449 (the_low_target): New.
15450 * linux-m68k-low.c (num_regs): Remove.
15451 (m68k_num_regs): Define.
15452 (m68k_regmap): Renamed from regmap, made static.
15453 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15454 made static.
15455 (m68k_cannot_store_register): Renamed from cannot_store_register,
15456 made static.
15457 (the_low_target): New.
15458 * linux-mips-low.c (num_regs): Remove.
15459 (mips_num_regs): Define.
15460 (mips_regmap): Renamed from regmap, made static.
15461 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15462 made static.
15463 (mips_cannot_store_register): Renamed from cannot_store_register,
15464 made static.
15465 (the_low_target): New.
15466 * linux-ppc-low.c (num_regs): Remove.
15467 (ppc_num_regs): Define.
15468 (ppc_regmap): Renamed from regmap, made static.
15469 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15470 made static.
15471 (ppc_cannot_store_register): Renamed from cannot_store_register,
15472 made static.
15473 (the_low_target): New.
15474 * linux-s390-low.c (num_regs): Remove.
15475 (s390_num_regs): Define.
15476 (s390_regmap): Renamed from regmap, made static.
15477 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15478 made static.
15479 (s390_cannot_store_register): Renamed from cannot_store_register,
15480 made static.
15481 (the_low_target): New.
15482 * linux-sh-low.c (num_regs): Remove.
15483 (sh_num_regs): Define.
15484 (sh_regmap): Renamed from regmap, made static.
15485 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15486 made static.
15487 (sh_cannot_store_register): Renamed from cannot_store_register,
15488 made static.
15489 (the_low_target): New.
15490 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15491 (the_low_target): New.
15492
154932002-04-09 Daniel Jacobowitz <drow@mvista.com>
15494
15495 * Makefile.in: Add stamp-h target.
15496 * configure.in: Create stamp-h.
15497 * configure: Regenerated.
15498
154992002-04-09 Daniel Jacobowitz <drow@mvista.com>
15500
15501 * inferiors.c: New file.
15502 * target.c: New file.
15503 * target.h: New file.
15504 * Makefile.in: Add target.o and inferiors.o. Update
15505 dependencies.
15506 * linux-low.c (inferior_pid): New static variable,
15507 moved from server.c.
15508 (linux_create_inferior): Renamed from create_inferior.
15509 Call add_inferior. Return 0 on success instead of a PID.
15510 (linux_attach): Renamed from myattach.
15511 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15512 (linux_thread_alive): Renamed from mythread_alive.
15513 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15514 child dies.
15515 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15516 (regsets_store_inferior_registers): Correct error message.
15517 Add missing ``return 0''.
15518 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15519 (linux_store_registers): Renamed from store_inferior_registers.
15520 (linux_read_memory): Renamed from read_inferior_memory.
15521 (linux_write_memory): Renamed from write_inferior_memory.
15522 (linux_target_ops): New structure.
15523 (initialize_low): Call set_target_ops ().
15524 * remote-utils.c (unhexify): New function.
15525 (hexify): New function.
15526 (input_interrupt): Send signals to ``signal_pid''.
15527 * server.c (inferior_pid): Remove.
15528 (start_inferior): Update create_inferior call.
15529 (attach_inferior): Call add_inferior.
15530 (handle_query): New function.
15531 (main): Call handle_query for `q' packets.
15532 * server.h: Include "target.h". Remove obsolete prototypes.
15533 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15534
155352002-04-09 Daniel Jacobowitz <drow@mvista.com>
15536
15537 * Makefile.in: Add WARN_CFLAGS. Update configury
15538 dependencies.
15539 * configure.in: Check for <string.h>
15540 * configure: Regenerate.
15541 * config.in: Regenerate.
15542 * gdbreplay.c: Include needed system headers.
15543 (remote_open): Remove strchr prototype.
15544 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15545 * regcache.c (supply_register): Change buf argument to const void *.
15546 (supply_register_by_name): Likewise.
15547 (collect_register): Change buf argument to void *.
15548 (collect_register_by_name): Likewise.
15549 * regcache.h: Add missing prototypes.
15550 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15551 * server.c (handle_query): New function.
15552 (attached): New static variable, moved out of main.
15553 (main): Quiet longjmp clobber warnings.
15554 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15555 * utils.c (error): Remove NORETURN.
15556 (fatal): Likewise.